You are not logged in.

#1 2018-02-18 18:31:33

billbaggins
Member
Registered: 2013-02-20
Posts: 2

[Solved] encrypted system not found by systemd-boot

Hello,

I've been working with full disk encryption using Simple partition layout with LUKS using systemd-boot as the bootloader.

https://wiki.archlinux.org/index.php/Dm … _with_LUKS

On boot I'm getting the following message and then I get kicked out to my Windows OS:

"""
Error loading \vmlinux-linux: Not Found
Failed to load execute Arch Linux (\vmlinuz-linux): Not Found
"""

I'm guessing this might be me not correctly configuring something like kernel parameters or the loader conf, but I haven't been able to figure out what it is.   

-- Potentially useful info --

I also have Windows installed on another HardDrive as a secondary OS.

Prior to this issue, I successfully installed and configured this system with encrypted setup to use grub.  However, I had some HDD trouble with a bad cable periodically disconnecting. 

After temporarily removing some HDDs and replacing cables grub stopped showing up as a boot option in my mobo BIOS/UEFI bootloader (whichever the term is).  I was able to use a USB with Arch on it to get in and chroot into my system to try to fix it.  Something I noticed was that now my HDDs names mixed around (Arch was on SDB1+2, is now SDC1+2)  After trying to reinstall grub I guess I got similar issues because I would just load into the grub command line with no option to select a boot option.

I decided to try switching to systemd-boot instead of grub.  After working through the wiki to change config options, I'm now where I am presently: getting this error on boot.

-- Potentially useful stuff --

fstab

# /dev/mapper/cryptroot
UUID=29f805a2-5691-41d4-a5c6-c311d8e51ad0	/         	ext4      	rw,relatime,data=ordered	0 1

# /dev/sdc1
UUID=E006-D001      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro	0 2

blkid

/dev/sdc1: UUID="C8FF-190F" TYPE="vfat" PARTUUID="df9bf983-f969-9343-a889-daeee868b80f"
/dev/sdc2: UUID="098a84ee-2da3-47d9-b480-d7608a91c0d2" TYPE="crypto_LUKS" PARTUUID="293bd0da-e637-4441-b0bb-cf07448d8614"
/dev/sdb1: UUID="CE0CA7CD0CA7AEC1" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="85f47763-523e-4f5f-999f-279f509f1d87"
/dev/sdb2: UUID="E20A-392F" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="bbbeee88-50e6-4175-8fd0-614c42a38cdb"
/dev/sdb3: PARTLABEL="Microsoft reserved partition" PARTUUID="ced0776d-7411-4602-bc99-ad34bbca3c5e"
/dev/sdb4: UUID="423A325C3A324D63" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="6aa1319d-7543-4d57-8512-ea42eb392ad4"
/dev/sda1: LABEL="easystore" UUID="861CE9621CE94E2D" TYPE="ntfs" PARTLABEL="easystore" PARTUUID="da22f627-0990-4325-b868-edb1ff47f289"
/dev/sdd1: UUID="2018-02-01-17-58-24-00" LABEL="ARCH_201802" TYPE="iso9660" PTUUID="32051230" PTTYPE="dos" PARTUUID="32051230-01"
/dev/sdd2: SEC_TYPE="msdos" LABEL="ARCHISO_EFI" UUID="5132-70A1" TYPE="vfat" PARTUUID="32051230-02"
/dev/loop0: TYPE="squashfs"
/dev/mapper/cryptroot: UUID="29f805a2-5691-41d4-a5c6-c311d8e51ad0" TYPE="ext4"
/dev/sde1: LABEL="ESD-USB" UUID="9362-6015" TYPE="exfat"

fdisk -l

Disk /dev/sdc: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 5127198A-04FC-0E46-A8A0-4A4C00B8114C

Device       Start        End    Sectors  Size Type
/dev/sdc1     2048    1050623    1048576  512M EFI System
/dev/sdc2  1050624 3907029134 3905978511  1.8T Linux filesystem


Disk /dev/sdb: 119.2 GiB, 128035676160 bytes, 250069680 sectors
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: EBF84CC0-821E-4582-925E-BDA89222C4A7

Device       Start       End   Sectors   Size Type
/dev/sdb1     2048    923647    921600   450M Windows recovery environment
/dev/sdb2   923648   1128447    204800   100M EFI System
/dev/sdb3  1128448   1161215     32768    16M Microsoft reserved
/dev/sdb4  1161216 250068991 248907776 118.7G Microsoft basic data


Disk /dev/sda: 7.3 TiB, 8001563222016 bytes, 15628053168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 5C06D2F6-5AB4-4C01-A1F7-A779832F3162

Device     Start         End     Sectors  Size Type
/dev/sda1   2048 15628050431 15628048384  7.3T Microsoft basic data


Disk /dev/sdd: 960.5 MiB, 1007157248 bytes, 1967104 sectors
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: dos
Disk identifier: 0x32051230

Device     Boot Start     End Sectors  Size Id Type
/dev/sdd1  *        0 1103871 1103872  539M  0 Empty
/dev/sdd2         164  131235  131072   64M ef EFI (FAT-12/16/32)


Disk /dev/loop0: 432 MiB, 452915200 bytes, 884600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/cryptroot: 1.8 TiB, 1999856803328 bytes, 3905970319 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/sde: 58.6 GiB, 62898831360 bytes, 122849280 sectors
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: dos
Disk identifier: 0x00000000

Device     Boot Start       End   Sectors  Size Id Type
/dev/sde1       32768 122849279 122816512 58.6G  7 HPFS/NTFS/exFAT

arch.conf (for systemd-boot)

## This is just an example config file.
## Please edit the paths and kernel parameters according to your system.

title   Arch Linux
linux   /vmlinuz-linux
initrd  /initramfs-linux.img
options cryptdevice=UUID=098a84ee-2da3-47d9-b480-d7608a91c0d2:cryptroot root=/dev/mapper/cryptroot rootfstype=ext4 add_efi_memmap

mkinitcpio.conf

# 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 <hook name>' 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 filesystems keyboard sd-encrypt sd-vconsole 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 billbaggins (2018-02-21 00:04:11)

Offline

#2 2018-02-21 00:03:32

billbaggins
Member
Registered: 2013-02-20
Posts: 2

Re: [Solved] encrypted system not found by systemd-boot

Ayy, figured this out but ends up I had multiple issues

1.  Forgot to actually run "mkinitcpio" after making changes
2.  Linux didn't exist? had to reinstall
3.  using wrong hooks; should be using systemd subset of hooks in mkinitcpio.conf (e.g. sd-encrypt, sd-vconsole)
4.  fstab entry for /boot incorrect

I feel stupid for #1
#4 confuses me because this hadn't changed and worked when I used grub.  I thought UUID's aren't supposed to change?

Last edited by billbaggins (2018-02-21 00:05:39)

Offline

#3 2018-02-21 07:20:36

mxfm
Member
Registered: 2015-10-23
Posts: 66

Re: [Solved] encrypted system not found by systemd-boot

billbaggins wrote:

#4 confuses me because this hadn't changed and worked when I used grub.  I thought UUID's aren't supposed to change?

They are changed when you reformat partition.

Offline

Board footer

Powered by FluxBB