Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 442050 | Differences between
and this patch

Collapse All | Expand All

(-)grub-2.00.orig/grub-core/loader/i386/bsd.c (-5 / +5 lines)
Lines 1309-1315 Link Here
1309
      && phdr->p_type != PT_DYNAMIC)
1309
      && phdr->p_type != PT_DYNAMIC)
1310
      return 0;
1310
      return 0;
1311
1311
1312
  paddr = phdr->p_paddr & 0xFFFFFF;
1312
  paddr = phdr->p_paddr & 0xFFFFFFF;
1313
1313
1314
  if (paddr < kern_start)
1314
  if (paddr < kern_start)
1315
    kern_start = paddr;
1315
    kern_start = paddr;
Lines 1333-1339 Link Here
1333
    }
1333
    }
1334
1334
1335
  *do_load = 1;
1335
  *do_load = 1;
1336
  phdr->p_paddr &= 0xFFFFFF;
1336
  phdr->p_paddr &= 0xFFFFFFF;
1337
  paddr = phdr->p_paddr;
1337
  paddr = phdr->p_paddr;
1338
1338
1339
  *addr = (grub_addr_t) (paddr - kern_start + (grub_uint8_t *) kern_chunk_src);
1339
  *addr = (grub_addr_t) (paddr - kern_start + (grub_uint8_t *) kern_chunk_src);
Lines 1351-1357 Link Here
1351
      && phdr->p_type != PT_DYNAMIC)
1351
      && phdr->p_type != PT_DYNAMIC)
1352
    return 0;
1352
    return 0;
1353
1353
1354
  paddr = phdr->p_paddr & 0xffffff;
1354
  paddr = phdr->p_paddr & 0xfffffff;
1355
1355
1356
  if (paddr < kern_start)
1356
  if (paddr < kern_start)
1357
    kern_start = paddr;
1357
    kern_start = paddr;
Lines 1375-1381 Link Here
1375
    }
1375
    }
1376
1376
1377
  *do_load = 1;
1377
  *do_load = 1;
1378
  paddr = phdr->p_paddr & 0xffffff;
1378
  paddr = phdr->p_paddr & 0xfffffff;
1379
1379
1380
  *addr = (grub_addr_t) (paddr - kern_start + (grub_uint8_t *) kern_chunk_src);
1380
  *addr = (grub_addr_t) (paddr - kern_start + (grub_uint8_t *) kern_chunk_src);
1381
1381
Lines 1394-1400 Link Here
1394
    {
1394
    {
1395
      grub_relocator_chunk_t ch;
1395
      grub_relocator_chunk_t ch;
1396
1396
1397
      entry = elf->ehdr.ehdr32.e_entry & 0xFFFFFF;
1397
      entry = elf->ehdr.ehdr32.e_entry & 0xFFFFFFF;
1398
      err = grub_elf32_phdr_iterate (elf, filename,
1398
      err = grub_elf32_phdr_iterate (elf, filename,
1399
				     grub_bsd_elf32_size_hook, NULL);
1399
				     grub_bsd_elf32_size_hook, NULL);
1400
      if (err)
1400
      if (err)
(-)grub-2.00.orig/util/grub-mkconfig_lib.in (+7 lines)
Lines 349-351 Link Here
349
      cat
349
      cat
350
  fi
350
  fi
351
}
351
}
352
353
grub_tab="	"
354
355
grub_add_tab () {
356
  sed -e "s/^/$grub_tab/"
357
}
358
(-)grub-2.00.orig/util/grub.d/10_hurd.in (-4 / +4 lines)
Lines 108-114 Link Here
108
EOF
108
EOF
109
  fi
109
  fi
110
110
111
  prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | sed -e "s/^/\t/"|sed "s/^/$submenu_indentation/"
111
  prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | grub_add_tab|sed "s/^/$submenu_indentation/"
112
  message="$(gettext_printf "Loading GNU Mach ...")"
112
  message="$(gettext_printf "Loading GNU Mach ...")"
113
113
114
  if [ x$type = xrecovery ] ; then
114
  if [ x$type = xrecovery ] ; then
Lines 122-130 Link Here
122
EOF
122
EOF
123
123
124
  if [ x$type != xrecovery ] ; then
124
  if [ x$type != xrecovery ] ; then
125
      save_default_entry | sed -e "s/^/\t/"| sed "s/^/$submenu_indentation/"
