All pastes #483571 Raw Edit

Something

public text v1 · immutable
·published 2007-05-11 19:58 UTC
rendered paste body
#!/bin/sh

echo "*** Preparando discos e iniciando sistema"
touch /etc/fstab
#echo -n proc
mount -t proc none /proc
#echo .
#echo -n sysfs
#mount -t sysfs none /sys
#echo .
#echo -n devpts
#mount -t devpts none /dev/pts
#echo .

echo "*** Verificando sistema de arquivos"
fsck.vfat -a /dev/hda1

echo "*** Montando particoes"
mount -t vfat /dev/hda1 /mnt/harddisk

# Swap file
if [ ! -f /mnt/harddisk/swapfile ]; then
        echo "*** Criando arquivo swap"
        dd if=/dev/zero of=/mnt/harddisk/swapfile bs=1M count=384
        mkswap /mnt/harddisk/swapfile
fi;

swapon /mnt/harddisk/swapfile

mount -t squashfs /mnt/harddisk/system /mnt/system

test -d /mnt/harddisk/root || mkdir -p /mnt/harddisk/root

mount -t unionfs -o dirs=/mnt/harddisk/root=rw:/mnt/system=ro unionfs /new_root


[ "$(grep debug /proc/cmdline)" ] && /bin/sh

cd /new_root

pivot_root . boot 


/bin/echo '-> Executando sistema'
exec sbin/chroot . /sbin/init </dev/console >/dev/console 2>&1