You are not logged in.

#1 2023-09-04 23:56:20

pomomayu
Member
Registered: 2023-09-04
Posts: 5

[SOLVED] Systemd image error - [TIME] Timed out waiting for device

Hello,

Cannot boot on a fresh systemd based initramfs image. It times out during bootup. Did not get any errors during installation; it only failed during bootup.

This is intended for use with a simple boot and encrypted root partition. Please let me know if any additional info needed. Since the system isn't running everything here had to be hand-typed from another computer. Thank you.

Error:

[TIME] Timed out waiting for device /dev/m39d3ee-ea50-46e8-a67d-78b865ad9de5.
[DEPEND] Dependency failed for File System Check on /dev/disk/by-uuid/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
[DEPEND] Dependency failed for /sysroot.
[DEPEND] Dependency failed for Initrd Root File System.
[DEPEND] Dependency failed for Mountpoints Configured in the Real Root.
[DEPEND] Dependency failed for Initrd Root Device.

Here are the exact install steps:

  # ping archlinux.org
  # timedatectl

  # fdisk -l
  # fdisk /dev/sda
    g // create new GPT table
    n // create boot partion: +2G
    t // change boot partition type to uefi
    n // create root partition: remainder of disk
    w // save changes

  # mkfs.fat -F 32 /dev/sda1

  # cryptsetup luksFormat /dev/sda2
  # cryptsetup luksDump /dev/sda2
  # cryptsetup open /dev/sda2 root
  # mkfs.btrfs -L root /dev/mapper/root

  # mount /dev/mapper/root /mnt 
  # mount --mkdir /dev/sda1 /mnt/boot

  # pacstrap -K /mnt base btrfs-progs efibootmgr grub linux linux-firmware man-db man-pages nftables vim
    
  # genfstab -U /mnt >> /mnt/etc/fstab

  # arch-chroot /mnt

  # ln -sf /usr/share/zoneinfo/UTC /etc/localtime
  
  # hwclock --systohc
  
  # locale-gen
  
  # vim /etc/locale.gen
    // uncomment en_US.UTF-8 UTF-8

  # vim /etc/locale.conf  
    LANG=en_US.UTF-8

  # vim /etc/hostname
    myhostname

  // Add hooks
  # vim /etc/mkinitcpio.conf
    HOOKS=(base systemd autodetect modconf kms keyboard block sd-encrypt filesystems fsck)

  # mkinitcpio -P

  // Configure boot loader
  # vim /etc/sysctl.d/sysctl.conf
    rd.luks.name=device-UUID=root root=/dev/mapper/root

  # passwd

  # grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
  # grub-mkconfig -o /boot/grub/grub.cfg

  # exit
  # reboot

Not sure if the UUIDs should be publicly posted but fstab was generated using genfstab. It is confirmed that the UUID of root is that of /dev/mapper/root:

# genfstab -U /mnt >> /mnt/etc/fstab

/etc/fstab:

UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx     /     btrfs     rw,relatime,ssd,space_cache=v2,subvolid=5,subvol=/     0     0
UUID=XXXX-XXXX     /boot     vfat     rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro     0     2

Ran a uname from USB installer after installation:

# arch-chroot /mnt
[root@archiso]# uname -a
Linux archiso 6.2.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Sun, 26 Feb 2023 03:39:23 +0000 x86_64 GNU/Linux

Last edited by pomomayu (2023-09-10 16:39:57)

Offline

#2 2023-09-05 05:57:18

ScarletFire
Member
Registered: 2023-08-29
Posts: 6

Re: [SOLVED] Systemd image error - [TIME] Timed out waiting for device

GRUB is configured via /etc/default/grub, you should add your kernel parameters to it. It should look something like this

GRUB_CMDLINE_LINUX="rd.luks.name=<the acutal uuid of /dev/sda2>=root root=/dev/mapper/root"

I have personally nerver used the systemd hooks so I cannot tell you if you also need to install cryptsetup via pacman (as that is the case for the regular encrypt hook). Then regenerate initramfs with mkinitcpio, regenerate grub with grub-mkconfig and try again.
If you aren't sure how to get the correct uuid you can gather it via

blkid -s UUID /dev/sda2

Offline

#3 2023-09-05 14:04:56

pomomayu
Member
Registered: 2023-09-04
Posts: 5

Re: [SOLVED] Systemd image error - [TIME] Timed out waiting for device

Hello and thank you.

I tried updating /etc/default/grub using the UUID of /dev/sda2. Unfortunately no luck. Also tried using the UUID of /dev/mapper/root and that did not work either.

Also attempted to install cryptsetup with pacman as suggested, but it gave a message saying cryptsetup is up to date. Should I proceed with the installation of cryptsetup via pacman regardless?

Last edited by pomomayu (2023-09-05 14:05:37)

Offline

#4 2023-09-05 14:34:42

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,101

Re: [SOLVED] Systemd image error - [TIME] Timed out waiting for device

Possibly https://bbs.archlinux.org/viewtopic.php?id=286293

