#!/bin/busybox sh FindCD(){ CDROM="" for x in hda hdb hdc hdd sda sdb sdc sdd sr0; do mount -t iso9660 -r /dev/$x /cdrom > /dev/null 2>&1 if [ "$?" = "0" ]; then echo " Press 'b' for initramfs shell" read -n1 -t 1 b if [ "$b" = "b" ]; then echo "Use 'busybox --help' to view available commands." sh fi id=`find /cdrom/ -name source.img` if [ "$id" = "/cdrom/source.img" ]; then break else umount /dev/$x FindCD fi fi done } mkdir cdrom new FindCD CDROM=$x if [ "$CDROM" == "" ]; then mkdir proc mount -t proc none /proc echo " This LiveCD didnt feel like booting!" echo " Please paste the output that follows to http://bugs.linuxfly.net" echo "" /sbin/lspci -i /bin/pci.ids sh fi mount -t squashfs -o loop /cdrom/source.img /new > /dev/null 2>&1 mount -t tmpfs -o size=8m none /new/etc > /dev/null 2>&1 mount -t tmpfs -o size=32m none /new/home > /dev/null 2>&1 mount -t tmpfs -o size=4m none /new/mnt > /dev/null 2>&1 mount -t tmpfs -o size=8m none /new/root > /dev/null 2>&1 mount -t tmpfs -o size=64m none /new/tmp > /dev/null 2>&1 mount -t tmpfs -o size=32m none /new/var > /dev/null 2>&1 cd /new/etc && tar xpf /cdrom/etc.tar.gz > /dev/null 2>&1 cd /new/home && tar xpf /cdrom/home.tar.gz > /dev/null 2>&1 cd /new/mnt && tar xpf /cdrom/mnt.tar.gz > /dev/null 2>&1 cd /new/root && tar xpf /cdrom/root.tar.gz > /dev/null 2>&1 cd /new/var && tar xpf /cdrom/var.tar.gz > /dev/null 2>&1 cd /new mount --move . / exec chroot . /sbin/init