Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] no /dev/disk/by-uuid in initramfs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
pll
n00b
n00b


Joined: 16 Dec 2011
Posts: 19

PostPosted: Wed Aug 01, 2012 12:09 pm    Post subject: [SOLVED] no /dev/disk/by-uuid in initramfs Reply with quote

My root partition is not on the same drive as the bootloader and kernel. I'm trying to mount root by uuid within an initramfs (I need the initramfs for other things) but /dev/disk/by-uuid does not exist. Manually running blkid does list devices and their uuid's, I suppose I could hack something together with that.

I was just wondering if I could get some help with how /dev/disk/by-uuid gets populated. I've tried mounting devtmpfs and running mdev -s but neither do the trick, though they do bring up /dev/sdb sdc etc..

Thanks for any help.
_________________
Peace, love, linux


Last edited by pll on Wed Aug 01, 2012 1:51 pm; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9679
Location: almost Mile High in the USA

PostPosted: Wed Aug 01, 2012 1:45 pm    Post subject: Reply with quote

You could try installing udev into initramfs. Udev creates the uuid directories.

mdev is a miniature udev, which doesn't fully populate /dev.

Could you do it without the uuid directories? I think you should just hack it - Translate uuid to /dev/xxx with the help of blkid...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
pll
n00b
n00b


Joined: 16 Dec 2011
Posts: 19

PostPosted: Wed Aug 01, 2012 1:50 pm    Post subject: Reply with quote

I see. I suppose it's not worth installing udev in it's entirety.

I just had a look at blkid's man pages it turns out you can simply do
Code:
$ blkid -U <uuid>

and it returns
"/dev/sdb1" or whatever so no fancy regex needed.

Thanks for the help eccerr0r ^_^
_________________
Peace, love, linux
Back to top
View user's profile Send private message
SlashBeast
Retired Dev
Retired Dev


Joined: 23 May 2006
Posts: 2922

PostPosted: Wed Aug 01, 2012 5:54 pm    Post subject: Reply with quote

You can also use findfs, here you have resolve_device function, under BSD license: https://github.com/slashbeast/better-initramfs/blob/master/sourceroot/functions.sh#L48
Supports LABEL= and UUID=.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum