You are not logged in.

#1 2013-03-24 15:34:13

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

[SOLVED] ==> ERROR: file not found: `/sbin/dmsetup'

[EDIT] A much simpler way to deal with this is to explicitly ignore the kernel update during a full system update:

pacman -Syu --ignore linux

Then explicitly update the kernel alone:

pacman -S linux

[EDIT] First, after a full system update I had to move the STUB kernel image from the UEFI directory back to /boot, them recreate the images a second time. The systemd service moved it back to the UEFI directory.

[EDIT] The use of 'mdadm_udev' in HOOKS= also seems to be no longer just 'preferred' to the 'mdadm' hook but instead is now mandatory.

I've read the news item...

Changes to LVM

2013-02-12 - Thomas Bächler

With lvm2 2.02.98-3, we now utilize lvmetad to activate LVM volumes automatically. This implies the following changes:

    The lvm2 initramfs hook now requires the udev hook.
    The use_lvmetad = 1 must be set in /etc/lvm/lvm.conf. This is the default now - if you have a lvm.conf.pacnew file, you must merge this change.
    You can restrict the volumes that are activated automatically by setting the auto_activation_volume_list in /etc/lvm/lvm.conf. If in doubt, leave this option commented out.
    If you need monitoring (needed for snapshots), run systemctl enable lvm-monitoring.service.
    The lvmwait kernel command line option is no longer needed and has no effect.

If you run pacman -Syu and update device-mapper, linux and lvm2 at the same time, you will get an error message that /sbin/dmsetup is missing. Run mkinitcpio -p linux again after the update to avoid any problems.

...and I do get the message...

==> ERROR: file not found: `/sbin/dmsetup'

...but after a full system update with...

pacman -Syu

...when I execute...

mkinitcpio -p linux

...this is what I get...

Building image from preset: 'default'
/boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
ERROR:specified kernel image does not exist: `/boot/vmlinuz-linux'
Building image from preset: 'fallback'
/boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
ERROR:specified kernel image does not exist: `/boot/vmlinuz-linux'

So of course if I reboot I get the dreaded 'No volume groups found' message.

I should mention that I use the systemd path and service to move the kennel after it has been updated.

Last edited by KairiTech (2013-04-07 02:45:12)

Offline

#2 2013-03-24 18:01:10

s1ln7m4s7r
Member
Registered: 2013-02-22
Posts: 262

Re: [SOLVED] ==> ERROR: file not found: `/sbin/dmsetup'

I'm sorry, but by reading your post i don't understand if you need help or not!

I guess you can't run your system after this, can you? If not, you need to run a chroot environment with the arch install CD. Probably you'll need to move your kernel and initramfs files back to "/boot", then edit files according to the quote in your post, then run "mkinitcpio -p linux" and then move them back again.

Offline

#3 2013-03-24 18:09:08

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

Re: [SOLVED] ==> ERROR: file not found: `/sbin/dmsetup'

KairiTech wrote:

I should mention that I use the systemd path and service to move the kennel after it has been updated.

So you moved the kernel image, and now you're surprised that mkinitcpio can't find it.

Offline

#4 2013-03-24 20:02:44

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

Re: [SOLVED] ==> ERROR: file not found: `/sbin/dmsetup'

s1ln7m4s7r wrote:

I'm sorry, but by reading your post i don't understand if you need help or not!

I guess you can't run your system after this, can you? If not, you need to run a chroot environment with the arch install CD. Probably you'll need to move your kernel and initramfs files back to "/boot", then edit files according to the quote in your post, then run "mkinitcpio -p linux" and then move them back again.

Yes I should end my posts with a question. Sorry about that.

Thanks. That worked. I should have known that it would be as simple as to move the kernel images back to /boot before recreating them.

Now when I boot it complains about not being able to find my LVM root.

I do have the udev and lvm2 hooks in place...

HOOKS="base udev autodetect sata mdadm usbinput keymap encrypt lvm2 filesystems timestamp shutdown"

What am I missing?

Last edited by KairiTech (2013-03-24 20:08:15)

Offline

#5 2013-03-24 20:04:50

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] ==> ERROR: file not found: `/sbin/dmsetup'

You need to modify the preset file in mkinitcpio.d.  Point it to wherever you are moving the kernel to.

Offline

#6 2013-03-24 20:09:53

s1ln7m4s7r
Member
Registered: 2013-02-22
Posts: 262

Re: [SOLVED] ==> ERROR: file not found: `/sbin/dmsetup'

Do you have "dm_mod" under MODULES array in your mkinitcpio.conf, remember when you change something in mkinitcpio.conf you have to rebuild your kernel and initramfs files.

Last edited by s1ln7m4s7r (2013-03-24 20:10:41)

Offline

#7 2013-03-24 20:11:26

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

Re: [SOLVED] ==> ERROR: file not found: `/sbin/dmsetup'

