You are not logged in.

#1 2017-04-08 07:33:23

joesmoe10
Member
Registered: 2013-04-13
Posts: 9

[SOLVED] Unable to boot with NVME drive with systemd-boot

Hi all,

I'm having a lot of trouble getting Arch to boot.  The setup is EFI on an NVME drive using systemd-boot.

Here's what happens when I boot.
1. Reach Systemd-Boot selection page with the following options:

Arch Linux
EFI Default Loader
Reboot Into Firmware Interface

2. Select Arch Linux

Error loading /vmlinuz-linux: Not Found
Failed to Execute (Arch Linux /vmlinuz-linux):  Not Found

Here's the relevant output from commands.

/etc/fstab

# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>

# /dev/nvme0n1p2
UUID=ef411a94-8279-4598-a2ce-9ac53c3cea37	/         	ext4      	rw,relatime,data=ordered	0 1

# /dev/nvme0n1p1
UUID=A4C4-D242      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro	0 2

parted -l

Model: Unknown (unknown)
Disk /dev/nvme0n1: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size   File system  Name  Flags
 1      1049kB  538MB  537MB  fat32        efi   boot, esp
 2      538MB   512GB  512GB  ext4         root

lsblk

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0         7:0    0 367.1M  1 loop /run/archiso/sfs/airootfs
sda           8:0    0 238.5G  0 disk 
sdb           8:16   1  14.5G  0 disk 
├─sdb1        8:17   1   478M  0 part /run/archiso/bootmnt
└─sdb2        8:18   1    64M  0 part 
sr0          11:0    1  1024M  0 rom  
nvme0n1     259:0    0   477G  0 disk 
├─nvme0n1p1 259:1    0   512M  0 part /mnt/boot
└─nvme0n1p2 259:2    0 476.4G  0 part /mnt

blkid

/dev/nvme0n1p1: UUID="A4C4-D242" TYPE="vfat" PARTLABEL="efi" PARTUUID="5d3ac4a7-1a92-42ac-a2b6-c93c33c14711"
/dev/nvme0n1p2: UUID="ef411a94-8279-4598-a2ce-9ac53c3cea37" TYPE="ext4" PARTLABEL="root" PARTUUID="50a640f0-f400-44a1-aec9-3bc484475215"
/dev/nvme0n1: PTUUID="fd7dcc5a-889d-4c99-a07f-5829ce53aafd" PTTYPE="gpt"

efibootmgr -v

BootCurrent: 0004
Timeout: 1 seconds
BootOrder: 0002,0004
Boot0002* Linux Boot Manager	HD(1,GPT,5d3ac4a7-1a92-42ac-a2b6-c93c33c14711,0x800,0x100000)/File(\EFI\SYSTEMD\SYSTEMD-BOOTX64.EFI)
Boot0004* UEFI: KingstonDT 101 G2 PMAP, Partition 1	PciRoot(0x0)/Pci(0x14,0x0)/USB(10,0)/HD(1,MBR,0x48d46635,0xa4,0x20000)..BO

tree /boot

/boot
├── boot
├── EFI
│   ├── BOOT
│   │   └── BOOTX64.EFI
│   └── systemd
│       └── systemd-bootx64.efi
└── loader
    ├── entries
    │   └── arch.conf
    └── loader.conf

6 directories, 4 files

/boot/loader/loader.conf

timeout 3
default arch
editor 0
# default 2fac2978e64840eda3eda8cb031c6957-*

/boot/loader/entries/arch.conf

title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=PARTUUID=5d3ac4a7-1a92-42ac-a2b6-c93c33c14711 rw

Last edited by joesmoe10 (2017-04-08 08:29:55)

Offline

#2 2017-04-08 07:48:22

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [SOLVED] Unable to boot with NVME drive with systemd-boot

Isn't it obvious? There is no kernel or initramfs in the ESP. You probably forgot to mount it to /boot before pacstrap, or mounted it in a wrong order (e.g. mkdir /mnt/boot; mount /dev/nvme0np1 /mnt/boot; mount /dev/nvme0np2 /mnt).

Just pacman -S linux again (either in chroot or with the root switch). You might want to check the /boot in p2 delete the files there before mounting p1 and reinstall to avoid further confusion.

Note that / in the entry conf refers to the ESP, not the root filesystem (on p2 in this case) init is going to mount.

Offline

#3 2017-04-08 07:51:05

joesmoe10
Member
Registered: 2013-04-13
Posts: 9

Re: [SOLVED] Unable to boot with NVME drive with systemd-boot

Okay, I've solved the boot problem.

While debugging unrelated errors, I wiped the EFI partition after I had already run pacstrap. Later, I recreated the EFI partition.  Since I didn't reinstall the kernel after that, there was nothing to boot into.  I fixed the issue by running the following command.

pacman -U /var/cache/pacman/pkg/linux-4.10.8-1-x86_64.pkg.tar.xz

I can now boot into Arch but I have the following error:

:: mounting '/dev/nvme0n1p1' on real root
mount: unknown filesystem type 'vfat'

Offline

#4 2017-04-08 08:20:00

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: [SOLVED] Unable to boot with NVME drive with systemd-boot

Because you used the wrong PARTUUID for root= in the entry conf. And because of the autodetect hook of mkinitcpio will make it include only the modules necessary for the root filesystem (ext4 on p1), you see such error.

Offline

#5 2017-04-08 08:25:54

joesmoe10
Member
Registered: 2013-04-13
Posts: 9

Re: [SOLVED] Unable to boot with NVME drive with systemd-boot

:: mounting '/dev/nvme0n1p1' on real root
mount: unknown filesystem type 'vfat'

This error states that I'm trying to mount my /boot partition as my / (root) partition.  In /boot/loader/entries/arch.conf, I used the wrong PARTUUID or partition UUID.  Changing it to the partition UUID of my root drive (nvme0n1p2) specified by blkid fixes the problem.

/boot/loader/entries/arch.conf

# Change to the partition UUID of the root drive.
options root=PARTUUID=50a640f0-f400-44a1-aec9-3bc484475215 rw

As a side note, you don't even need the /boot entry in your /etc/fstab.  See https://www.reddit.com/r/archlinux/comm … i/cdj5mi6/.

tom.ty89 wrote:

Isn't it obvious? There is no kernel or initramfs in the ESP. You probably forgot to mount it to /boot before pacstrap, or mounted it in a wrong order (e.g. mkdir /mnt/boot; mount /dev/nvme0np1 /mnt/boot; mount /dev/nvme0np2 /mnt).

Yes, you were right, thank you for the reply.  I think I was typing as you responded.  I'm going to go with not obvious.  The issue it was a long and convoluted path through the install guide and wiki to get to this point.  I tried grub, then EFISTUB before trying systemd-boot.  Additionally, my mental model of how Linux boots up is what you might call "not great."  Those factors turn a pretty simple error into OMG, WHY WON'T LINUX BOOT.

Offline

#6 2017-04-08 08:27:13

joesmoe10
Member
Registered: 2013-04-13
Posts: 9

Re: [SOLVED] Unable to boot with NVME drive with systemd-boot

tom.ty89 wrote:

Because you used the wrong PARTUUID for root= in the entry conf. And because of the autodetect hook of mkinitcpio will make it include only the modules necessary for the root filesystem (ext4 on p1), you see such error.

Ah, you keep beating me while I'm typing.  Right again.  Thank you.

Offline

Board footer

Powered by FluxBB