Hey People, this time I need your help — and badly too.
Here’s the thing… For a couple of weeks already, I had been brooding on converting my existing Manjaro installation with multiple distinct partitions — i.e. the usual EFI partition, an ext4
partition for /boot
, a (disabled) swap partition, an unused (for too small) btrfs
partition that used to be mounted at /var
, and about 7 other distinct btrfs
partitions — into a system with the following setup…:
/dev/sda1
–/boot/efi
–vfat
(unchanged)/dev/sda2
–/boot
–ext4
(unchanged)/dev/sda3
– everything else —btrfs
subvolumes (and a whole bunch of them too!)
Now, I have studied the Arch Wiki, I have read countless man
pages — well, okay, maybe not “countless”, but many of them anyway — and I have even consulted duck.ai, the ChatGPT4 Mini of DuckDuckGo. And it was quite helpful on account of technical details that are often overlooked or ambiguously worded in the man
pages or online information sources.
So I have done my due diligence, and I am pretty certain that I was also very meticulous and methodical in my efforts. However, I cannot really test my endeavor — pun not intended, although I will get back to this in a short while — because my system refuses to boot, with an error message that it cannot mount /boot
, and an “Assertion” error about the initramfs
.
Now, the thing is that before I went ahead with the conversion, I already had a similar failure to boot with my system as it was installed. And I had only really done two or three things, one of which threw an error.
-
The first thing I did was use
gparted
to give my first three partitions aPARTLABEL
, and in addition to that, a filesystemLABEL
for/dev/sda2
and/dev/sda3
. At that point in time,/dev/sda3
already was my root filesystem, and it wasbtrfs
, but it was only 1 GiB in size, and it initially only had one subvolume on it, “@
”, created bycalamares
. My conversion afterwards was going to include the removal of all following partitions and the enlargement of/dev/sda3
to fill the rest of the drive. -
The second thing I did was create additional (but empty) subvolumes on
/dev/sda3
. -
The third thing I did — and which was the one that threw up an error, even though it had nothing to do with the above two actions — was update my system, because there was an update for
chromium
waiting, and to then, while I was at it, uninstallmkinitcpio-openswap
. I don’t really know why I had that installed, and it was marked as “explicitly installed”. But given that I don’t even use a swap device — with 16 GiB of RAM, I haven’t needed any swap in almost 6 years now — I uninstalled it.
It was this latter action which triggered an automatic rebuild of my initramfs
, and that’s where things suddenly went all haywire. Even though the initramfs
appeared to have been correctly built — it reported success, and it showed me all of the hooks — there was an error message from zstd
right after showing the [kms]
hook, and it was repeatable. I’ve retried rebuilding the initramfs
, and each time the error message — going from memory, it was something along the lines of “zstd
error 70: broken pipe” — appeared right after the [kms]
hook appeared on the screen.
I didn’t think much of it, given that the rebuild of the initramfs
appeared to have succeeded well. So before doing anything else, I decided to download the latest Manjaro ISO for my Ventoy stick. But stupidly, after removing the older Manjaro ISO from the Ventoy stick, I had forgotten to move the new ISO from /tmp
to the Ventoy stick – I always download ISOs to /tmp
, which is faster than an SSD, and which spares the SSD a few write-and-erase cycles.
Therefore, upon rebooting from the Ventoy stick, I saw that I only still had Endeavour OS on there, which is what I’m using now, and it’s a pain in the nether regions, because it’s completely set up for laptops with US keyboards and WiFi, with a dimming screen, power savings all over the place, double-click to open instead of single-click, an incredibly slow mouse with acceleration disabled, and so on.
I literally have to spend at least half an hour tweaking all the settings — including changing the wallpaper to something that causes less bleeding in my eyes and enlarging the ant-sized fonts. It also takes ages to boot, because by default, it loads a firewall that slows everything down, kdeconnect
, and something similar to manjaro-hello
, but which also takes a long time to load. And, oh, yes, you’re on a slow power-savings profile by default, so you have to change that too.
Anyway, rant aside, so I booted up from the Ventoy and saw that I only had Endeavour OS anymore on it. Slapping myself upside the head, I decided to boot back into Manjaro and download the ISO again. And that’s when I first got that error message about being unable to mount /boot
. As far as I can see, it’s some kind of an emergency mode in the initramfs
— busybox
perhaps. But it doesn’t let me do anything other than reboot by way of the three-finger salute.
Now, I still thought that I could fix whatever needed to be fixed once I had the conversion behind me, and so I went ahead and started the conversion anyway, by way of the Endeavour OS ISO and a manual chroot
, all with man
pages open and firefox
aimed at several pages of the Arch Wiki.
I did however make certain that there were no errors on the filesystem itself — given that I had created a filesystem LABEL
for it, which it did not have yet before — and in the process, I also checked the btrfs
volume for errors, and I ran a full “btrfs scrub
” on it too after copying all my files back — by hand, one major directory at the time! — into the individual subvolumes, from a mounted timeshift
rsync
backup on my spinning-rust HDD.
I have also examined the contents of the initramfs
with lsinitcpio
— I even unpacked it into the home directory of the live user of the Endeavour OS USB — so as to see what was all there, and most notably, my meticulously formatted new /etc/fstab
, which I am including in the initramfs
by way of the FILES=
section of /etc/mkinitcpio.conf
.
The reason why I am including /etc/fstab
in there is because I now have a very specialized setup, with /etc
being on its own subvolume in a flat list, instead of as a directory in the “@” subvolume mounted as /
.
If I had made /etc
into a nested subvolume under “@
”, then its contents would already be visible from the moment “@
” gets mounted, but it would then be mounted with the same mount options as “@
” itself, and you can then explicitly mount it with its own mount options later.
Perhaps I should have done it that way — and I can always move it under “@
” if I have to — but I wanted it to be a flat list, which looks nicer, because otherwise it would have been the only nested subvolume. It’s just my OCD — and unlike in the case of many people who casually say they have OCD, I do actually have OCD.
Anyway, below is my new layout — or at least, on account of /dev/sda
, because /dev/sdb
is my HDD and is only ever mounted while making backups. Caution: It’s a big list.
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
#
#############################################################################################################################################################
#
# FILESYSTEM UUID PARTITION TYPE PARTITION LABEL FILESYSTEM LABEL FILESYSTEM FORMAT
#
#
# CEF6-EF5C EFI System Partition ESP ESP vfat
# 924f11d8-4bec-49a6-852e-033ce5e3d6a3 "/boot" filesystem BOOT BOOT ext4
# 3f1852bc-be95-4e42-8d46-25bafac4ce79 btrfs root filesystem SYSTEM SYSTEM btrfs
#
#############################################################################################################################################################
#
# PARTITION LABEL MOUNTPOINT FSTYPE MOUNT OPTIONS DUMP PASS
#
PARTLABEL=ESP /boot/efi vfat ro,defaults,noatime,sync,nodev,umask=0022,tz=UTC 0 0
PARTLABEL=BOOT /boot ext4 ro,defaults,noatime,nodev 0 0
PARTLABEL=SYSTEM / btrfs ssd,ro,noatime,space_cache,compress=zstd,nodev,discard=async,subvolid=257,subvol=@ 0 0
PARTLABEL=SYSTEM /usr btrfs ssd,ro,noatime,space_cache,compress=zstd,nodev,discard=async,subvolid=272,subvol=@usr 0 0
PARTLABEL=SYSTEM /usr/local btrfs ssd,ro,noatime,space_cache,compress=zstd,nodev,discard=async,subvolid=273,subvol=@usr.local 0 0
PARTLABEL=SYSTEM /opt btrfs ssd,ro,noatime,space_cache,compress=zstd,nodev,discard=async,subvolid=274,subvol=@opt 0 0
PARTLABEL=SYSTEM /var btrfs ssd,rw,noatime,space_cache,compress=zstd,nodev,discard=async,subvolid=275,subvol=@var 0 0
PARTLABEL=SYSTEM /var/cache btrfs ssd,rw,noatime,space_cache,compress=zstd,nodev,discard=async,subvolid=276,subvol=@var.cache 0 0
PARTLABEL=SYSTEM /var/log btrfs ssd,rw,noatime,space_cache,compress=zstd,nodev,discard=async,subvolid=277,subvol=@var.log 0 0
PARTLABEL=SYSTEM /home btrfs ssd,rw,noatime,space_cache,compress=zstd,nodev,discard=async,subvolid=278,subvol=@home 0 0
PARTLABEL=SYSTEM /srv btrfs ssd,rw,noatime,space_cache,compress=zstd,nodev,discard=async,subvolid=279,subvol=@srv 0 0
PARTLABEL=SYSTEM /srv/mmedia/music btrfs ssd,rw,noatime,space_cache,compress=zstd,nodev,discard=async,subvolid=280,subvol=@srv.mmedia.music 0 0
PARTLABEL=SYSTEM /srv/mmedia/video btrfs ssd,rw,noatime,space_cache,compress=zstd,nodev,discard=async,subvolid=281,subvol=@srv.mmedia.video 0 0
PARTLABEL=SYSTEM /var/spool btrfs ssd,rw,noatime,space_cache,compress=zstd,nodev,discard=async,subvolid=282,subvol=@var.spool 0 0
PARTLABEL=SYSTEM /root btrfs ssd,rw,noatime,space_cache,compress=zstd,nodev,discard=async,subvolid=283,subvol=@rootuser 0 0
PARTLABEL=SYSTEM /var/tmp btrfs ssd,rw,noatime,space_cache,compress=zstd,nodev,discard=async,subvolid=284,subvol=@var.tmp 0 0
PARTLABEL=SYSTEM /etc btrfs ssd,ro,noatime,space_cache,compress=zstd,nodev,discard=async,subvolid=285,subvol=@etc 0 0
# Below is the root subvolume of a btrfs filesystem on the MDT HDD, which is used exclusively for backups.
UUID=1aedac7f-403b-4d85-9643-0d622be75453 /mnt btrfs noauto,nofail,subvolid=5,defaults,space_cache,autodefrag,compress=zstd,nodev,noexec 0 0
And just to be complete, here’s my /etc/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=(usbhid xhci_hcd)
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=(/etc/fstab)
# 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 modconf block filesystems fsck)
#
## This setup will generate a 'full' image which supports most systems.
## No autodetection is done.
# HOOKS=(base udev modconf block filesystems fsck)
#
## This setup assembles a mdadm array with an encrypted root file system.
## Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
# HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
#
## This setup loads an lvm2 volume group.
# HOOKS=(base udev modconf block lvm2 filesystems fsck)
#
## This will create a systemd based initramfs which loads an encrypted root filesystem.
# HOOKS=(base systemd autodetect modconf kms keyboard sd-vconsole sd-encrypt block filesystems fsck)
#
## NOTE: If you have /usr on a separate partition, you MUST include the
# usr and fsck hooks.
#
# NOTE from Aragorn: The above is not needed with the systemd hook
HOOKS=(systemd autodetect microcode modconf kms keyboard sd-vconsole block filesystems)
# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used for Linux ≥ 5.9 and gzip compression is used for Linux < 5.9.
# Use 'cat' to create an uncompressed image.
#COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"
COMPRESSION="zstd"
# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()
# MODULES_DECOMPRESS
# Decompress loadable kernel modules and their firmware during initramfs
# creation. Switch (yes/no).
# Enable to allow further decreasing image size when using high compression
# (e.g. xz -9e or zstd --long --ultra -22) at the expense of increased RAM usage
# at early boot.
# Note that any compressed files will be placed in the uncompressed early CPIO
# to avoid double compression.
#MODULES_DECOMPRESS="no"
As I said, all of the filesystems check out fine — I’ve checked both the ext4
partition at /boot
(with e2fsck
) and I’ve checked the btrfs
filesystem (with “btrfs check
” and “btrfs scrub
”). The hardware is also still in good condition – I’ve checked that too.
And as I also said earlier, the problem with the initramfs
already occurred just before I went ahead with the conversion of my partitioning, with the only possible clue being that zstd
error during the automatic rebuild of the initramfs
after the removal of the mkinitcpio-openswap
package.
So, here I am, running from that gawdawful Endeavour OS live session. I don’t often post a support request, and when I do, it’s usually about very specialized things that only a few people know about. But neither the documentation nor DuckDuckGo’s otherwise quite congenial duck.ai can offer me any solace.
I am genuinely at the end of my rope. I’ve been going at this for over 24 hours already, and I’m also battling some other technical issues here at my home in the meantime as well. So I’m hoping one (or several) of you people can help me out with this one.
I am obviously missing something. But the question is “What?”