WonderWoofy wrote:

You need to modify the preset file in mkinitcpio.d.  Point it to wherever you are moving the kernel to.

Now that's a great idea because I could get rid of the systems path/service but when I do will subsequent kernel updated overwrite my configuration?

Offline

#8 2013-03-24 20:13:11

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

Re: [SOLVED] ==> ERROR: file not found: `/sbin/dmsetup'

s1ln7m4s7r wrote:

Do you have "dm_mod" under MODULES array in your mkinitcpio.conf, remember when you change something in mkinitcpio.conf you have to rebuild your kernel and initramfs files.

Yes I do...

MODULES="nouveau dm_mod dm_crypt aes_x86_64 raid0"

Offline

#9 2013-03-24 20:20:51

s1ln7m4s7r
Member
Registered: 2013-02-22
Posts: 262

Re: [SOLVED] ==> ERROR: file not found: `/sbin/dmsetup'

You're using UEFI, i presume!

-=[  Pure systemd Pure UEFI LVM2 on LUKS encrypted GPT SSDx3 RAID0 because I can.  ]=-

What boot loader do you use? What do you have as boot entry?

Offline

#10 2013-03-24 20:27:41

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

Re: [SOLVED] ==> ERROR: file not found: `/sbin/dmsetup'

s1ln7m4s7r wrote:

You're using UEFI, i presume!

-=[  Pure systemd Pure UEFI LVM2 on LUKS encrypted GPT SSDx3 RAID0 because I can.  ]=-

What boot loader do you use? What do you have as boot entry?

No bootloader. I use the STUB kernel. Here's the code that creates the UEFI boot entry...I've been using it for the longest while without any problems.

echo "initrd=\EFI\arch\initramfs-linux.img root=/dev/mapper/vgTESTDrive-lvRoot cryptdevice=/dev/md33:vgTESTDrive add_efi_memmap pcie_aspm=force quiet" | iconv -f ascii -t ucs2 | efibootmgr --create --write-signature --gpt --disk /dev/sdd --part 1 --label "-=[[[TESTING]]]=- 2013-03-20 22:25:42" --loader '\EFI\arch\vmlinuz-linux.efi' --append-binary-args -

Last edited by KairiTech (2013-03-24 20:34:45)

Offline

#11 2013-03-24 20:36:01

s1ln7m4s7r
Member
Registered: 2013-02-22
Posts: 262

Re: [SOLVED] ==> ERROR: file not found: `/sbin/dmsetup'

With lvm2 2.02.98-3, we now utilize lvmetad to activate LVM volumes automatically. This implies the following changes:

    The lvm2 initramfs hook now requires the udev hook.
    The use_lvmetad = 1 must be set in /etc/lvm/lvm.conf. This is the default now - if you have a lvm.conf.pacnew file, you must merge this change.
    You can restrict the volumes that are activated automatically by setting the auto_activation_volume_list in /etc/lvm/lvm.conf. If in doubt, leave this option commented out.
    If you need monitoring (needed for snapshots), run systemctl enable lvm-monitoring.service.
    The lvmwait kernel command line option is no longer needed and has no effect.

Just to confirm. You did all these steps, right?

EDIT: I just noticed something:

KairiTech wrote:
HOOKS="base udev autodetect sata mdadm usbinput keymap encrypt lvm2 filesystems timestamp shutdown"

Replace

mdadm

with

mdadm_udev

. Maybe this is nothing, but it is recommended to use this one instead of the other.

NEW EDIT: Expecially this one

The use_lvmetad = 1 must be set in /etc/lvm/lvm.conf. This is the default now - if you have a lvm.conf.pacnew file, you must merge this change.

Last edited by s1ln7m4s7r (2013-03-24 20:42:55)

Offline

#12 2013-03-24 20:38:47

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

Re: [SOLVED] ==> ERROR: file not found: `/sbin/dmsetup'

s1ln7m4s7r wrote:

With lvm2 2.02.98-3, we now utilize lvmetad to activate LVM volumes automatically. This implies the following changes:

    The lvm2 initramfs hook now requires the udev hook.
    The use_lvmetad = 1 must be set in /etc/lvm/lvm.conf. This is the default now - if you have a lvm.conf.pacnew file, you must merge this change.
    You can restrict the volumes that are activated automatically by setting the auto_activation_volume_list in /etc/lvm/lvm.conf. If in doubt, leave this option commented out.
    If you need monitoring (needed for snapshots), run systemctl enable lvm-monitoring.service.
    The lvmwait kernel command line option is no longer needed and has no effect.

Just to confirm. You did all these steps, right?

Well after I read it I got the impression there was noting to do. The defaults should work. Did I miss something?

Offline

#13 2013-03-24 21:19:52

s1ln7m4s7r
Member
Registered: 2013-02-22
Posts: 262

Re: [SOLVED] ==> ERROR: file not found: `/sbin/dmsetup'