125
      save_default_entry | grub_add_tab| sed "s/^/$submenu_indentation/"
126
  fi
126
  fi
127
  prepare_grub_to_access_device "${GRUB_DEVICE}" | sed -e "s/^/\t/"| sed "s/^/$submenu_indentation/"
127
  prepare_grub_to_access_device "${GRUB_DEVICE}" | grub_add_tab| sed "s/^/$submenu_indentation/"
128
  message="$(gettext_printf "Loading the Hurd ...")"
128
  message="$(gettext_printf "Loading the Hurd ...")"
129
  if [ x$type = xrecovery ] ; then
129
  if [ x$type = xrecovery ] ; then
130
      opts=
130
      opts=
Lines 158-164 Link Here
158
158
159
  if [ "x$is_first_entry" = xtrue ]; then
159
  if [ "x$is_first_entry" = xtrue ]; then
160
      hurd_entry "$kernel" simple
160
      hurd_entry "$kernel" simple
161
      submenu_indentation="\t"
161
      submenu_indentation="$grub_tab"
162
    
162
    
163
      # TRANSLATORS: %s is replaced with an OS name
163
      # TRANSLATORS: %s is replaced with an OS name
164
      echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnuhurd-advanced-$(grub_get_device_id "${GRUB_DEVICE_BOOT}")' {"
164
      echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnuhurd-advanced-$(grub_get_device_id "${GRUB_DEVICE_BOOT}")' {"
(-)grub-2.00.orig/util/grub.d/10_illumos.in (-2 / +2 lines)
Lines 35-42 Link Here
35
esac
35
esac
36
36
37
echo "menuentry '$(echo "$OS" | grub_quote)' ${CLASS} \$menuentry_id_option 'illumos-$(grub_get_device_id "${GRUB_DEVICE_BOOT}")' {"
37
echo "menuentry '$(echo "$OS" | grub_quote)' ${CLASS} \$menuentry_id_option 'illumos-$(grub_get_device_id "${GRUB_DEVICE_BOOT}")' {"
38
save_default_entry | sed -e "s/^/\t/"
38
save_default_entry | grub_add_tab
39
prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | sed -e "s/^/\t/"
39
prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | grub_add_tab
40
message="$(gettext_printf "Loading kernel of Illumos ...")"
40
message="$(gettext_printf "Loading kernel of Illumos ...")"
41
  cat << EOF
41
  cat << EOF
42
	insmod gzio
42
	insmod gzio
(-)grub-2.00.orig/util/grub.d/10_kfreebsd.in (-8 / +8 lines)
Lines 54-60 Link Here
54
  fi
54
  fi
55
55
56
  if [ -z "${prepare_module_dir_cache}" ]; then
56
  if [ -z "${prepare_module_dir_cache}" ]; then
57
    prepare_module_dir_cache="$(prepare_grub_to_access_device $(grub-probe -t device "${module_dir}") | sed -e "s/^/\t/")"
57
    prepare_module_dir_cache="$(prepare_grub_to_access_device $(${grub_probe} -t device "${module_dir}") | grub_add_tab)"
58
  fi
58
  fi
59
59
60
  printf '%s\n' "${prepare_module_dir_cache}"
60
  printf '%s\n' "${prepare_module_dir_cache}"
Lines 91-100 Link Here
91
      echo "menuentry '$(echo "$OS" | grub_quote)' ${CLASS} \$menuentry_id_option 'kfreebsd-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
91
      echo "menuentry '$(echo "$OS" | grub_quote)' ${CLASS} \$menuentry_id_option 'kfreebsd-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
92
  fi
92
  fi
93
  if [ x$type != xrecovery ] ; then
93
  if [ x$type != xrecovery ] ; then
94
      save_default_entry | sed -e "s/^/\t/" | sed "s/^/$submenu_indentation/"
94
      save_default_entry | grub_add_tab | sed "s/^/$submenu_indentation/"
95
  fi
95
  fi
96
  if [ -z "${prepare_boot_cache}" ]; then
96
  if [ -z "${prepare_boot_cache}" ]; then
97
    prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
97
    prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)"
98
  fi
98
  fi
99
99
100
  printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
100
  printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
Lines 112-118 Link Here
112
112
113
  load_kfreebsd_module acpi true
113
  load_kfreebsd_module acpi true
114
114
115
  for abstraction in dummy $(grub-probe -t abstraction --device ${GRUB_DEVICE}) ; do
