Bug#491376: recipe for BIOS-based boot on gpt
Ok, so here are two patches. One of them using recipes-x86, and the other
simply modifiing recipes.
The first one expects recipes-x86 has been created previously via "svn copy".
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What good is a phone call… if you are unable to speak?
(as seen on /.)
Index: recipes/home
===================================================================
--- recipes/home (revision 54293)
+++ recipes/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/multi
===================================================================
--- recipes/multi (revision 54293)
+++ recipes/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/atomic
===================================================================
--- recipes/atomic (revision 54293)
+++ recipes/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
Index: debian/rules
===================================================================
--- debian/rules (revision 54293)
+++ debian/rules (working copy)
@@ -9,6 +9,7 @@
clean:
dh_testdir
dh_testroot
+ rm -rf recipes-i386 recipes-amd64
dh_clean
install: build
@@ -18,6 +19,9 @@
dh_install autopartition bin
dh_install perform_recipe bin
dh_install lib lib/partman
+ifneq (,$(filter $(ARCH),i386 amd64))
+ cp -a recipes-x86 recipes-$(ARCH)
+endif
if [ -d recipes-$(ARCH) ]; then \
debian/install-rc recipes-$(ARCH); \
else \
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
Index: recipes-x86/home
===================================================================
--- recipes-x86/home (revision 54293)
+++ recipes-x86/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-x86/multi
===================================================================
--- recipes-x86/multi (revision 54293)
+++ recipes-x86/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-x86/atomic
===================================================================
--- recipes-x86/atomic (revision 54293)
+++ recipes-x86/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{ }
Reply to: