Booting linux in a multi-disk environment - bootloaders
I am trying to run Linux in a multi-disk environment where disk drives are often either added or removed and where the linux root path may sometimes change when other drives are plugged in.
Say for example I install it with only one drive /dev/sda and partition it as follows: /dev/sda1 - /bootNow when I install a couple of new disk drives I find that the linux disk has become sdc: /dev/sdc1 - /bootAnd linux will not boot until the other disks are removed. This happens even thought the linux disk is first in the BIOS boot order, and regardless of whether the lilo bootloader is written to the MBR or to the superblock of linux root partition. Is there some other way of booting linux which avoids this problem? |
Use UUIDs instead of device descriptors, this should solve your problems. UUIDs are applied when formatting a device and never change (until the next re-format, of course).
You should be able to see the UUIDs for your device descriptors by running Code:
ls -l /dev/disk/by-uuid |
Nevermind - probably no boot-loader support for my suggestion.
|
Tried the uuid solution but still can't get it to boot with multiple disks in the system, errors with:
Code:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,3) |
The question is bad (all boot-loaders allow booting in a properly configured multi-disk environment), but grub2 - not classic grub - has the ability to use UUID natively (i.e. without the need for a patch or initrd/initramfs). Try that.
As an aside, current kernels also recognise UUID for partitions (not filesystems) - this means gpt formatted disks basically. |
Quote:
Will try Grub2. Only thing I don't know is whether I still need to change the partition descriptors in fstab to uuid or not. Edit Just installed grub2, run sg2conf and wrote bootloader to MBR... Still same problem: Code:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,3) |
Is there anything special I need to do to get grub2 to use uuid? I have used sg2conf to configure grub.
|
So we are to presume zenwalk ?.
grub2 should use UUID by default unless the option is disabled. So it depends on the (grub2) default/cfg file, and any wrapper(s) the distro choose to invoke. Perhaps try the grub-mkconfig shipped with the product. |
Discovered by trial and error that CentOS uses grub2 and their implementation actually uses uuids properly.
I have installed CentOS onto a single disk, then added another couple of disks on top and doesn't seem to matter which order the disks are in it boots up fine. I can just choose the bootable drive by reordering the drives in the BIOS disk boot order, same as we have always done with windows drives. Frankly I am surprised, and perhaps just a little disapointed, to have encountered this problem with modern linux distros. Maybe just me but I would have assumed that something this basic would have been sorted out years ago. Anyway for the moment CentOS seems to work. Also it has a 'Virtualization Host' installation package and allows exact package selection/deselection at install time. Never heard of Zenwalk before perhaps I should try that out to compare it to CentOS. Can anyone suggest how they compare, Zenwalk vs CentOS. |
Been poking around the Zenwalk site tyrying to establish which version is most appropriate to provide the workstation virtualization host I am looking for. Then noticed mention of Zenserver has anyone used that before for virtualization?
|
You might want to add the "rootdelay" parameter to the "linux" line. To use it, just type it after the "root" parameter. This parameter gives a several seconds delay (depending on the value that you give in), giving the time for your kernel to detect the hardware.
Syntax: Code:
rootdelay=<seconds> |
All times are GMT -5. The time now is 07:22 AM. |