115
  for abstraction in dummy $(${grub_probe} -t abstraction --device ${GRUB_DEVICE}) ; do
116
    case $abstraction in
116
    case $abstraction in
117
      lvm) load_kfreebsd_module geom_linux_lvm false ;;
117
      lvm) load_kfreebsd_module geom_linux_lvm false ;;
118
    esac
118
    esac
Lines 122-131 Link Here
122
    zfs)
122
    zfs)
123
      load_kfreebsd_module opensolaris false
123
      load_kfreebsd_module opensolaris false
124
124
125
      ls "${dirname}/zfs/zpool.cache" > /dev/null
125
      ls "/boot/zfs/zpool.cache" > /dev/null
126
      printf '%s\n' "${prepare_boot_cache}"
126
      printf '%s\n' "${prepare_boot_cache}"
127
      sed "s/^/$submenu_indentation/" << EOF
127
      sed "s/^/$submenu_indentation/" << EOF
128
	kfreebsd_module		${rel_dirname}/zfs/zpool.cache type=/boot/zfs/zpool.cache
128
	kfreebsd_module		$(make_system_path_relative_to_its_root /boot)/zfs/zpool.cache type=/boot/zfs/zpool.cache
129
EOF
129
EOF
130
    ;;
130
    ;;
131
  esac
131
  esac
Lines 179-185 Link Here
179
  case ${GRUB_FS} in
179
  case ${GRUB_FS} in
180
    zfs)
180
    zfs)
181
			# zpool name
181
			# zpool name
182
			kfreebsd_device=$(grub-probe -t fs_label --device ${GRUB_DEVICE})
182
			kfreebsd_device=$(${grub_probe} -t fs_label --device ${GRUB_DEVICE})
183
			# filesystem name (empty string for the main filesystem)
183
			# filesystem name (empty string for the main filesystem)
