You are not logged in.

#1 2012-04-27 07:39:13

ZeroLinux
Member
Registered: 2011-10-07
Posts: 157

[SOLVED] boot failed after upgrade. some .rules are not found

I have a home server on Arch with all filesystems encrypted
During the update I had error
  -> Parsing hook: [encryptssh]
==> ERROR: file not found: `/lib/udev/rules.d/10-dm.rules'
==> ERROR: file not found: `/lib/udev/rules.d/13-dm-disk.rules'
==> ERROR: file not found: `/lib/udev/rules.d/95-dm-notify.rules'
After reboot I can't access to my root file system anymore. After entering password system doesn't continue booting process. Cursor blinks on the next line.

I used LiveCD, mounted FS under chroot, tried
# mkinitcpio -g /boot/initramfs-linux-fallback.img -S autodetect -k /boot/vmlinuz-linux
and had the same error with the same result .
How to solve the problem?

Last edited by ZeroLinux (2012-04-27 18:39:37)

Offline

#2 2012-04-27 09:59:40

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

Re: [SOLVED] boot failed after upgrade. some .rules are not found

This has nothing to do with udev. The rules, which all belong to core/device-mapper, moved to /usr/lib/udev/rules.d.

Offline

#3 2012-04-27 11:34:48

quantumphaze
Member
From: Melbourne, Australia
Registered: 2008-11-14
Posts: 175

Re: [SOLVED] boot failed after upgrade. some .rules are not found

I have the same problem except with LVM
Also have a missing /lib/initcpio/udev/11-dm-initramfs.rules which is also now in /usr/lib to add to the list.

The question is what should we do about it. How do I tell mkinitcpio to look there? I'm sure that there will be many LVM/RAID users having this problem.

pacman.log:

[2012-04-27 20:07] >>> Updating module dependencies. Please wait ...
[2012-04-27 20:07] >>> Generating initial ramdisk, using mkinitcpio.  Please wait...
[2012-04-27 20:07] ==> Building image from preset: 'default'
[2012-04-27 20:07]   -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
[2012-04-27 20:07] ==> Starting build: 3.3.3-1-ARCH
[2012-04-27 20:07]   -> Parsing hook: [base]
[2012-04-27 20:07]   -> Parsing hook: [udev]
[2012-04-27 20:07]   -> Parsing hook: [autodetect]
[2012-04-27 20:07]   -> Parsing hook: [pata]
[2012-04-27 20:07]   -> Parsing hook: [scsi]
[2012-04-27 20:07]   -> Parsing hook: [sata]
[2012-04-27 20:07]   -> Parsing hook: [lvm2]
[2012-04-27 20:07] ==> ERROR: file not found: `/lib/udev/rules.d/10-dm.rules'
[2012-04-27 20:07] ==> ERROR: file not found: `/lib/udev/rules.d/13-dm-disk.rules'
[2012-04-27 20:07] ==> ERROR: file not found: `/lib/udev/rules.d/95-dm-notify.rules'
[2012-04-27 20:07] ==> ERROR: file not found: `/lib/initcpio/udev/11-dm-initramfs.rules'
[2012-04-27 20:07]   -> Parsing hook: [filesystems]
[2012-04-27 20:07] ==> Generating module dependencies
[2012-04-27 20:07] ==> Creating xz initcpio image: /boot/initramfs-linux.img
[2012-04-27 20:08] ==> Image generation successful
[2012-04-27 20:08] ==> Building image from preset: 'fallback'
[2012-04-27 20:08]   -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
[2012-04-27 20:08] ==> Starting build: 3.3.3-1-ARCH
[2012-04-27 20:08]   -> Parsing hook: [base]
[2012-04-27 20:08]   -> Parsing hook: [udev]
[2012-04-27 20:08]   -> Parsing hook: [pata]
[2012-04-27 20:08]   -> Parsing hook: [scsi]
[2012-04-27 20:08]   -> Parsing hook: [sata]
[2012-04-27 20:08]   -> Parsing hook: [lvm2]
[2012-04-27 20:08] ==> ERROR: file not found: `/lib/udev/rules.d/10-dm.rules'
[2012-04-27 20:08] ==> ERROR: file not found: `/lib/udev/rules.d/13-dm-disk.rules'
[2012-04-27 20:08] ==> ERROR: file not found: `/lib/udev/rules.d/95-dm-notify.rules'
[2012-04-27 20:08] ==> ERROR: file not found: `/lib/initcpio/udev/11-dm-initramfs.rules'
[2012-04-27 20:08]   -> Parsing hook: [filesystems]
[2012-04-27 20:08] ==> Generating module dependencies
[2012-04-27 20:08] ==> Creating xz initcpio image: /boot/initramfs-linux-fallback.img
[2012-04-27 20:08] ==> Image generation successful
[2012-04-27 20:08] upgraded linux (3.3.2-1 -> 3.3.3-1)
[2012-04-27 20:08] upgraded lvm2 (2.02.95-1 -> 2.02.95-2)

▁▂▃▄▅▆▇█▉▊▋▌▍▎▏▏▎▍▌▋▊▉█▇▆▅▄▃▂▁

Offline

#4 2012-04-27 15:32:03

foggy
Member
Registered: 2012-01-25
Posts: 31

Re: [SOLVED] boot failed after upgrade. some .rules are not found

Reinstalling device-mapper fixed it for me.

Offline

#5 2012-04-27 18:08:45

ZeroLinux
Member
Registered: 2011-10-07
Posts: 157

Re: [SOLVED] boot failed after upgrade. some .rules are not found

foggy wrote:

Reinstalling device-mapper fixed it for me.

It doesn't work for me
When I use this line in /etc/mkinitcpio.conf

HOOKS="base udev keymap autodetect pata scsi sata encrypt filesystems"

Everything works fine, but I loose ability to enter password over network
with this line

HOOKS="base udev keymap autodetect pata scsi sata dropbear encryptssh filesystems"

I have this problem
# mkinitcpio -p linux

  -> Parsing hook: [encryptssh]
==> ERROR: file not found: `/lib/udev/rules.d/10-dm.rules'
==> ERROR: file not found: `/lib/udev/rules.d/13-dm-disk.rules'
==> ERROR: file not found: `/lib/udev/rules.d/95-dm-notify.rules'
==> ERROR: file not found: `/lib/initcpio/udev/11-dm-initramfs.rules'

I understand that this comes from /lib/initcpio/install/encryptssh:

    SCRIPT="encryptssh"
    [ -f "/sbin/cryptsetup" ] && add_binary "/sbin/cryptsetup" "/sbin/cryptsetup"
    [ -f "/usr/sbin/cryptsetup" ] && add_binary "/usr/sbin/cryptsetup" "/sbin/cryptsetup"
    add_binary "/sbin/dmsetup"
    add_file "/lib/udev/rules.d/10-dm.rules"
    add_file "/lib/udev/rules.d/13-dm-disk.rules"
    add_file "/lib/udev/rules.d/95-dm-notify.rules"
    add_file "/lib/initcpio/udev/11-dm-initramfs.rules" "/lib/udev/rules.d/11-dm-initramfs.rules"

I tried to comment these lines

    SCRIPT="encryptssh"
    [ -f "/sbin/cryptsetup" ] && add_binary "/sbin/cryptsetup" "/sbin/cryptsetup"
    [ -f "/usr/sbin/cryptsetup" ] && add_binary "/usr/sbin/cryptsetup" "/sbin/cryptsetup"
    add_binary "/sbin/dmsetup"
#    add_file "/lib/udev/rules.d/10-dm.rules"
#    add_file "/lib/udev/rules.d/13-dm-disk.rules"
#    add_file "/lib/udev/rules.d/95-dm-notify.rules"
#   add_file "/lib/initcpio/udev/11-dm-initramfs.rules" "/lib/udev/rules.d/11-dm-initramfs.rules"

And doing again # mkinitcpio -p linux. It makes initframes without errors.
But situatuin is the same: cusror on the second line. Boot proccess stops.
Help me please.

Last edited by ZeroLinux (2012-04-27 18:09:55)

Offline

#6 2012-04-27 18:08:51

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: [SOLVED] boot failed after upgrade. some .rules are not found

falconindy wrote:

This has nothing to do with udev. The rules, which all belong to core/device-mapperth , moved to /usr/lib/udev/rules.d.

Really useful response that.

The problem is hook install files pointing at the old location.

This is an "order of installation" problem. For me, lvm2 got installed after linux so when it rebuilt the ramdisk the lvm2 hook install was still pointing at the old udev rule location.

So, if a package with hooks you need is installed AFTER linux you're going to get this problem.

Rerun mkinitcpio manually or just pacman -S linux again.

Glad I checked for forum before reboot.

Last edited by dtw (2012-04-27 18:52:19)

Offline

#7 2012-04-27 18:31:08

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: [SOLVED] boot failed after upgrade. some .rules are not found

ZeroLinux wrote:
    SCRIPT="encryptssh"
    [ -f "/sbin/cryptsetup" ] && add_binary "/sbin/cryptsetup" "/sbin/cryptsetup"
    [ -f "/usr/sbin/cryptsetup" ] && add_binary "/usr/sbin/cryptsetup" "/sbin/cryptsetup"
    add_binary "/sbin/dmsetup"
#    add_file "/lib/udev/rules.d/10-dm.rules"
#    add_file "/lib/udev/rules.d/13-dm-disk.rules"
#    add_file "/lib/udev/rules.d/95-dm-notify.rules"
#   add_file "/lib/initcpio/udev/11-dm-initramfs.rules" "/lib/udev/rules.d/11-dm-initramfs.rules"

And doing again # mkinitcpio -p linux. It makes initframes without errors.
But situatuin is the same: cusror on the second line. Boot proccess stops.
Help me please.

Don't comment them out.  That's just pointing to old path - make them point at /usr/lib/udev/rules.d/ instead

Offline

#8 2012-04-27 18:39:06

ZeroLinux
Member
Registered: 2011-10-07
Posts: 157

Re: [SOLVED] boot failed after upgrade. some .rules are not found

I did this just before reading your post - now it works fine
Now /lib/initcpio/install/encryptssh:

# vim: set ft=sh:

build()
{
    if [ -z "${CRYPTO_MODULES}" ]; then
        MODULES=" dm-crypt $(all_modules "/crypto/") "
    else
        MODULES=" dm-crypt ${CRYPTO_MODULES} "
    fi
    FILES=""
    SCRIPT="encryptssh"
    [ -f "/sbin/cryptsetup" ] && add_binary "/sbin/cryptsetup" "/sbin/cryptsetup"
    [ -f "/usr/sbin/cryptsetup" ] && add_binary "/usr/sbin/cryptsetup" "/sbin/cryptsetup"
    add_binary "/sbin/dmsetup"
    add_file "/usr/lib/udev/rules.d/10-dm.rules"
    add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
    add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
    add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
}

help ()
{
cat<<HELPEOF
  This hook allows for an encrypted root device.
HELPEOF
}

don'd forget to make again

# mkinitcpio -p linux 

Offline

#9 2012-04-27 18:41:51

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: [SOLVED] boot failed after upgrade. some .rules are not found

Cools.  You should notify pkg maintainer that hook install file needs to be fixed.

Offline

#10 2012-04-28 03:48:40

_lunix_
Member
From: Sydney Australia
Registered: 2008-10-31
Posts: 17
Website

Re: [SOLVED] boot failed after upgrade. some .rules are not found

dtw wrote:

Cools.  You should notify pkg maintainer that hook install file needs to be fixed.

Seeing as this could leave systems in a state where they won't boot post upgrade I would hope it gets add to the news page too.
I do not normally come to the forums looking for issues that may stop my system booting after an upgrade but I do read the news page before startingan upgrade.


Cheers
Mick
@aussielunix

Last edited by _lunix_ (2012-04-28 04:14:58)

Offline

#11 2012-04-28 18:56:02

ZeroLinux
Member
Registered: 2011-10-07
Posts: 157

Re: [SOLVED] boot failed after upgrade. some .rules are not found

I informed maintainer about this.

Offline

#12 2012-04-28 22:22:09

pablox
Member
From: /home/chile/santiago/
Registered: 2008-05-14
Posts: 183
Website

Re: [SOLVED] boot failed after upgrade. some .rules are not found

I reinstalled the package and # mkinitcpio -p linux worked without issues.


Geeks & Linux Atelier
An eye for an eye ... ends in making everybody blind -- Mahatma Gandhi
dotfiles

Offline

#13 2012-04-29 09:03:31

Natanji
Member
Registered: 2009-09-22
Posts: 133

Re: [SOLVED] boot failed after upgrade. some .rules are not found

Just wanted to give a heads up to this. This is the reason why my desktop didn't start up properly before, and almost the same thing happened with my laptop. Please put this on the news page, it affects *everyone* that uses lvm2 I think.

Offline

#14 2012-05-03 12:16:49

sa1
Member
Registered: 2011-08-21
Posts: 20

Re: [SOLVED] boot failed after upgrade. some .rules are not found

This should have been on the news page imo.

Offline

#15 2012-05-04 07:26:24

AsmundEr
Member
From: Trondheim, Norway
Registered: 2010-05-07
Posts: 15

Re: [SOLVED] boot failed after upgrade. some .rules are not found

sa1 wrote:

This should have been on the news page imo.

Agreed. The news page seems to have fallen out of use recently, 3 months since the last news about a package upgrade. Anyone know why? This is the second time recently that I feel news is missing from the news page.

(FWIW, pacman -S linux after pacman -Syu fixed the problem just fine here.)

Offline

Board footer

Powered by FluxBB