Bug#491376: recipe for BIOS-based boot on gpt
Package: partman-auto
Version: 79
Severity: wishlist
Tags: patch
Hi,
This patch adds a recipe for creating a BIOS boot partition when installing
on GPT. Note the amd64 directory is not included with the patch, as I would
suggest just using a symlink for that (or otherwise copying it).
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-6-amd64
Locale: LANG=ca_AD.UTF-8, LC_CTYPE=ca_AD.UTF-8 (charmap=UTF-8)
Index: recipes-i386/home
===================================================================
--- recipes-i386/home (revision 54293)
+++ recipes-i386/home (working copy)
@@ -1,5 +1,10 @@
partman-auto/text/home_scheme ::
+1 1 1 free
+ $gptonly{ }
+ $primary{ }
+ $bios_boot{ } .
+
128 512 256 ext2
$defaultignore{ }
$primary{ }
Index: recipes-i386/multi
===================================================================
--- recipes-i386/multi (revision 54293)
+++ recipes-i386/multi (working copy)
@@ -1,5 +1,10 @@
partman-auto/text/multi_scheme ::
+1 1 1 free
+ $gptonly{ }
+ $primary{ }
+ $bios_boot{ } .
+
128 512 256 ext2
$defaultignore{ }
$primary{ }
Index: recipes-i386/atomic
===================================================================
--- recipes-i386/atomic (revision 54293)
+++ recipes-i386/atomic (working copy)
@@ -1,5 +1,10 @@
partman-auto/text/atomic_scheme ::
+1 1 1 free
+ $gptonly{ }
+ $primary{ }
+ $bios_boot{ } .
+
128 512 256 ext2
$defaultignore{ }
$primary{ }
Index: lib/recipes.sh
===================================================================
--- lib/recipes.sh (revision 54293)
+++ lib/recipes.sh (working copy)
@@ -90,9 +90,16 @@
shift; shift; shift; shift
line="$min $factor $max $fs $*"
+ open_dialog GET_LABEL_TYPE
+ read_line label_type
+ close_dialog
+
# Exclude partitions that have ...ignore set
if [ "$ignore" ] && [ "$(echo $line | grep "$ignore")" ]; then
:
+ # Exclude partitions that have gptonly set (except on GPT labels)
+ elif [ "$label_type" != "gpt" ] && [ "$label_type" != "unknown" ] && [ "$(echo $line | grep "gptonly")" ]; then
+ :
else
scheme="${scheme:+$scheme$NL}$line"
fi
@@ -201,6 +208,19 @@
write_line NO_MORE
close_dialog
;;
+ \$bios_boot{)
+ while [ "$1" != '}' ] && [ "$1" ]; do
+ shift
+ done
+ open_dialog GET_FLAGS $id
+ flags=$(read_paragraph)
+ close_dialog
+ open_dialog SET_FLAGS $id
+ write_line "$flags"
+ write_line bios_grub
+ write_line NO_MORE
+ close_dialog
+ ;;
\$*{)
while [ "$1" != '}' ] && [ "$1" ]; do
shift
Reply to: