Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Device /dev/nvme0n1p4 doesn't exist or access denied
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Wizumwalt
Guru
Guru


Joined: 20 Aug 2006
Posts: 547

PostPosted: Tue Mar 10, 2020 4:41 pm    Post subject: Device /dev/nvme0n1p4 doesn't exist or access denied Reply with quote

I've have an EFI stub kernel that's not booting properly. The system is logical volumes on an encrypted disk and I believe its failing in my custom initramfs. The error on the console is as follows:

Code:

...
[1.41192]Run /init as init process
Device /dev/nvme0n1p4 doesn't exist or access denied.
[1.46607] random: lvm: unitialized urandom read (4 bytes read)
/run/lvm/lvmetad.socket: connect failed: No such file or directory
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
Reading all physical volumes. This may take awhile...
random: lvm: unitialized urandom read (4 bytes read)
/run/lvm/lvmetad.socket: connect failed: No such file or directory
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
random: lvm: unitialized urandom read (4 bytes read)
/run/lvm/lvmetad.socket: connect failed: No such file or directory
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
Reading all physical volumes. This may take awhile...
mount: mounting /dev/mapper/vg0-root on /mnt/root failed: No such file or directory
Something went wrong. Dropping into shell.
/bin/sh: can't access tty: job control turned off

The init script is:
Code:
#!/bin/busybox sh

rescue_shell() {
    echo "Something went wrong. Dropping into shell."
    exec /bin/sh
}

mount -t proc none /proc
mount -t sysfs none /sys
mount -t devtmpfs none /dev

/sbin/setup luksOpen /dev/nvme0n1p4 crypt-root

/sbin/lvm vgscan --mknodesm
/sbin/lvm vgscan -a y
/sbin/lvm vgscan --mknodes

mkdir -p /mnt/root
mount /dev/mapper/vg0-root /mnt/root || rescue_shell

umount /dev
umount /proc
umount /sys

exec switch_root /mnt/root /sbin/init || rescue_shell

Code:
$ lsblk
NAME           MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
loop0            7:0    0 314.7M  1 loop
sda              8:0    1  29.9G  0 disk
├─sda1           8:1    1   349M  0 part
└─sda2           8:2    1   6.3M  0 part
sdb              8:16   1   7.5G  0 disk
└─sdb1           8:17   1   7.5G  0 part  /mnt/usb
nvme0n1        259:0    0   477G  0 disk
├─nvme0n1p1    259:1    0     2M  0 part
├─nvme0n1p2    259:2    0   128M  0 part
├─nvme0n1p3    259:3    0   512M  0 part
└─nvme0n1p4    259:4    0 476.3G  0 part
  └─crypt-root 252:0    0 476.3G  0 crypt
    ├─vg0-root 252:1    0   100G  0 lvm   /
    ├─vg0-var  252:2    0    75G  0 lvm   /var
    ├─vg0-opt  252:3    0    75G  0 lvm   /opt
    ├─vg0-home 252:4    0   200G  0 lvm   /home
    └─vg0-tmp  252:5    0  26.3G  0 lvm   /tmp
nvme1n1        259:5    0   477G  0 disk

Code:
$ fdisk -l /dev/nvme0n1
Disk /dev/nvme0n1: 477 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: INTEL SSDPEKNW512G8         
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 313C1781-29AF-44C8-9028-4DB6DD845115

Device           Start        End   Sectors   Size Type
/dev/nvme0n1p1    2048       6143      4096     2M BIOS boot
/dev/nvme0n1p2    6144     268287    262144   128M EFI System
/dev/nvme0n1p3  268288    1316863   1048576   512M Linux filesystem
/dev/nvme0n1p4 1316864 1000213167 998896304 476.3G Linux filesystem

The following are the devices I copied from /dev to /usr/src/initramfs/dev.
Code:
$ tree dev
dev
├── console
├── null
├── nvme0
├── nvme0n1
├── nvme0n1p1
├── nvme0n1p2
├── nvme0n1p3
├── nvme0n1p4   
├── nvme1
├── nvme1n1
├── random
├── tty
└── urandom

0 directories, 13 files


Any thoughts?


Last edited by Wizumwalt on Wed Mar 11, 2020 2:11 am; edited 3 times in total
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Tue Mar 10, 2020 6:35 pm    Post subject: Reply with quote

Is NVME support compiled into the kernel (CONFIG_BLK_DEV_NVME)?
Back to top
View user's profile Send private message
Wizumwalt
Guru
Guru


Joined: 20 Aug 2006
Posts: 547

PostPosted: Tue Mar 10, 2020 6:46 pm    Post subject: Reply with quote

Well, I thought that fixed it, but it comes back. After I reboot from a livecd, it loads, but if I reboot again, I get the same errors and I have this module built-in.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum