Revert "Allow btrfs /boot partition. This is supported by grub2 and lilo."

This reverts commit 841f8b754c.
This commit is contained in:
Dimitri John Ledkov 2016-09-30 15:50:47 +01:00
parent 02d80bcaf7
commit a773054924
3 changed files with 51 additions and 0 deletions

View file

@ -1 +1,2 @@
09 nomountpoint_btrfs
05 no_btrfs_boot

32
check.d/no_btrfs_boot Executable file
View file

@ -0,0 +1,32 @@
#!/bin/sh
# grub and other bootloaders that read the filesystem do not support /boot
# on btrfs. (lilo should work). Detect and warn.
. /lib/partman/lib/base.sh
get_btrfs_root_boot () {
(for i in /lib/partman/fstab.d/*; do
[ -x "$i" ] || continue
$i
done) |
while read fs mp type options dump pass; do
if [ "$mp" = / ]; then
echo root_type=$type
elif [ "$mp" = /boot ]; then
echo boot_type=$type
fi
done
}
eval "$(get_btrfs_root_boot)"
if [ "$boot_type" = btrfs ]; then
db_input critical partman-btrfs/btrfs_boot || true
db_go || exit 1
exit 1
fi
if [ "$boot_type" = "" ] && [ "$root_type" = btrfs ]; then
db_input critical partman-btrfs/btrfs_root || true
db_go || exit 1
exit 1
fi

View file

@ -15,3 +15,21 @@ Type: text
# :sl1:
# Short file system name (untranslatable in many languages)
_Description: btrfs
Template: partman-btrfs/btrfs_root
Type: error
# :sl2:
_Description: btrfs root file system not supported without separate /boot
Your root file system is a btrfs file system. This is not supported
by the boot loader used by default by this installer.
.
You should use a small /boot partition with another file system, such as ext3.
Template: partman-btrfs/btrfs_boot
Type: error
# :sl2:
_Description: btrfs file system not supported for /boot
You have mounted a btrfs file system as /boot. This is not supported
by the boot loader used by default by this installer.
.
You should use another file system, such as ext3, for the /boot partition.