Re: initrd hacking [was: booting with grub to /dev/sda]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2005-01-05 at 21:43 -0700, Jim Cromie wrote:

> Ive already hacked it - indirectly - by hacking mkinitrd (a shell script)
> - I turned off the setquiet in hope that it would tell me where the bug 
> was :-(
> 
> here it is:#!/bin/nash
> 
> mount -t proc /proc /proc
> echo Mounted /proc filesystem
> echo Mounting sysfs
> mount -t sysfs none /sys
> echo Creating /dev
> mount -o mode=0755 -t tmpfs none /dev
> mknod /dev/console c 5 1
> mknod /dev/null c 1 3
> mknod /dev/zero c 1 5
> mkdir /dev/pts
> mkdir /dev/shm
> echo Starting udev
> /sbin/udevstart
> echo -n "/sbin/hotplug" > /proc/sys/kernel/hotplug
> echo "Loading jbd.ko module"
> insmod /lib/jbd.ko
> echo "Loading ext3.ko module"
> insmod /lib/ext3.ko
> echo "Loading scsi_mod.ko module"
> insmod /lib/scsi_mod.ko
> echo "Loading usb-storage.ko module"
> insmod /lib/usb-storage.ko
> sleep 5
> /sbin/udevstart
> echo Creating root device
> mkrootdev /dev/root
> umount /sys
> echo Mounting root filesystem
> mount -o defaults --ro -t ext3 /dev/root /sysroot
> mount -t tmpfs --bind /dev /sysroot/dev
> echo Switching to new root
> switchroot /sysroot
> umount /initrd/dev
> 
> I stalled out after looking for nash docs explaining what
> "mkrootdev /dev/root" actually does.
> it would make sense if its whatever is on kernel-command line,
> ie root=/dev/sda1 in my case.
> 
> Id welcome other suggestions.

One thing I noticed... you load the SCSI modules prior to loading USB
support. That seems backwards to me. I would have also thought that you
need sd_mod.ko. Your boot log should show the SCSI sub-system detecting
a disk drive and assigning a device name to it.

-- 
C. Linus Hicks <lhicks at nc dot rr dot com>


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux