[SOLVED] enable UUID support in kernel [WITHOUT INITRD]
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
i've compiled my kernel 2.6.39.2 along with grub and other useful stuff.
everything works OK , problem is that i can only boot with a device node path in my kernel boot line (i.e /dev/sda*) but i want to boot with a UUID.
apparently the kernel can't detect UUID's at all , after the panic the kernel supposedly lists all available partitions to boot from , the list however shows that all UUID's for the partitions are null (which can only mean the kernel is totally blind to UUID's !!)
okay , now can i fix this?
i've googled and a couple of posts suggested to use a ramdisk as the only solution , which is undesirable , also a simple search in the kernel config options didn't return a result matching 'UUID'
UUIDs (as commonly understood) are an attribute of the filesystem - for the (early) kernel (prior to the mount of the root) to find this requires tools to interrogate the filesystem. For any and all filesystems.
That's what the initrd provides - why it exists.
UUIDs (as commonly understood) are an attribute of the filesystem - for the (early) kernel (prior to the mount of the root) to find this requires tools to interrogate the filesystem. For any and all filesystems.
That's what the initrd provides - why it exists.
Search PARTUUID - you may not like the answer.
Well actually i'm not quite sure if i like the answer.
anyways, i'm now experimenting with labels in the hope it's easier than UUID's (trying to get around ramdisks at all costs) , i've given the root partition a label and root in the boot line is "root=LABEL=mylabel" , didn't work though ...don't tell me that labels aren't supported natively in the kernel too?
Why do you want to use UUIDs or LABELs, yet do not want to use an initrd?
because nothing else works ...at least not reliably , device nodes keep changing depending on whether i'm booting in bochs where the rootfs is /dev/sda and on the real thing where it's /dev/sdc (btw i'm using a USB stick).
quick update , labels didn't work either ...arrgg
Does anybody if hardware IDs work without initramfs? because they aren't for me...
i've given the root partition a label and root in the boot line is "root=LABEL=mylabel" , didn't work though ...don't tell me that labels aren't supported natively in the kernel too?
No you didn't - you gave the root filesystem a label. If you can't comprehend the difference you aren't going to get very far. LABEL= fails for the same reason as UUID=.
Quote:
Does anybody if hardware IDs work without initramfs? because they aren't for me...
Show us some evidence you used "hardware IDs" - whatever they choose to be.
because nothing else works ...at least not reliably , device nodes keep changing depending on whether i'm booting in bochs where the rootfs is /dev/sda and on the real thing where it's /dev/sdc (btw i'm using a USB stick).
Have you tried to compile your kernel with only USB support, write grub to the MBR of the stick and set the BIOS boot priority to boot off USB.
If you do it correctly, the USB stick will be /dev/sda every time and the internal HD will not
even be recognized.
If you can't comprehend the difference you aren't going to get very far...
Well how about some respect first , HUH?!
and btw smartass i do comprehend the difference , regarding the labels i've followed the instructions given by the search token you suggested....DOH!
anyways that's -1 rep point for being a pretentious dick who isn't very helpful and misleading too...
have a nice day
Quote:
Originally Posted by andrewthomas;
Have you tried to compile your kernel with only USB support, write grub to the MBR of the stick and set the BIOS boot priority to boot off USB.
If you do it correctly, the USB stick will be /dev/sda every time and the internal HD will not
even be recognized.
sounds like a plan , but unfortunately there is one caveat and that is i'm not planning on giving up on my hdd ,meaning that i plan to mount the hdd once the system has booted from the USB stick , consider it something like a rescue shell or something like that...
btw i've written grub to the MBR...
all i need is get the USB device to be recognized first , in the meantime i'm using to grub menuentries for the 2 scenarious
OK, if you want the USB to be recognized first, then compile support for USB into the kernel (=y), and then compile support for your HDD as a module(=m.)
This way your USB will still get /dev/sda, and then once the modules are loaded your HDD will get /dev/sdb.
I have a similar application except mine's still a SATA drive rather than a USB stick, I've never been able to get UUID or labels to work without initrd either. I just hard code it to boot to /dev/sda and make sure in my BIOS settings that the drive is at the top of the boot-up priority.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.