lkml.org 
[lkml]   [2004]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectInitrd Question
Date
I wrote the initrd hint for the Linux from Scratch. I have followed the
initrd.txt exactly to the letter. The problem I have noticed is with one of
the commands, and I checked other mkinitrd scripts and they have the
workaround in it.

According to initrd.txt the echo 0x301 >/proc/sys/kernel/real-root-dev is
for the old change root mechanism, but I have tried to elminate that from my
script and it fails everytime saying it can't find the root, the infamous
Kernel panic: VFS: Unable to mount root fs on xx:xx. Here is my linuxrc
script that is built from my mkinitrd script which can be viewed at
http://cvs.jg555.com/viewcvs.cgi/scripts/system/mkinitrd.

I use busybox for my script so I can keep the size down. My current size is
only 387k.

#!/bin/sh

echo "Initial RAMDISK Loading Starting..."
insmod /lib/megaraid.ko
insmod /lib/aic7xxx.ko
insmod /lib/uhci-hcd.ko
echo "Mounting proc..."
mount -n -t proc none /proc
echo 0x0100 > /proc/sys/kernel/real-root-dev
echo "Mounting real root dev..."
mount -n -o ro /dev/sda2 /new_root
echo "Running pivot_root..."
pivot_root /new_root /new_root/initrd
if [ -c initrd/dev/.devfsd ]
then
echo "Mounting devfs..."
mount -n -t devfs none dev
fi
if [ $$ = 1 ]
then
echo "Running init..."
exec chroot . sbin/init dev/console 2>&1
else
echo "Using bug circumvention for busybox..."
exec chroot . sbin/linuxrc dev/console 2>&1
fi
echo "Initial RAMDISK Loading Completed..."



----
Jim Gifford
maillist@jg555.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.069 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site