Skip to contentSkip to conversation

Detection of boot devices by a linux kernel

DISCUSSION adrian15 1 participant 1 message Jun 15, 2007

lore
Share & tools
lore

adrian15

author
#0 lore raw
	First question:
	=================
	
	Once a Kernel has booted can request the bios the different boot

devices and try to open them with a bios-disk driver or whatever the name is?

	Current problems:
	====================	

	I do not know what's the live cd / non-live cd installer algorithm for

detecting which grub device corresponds to which linux device.
There's a man in hardwareguys.com which gets some strange results. He
installing Linux in his 4th drive and as long as it is detected as /dev/sdg then the linux assign it: hd6 . :)

http://forums.hardwareguys.com/ikonboard.cgi?act=ST;f=21;t=5731;&#top

	Probable solution:
	=====================
	If the answer for the first question is that NO here there is my

solution to problem.

We should make a command that iterates all the hard disks boot devices
and looks for the uuid from the hard disks. Once it has done so it saves the result into a variable.

	Then we can boot a kernel and pass this variable as a parametrer.

	Example:
	==========

	grub> set
	prefix=(cd)/boot/grub/
	root=(cd)
	grub> detectboot -s biosdevices
	grub> set
	root=(cd)
	biosdevices=hd0|ffkei|hd1|ereok|hd2|er455
	grub> linux /boot/knoppix-6.0-kernel root=/dev/ram grubdevices=$biosdevices
	grub> initrd /boot/knoppix-6.0-initrd
	grub> boot

	Then thanks to the "grubdevices=hd0|ffkei|hd1|ereok|hd2|er455" string

found in /proc/cmdline the knoppix boot scripts can check the uuid for each detected hard disk and generate a valid devices.map file.

Any comments on this?

adrian15