Cannot find device linux

Arch Linux

A fresh installation of Arch with LVM on Luks as per the instructions here (https://wiki.archlinux.org/index.php/Dm … VM_on_LUKS) seems to go well throughout until I restart.

The system boots to GRUB but gives me an error when starting:

ERROR: resume: hibernation device 'dev/mapper/MyStorage-swapvol' not found ERROR: device '/dev/mapper/MyStorage-rootvol' not found. Skipping fsck. ERROR: Unable to find root device '/dev/mapper/MyStorage-rootvol'.

I am then dropped into a recovery shell.

My mkinitcpio.conf hooks for encrypt, lvm2, and resume are included along with the necessary changes to kernel parameters. My cryptdevice is listed with its UUID.

I can provide more system details as necessary. I’m posting this from a separate machine, so I can grab files/code from the encrypted machine as needed.

I’m not sure where to go from here as far as troubleshooting. I’ve looked over everything three times with no success. Any help is appreciated. Thanks.

Last edited by bovis (2014-12-10 00:52:23)

#2 2014-12-08 13:03:43

Re: [SOLVED] LVM on Luks cannot find device

Shaving a similar issue. See here. LVM2/device-mapper seems to be broken again. The new 2.02.114-1 version didn’t seem to solve anything. Seems to happen every now and then.

I find it odd that this seems to be the second time I was among the first to discover this. Looks like I am one of just maybe 4 to 5 Archers using full system encryption (and detached LUKS headers too).

I should add I do see my volume group but the associated logical volumes are not being activated.

Last edited by KairiTech (2014-12-08 17:07:16)

#3 2014-12-08 14:58:51

Re: [SOLVED] LVM on Luks cannot find device

* Edited to insert UUIDs 2014-12-09 *

As a followup, here are my fstab, grub, and mkinitcpio.conf.

Also, note that /dev/sda1 and /dev/sda2 are Windows. /dev/sda3 is a primary partition as /boot/. And /dev/sda4 is a primary where the mapper volumes are located.

# /dev/mapper/MyStorage-rootvol UUID=b8d6c4c3-b69b-4912-b26c-909d4eb912c7 / ext4 rw,relatime,data=ordered 0 1 # /dev/mapper/MyStorage-homevol UUID=1d953a31-a19b-49c5-8bf4-7b4598b0090d /home ext4 rw,relatime,data=ordered 0 2 # /dev/mapper/MyStorage-tmpvol UUID=5fcd20fd-209f-4a2e-b16d-35b06d101398 /tmp ext4 rw,relatime,data=ordered 0 2 # /dev/mapper/MyStorage-varvol UUID=de6b0220-1975-4e52-958f-7d2bc143972b /var ext4 rw,relatime,data=ordered 0 2 # /dev/sda3 UUID=70ea6e21-3a38-4d66-973b-b0200f10c746 /boot ext4 rw,relatime,data=ordered 0 2 # /dev/mapper/MyStorage-swapvol UUID=07ec871a-2885-4a79-a943-b21ea6501797 none swap defaults 0 0
# # DO NOT EDIT THIS FILE # # It is automatically generated by grub-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub # ### BEGIN /etc/grub.d/00_header ### insmod part_gpt insmod part_msdos if [ -s $prefix/grubenv ]; then load_env fi if [ "$" ] ; then set default="$" set next_entry= save_env next_entry set boot_once=true else set default="0" fi if [ x"$" = xy ]; then menuentry_id_option="--id" else menuentry_id_option="" fi export menuentry_id_option if [ "$" ]; then set saved_entry="$" save_env saved_entry set prev_saved_entry= save_env prev_saved_entry set boot_once=true fi function savedefault < if [ -z "$" ]; then saved_entry="$" save_env saved_entry fi > function load_video < if [ x$feature_all_video_module = xy ]; then insmod all_video else insmod efi_gop insmod efi_uga insmod ieee1275_fb insmod vbe insmod vga insmod video_bochs insmod video_cirrus fi >if loadfont unicode ; then set gfxmode=auto load_video insmod gfxterm set locale_dir=$prefix/locale set lang=en_US insmod gettext fi terminal_input console terminal_output gfxterm if [ x$feature_timeout_style = xy ] ; then set timeout_style=menu set timeout=5 # Fallback normal timeout code in case the timeout_style feature is # unavailable. else set timeout=5 fi ### END /etc/grub.d/00_header ### ### BEGIN /etc/grub.d/10_linux ### menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-b8d6c4c3-b69b-4912-b26c-909d4eb912c7' < load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod ext2 set root='hd0,msdos3' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 70ea6e21-3a38-4d66-973b-b0200f10c746 else search --no-floppy --fs-uuid --set=root 70ea6e21-3a38-4d66-973b-b0200f10c746 fi echo 'Loading Linux linux . ' linux /vmlinuz-linux root=UUID=b8d6c4c3-b69b-4912-b26c-909d4eb912c7 rw cryptdevice=b8d6c4c3-b69b-4912-b26c-909d4eb912c7:MyStorage root=/dev/mapper/MyStorage-rootvol resume=/dev/mapper/MyStorage-swapvol quiet echo 'Loading initial ramdisk . ' initrd /initramfs-linux.img >submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-b8d6c4c3-b69b-4912-b26c-909d4eb912c7' < menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-b8d6c4c3-b69b-4912-b26c-909d4eb912c7' < load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod ext2 set root='hd0,msdos3' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 70ea6e21-3a38-4d66-973b-b0200f10c746 else search --no-floppy --fs-uuid --set=root 70ea6e21-3a38-4d66-973b-b0200f10c746 fi echo 'Loading Linux linux . ' linux /vmlinuz-linux root=UUID=b8d6c4c3-b69b-4912-b26c-909d4eb912c7 rw cryptdevice=b8d6c4c3-b69b-4912-b26c-909d4eb912c7:MyStorage root=/dev/mapper/MyStorage-rootvol resume=/dev/mapper/MyStorage-swapvol quiet echo 'Loading initial ramdisk . ' initrd /initramfs-linux.img >menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-b8d6c4c3-b69b-4912-b26c-909d4eb912c7' < load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod ext2 set root='hd0,msdos3' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 70ea6e21-3a38-4d66-973b-b0200f10c746 else search --no-floppy --fs-uuid --set=root 70ea6e21-3a38-4d66-973b-b0200f10c746 fi echo 'Loading Linux linux . ' linux /vmlinuz-linux root=UUID=b8d6c4c3-b69b-4912-b26c-909d4eb912c7 rw cryptdevice=b8d6c4c3-b69b-4912-b26c-909d4eb912c7:MyStorage root=/dev/mapper/MyStorage-rootvol resume=/dev/mapper/MyStorage-swapvol quiet echo 'Loading initial ramdisk . ' initrd /initramfs-linux-fallback.img >> ### END /etc/grub.d/10_linux ### ### BEGIN /etc/grub.d/20_linux_xen ### ### END /etc/grub.d/20_linux_xen ### ### BEGIN /etc/grub.d/30_os-prober ### menuentry 'Windows Vista (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-4A7A4BD67A4BBD87' < insmod part_msdos insmod ntfs set root='hd0,msdos1' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 4A7A4BD67A4BBD87 else search --no-floppy --fs-uuid --set=root 4A7A4BD67A4BBD87 fi chainloader +1 >### END /etc/grub.d/30_os-prober ### ### BEGIN /etc/grub.d/40_custom ### # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. ### END /etc/grub.d/40_custom ### ### BEGIN /etc/grub.d/41_custom ### if [ -f $/custom.cfg ]; then source $/custom.cfg elif [ -z "$" -a -f $prefix/custom.cfg ]; then source $prefix/custom.cfg; fi ### END /etc/grub.d/41_custom ### ### BEGIN /etc/grub.d/60_memtest86+ ### ### END /etc/grub.d/60_memtest86+ ###
# vim:set ft=sh # MODULES # The following modules are loaded before any boot hooks are # run. Advanced users may wish to specify all system modules # in this array. For instance: # MODULES="piix ide_disk reiserfs" MODULES="" # BINARIES # This setting includes any additional binaries a given user may # wish into the CPIO image. This is run last, so it may be used to # override the actual binaries included by a given hook # BINARIES are dependency parsed, so you may safely ignore libraries BINARIES="" # FILES # This setting is similar to BINARIES above, however, files are added # as-is and are not parsed in any way. This is useful for config files. FILES="" # HOOKS # This is the most important setting in this file. The HOOKS control the # modules and scripts added to the image, and what happens at boot time. # Order is important, and it is recommended that you do not change the # order in which HOOKS are added. Run 'mkinitcpio -H ' for # help on a given hook. # 'base' is _required_ unless you know precisely what you are doing. # 'udev' is _required_ in order to automatically load modules # 'filesystems' is _required_ unless you specify your fs modules in MODULES # Examples: ## This setup specifies all modules in the MODULES setting above. ## No raid, lvm2, or encrypted root is needed. # HOOKS="base" # ## This setup will autodetect all modules for your system and should ## work as a sane default # HOOKS="base udev autodetect block filesystems" # ## This setup will generate a 'full' image which supports most systems. ## No autodetection is done. # HOOKS="base udev block filesystems" # ## This setup assembles a pata mdadm array with an encrypted root FS. ## Note: See 'mkinitcpio -H mdadm' for more information on raid devices. # HOOKS="base udev block mdadm encrypt filesystems" # ## This setup loads an lvm2 volume group on a usb device. # HOOKS="base udev block lvm2 filesystems" # ## NOTE: If you have /usr on a separate partition, you MUST include the # usr, fsck and shutdown hooks. HOOKS="base udev autodetect modconf block encrypt lvm2 resume filesystems keyboard fsck" # COMPRESSION # Use this to compress the initramfs image. By default, gzip compression # is used. Use 'cat' to create an uncompressed image. #COMPRESSION="gzip" #COMPRESSION="bzip2" #COMPRESSION="lzma" #COMPRESSION="xz" #COMPRESSION="lzop" #COMPRESSION="lz4" # COMPRESSION_OPTIONS # Additional options for the compressor #COMPRESSION_OPTIONS=""

Last edited by bovis (2014-12-09 15:12:12)

Источник

Читайте также:  Linux есть ли word

Interface creation via iproute2 resulted to «Cannot find device» error

As a result I’ve got: «Cannot find device eth88» In some articles I’ve read that interfaces represent physical devices (nic?). But I have some docker0 interface created by docker. Should I create somewhere virtual device to enable my interface?

The first thing to understand is that that is not Linux network interfaces. That is Debian’s interfaces system, which not all Linux operating systems share. So this question is not tagged or titled appropriately. Do you want to know about Debian’s system, which it even tries to make work on the FreeBSD and Hurd kernels? Or about network interfaces at a basic level that is common to all Linux operating systems but not necessarily other kernels? Please fix your question as appropriate.

1 Answer 1

A network interface is always backed by some kernel module or similar part of the kernel that represents something, be it a physical interface, or some virtual interface that in some way talks to other interfaces. There are also dummy interface that don’t do anything; you can assign an IP address to them, but it very likely won’t do what you want to achieve.

In general, you can add new interfaces with a variant of ip link add . type . . See man ip-link for details and a list of types.

You can also add several IP addresses to a single interface. With ip , you don’t need the eth0:1 etc. of ifconfig anymore.

I suspect this is an XY-question, if you would tell us what you actually want to achieve, and what you need the second IP address for, it will be easier to answer.

Читайте также:  How to ramdisk linux

Источник

cannot find device eth0

I’m new to ubuntu and need to install the ubuntu xenial server (16.04) edition to install MongoDB into a VirtualBox. After installation I tried to change from dhcp to a static ipv4 address. So I changed the /etc/network/interfaces :

auto lo iface lo inet loopback allow-hotplug eth0 iface eth0 inet static address 192.168.56.5 netmask 255.255.255.0 gateway 192.168.56.1 
# but ifconfig -a shows only an enp0s3 interface without any IP address and lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host up loopback running MTU: . 
did a reboot once more and tried sudo ifdown and afterwards ifup eth0 # but it gives allways : Cannot find device "eth0" Failed to bring up eth0 

The VirtualBox Network Adapter is set to Host-only Adapter and I have already running another VirtualBox with Debian8 on 192,168.56.4. Has anyone any help for me ?

3 Answers 3

You can find the network device logical name by the command:

In my case, my logical network device name is enp3s0. So I replaced the device name from eth0 to enp3s0 and it works.

This list is similar to what I found in ls /sys/class/net , devices that are tapped but may or may not be plumbed yet.

Your network interface is enp0s3 . Replace the eth0 entries with this interface.

Change from:

auto lo iface lo inet loopback allow-hotplug eth0 iface eth0 inet static address 192.168.56.5 netmask 255.255.255.0 gateway 192.168.56.1
auto lo iface lo inet loopback allow-hotplug enp0s3 iface enp0s3 inet static address 192.168.56.5 netmask 255.255.255.0 gateway 192.168.56.1

Just after the Debian 9 installation, I came to know that the name of network interface got changed to “ens33” from old type “eth0“. If you ever interested in changing interface name to old type “ethX“, then here is the tutorial for you.

Читайте также:  Группа владелец директории linux

Are you Interested in Debian upgrade,

READ: How To Upgrade Debian 8 Jessie to Debian 9 Stretch

As you can see in the output of “ip a” command, my Debian 9 system is having a network adapter called “ens33“.

 $ ip a 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens33: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 08:00:27:10:73:eb brd ff:ff:ff:ff:ff:ff inet 192.168.1.6/24 brd 192.168.1.255 scope global dynamic ens33 valid_lft 86366sec preferred_lft 86366sec inet6 fd50:1d9:9fe3:1400:85b2:6a34:5c9d:f3e/64 scope global temporary dynamic valid_lft 7176sec preferred_lft 3576sec inet6 fd50:1d9:9fe3:1400:a00:27ff:fe10:73eb/64 scope global mngtmpaddr noprefixroute dynamic valid_lft 7176sec preferred_lft 3576sec inet6 fe80::a00:27ff:fe10:73eb/64 scope link valid_lft forever preferred_lft forever 

You can confirm that the Ethernet device got renamed during the system boot by using “dmesg” command.

$ sudo dmesg | grep -i eth [ 1.510948] e1000 0000:00:03.0 eth0: (PCI:33MHz:32-bit) 08:00:27:10:73:eb [ 1.510955] e1000 0000:00:03.0 eth0: Intel(R) PRO/1000 Network Connection [ 1.514587] e1000 0000:00:03.0 ens33: renamed from eth0 

Источник

Оцените статью
Adblock
detector