You are not logged in.

#1 2013-10-04 10:34:28

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

udev and UUID

I want to speed up my boot time,
so i've searched our glorious wiki and read these:

1. https://wiki.archlinux.org/index.php/Tw … _boot_time
2. http://blog.falconindy.com/articles/opt … tcpio.html

and make it possible!

I use a LVM2 under LUKS aka lvms2 on luks - but i cant use UUID or any /dev/volume_group/lvm_partiton cause

/dev/disk/by-uuid/xxxx (or any other mapper device)

are being created by rules (/usr/lib/udev/rules.d) of udev.

So ... is it possible to boot up somehow with UUID ?

Thank you in advanced.


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#2 2013-10-04 13:04:22

bjornoslav
Member
Registered: 2011-11-01
Posts: 137

Re: udev and UUID

Of course. Depending on your boot loader, you may add/replace the root=/dev/sdX option with root=UUID=....


asus ux303la, core i5@1.6ghz, 8 gb ram, 500gb hdd, hd4400 gpu, crux x64 with openbox

Offline

#3 2013-10-04 18:02:44

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: udev and UUID

Support thread, moving to Kernel & Hardware...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2013-10-04 19:00:23

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

Re: udev and UUID

@bjornoslav this is actually inaccurate !

Of course you can define your root= or your encrypted device via UUID, but how can your kernel (after UEFI/grub2) can find these ??????

As i said, only udev can run rules (via the hook udev) to run shell scripts and create the /dev/disk/* devices.
So with no udev - you have no /dev/disk/by-uuid/xxxx partition.

@jasonwryan sorry for the wrong topic posting


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#5 2013-10-04 22:13:19

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: udev and UUID

ebal wrote:

Of course you can define your root= or your encrypted device via UUID, but how can your kernel (after UEFI/grub2) can find these ??????

..And this is why initramfs exists. mkinitcpio understands these tags with or without udev. The difference is that when udev is running, something like UUID=037b9d94-148e-4ee4-8d38-67bfe15bb535 is translated to /dev/disk/by-uuid/037b9d94-148e-4ee4-8d38-67bfe15bb535 in order to be able to wait on it to appear. Without udev, you simply query a tool linked to libblkid (e.g. lsblk or blkid) to probe available block devices.

Offline

#6 2013-10-05 07:57:37

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

Re: udev and UUID

@falconidny that's what i did to tested it and boot with UUID, Yes lsblk and blkid are working just fine.

So the bottom line: i have to write a custom hook that does exactly that (translate UUID=xxxx to something like /dev/dm-0)
or i can do it another way ?


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#7 2013-10-05 16:01:27

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: udev and UUID

ebal wrote:

@falconidny that's what i did to tested it and boot with UUID, Yes lsblk and blkid are working just fine.

So the bottom line: i have to write a custom hook that does exactly that (translate UUID=xxxx to something like /dev/dm-0)
or i can do it another way ?

I have no idea what it is you're doing that you think isn't already supported. Hooks which need to resolve tag names to device nodes use resolve_device.

Offline

#8 2013-10-06 09:16:27

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

Re: udev and UUID

@falconindy

hmm thanks for the tip - i'll try that and report back my findings


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

Board footer

Powered by FluxBB