#!/bin/busybox sh B=/bin/busybox export PATH=/bin:/sbin:/usr/bin:/usr/sbin $B mount -t proc proc /proc $B mount -t sysfs sysfs /sys $B mount -t devtmpfs devtmpfs /dev 2>/dev/null || $B mdev -s $B echo "initramfs: loading block drivers" $B insmod /modules/scsi_mod.ko $B insmod /modules/sd_mod.ko $B insmod /modules/scsi_transport_spi.ko $B insmod /modules/sym53c8xx.ko $B insmod /modules/mbcache.ko $B insmod /modules/ext2.ko $B sleep 4 $B mdev -s 2>/dev/null $B mknod /dev/sda b 8 0 2>/dev/null $B mknod /dev/sda1 b 8 1 2>/dev/null $B echo "initramfs: block devices present:" $B ls -l /dev/sd* 2>/dev/null || $B echo " NONE" $B mkdir -p /mnt if $B mount -t ext2 /dev/sda /mnt; then $B echo "initramfs: mounted /dev/sda, switching root" $B mount -t proc proc /mnt/proc 2>/dev/null if $B test -f /mnt/guitest.sh; then exec $B chroot /mnt /guitest.sh; else exec $B chroot /mnt /build.sh; fi else $B echo "initramfs: MOUNT FAILED - dropping to shell" exec $B sh fi