#!/bin/sh # # # 19-Nov-04 amo Try simplified linuxrc # # # PATH="/sbin:/bin:/usr/sbin:/usr/bin" # # echo "" echo "Start InitRD" # # CompactFlash and Loop device with the rootFS # CF="/mnt/CF" RootFS="$CF/rootfs.img" # mount -n -t proc none /proc mount -n -o rw,remount /dev/ram0 mount -o rw,remount /dev/ram0 # # mount the compact flash mount -t jfs /dev/hda1 $CF # cat /proc/mounts cat /etc/mtab df # # if [ ! -f "$RootFS" ]; then # echo "linuxrc: ERROR: Cound not find RootFS=$RootFS" echo "" # exit 1 # else # # losetup /dev/loop0 $RootFS # # mount the the real rootFS # mount -o ro,loop $RootFS /mnt/loop0 # # mount -av mount -o ro,loop $RootFS /mnt/loop0 # # df # echo "End of InitRD -- transfer to /sbin/init" # # # tell it that the /dev/loop device is the rootfs # cd # umount /proc # pivot_root /mnt/loop0 /initrd # # tell the kernel the RootFS is already mounted # echo "echo 256 > /proc/sys/kernel/real-root-dev" echo 256 > /proc/sys/kernel/real-root-dev # # umount /initrd/proc # # chroot /mnt/loop0 /linuxrc.loop dev/console 2>&1 chroot /mnt/loop0 /bin/bash # # fi # # # # End of file