The UUIDs are btw. no private data, their purpose is to prevent device ID collisions, please don't obfuscate them as their alignments are really important here.

Offline

#5 2023-09-07 03:38:18

pomomayu
Member
Registered: 2023-09-04
Posts: 5

Re: [SOLVED] Systemd image error - [TIME] Timed out waiting for device

Understood. Will provide the UUIDs.

Definitely seems related to https://bbs.archlinux.org/viewtopic.php?id=286293.

Actually was in such a scramble did a poor job of documenting my troubleshooting process. Decided to start over and will update this thread shortly.

Thank you all for the help.

Last edited by pomomayu (2023-09-07 03:38:47)

Offline

#6 2023-09-09 16:45:43

pomomayu
Member
Registered: 2023-09-04
Posts: 5

Re: [SOLVED] Systemd image error - [TIME] Timed out waiting for device

Systemd image working. Please mark this as resolved. Thanks again for the help. It's an honor to be using Arch.

Do not suspect this is related to https://bbs.archlinux.org/viewtopic.php?id=286293.

Started completely from scratch and documented everything. The issue was in the GRUB_CMDLINE_LINUX variable. The UUID of the disk needed to be specified, not the UUID of /dev/mapper/root, just as ScarletFire instructed. In addition, I failed to remake the /boot/grub/grub.cfg file after making changes.

Below are the mkinitcpio.conf HOOKS, and the additional steps required for a successful systemd image.

mkinitcpio.conf HOOKS:

HOOKS=(base systemd autodetect modconf kms keyboard block sd-encrypt filesystems fsck)

Rebuild initramfs:

# mkinitcpio -P

Bootloader config /etc/default/grub (UUID of device, not UUID of /dev/mapper/root):

GRUB_CMDLINE_LINUX="rd.luks.name=device-UUID=root root=/dev/mapper/root"

Remake /boot/grub/grub.cfg

# grub-mkconfig -o /boot/grub/grub.cfg

Below is a recap of the entire installation for a simple encrypted rootfs on btrfs using only two partitions.

  # ping archlinux.org
  # timedatctl

  # fdisk -l
  # fdisk /dev/sda
    g // create new GPT table
    n // create boot partion: +2G
    t // change boot partition type to uefi
    n // create root partition: remainder of disk
    w // save changes

  # mkfs.fat -F 32 /dev/sda1

  # cryptsetup luksFormat /dev/sda2
  # cryptsetup luksDump /dev/sda2
  # cryptsetup open /dev/sda2 root
  # mkfs.btrfs -L root /dev/mapper/root

  # mount /dev/mapper/root /mnt 
  # mount --mkdir /dev/sda1 /mnt/boot

  # pacstrap -K /mnt base btrfs-progs efibootmgr grub linux linux-firmware man-db man-pages nftables vim
    
  # genfstab -U /mnt >> /mnt/etc/fstab

  # arch-chroot /mnt

  # ln -sf /usr/share/zoneinfo/UTC /etc/localtime
  
  # hwclock --systohc
  
  # locale-gen
  
  # vim /etc/locale.gen
    // uncomment en_US.UTF-8 UTF-8

  # vim /etc/locale.conf  
    LANG=en_US.UTF-8

  # vim /etc/hostname
    myhostname

  // Add initramfs HOOKS and MODULES
  # vim /etc/mkinitcpio.conf
    HOOKS=(base systemd autodetect modconf kms keyboard block sd-encrypt filesystems fsck)

  # mkinitcpio -P

  # passwd

  # grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
  # vim /etc/default/grub
       GRUB_CMDLINE_LINUX="rd.luks.name=device-UUID=root root=/dev/mapper/root"
  # grub-mkconfig -o /boot/grub/grub.cfg

  # exit
  # reboot

Last edited by pomomayu (2023-09-10 16:22:30)

Offline

#7 2023-09-09 19:02:04

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,101

Re: [SOLVED] Systemd image error - [TIME] Timed out waiting for device

Systemd image working. … Do not suspect this is related to https://bbs.archlinux.org/viewtopic.php?id=286293

The very same "solution" of https://bbs.archlinux.org/viewtopic.php?id=286293 worked  for you, why do you suspect it's not the exact same problem?

Please mark this as resolved.

Mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#8 2023-09-09 19:34:09

pomomayu
Member
Registered: 2023-09-04
Posts: 5

Re: [SOLVED] Systemd image error - [TIME] Timed out waiting for device

Okay sorry overlooked that. The solution in that thread was buried somewhere in the middle. The thread was long and went off on other tangents.

Added [SOLVED] and also 'Systemd image' to the subject.

Thanks again

Last edited by pomomayu (2023-09-10 16:23:53)

Offline

#9 2023-09-09 19:38:19

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,101

Re: [SOLVED] Systemd image error - [TIME] Timed out waiting for device

No problem, we just don't want to leave ab open/ambigious conclusion for future readers wink

Offline

Board footer

Powered by FluxBB