2 # shebang is for editor file mode detection only
5 if [ -s $envfile ]; then
7 save_env
--file $envfile $var
12 function save_chosen
{
14 save_vars did_fai_check last_boot
17 # we don't set this to fai check so we can't get into
18 # an infinite reboot cycle. We depend on the os to
19 # create the initial grubenv file.
20 set default
=/debianstable_bootstrap
# could use 0 here.
23 for part
in (ahci
*4) (ata
*4); do
25 if [ -s $envfile ]; then
26 load_env
--file $envfile
27 if [ x
$did_fai_check != xtrue
-a x
$last_boot != x
$default ]; then
29 elif [ ! -z $last_boot ]; then
30 set default
=$last_boot
38 bs_dir
=/debianstable_bootstrap
39 menuentry
$bs_dir --id=$bs_dir {
41 configfile
$bs_dir/boot
/grub
/grub.cfg
44 for dir
in /boot_
*; do
45 if [ $dir == '/boot_*' ]; then
48 menuentry
$dir --id=$dir {
50 configfile
$1/grub
/grub.cfg
54 menuentry fai-check
--id=fai-check
{
56 save_vars did_fai_check
57 configfile
$bs_dir/boot
/grub
/grub.cfg