You are not logged in.

#1 2022-06-14 10:28:26

From: Geneva, Switzerland
Registered: 2011-11-20
Posts: 115

[SOLVED]dual boot arch-windows with systemd boot: empty fstab

I dual boot arch/windows since a while and decided to perform a fresh arch install. W10 was first installed.
Below are relevant pieces of information.

filesystem preparation

# fdisk -l
Device             Start       End   Sectors   Size Type
/dev/nvme0n1p1      2048    534527    532480   260M EFI System   <--- comes from w10 install
/dev/nvme0n1p2    534528    567295     32768    16M Microsoft reserved
/dev/nvme0n1p3    567296 637416297 636849002 303.7G Microsoft basic data  <--- w10
/dev/nvme0n1p4 637417472 638535679   1118208   546M Windows recovery environment
/dev/nvme0n1p5 638535680 945737727 307202048 146.5G Linux filesystem  <--- arch, label=magnolia
/dev/nvme0n1p8 945737728 998166527  52428800    25G Microsoft basic data

Btrfs things (3 subvolumes)

# btrfs filesystem show
Label: 'magnolia'  uuid: aa276d53-410c-4bf4-ac41-08b658625043
	Total devices 1 FS bytes used 1.24GiB
	devid    1 size 146.49GiB used 4.02GiB path /dev/nvme0n1p5
# mount /dev/nvme0n1p5 /mnt
# ls -al /mnt
total 16
drwxr-xr-x 1 root root   18 Jun 12 22:47 .
drwxr-xr-x 1 root root  120 Jun 14  2022 ..
drwxr-xr-x 1 root root  122 Jun 12 23:17 @
drwxr-xr-x 1 root root 1518 Jun 13 20:42 @etc
drwxr-xr-x 1 root root  100 Jun 12 23:17 @var

Then I followed strictly installation guide arch wiki

# cat /mnt/@etc/fstab 
# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/nvme0n1p5 LABEL=magnolia
UUID=aa276d53-410c-4bf4-ac41-08b658625043	/         	btrfs     	rw,noatime,discard,compress=zstd:3,ssd,space_cache,commit=120,subvolid=256,subvol=@	0 0

# /dev/nvme0n1p1 LABEL=SYSTEM_DRV
UUID=2879-4041      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2

# /dev/nvme0n1p5 LABEL=magnolia
UUID=aa276d53-410c-4bf4-ac41-08b658625043	/var      	btrfs     	rw,noatime,discard,compress=zstd:3,ssd,space_cache,commit=120,subvolid=258,subvol=@var	0 0

# /dev/nvme0n1p5 LABEL=magnolia
UUID=aa276d53-410c-4bf4-ac41-08b658625043	/etc      	btrfs     	rw,noatime,discard,compress=zstd:3,ssd,space_cache,commit=120,subvolid=257,subvol=@etc	0 0
# ls -al /mnt/@/boot
total 0
drwxr-xr-x 1 root root   0 Jun 12 23:08 .
drwxr-xr-x 1 root root 122 Jun 12 23:17 ..

# mkdir /mnt/boot
# mount /dev/nvme0n1p1 /mnt/boot
# ls -al /mnt/boot
total 59996
drwxr-xr-x 6 root root     4096 Jan  1  1970 .
drwxr-xr-x 1 root root       26 Jun 14 09:48 ..
drwxr-xr-x 2 root root     4096 May  2  2018 BOOT
drwxr-xr-x 8 root root     4096 Jun 13 01:18 EFI
-rwxr-xr-x 1 root root 35698203 Jun 12 23:49 initramfs-linux-fallback.img
-rwxr-xr-x 1 root root  9902681 Jun 12 23:49 initramfs-linux.img
-rwxr-xr-x 1 root root  5174272 May 10 18:27 intel-ucode.img
drwxr-xr-x 3 root root     4096 Jun 14  2022 loader
-rwxr-xr-x 1 root root 10615744 Jun 12 23:17 vmlinuz-linux