184
			kfreebsd_device="${kfreebsd_device}$(${grub_mkrelpath} / | sed -e "s,/*@$,,")"
184
			kfreebsd_device="${kfreebsd_device}$(${grub_mkrelpath} / | sed -e "s,/*@$,,")"
185
    ;;
185
    ;;
Lines 213-219 Link Here
213
213
214
  if [ "x$is_first_entry" = xtrue ]; then
214
  if [ "x$is_first_entry" = xtrue ]; then
215
      kfreebsd_entry "${OS}" "${version}" simple
215
      kfreebsd_entry "${OS}" "${version}" simple
216
      submenu_indentation="\t"
216
      submenu_indentation="$grub_tab"
217
    
217
    
218
      if [ -z "$boot_device_id" ]; then
218
      if [ -z "$boot_device_id" ]; then
219
	  boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
219
	  boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
(-)grub-2.00.orig/util/grub.d/10_linux.in (-4 / +4 lines)
Lines 101-107 Link Here
101
      echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
101
      echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
102
  fi      
102
  fi      
103
  if [ x$type != xrecovery ] ; then
103
  if [ x$type != xrecovery ] ; then
104
      save_default_entry | sed -e "s/^/\t/"
104
      save_default_entry | grub_add_tab
105
  fi
105
  fi
106
106
107
  # Use ELILO's generic "efifb" when it's known to be available.
107
  # Use ELILO's generic "efifb" when it's known to be available.
Lines 123-134 Link Here
123
123
124
  if [ x$dirname = x/ ]; then
124
  if [ x$dirname = x/ ]; then
125
    if [ -z "${prepare_root_cache}" ]; then
125
    if [ -z "${prepare_root_cache}" ]; then
126
      prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/")"
126
      prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | grub_add_tab)"
127
    fi
127
    fi
128
    printf '%s\n' "${prepare_root_cache}" | sed "s/^/$submenu_indentation/"
128
    printf '%s\n' "${prepare_root_cache}" | sed "s/^/$submenu_indentation/"
129
  else
129
  else
130
    if [ -z "${prepare_boot_cache}" ]; then
130
    if [ -z "${prepare_boot_cache}" ]; then
131
      prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
131
      prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)"
132
    fi
132
    fi
133
    printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
133
    printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
134
  fi
134
  fi
Lines 230-236 Link Here
230
    linux_entry "${OS}" "${version}" simple \
230
    linux_entry "${OS}" "${version}" simple \
231
    "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
231
    "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
232
232
233
    submenu_indentation="\t"
233
    submenu_indentation="$grub_tab"
234
    
234
    
235
    if [ -z "$boot_device_id" ]; then
235
    if [ -z "$boot_device_id" ]; then
236
	boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
236
	boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
(-)grub-2.00.orig/util/grub.d/10_netbsd.in (-5 / +5 lines)
Lines 77-86 Link Here
77
  prepare_grub_to_access_device $(${grub_probe} -t device "${kmodule}") | sed -e 's,^,	,'
77
  prepare_grub_to_access_device $(${grub_probe} -t device "${kmodule}") | sed -e 's,^,	,'
78
  case "${loader}" in
78
  case "${loader}" in
79
    knetbsd)
79
    knetbsd)
80
      printf "\tknetbsd_module_elf %s\n" "${kmodule_rel}"
80
      printf "$grub_tabknetbsd_module_elf %s\n" "${kmodule_rel}"
81
      ;;
81
      ;;
82
    multiboot)
82
    multiboot)
83
      printf "\tmodule %s\n" "${kmodule_rel}"
83
      printf "$grub_tabmodule %s\n" "${kmodule_rel}"
84
      ;;
84
      ;;
85
  esac
85
  esac
86
}
86
}
Lines 121-131 Link Here
121
  printf "%s\n" "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
121
  printf "%s\n" "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
122
  case "${loader}" in
122
  case "${loader}" in
123
    knetbsd)
123
    knetbsd)
124
      printf "\tknetbsd %s -r %s %s\n" \
124
      printf "$grub_tabknetbsd %s -r %s %s\n" \
125
        "${kernel}" "${kroot_device}" "${GRUB_CMDLINE_NETBSD} ${args}" | sed "s/^/$submenu_indentation/"
125
        "${kernel}" "${kroot_device}" "${GRUB_CMDLINE_NETBSD} ${args}" | sed "s/^/$submenu_indentation/"
126
      ;;
126
      ;;
127
    multiboot)
127
    multiboot)
128
      printf "\tmultiboot %s %s root=%s %s\n" \
128
      printf "$grub_tabmultiboot %s %s root=%s %s\n" \
129
        "${kernel}" "${kernel}" "${kroot_device}" "${GRUB_CMDLINE_NETBSD} ${args}" | sed "s/^/$submenu_indentation/"
129
        "${kernel}" "${kernel}" "${kroot_device}" "${GRUB_CMDLINE_NETBSD} ${args}" | sed "s/^/$submenu_indentation/"
130
      ;;
130
      ;;
131
  esac
131
  esac
Lines 159-165 Link Here
159
159
160
  if [ "x$is_first_entry" = xtrue ]; then
160
  if [ "x$is_first_entry" = xtrue ]; then
161
      netbsd_entry "knetbsd"   "$k" simple "${GRUB_CMDLINE_NETBSD_DEFAULT}"
161
      netbsd_entry "knetbsd"   "$k" simple "${GRUB_CMDLINE_NETBSD_DEFAULT}"
162
    submenu_indentation="\t"
162
    submenu_indentation="$grub_tab"
163
    
163
    
164
    if [ -z "$boot_device_id" ]; then
164
    if [ -z "$boot_device_id" ]; then
165
	boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
165
	boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
(-)grub-2.00.orig/util/grub.d/10_windows.in (-3 / +3 lines)
Lines 45-51 Link Here
45
    sort | uniq | wc -l`" = 1 || return 1
45
    sort | uniq | wc -l`" = 1 || return 1
46
46
47
  # Search 'default=PARTITION'
47
  # Search 'default=PARTITION'
48
  get_os_name_from_boot_ini_part=`sed -n 's,^default=,,p' "$1" | sed 's,\\\\,/,g;s,[ \t\r]*$,,;1q'`
48
  get_os_name_from_boot_ini_part=`sed -n 's,^default=,,p' "$1" | sed 's,\\\\,/,g;s,[ $grub_tab\r]*$,,;1q'`
49
  test -n "$get_os_name_from_boot_ini_part" || return 1
49
  test -n "$get_os_name_from_boot_ini_part" || return 1
50
50
51
  # Search 'PARTITION="NAME" ...'
51
  # Search 'PARTITION="NAME" ...'
Lines 87-94 Link Here
87
menuentry '$(echo "$OS" | grub_quote)' \$menuentry_id_option '$osid-$(grub_get_device_id "${dev}")' {
87
menuentry '$(echo "$OS" | grub_quote)' \$menuentry_id_option '$osid-$(grub_get_device_id "${dev}")' {
88
EOF
88
EOF
89
89
90
  save_default_entry | sed -e 's,^,\t,'
90
  save_default_entry | sed -e 's,^,$grub_tab,'
91
  prepare_grub_to_access_device "$dev" | sed 's,^,\t,'
91
  prepare_grub_to_access_device "$dev" | sed 's,^,$grub_tab,'
92
  test -z "$needmap" || cat <<EOF
92
  test -z "$needmap" || cat <<EOF
93
	drivemap -s (hd0) \$root
93
	drivemap -s (hd0) \$root
94
EOF
94
EOF
(-)grub-2.00.orig/util/grub.d/10_xnu.in (-2 / +2 lines)
Lines 39-46 Link Here
39
        cat << EOF
39
        cat << EOF
40
menuentry '$(echo "Darwin/Mac OS X $bitstr $onstr" | grub_quote)' --class osx --class darwin --class os \$menuentry_id_option 'osprober-xnu-$2-$(grub_get_device_id "${GRUB_DEVICE}")'  {
40
menuentry '$(echo "Darwin/Mac OS X $bitstr $onstr" | grub_quote)' --class osx --class darwin --class os \$menuentry_id_option 'osprober-xnu-$2-$(grub_get_device_id "${GRUB_DEVICE}")'  {
41
EOF
41
EOF
42
	save_default_entry | sed -e "s/^/	/"
42
	save_default_entry | grub_add_tab
43
	prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/	/"
43
	prepare_grub_to_access_device ${GRUB_DEVICE} | grub_add_tab
44
	cat << EOF
44
	cat << EOF
45
        load_video
45
        load_video
46
        set do_resume=0
46
        set do_resume=0
(-)grub-2.00.orig/util/grub.d/20_linux_xen.in (-3 / +3 lines)
Lines 110-120 Link Here
110
      echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'xen-gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
110
      echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'xen-gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
111
  fi
111
  fi
112
  if [ x$type != xrecovery ] ; then
112
  if [ x$type != xrecovery ] ; then
113
      save_default_entry | sed -e "s/^/\t/" | sed "s/^/$submenu_indentation/"
113
      save_default_entry | grub_add_tab | sed "s/^/$submenu_indentation/"
114
  fi
114
  fi
115
115
116
  if [ -z "${prepare_boot_cache}" ]; then
116
  if [ -z "${prepare_boot_cache}" ]; then
117
    prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
117
    prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)"
118
  fi
118
  fi
119
  printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
119
  printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
120
  xmessage="$(gettext_printf "Loading Xen %s ..." ${xen_version})"
120
  xmessage="$(gettext_printf "Loading Xen %s ..." ${xen_version})"
Lines 236-242 Link Here
236
	    linux_entry "${OS}" "${version}" "${xen_version}" simple \
236
	    linux_entry "${OS}" "${version}" "${xen_version}" simple \
237
		"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
237
		"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
238
238
239
	    submenu_indentation="\t\t"
239
	    submenu_indentation="$grub_tab$grub_tab"
240
    
240
    
241
	    if [ -z "$boot_device_id" ]; then
241
	    if [ -z "$boot_device_id" ]; then
242
		boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
242
		boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
(-)grub-2.00.orig/util/grub.d/30_os-prober.in (-10 / +10 lines)
Lines 54-61 Link Here
54
        cat << EOF
54
        cat << EOF
55
menuentry '$(echo "${LONGNAME} $bitstr $onstr" | grub_quote)' --class osx --class darwin --class os \$menuentry_id_option 'osprober-xnu-$2-$(grub_get_device_id "${DEVICE}")'  {
55
menuentry '$(echo "${LONGNAME} $bitstr $onstr" | grub_quote)' --class osx --class darwin --class os \$menuentry_id_option 'osprober-xnu-$2-$(grub_get_device_id "${DEVICE}")'  {
56
EOF
56
EOF
57
	save_default_entry | sed -e "s/^/\t/"
57
	save_default_entry | grub_add_tab
58
	prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
58
	prepare_grub_to_access_device ${DEVICE} | grub_add_tab
59
	cat << EOF
59
	cat << EOF
60
        load_video
60
        load_video
61
        set do_resume=0
61
        set do_resume=0
Lines 126-133 Link Here
126
      cat << EOF
126
      cat << EOF
127
menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class windows --class os \$menuentry_id_option 'osprober-chain-$(grub_get_device_id "${DEVICE}")' {
127
menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class windows --class os \$menuentry_id_option 'osprober-chain-$(grub_get_device_id "${DEVICE}")' {
128
EOF
128
EOF
129
      save_default_entry | sed -e "s/^/\t/"
129
      save_default_entry | grub_add_tab
130
      prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
130
      prepare_grub_to_access_device ${DEVICE} | grub_add_tab
131
131
132
      case ${LONGNAME} in
132
      case ${LONGNAME} in
133
	Windows\ Vista*|Windows\ 7*|Windows\ Server\ 2008*)
133
	Windows\ Vista*|Windows\ 7*|Windows\ Server\ 2008*)
Lines 181-194 Link Here
181
	used_osprober_linux_ids="$used_osprober_linux_ids 'osprober-gnulinux-$LKERNEL-${recovery_params}-$counter-$boot_device_id'"
181
	used_osprober_linux_ids="$used_osprober_linux_ids 'osprober-gnulinux-$LKERNEL-${recovery_params}-$counter-$boot_device_id'"
182
182
183
	if [ -z "${prepare_boot_cache}" ]; then
183
	if [ -z "${prepare_boot_cache}" ]; then
184
	  prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | sed -e "s/^/\t/")"
184
	  prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | grub_add_tab)"
185
	fi
185
	fi
186
186
187
	if [ "x$is_first_entry" = xtrue ]; then
187
	if [ "x$is_first_entry" = xtrue ]; then
188
            cat << EOF
188
            cat << EOF
189
menuentry '$(echo "$OS" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-simple-$boot_device_id' {
189
menuentry '$(echo "$OS" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-simple-$boot_device_id' {
190
EOF
190
EOF
191
	    save_default_entry | sed -e "s/^/\t/"
191
	    save_default_entry | grub_add_tab
192
	    printf '%s\n' "${prepare_boot_cache}"
192
	    printf '%s\n' "${prepare_boot_cache}"
193
	    cat <<  EOF
193
	    cat <<  EOF
194
	linux ${LKERNEL} ${LPARAMS}
194
	linux ${LKERNEL} ${LPARAMS}
Lines 208-215 Link Here
208
        cat << EOF
208
        cat << EOF
209
	menuentry '$(echo "$title" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-$LKERNEL-${recovery_params}-$boot_device_id' {
209
	menuentry '$(echo "$title" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-$LKERNEL-${recovery_params}-$boot_device_id' {
210
EOF
210
EOF
211
	save_default_entry | sed -e "s/^/\t\t/"
211
	save_default_entry | sed -e "s/^/$grub_tab$grub_tab/"
212
	printf '%s\n' "${prepare_boot_cache}" | sed -e "s/^/\t/"
212
	printf '%s\n' "${prepare_boot_cache}" | grub_add_tab
213
	cat <<  EOF
213
	cat <<  EOF
214
		linux ${LKERNEL} ${LPARAMS}
214
		linux ${LKERNEL} ${LPARAMS}
215
EOF
215
EOF
Lines 243-250 Link Here
243
      cat << EOF
243
      cat << EOF
244
menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class hurd --class gnu --class os \$menuentry_id_option 'osprober-gnuhurd-/boot/gnumach.gz-false-$(grub_get_device_id "${DEVICE}")' {
244
menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class hurd --class gnu --class os \$menuentry_id_option 'osprober-gnuhurd-/boot/gnumach.gz-false-$(grub_get_device_id "${DEVICE}")' {
245
EOF
245
EOF
246
      save_default_entry | sed -e "s/^/\t/"
246
      save_default_entry | grub_add_tab
247
      prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
247
      prepare_grub_to_access_device ${DEVICE} | grub_add_tab
248
      grub_device="`${grub_probe} --device ${DEVICE} --target=drive`"
248
      grub_device="`${grub_probe} --device ${DEVICE} --target=drive`"
249
      mach_device="`echo "${grub_device}" | sed -e 's/(\(hd.*\),msdos\(.*\))/\1s\2/'`"
249
      mach_device="`echo "${grub_device}" | sed -e 's/(\(hd.*\),msdos\(.*\))/\1s\2/'`"
250
      grub_fs="`${grub_probe} --device ${DEVICE} --target=fs`"
250
      grub_fs="`${grub_probe} --device ${DEVICE} --target=fs`"

Return to bug 442050