@ -58,10 +58,12 @@ echo "" > /proc/sys/kernel/hotplug
if [ -n "${real_root}" ] ; then
rootfs=${real_root}
else
while read dev mntpoint fstype options fsck1 fsck2 ; do
[ "${mntpoint}" == "/" ] && rootfs=${dev}
[ -n "${rootfs}" ] && break
done < /etc/fstab
if [ -f /etc/fstab ] ; then
fi
echo "loading kernel modules"
@ -5,6 +5,9 @@ rm -rf $disksdir/initrd
mkdir -p $disksdir/initrd/{dev,proc,sys,tmp,scsi,net,bin,etc,lib}
cd $disksdir/initrd; ln -s bin sbin; ln -s . usr
# make mount not complain
touch etc/fstab
rock_targetdir="$base/target/$target/"
rock_target="$target"
@ -258,11 +258,13 @@ getcdromdevice () { # {{{
load_ramdisk_file() { # {{{
devicetype=${1}
autoboot=${2}
mountopts=""
echo -en "Select a device for loading the 2nd stage system from: \n\n"
if [ "${devicetype}" == "cdroms" ] ; then
getcdromdevice 1 1 ${autoboot} || return
mountopts="-o ro"
getdevice || return
@ -300,7 +302,7 @@ EOF
exit_linuxrc=0
if ! mount ${devicefile} "/mnt_source" ; then
if ! mount ${mountopts} ${devicefile} "/mnt_source" ; then
echo "Can't mount /mnt_source"