| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
My original question was essentially "how do I boot if my scsi devices are
constantly being reordered as LUNs are added and taken away?" Thanks to responses
from Will McDonald and Jamie Wellnitz, I've found a workable solution although it
isn't quite perfect just yet.
Basically, what I was shooting for was the right approach: build an initrd that
supports udev properly. Debian's initrd doesn't yet ship with udev support, but
RHEL4/CentOS/Whitebox's do, so a copy from Will was a good start. My version of
its /linuxrc:
#!/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
/sbin/udevstart
umount /sys
echo Mounting root filesystem
mount -o defaults --ro -t reiserfs /dev/lsi1 /sysroot
mount -t tmpfs --bind /dev /sysroot/dev
echo Unmounting /initrd/proc and /initrd/dev
umount /initrd/proc
umount /initrd/dev
echo Switching to new root
pivot_root /sysroot /sysroot/initrd
umount /initrd
exec /sbin/init q <dev/console >dev/console 2>&1
blockdev --flushbufs /dev/ram0
/dev/lsi1 is a symlink created by this udev rule:
BUS="scsi", SYSFS{vendor}="LSILOGIC", NAME="%k", SYMLINK="lsi%n"
Thus, the on-board LSI controller can remain the preferred root device via the
/dev/lsi1 symlink, yet the normal /dev/sdNX device nodes are unaffected. The only
problem here is that my kernel boot command line uses "root=/dev/ram0," so the
root device has to be hard-coded in linuxrc.
The only issue pending is that for some reason I can't get /initrd to umount
sucessfully, so I'm wasting whatever the initrd consumes in memory, so if anyone
has any suggestions there, I'd appreciate it, but it's a small chunk of the 8GB in
these machines, so I'm not too worried about it either.
Thanks,
John
--
John Madden
UNIX Systems Engineer
Ivy Tech Community College of Indiana
jmadden@xxxxxxxxxxx
_______________________________________________
LinuxManagers mailing list - http://www.linuxmanagers.org
submissions: LinuxManagers@xxxxxxxxxxxxxxxxx
subscribe/unsubscribe: http://www.linuxmanagers.org/mailman/listinfo/linuxmanagers
[Home] [Kernel List] [Linux SCSI] [Video 4 Linux] [Linux Admin] [Yosemite News] [Motherboards]