You are not logged in.

#1 2011-08-05 02:41:10

del---
Member
Registered: 2010-11-04
Posts: 31

Initcpio + LVM = No volume groups found

I updated arch today and for some reason I can no longer boot properly. The default initcpio image fails to boot and shows the error "No volume groups found". When I boot into fallback however, the system boots fine (but with far more verbosity than usual).

I believe the error lies in the autodetect hook which is the main difference between the presets.

Anyone have any idea what's wrong?

Offline

#2 2011-08-05 03:07:18

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

Re: Initcpio + LVM = No volume groups found

Impossible to say without more info. What was updated? Post the output of `lsinitcpio -a </path/to/initramfs-with-autodetect>'

Offline

#3 2011-08-05 03:59:20

del---
Member
Registered: 2010-11-04
Posts: 31

Re: Initcpio + LVM = No volume groups found

Updated: Lots, I hadn't updated in ~3 weeks. I can't tell you exactly but if you give me a magic command like the last one I shall execute it.

Results of lsinitcpio:

Normal: http://pastebin.com/iC6N4fnC
Fallback: http://pastebin.com/fPT5j0tZ

EDIT:

Forgot the -a

New links:

Normal: http://pastebin.com/NFHdWQSb
Fallback: http://pastebin.com/hhr0QqwG

Last edited by del--- (2011-08-05 04:03:06)

Offline

#4 2011-08-05 04:11:42

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

Re: Initcpio + LVM = No volume groups found

/var/logs/pacman.log contains a record of everything pacman related, so check it out and post the lines related to your last update (entries are dated).

Looking at the second 'normal' image output, you don't seem to have any modules for a storage bus (pata, sata, ahci, usb, etc.). Why aren't you using a hook such as pata, ide, or sata?


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

#5 2011-08-05 04:13:40

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

Re: Initcpio + LVM = No volume groups found

I could be mistaken, but I don't see any ata driver in your autodetect image. Looks like you've got pata, sata and scsi all enabled as HOOKS in /etc/mkinitcpio.conf but for some reason nothing is being grabbed by autodetect. Could you add 'ata_generic' to MODULES in /etc/mkinitcpio.conf and see if that helps? Alternatively, add usbinput to HOOKS, boot with 'break' on the kernel cmdline, and type lsmod at the ramfs prompt to see what modules are being loaded to create the root device. You can dump this list to somewhere in /run (which is writeable and persists through to later userspace) and compare with what's in the autodetect image.

Offline

#6 2011-08-05 04:28:23

del---
Member
Registered: 2010-11-04
Posts: 31

Re: Initcpio + LVM = No volume groups found

Pacman.log: http://pastebin.com/JErFYw55
Mkinitcpio.conf: http://pastebin.com/M4YezDyu

alphaniner: I am using all of them as you should see from my config file. For some reason none of them seem to be included...
falconindy: Trying now...

Offline

#7 2011-08-05 04:35:14

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

Re: Initcpio + LVM = No volume groups found

bobobo1618 wrote:

alphaniner: I am using all of them as you should see from my config file. For some reason none of them seem to be included...

Sorry, I based my comment on this:

==> Hook run order:
  udev
  lvm2
  resume

But I'm not very familiar with lsinitcpio -a output, so maybe that's normal.


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

#8 2011-08-05 04:36:31

del---
Member
Registered: 2010-11-04
Posts: 31

Re: Initcpio + LVM = No volume groups found

Okay, adding ata_generic did not work.

I did the usbinput + break thing and I had 4 modules: dm_mod, ata_generic, scsi_mod and I believe the last one was pata-<can't quite remember what goes here but it definitely had something to do with ata>.
Didn't quite understand what you meant about the /run I'm afraid. I can't fully boot into the normal image and fallback already has what's needed.

Offline

#9 2011-08-05 04:37:37

del---
Member
Registered: 2010-11-04
Posts: 31

Re: Initcpio + LVM = No volume groups found

alphaniner wrote:
bobobo1618 wrote:

alphaniner: I am using all of them as you should see from my config file. For some reason none of them seem to be included...

Sorry, I based my comment on this:

==> Hook run order:
  udev
  lvm2
  resume

But I'm not very familiar with lsinitcpio -a output, so maybe that's normal.

Yeah, I don't think mkinitcpio is including them for some reason.

Offline

#10 2011-08-05 04:43:39

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

Re: Initcpio + LVM = No volume groups found

You're right, on my system only udev and lvm show up under 'Hook run order'

And regarding falconindy's suggestion, I believe he meant for you to run something like lsmod >/run/lsmod.out which will save the command output to a file.

Last edited by alphaniner (2011-08-05 04:47:04)


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

#11 2011-08-05 04:47:08

del---
Member
Registered: 2010-11-04
Posts: 31

Re: Initcpio + LVM = No volume groups found

Ahh, would it still work, considering all I can do is reboot and there is no disk mounted?

Offline

#12 2011-08-05 04:49:47

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

Re: Initcpio + LVM = No volume groups found

Actually I wouldn't think so, but he/she clearly knows more than I do.


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

#13 2011-08-05 06:54:20

del---
Member
Registered: 2010-11-04
Posts: 31

Re: Initcpio + LVM = No volume groups found

By the way, here's a list of modules (sorted /proc/modules) loaded by the fallback image.
http://pastebin.com/f4QisJ7n

Anyways, I gave up and removed the autodetect hook. Boots half a second slower than before but it works so I don't really care smile

Last edited by del--- (2011-08-05 07:58:51)

Offline

#14 2011-08-05 11:36:11

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

Re: Initcpio + LVM = No volume groups found

bobobo1618 wrote:

Okay, adding ata_generic did not work.

I did the usbinput + break thing and I had 4 modules: dm_mod, ata_generic, scsi_mod and I believe the last one was pata-<can't quite remember what goes here but it definitely had something to do with ata>.
Didn't quite understand what you meant about the /run I'm afraid. I can't fully boot into the normal image and fallback already has what's needed.

I had meant for you to do this from the fallback image where you can boot properly. udev will load the necessary modules from the collection on the fallback image and I'm interested in what it finds that mkinitcpio doesn't. If I can get a list of these modules from the ramfs, it's quite simple to narrow down the problem.


alphaniner wrote:
bobobo1618 wrote:

alphaniner: I am using all of them as you should see from my config file. For some reason none of them seem to be included...

Sorry, I based my comment on this:

==> Hook run order:
  udev
  lvm2
  resume

But I'm not very familiar with lsinitcpio -a output, so maybe that's normal.

Not all hooks have scripts that are run during boot. lsinitcpio will only list hooks which do.


bobobo1618 wrote:

By the way, here's a list of modules (sorted /proc/modules) loaded by the fallback image.
http://pastebin.com/f4QisJ7n

Anyways, I gave up and removed the autodetect hook. Boots half a second slower than before but it works so I don't really care smile

This sounds like a bug in mkinitcpio and I'd be interested to see what's causing it. I see that ata_generic is loaded by the fallback. Are you sure you regenerated your images after adding ata_generic to MODULES In mkinitcpio.conf? Can I get the output of:

find /sys -name modalias -exec sort -u {} + | xargs modprobe -Ra | sort -u

Offline

#15 2011-08-06 01:51:41

del---
Member
Registered: 2010-11-04
Posts: 31

Re: Initcpio + LVM = No volume groups found

Okay, modules loaded by fallback after break:

Module                  Size  Used by    Not tainted
usbhid                 35140  0 
hid                    79075  1 usbhid
dm_mod                 66857  4 
sg                     25621  0 
sr_mod                 14663  0 
cdrom                  36393  1 sr_mod
sd_mod                 27379  2 
xhci_hcd               66397  0 
ehci_hcd               39359  0 
usbcore               142192  4 usbhid,xhci_hcd,ehci_hcd
ahci                   20905  1 
libahci                18925  1 ahci
ata_generic             3431  0 
libata                173061  3 ahci,libahci,ata_generic
scsi_mod              130020  4 sg,sr_mod,sd_mod,libata

Output of your command:

[root@LBigTop lucas]# find /sys -name modalias -exec sort -u {} + | xargs -0 modprobe -Ra | sort -u
ac
battery
button
processor
thermal
video
wmi

I added the -0 by the way because the output of that find command included a quotation mark which xargs apparently dislikes. I did so in the mkinitcpio script too, no difference.

Offline

#16 2011-08-06 02:36:18

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

Re: Initcpio + LVM = No volume groups found

bobobo1618 wrote:

Okay, modules loaded by fallback after break:

Module                  Size  Used by    Not tainted
usbhid                 35140  0 
hid                    79075  1 usbhid
dm_mod                 66857  4 
sg                     25621  0 
sr_mod                 14663  0 
cdrom                  36393  1 sr_mod
sd_mod                 27379  2 
xhci_hcd               66397  0 
ehci_hcd               39359  0 
usbcore               142192  4 usbhid,xhci_hcd,ehci_hcd
ahci                   20905  1 
libahci                18925  1 ahci
ata_generic             3431  0 
libata                173061  3 ahci,libahci,ata_generic
scsi_mod              130020  4 sg,sr_mod,sd_mod,libata

Hmm... ata_generic is loaded but so is ahci....

bobobo1618 wrote:

Output of your command:

[root@LBigTop lucas]# find /sys -name modalias -exec sort -u {} + | xargs -0 modprobe -Ra | sort -u
ac
battery
button
processor
thermal
video
wmi

I added the -0 by the way because the output of that find command included a quotation mark which xargs apparently dislikes. I did so in the mkinitcpio script too, no difference.

Aha!!! This explains everything! You've got a broken modalias file somewhere with garbage in it which is why modprobe chokes. I've seen this a few times before -- I'm not sure its something that can be fixed on a software level. I'd be curious to see a raw dump of the find command (without the -exec and zipped to preserve it) if you're willing to provide.

NB: you're breaking the output by adding the -0 and not accounting for it in the sort feeding into xargs. It should be: find ... -exec sort -zu {} + | xargs -0 ... | sort -u

I'm not sure that null delimiting will help here, since its modprobe itself choking (crappy code) on bad input. My laptop has a similar, but stranger problem -- I lose data by null delimiting. Hence why the autodetect hook relies on newlines. If the hardware is sane, it shouldn't be a problem.

Last edited by falconindy (2011-08-06 02:38:20)

Offline

#17 2011-08-06 06:07:50

del---
Member
Registered: 2010-11-04
Posts: 31

Re: Initcpio + LVM = No volume groups found

Output of that find command:

http://c230756.r56.cf1.rackcdn.com/modalias.tar.xz

Exactly what I did to get that file:

find /sys -name modalias > modalias.txt
tar cJf modalias.tar.xz modalias.txt

Also, I altered /lib/initcpio/functions so that the xargs line mirrors the one you posted. Reactivated autodetect, built, and it worked! Whatever you did fixed it. Can I suggest you put this change in the mkinitcpio package?

Last edited by del--- (2011-08-06 06:14:44)

Offline

#18 2011-08-06 13:30:52

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

Re: Initcpio + LVM = No volume groups found

Unfortunately, I can't just do that so easily. Like I said, have a use case where addition of null delimiters breaks other hardware (my laptop). I guess I need to figure out where that breakage happens... maybe this'll be a weekend of hacking on module-init-tools and mkinitcpio...

Offline

#19 2011-08-06 13:39:49

del---
Member
Registered: 2010-11-04
Posts: 31

Re: Initcpio + LVM = No volume groups found

Write a python script to change the delimiters?

Offline

#20 2011-08-06 13:48:58

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

Re: Initcpio + LVM = No volume groups found

python?!?! No sir... Bash can do... I've been playing around with this ridiculous hack, and it works for me:

find /sys/devices -name modalias -exec sort -u {} + | tr '\n' '\0' | xargs -0 modprobe -Ra | sort -u

Of course, for a broken modalias file, any stray ascii 10 is going to break this. Post the output of that above insanity and we'll figure out where to go from there...

Last edited by falconindy (2011-08-06 14:06:20)

Offline

#21 2011-08-07 06:16:52

del---
Member
Registered: 2010-11-04
Posts: 31

Re: Initcpio + LVM = No volume groups found

Python is better ^.^
I'm running Windows at the moment, I'll post when I reboot.

Here you go: http://c230756.r56.cf1.rackcdn.com/out.tar.xz

Last edited by del--- (2011-08-07 07:55:31)

Offline

#22 2011-08-07 14:16:37

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

Re: Initcpio + LVM = No volume groups found

Ooh, it works. But... why....

Offline

#23 2011-08-07 17:49:58

Method_X
Member
Registered: 2011-04-18
Posts: 8

Re: Initcpio + LVM = No volume groups found

Same problem with my Laptop, but i can't do anything. Could you please give some instructions?

Offline

#24 2011-08-07 20:36:45

del---
Member
Registered: 2010-11-04
Posts: 31

Re: Initcpio + LVM = No volume groups found

Method_X wrote:

Same problem with my Laptop, but i can't do anything. Could you please give some instructions?

Wait for falconindy.
If you need a quick fix boot into the fallback image for now.

So falconindy, I can shove this:

find /sys/devices -name modalias -exec sort -u {} + | tr '\n' '\0' | xargs -0 modprobe -Ra | sort -u

In mah /lib/initcpio/functions file to replace that other one?

Offline

#25 2011-08-07 20:42:00

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

Re: Initcpio + LVM = No volume groups found

bobobo1618 wrote:

So falconindy, I can shove this:

find /sys/devices -name modalias -exec sort -u {} + | tr '\n' '\0' | xargs -0 modprobe -Ra | sort -u

In mah /lib/initcpio/functions file to replace that other one?

It seems to work, and it fixes a bug, so I'd say go for it.

I'll be proposing it for inclusion for next release: https://github.com/falconindy/mkinitcpi … bac30ffe8e

Offline

Board footer

Powered by FluxBB