Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Kernel: V3.6.10
Motherboard: P8Z77-V LX
Processor: i7-3774
HDDs:
IDE-HDD connected via JMicron IDE controller. The boot partition, the root partition, grub, and the kernel are on this drive.
USB-HDD containing data
Problem:
If the USB-HDD is connected, the kernel assignes the device sda to it. The kernel fails mount the root partition which expects it on the IDE-HDD as sda. If the USB-HDD is not connected, the IDE-HDD becomes sda, and the kernel boots allright.
Question:
How can I fix of the drive assignements ?
The USB-HDD is not always connected, and the kernel should in both cases.
This issue is known and has two workarounds.
1. Use the UUIDs of the partitions in your bootloader configuartion and the /etc/fstab file.
2. The same, only with labels instead of UUIDs.
You can find the UUIDs of your partitions with the blkid command.
The issue is not resolved
1) I added the UUIDs to /etc/fstab. Once the kernel has come up, it is able to mount the partitions by UUID
2) grub (legacy) seems not to be able to forward the root partition to the kernel. I changed menu.lst (config file for grub) to
root (hd0,0)
kernel /boot/bzImage.3_6_10 root=UUID=31ce....
Do you use an initrd? The kernel is not able to handle UUIDs by itself, so an initrd to translate UUIDs to actual partitions is mandatory.
Well, having googled in the meanwhile, I was sort of expecting that question -- No, I do not use an initrd. It is years ago, that I created my last initramfs -- are there some images readily available that I could just download ? I guess the distribution that is to be boot up after the kernel does not really matter....
The initrd has to be setup especially for your system, so you can't just download one.
Usually distros come with their own set of tools to create initrds, so we need to know which distro you use to give you a hint about that.
Been a while since I built a gentoo system, but initrd is (to me) anathema in such a build.
A quick search of the wiki shows grub2 as masked - install that instead, it supports UUID natively without the need of initrd setup code.
I upgraded to grub2 and tried using the parameter "root=UUID=...".
This seems not to work either even though there are many google reference that claim it should. I get a kernel message indicating the VFS could not be mounted. Supposedly the UUID is passed as kernel argument to the kernel and the kernel does not parse it properly. Gtub probably does not process the root=UUID flag directly and maüs it to an sdx -- at least, this is what I understand after reading about grub2 on the web.
a) Is there a flag in the kernel config that I need to enable to make the kernel parse a parameter in the format "root=UUID=.." ?
b) grub2 seems to offer at least 2 modes for generation of its config files: (a) generation by grub-mkconfig and (b) manually writting or adapting /boot/grub2/grub.conf. Can the UUID be given as input to the generation process of the config files ? The input for the generation is in /etc/default/grub -- if the UUID can be passed as input, I would expect it to go into this file.
Gtub probably does not process the root=UUID flag directly and maüs it to an sdx -- at least, this is what I understand after reading about grub2 on the web.
Of course not. How should Grub know in which order the kernel will see the devices?
Quote:
a) Is there a flag in the kernel config that I need to enable to make the kernel parse a parameter in the format "root=UUID=.." ?
No. As stated earlier already, you need an initrd, the mapping will be done by the programs in it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.