You are not logged in.

#1 2015-02-17 22:43:23

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Removing udev from initramfs

Hello,

In falconindy's blog post he explains that udev is not needed for successful booting. I would like to remove udev from initramfs, but am stuck because I use LVM.

I tried the following:

MODULES="sd_mod dm_mod ata_piix ext4"
BINARIES="fsck fsck.ext4"
FILES=""
HOOKS="base"

This however resulted in kernel not being able to find /dev/lvm/root, and I had the same result whatever I tried except specifiing

HOOKS="base udev lvm2"

That hook array defeats the point.

Falconindy has shown that

udevadm info --attribute-walk -n /dev/sda1 | grep 'DRIVERS=="[^"]'

can show you your sata driver, and that's how I got to the sd_mod and ata_piix modules, ext4 is obvious (every partition uses ext4), and as I understand dm_mod is needed for LVM.

I tried figuring out what's missing using break=postmount as kernel commandline. Here's the output from lsmod (I don't have sizes of modules):

ext4          1
crc16         1  ext4
jbd2          1  ext4
mbcache       1  ext4
ehci_pci      0
uas           0
ehci_hcd      1  ehci_pci
usb_storage   1  uas
usbcore       7  uas,usb_storage,ehci_hcd,ehci_pci,usbhid,xhci_hcd,xhci_pci
dm_mod        9
usbhid        0
usb_common    1  usbcore
hidgeneric    0
hid           2  usbhid,hidgeneric
sd_mod        6
ata_generic   0
pata_acpi     0
atkbd         0
libps2        1  atkbd
crc32c_intel  0
pata_via      0
ata_piix      3
xhci_pci      0
xhci_hcd      1  xhci_pci
libata        4  pata_acpi,pata_via,ata_generic,ata_piix
scsi_mod      4  uas,usb_storage,libata,sd_mod
i8042         1  libps2
serio         4  atkbd,i8042

From this list the only module I thought may be missing in initramfs is xhci_pci. Adding that module made no difference.

I also found out that lvm2 hook does:

run_earlyhook() {
    mkdir /run/lvm
    lvmetad
}

run_cleanuphook() {
    kill $(cat /run/lvmetad.pid)
}

But if that was the missing part I would have been able to boot using HOOKS="base lvm2", even so I tried including the hook in FILES array. As expected this gave no results.

Offline

#2 2015-02-21 00:55:51

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: Removing udev from initramfs

Don't bother about this. The systemd hook, which uses udev, will replace the old hooks sooner or later. That means you will also use udev.
https://bbs.archlinux.org/viewtopic.php?id=161080

Offline

#3 2015-02-21 01:37:04

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Removing udev from initramfs

Did you do a sanity check by inspecting your custom and autodetect images with lsinitcpio?

Also, all of the _hci stuff is usb-related. The exception would be ahci which is a SATA controller mode that you don't seem to have enabled (why not?!?).


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#4 2015-02-22 00:10:11

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: Removing udev from initramfs

teateawhy,

That's too bad, as I kind of wanted to play around with a static /dev. I also do not use systemd. Arch has been working great, but this won't stop me from trying. smile

alphaniner,

I didn't know about lsinitcpio. As for ahci, I think that my (really old) SATA drives are set in BIOS in IDE mode and I have never seen any benefit with AHCI whit my drives so I have never bothered switching to AHCI. Though I may be wrong, can't check 'til tomorrow.

Offline

Board footer

Powered by FluxBB