chroot arch

# bootctl status  
     Firmware: UEFI 2.50 (INSYDE Corp. 313.00)
  Secure Boot: disabled (setup)
 TPM2 Support: yes
 Boot into FW: supported

Current Boot Loader:
      Product: systemd-boot 250.4-2-arch
     Features: ✓ Boot counting
               ✓ Menu timeout control
               ✓ One-shot menu timeout control
               ✓ Default entry control
               ✓ One-shot entry control
               ✓ Support for XBOOTLDR partition
               ✓ Support for passing random seed to OS
               ✓ Load drop-in drivers
               ✗ Boot loader sets ESP information   <--- maybe the root of my issue
          ESP: n/a
         File: └─/EFI/BOOT/BOOTX64.EFI

Random Seed:
 Passed to OS: no
 System Token: set

Boot Loaders Listed in EFI Variables:
        Title: Linux Boot Manager
           ID: 0x0001
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/fd98769e-62b3-4615-a98f-4461815c8619
         File: └─/EFI/systemd/systemd-bootx64.efi

        Title: Windows Boot Manager
           ID: 0x0002
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/fd98769e-62b3-4615-a98f-4461815c8619
         File: └─/EFI/Microsoft/Boot/bootmgfw.efi

Boot Loader Entries:
        $BOOT: /boot (/dev/disk/by-partuuid/fd98769e-62b3-4615-a98f-4461815c8619)

Default Boot Loader Entry:
         type: Boot Loader Specification Type #1 (.conf)
        title: Arch linux by Gabx
           id: arch.conf
       source: /boot/loader/entries/arch.conf
        linux: /vmlinuz-linux
       initrd: /intel-ucode.img
      options: root=LABEL=magnolia rootflags=subvol=@ rw
# cat boot/loader/loader.conf
default	      arch.conf
timeout       5
console-mode  max
editor        no
# cat boot/loader/entries/arch.conf 
title		Arch linux by Gabx
linux		/vmlinuz-linux
initrd		/intel-ucode.img
initrd		/initramfs-linux.img
options		root=LABEL=magnolia rootflags=subvol=@ rw

Once I leave chrooted environment, when I run bootctl I have a slightly different output:

# bootctl status
Couldn't find EFI system partition. It is recommended to mount it to /boot or /efi.
Alternatively, use --esp-path= to specify path to mount point.

I used the --esp-path=/boot option even if I think this is not mandatory.

When I boot, I can see the boot menu with arch and w10. Selecting arch will boot the OS,but at the virtual console i can see the filesystem is not mounted and the fstab is empty.
I can't see where I did wrong. Thank you for any help on this issue

Last edited by gabx (2022-06-14 12:41:10)


#2 2022-06-14 11:09:28

From: London
Registered: 2014-02-20
Posts: 6,391

Re: [SOLVED]dual boot arch-windows with systemd boot: empty fstab

gabx wrote:

Selecting arch will boot the OS,but at the virtual console i can see the filesystem is not mounted and the fstab is empty.

That's because systemd-boot tells the kernel where the root subvolume is but then /etc/fstab can't be found because it's in a different subvolume.

Why do you have /etc/ in a separate subvolume? Placing a copy of /etc/fstab in the root subvolume would make things work. It would be "covered" by the /etc/ subvolume once it's been read. You would then have to keep both files in synchrony if you ever had to change anything. Seems like hassle for no gain to me.


#3 2022-06-14 12:07:03

From: Geneva, Switzerland
Registered: 2011-11-20
Posts: 115

Re: [SOLVED]dual boot arch-windows with systemd boot: empty fstab

I see and this is obvious. I will make the changes as soon as I can and see if issue is solved (I think it will).
The etc subvol was to make a regular backup of this partition,like home.Not sure I will thus keep this setup,even if I don't change very often my devices.

Thank you much for your prompt  answer.I will be back to mark solved if it is


Board footer

Powered by FluxBB