I was trying to minimise initramfs to optimise booting following https://wiki.archlinux.org/title/Mkinitcpio/Minimal_initramfs
But failed to boot not detecting root which is a btrfs partitions,
Then I found this https://stackoverflow.com/questions/43001223/how-to-ensure-that-there-is-a-delay-before-a-service-is-started-in-systemd
I created those two files, still fails to detect the root.
Anybody has succeeded in doing this?
Thank you
Files: /etc/mkinitcpio.d/linux-xanmod-anbox.preset
```
ALL_config="/etc/mkinitcpio.conf" ALL_kver="/boot/vmlinuz-linux-xanmod-anbox"
PRESETS=('default' 'fallback')
default_image="/boot/initramfs-linux-xanmod-anbox.img"
fallback_image="/boot/initramfs-linux-xanmod-anbox-fallback.img" fallback_options="-S autodetect" `/usr/lib/initcpio/hooks/without-udev`
run_hook () { local dev timeout sleepval device=$root # if udev is running then exit [ "$udevd_running" -eq 1 ] && return # try for (timeout * sleepval =) 10 seconds to handle slow (USB) devices timeout=1000 sleepval=0.01
case $device in # label to resolve, when resolved the kernel block device also exists UUID=*|LABEL=*|PARTUUID=*|PARTLABEL=*) while [ $timeout -gt 0 ]; do timeout=$((timeout - 1)) dev=$(blkid -lt "$device" -o device) [ -n "$dev" ] && timeout=0 || sleep $sleepval done ;; # kernel named block device, poll for existence /dev/*) while [ $timeout -gt 0 ]; do timeout=$((timeout -1)) if [ -b "$device" ]; then dev=$device timeout=0 else sleep $sleepval fi done ;; esac
} `/usr/lib/initcpio/install/without-udev`
build() { add_runscript }
help() { cat <<HELPEOF This hook provides support for booting without the "udev" hook, including support for UUID, LABEL, PARTUUID, PARTLABEL. HELPEOF } ```
Also a line in /etc/mkinitcpio.conf BINARIES="fsck fsck.btrfs btrfsck"