I don't know if you have seen but i added some things to my previous post. I wasn't as fast as i should, and you replied faster!

Offline

#14 2013-03-24 21:50:06

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

Re: [SOLVED] ==> ERROR: file not found: `/sbin/dmsetup'

Replace

mdadm

with

mdadm_udev

Maybe this is nothing, but it is recommended to use this one instead of the other.

NEW EDIT: Expecially this one

The use_lvmetad = 1 must be set in /etc/lvm/lvm.conf. This is the default now - if you have a lvm.conf.pacnew file, you must merge this change.

Brilliant! Absolutely brilliant! Using 'mdadm_udev' instead of just 'mdadm' worked. I'm typing this now from the successful boot.

I read a while back that mdadm_udev was 'preferred' but it definitely seems mandatory now. I'll mark this thread solved.

Thanks again buddy. My Arch is back up and running.

Offline

#15 2013-03-24 22:00:17

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] ==> ERROR: file not found: `/sbin/dmsetup'

KairiTech wrote:

Brilliant! Absolutely brilliant! Using 'mdadm_udev' instead of just 'mdadm' worked. I'm typing this now from the successful boot.

I read a while back that mdadm_udev was 'preferred' but it definitely seems mandatory now. I'll mark this thread solved.

Thanks again buddy. My Arch is back up and running.

I do remember reading this somewhere.  The news says that the udev hook is now required, but I swear I remember seeing somewhere that the mdadm_udev hook is also required with the lvm2 hook... but I can't seem to find that.

You should still make the changes I mentioned to the presets for mkinitcpio.  Those files are ones that are protected by pacman, so changes will not be overwritten (this is how you end up with *.pacnew files).  If you want to see what files of a given package are tracked in this way (I believe that it calculates an md5sum and compares it against a database), you can use "pacman -Qii <package>" and on the bottom you will see a "Backup Files" area.

Offline

#16 2013-03-24 22:05:06

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

Re: [SOLVED] ==> ERROR: file not found: `/sbin/dmsetup'

WonderWoofy wrote:
KairiTech wrote:

Brilliant! Absolutely brilliant! Using 'mdadm_udev' instead of just 'mdadm' worked. I'm typing this now from the successful boot.

I read a while back that mdadm_udev was 'preferred' but it definitely seems mandatory now. I'll mark this thread solved.

Thanks again buddy. My Arch is back up and running.

I do remember reading this somewhere.  The news says that the udev hook is now required, but I swear I remember seeing somewhere that the mdadm_udev hook is also required with the lvm2 hook... but I can't seem to find that.

You should still make the changes I mentioned to the presets for mkinitcpio.  Those files are ones that are protected by pacman, so changes will not be overwritten (this is how you end up with *.pacnew files).  If you want to see what files of a given package are tracked in this way (I believe that it calculates an md5sum and compares it against a database), you can use "pacman -Qii <package>" and on the bottom you will see a "Backup Files" area.

That's something I will definitely try. I have never been entirely comfortable with relying on a systemd service to move the STUB kernel. Will post the results here. Thanks again for the suggestion.

Offline

#17 2013-03-25 00:05:49

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] ==> ERROR: file not found: `/sbin/dmsetup'

Well, think of it this way, on detection of path/file change, systemd moves the kernel.  With mkinitcpio.d preset configured to read the kernel from where systemd moves it to, it will then use that moved kernel to create the initramfs.  If it fails to move the kernel, and mkinitcpio is still triggered, it will then read the old kernel (which is still in place since it hasn't been copied over) and it will fail because it can't find the modules.

So at the very least, you will still have a matching old kernel and old initramfs.  So you will be able to at least partially boot.  But still, I have never had the systemd.path/systemd.service combination fail on me.  I have had it fail to start, but that was because I made some crappy changes, that were invalid with typos.

I think if you trust systemd to start your services and run your machine, it makes no sense to not trust it to move your kernel and append ".efi" to it.

Offline

#18 2013-03-25 00:13:43

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

Re: [SOLVED] ==> ERROR: file not found: `/sbin/dmsetup'

WonderWoofy wrote:

I think if you trust systemd to start your services and run your machine, it makes no sense to not trust it to move your kernel and append ".efi" to it.

That's a very valid point. Duly noted.

Offline

Board footer

Powered by FluxBB