LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 09-14-2011, 01:21 PM   #1
entz
Member
 
Registered: Mar 2007
Location: Milky Way , Planet Earth!
Distribution: Opensuse
Posts: 453
Blog Entries: 3

Rep: Reputation: 40
enable UUID support in kernel [WITHOUT INITRD]


hi,

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'

help is needed

cheers
 
Old 09-14-2011, 05:59 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
I really do not believe that this is possible.

I have tried, but have never had any success.
 
Old 09-14-2011, 07:25 PM   #3
entz
Member
 
Registered: Mar 2007
Location: Milky Way , Planet Earth!
Distribution: Opensuse
Posts: 453
Blog Entries: 3

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by andrewthomas View Post
I really do not believe that this is possible.

I have tried, but have never had any success.
well that's unfortunate , so what's the next best solution then?
cheers
 
Old 09-14-2011, 07:34 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,103

Rep: Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982
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.
 
Old 09-14-2011, 08:09 PM   #5
entz
Member
 
Registered: Mar 2007
Location: Milky Way , Planet Earth!
Distribution: Opensuse
Posts: 453
Blog Entries: 3

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by syg00 View Post
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?

cheers
 
Old 09-14-2011, 08:20 PM   #6
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
I would think that I will not work for the same reason the UUIDs will not work without an initramfs.

Why do you want to use UUIDs or LABELs, yet do not want to use an initrd?
 
Old 09-14-2011, 08:44 PM   #7
entz
Member
 
Registered: Mar 2007
Location: Milky Way , Planet Earth!
Distribution: Opensuse
Posts: 453
Blog Entries: 3

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by andrewthomas View Post
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...

cheers
 
Old 09-14-2011, 09:05 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,103

Rep: Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982
Quote:
Originally Posted by entz View Post
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.
 
0 members found this post helpful.
Old 09-14-2011, 09:32 PM   #9
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
Quote:
Originally Posted by entz View Post
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.
 
1 members found this post helpful.
Old 09-15-2011, 08:31 AM   #10
entz
Member
 
Registered: Mar 2007
Location: Milky Way , Planet Earth!
Distribution: Opensuse
Posts: 453
Blog Entries: 3

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by syg00 View Post
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

cheers

Last edited by entz; 09-15-2011 at 08:33 AM.
 
Old 09-15-2011, 06:26 PM   #11
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
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.
 
Old 10-19-2011, 08:37 PM   #12
galapogos
Member
 
Registered: May 2008
Posts: 223

Rep: Reputation: 30
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to boot from UUID using initrd kapsule Linux - Software 1 05-02-2011 03:54 AM
can anyone post thier .config for kernel without initrd support kushalkoolwal Debian 5 09-24-2006 07:39 PM
compiling kernel without initrd support kushalkoolwal Debian 22 07-03-2006 08:47 PM
enable nptl support for kernel melinda_sayang Slackware 1 08-12-2004 03:21 AM
initrd support for kernel version 2.4.22 hangover Linux - Newbie 2 12-16-2003 11:49 AM


All times are GMT -5. The time now is 09:37 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration