heads/initrd
Jonathon Hall a6228b9843
functions: Improve detect_boot_device to silence exFAT errors
When testing a possible boot device, detect its partition type and
skip grub, LUKS, and LVM partitions.  These aren't mountable as /boot,
this silences spurious exFAT errors.

In detect_boot_device, skip testing CONFIG_BOOT_DEV a second time if it
is found as a block device.  This avoids doubling any errors shown from
checking this device, no sense trying it twice.

Refactor some logic to avoid duplication - extract
device_has_partitions and use it in detect_boot_device, extract
mount_possible_boot_device and use it instead of duplicating the logic.

Move find_lvm_vg_name() to /etc/functions.

Avoid mixing up similarly-named devices like 'nvme0n1'/'nvme0n10' or
'sda'/'sdaa' - it's probably unlikely that many devices will appear,
but looking for partitions in '/sys/class/block/<device>/' instead of
'/dev/' would avoid any collisions.

Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
2024-02-02 17:14:33 -05:00
..
.gnupg gpg2: make sure dirmngr is not spawn to refresh keys under initrd/.gnupg/gpg.conf 2024-01-09 12:53:56 -05:00
bin functions: Improve detect_boot_device to silence exFAT errors 2024-02-02 17:14:33 -05:00
etc functions: Improve detect_boot_device to silence exFAT errors 2024-02-02 17:14:33 -05:00
run/cryptsetup [WIP] cross build json-c and cryptsetup 2020-10-28 15:28:05 +02:00
sbin all scripts: replace TRACE manual strings with dynamic tracing by bash debug 2024-02-01 15:48:27 -05:00
.ash_history Merge pull request #1515 from tlaurion/inmemory_keygen-gpg_backup_usable_for_RSA_only-copy_to_card_working_for_RSA_only-gpg_auth_for_recovery_and_sub_boot 2023-11-13 16:05:26 -05:00
init init: Silence exFAT errors when mounting iso9660; reorder exfat last 2024-02-02 13:24:34 -05:00
mount-boot Add dual support for real bash and busybox's bash(ash) 2023-03-08 12:45:44 -05:00