mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
add syslinux checks for btrfs again
This commit is contained in:
parent
2c23fcc3ed
commit
1421e57da5
1 changed files with 33 additions and 15 deletions
|
@ -3078,12 +3078,39 @@ check_bootpart() {
|
|||
fi
|
||||
}
|
||||
|
||||
# check for btrfs bootpart and abort if detected
|
||||
abort_btrfs_bootpart() {
|
||||
# extlinux cannot boot from compressed btrfs
|
||||
# extlinux cannot boot from btrfs raid, compressed btrfs
|
||||
# FS60996:
|
||||
# btrfs subvolume support of /boot or / is broken as of 14.09.2021
|
||||
abort_syslinux_btrfs() {
|
||||
FSTYPE="$(${_LSBLK} FSTYPE ${bootdev})"
|
||||
if [[ "${FSTYPE}" = "btrfs" ]]; then
|
||||
DIALOG --msgbox "Error:\nYour selected bootloader cannot boot from btrfs partition with /boot on it." 0 0
|
||||
return 1
|
||||
# abort on compress or subvolume on /boot
|
||||
if [[ "$(mount | grep ${DESTDIR}/boot | grep subvol)" ]]; then
|
||||
DIALOG --msgbox "Error:\nYour selected bootloader cannot boot from btrfs partition with /boot on subvolume." 0 0
|
||||
return 1
|
||||
fi
|
||||
if [[ "$(mount | grep ${DESTDIR}/boot | grep compress)" ]]; then
|
||||
DIALOG --msgbox "Error:\nYour selected bootloader cannot boot from btrfs partition with /boot and enabled compress option." 0 0
|
||||
return 1
|
||||
fi
|
||||
# abort on compress or subvolume on / with /boot on it.
|
||||
if [[ ! "$(mount | grep ${DESTDIR}/boot)" ]]; then
|
||||
if [[ "$(mount | grep "${DESTDIR} " | grep subvol)" ]]; then
|
||||
DIALOG --msgbox "Error:\nYour selected bootloader cannot boot from btrfs with /boot on / subvolume." 0 0
|
||||
return 1
|
||||
fi
|
||||
if [[ "$(mount | grep "${DESTDIR} " | grep compress)" ]]; then
|
||||
DIALOG --msgbox "Error:\nYour selected bootloader cannot boot from btrfs with /boot on / and enabled compress option." 0 0
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
CHECK is not perfect
|
||||
find_btrfs_raid_bootloader_devices
|
||||
if [[ ${BTRFS_COUNT} -ge 3 ]]; then
|
||||
DIALOG --msgbox "Error:\n${SYSLINUX} cannot boot from any btrfs raid." 0 0
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -3706,6 +3733,7 @@ do_syslinux_bios() {
|
|||
do_syslinux_common_before
|
||||
|
||||
check_bootpart
|
||||
abort_syslinux_btrfs || return 1
|
||||
abort_nilfs_bootpart || return 1
|
||||
abort_f2fs_bootpart || return 1
|
||||
|
||||
|
@ -3731,17 +3759,7 @@ do_syslinux_bios() {
|
|||
SYSLINUX_OPTS="--raid"
|
||||
fi
|
||||
fi
|
||||
# extlinux cannot boot from compressed btrfs
|
||||
# extlinux cannot boot from btrfs raid, compressed btrfs
|
||||
# FS60996:
|
||||
# btrfs subvolume support of /boot or / is broken as of 14.09.2021
|
||||
### CHECK is wrong!
|
||||
#find_btrfs_raid_bootloader_devices
|
||||
#if [[ ${BTRFS_COUNT} -ge 3 ]]; then
|
||||
# DIALOG --msgbox "Error:\n${SYSLINUX} cannot boot from any btrfs raid." 0 0
|
||||
# return 1
|
||||
#fi
|
||||
|
||||
|
||||
DEVS="$(findbootloaderdisks _)"
|
||||
DEVS="${DEVS} $(findbootloaderpartitions _)"
|
||||
|
||||
|
|
Loading…
Reference in a new issue