partman-btrfs/check.d/no_btrfs_boot
Joey Hess 0eb02adc27 initial commit of partman-btrfs
This is untested and unlikely to work without parted support.
Committing what I have since I don't trust btrfs to preserve the data. ;-)

Note to translators: Probably not worth wasting your time with this yet.
Have not run debconf-updatepo.

r62090
2010-01-27 20:14:29 +00:00

32 lines
713 B
Bash
Executable file

#!/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