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

Collapse All | Expand All

(-)a/docs/grub.texi (+19 lines)
Lines 1398-1403 for all respectively normal entries. Link Here
1398
The values of these options replace the values of @samp{GRUB_CMDLINE_LINUX}
1398
The values of these options replace the values of @samp{GRUB_CMDLINE_LINUX}
1399
and @samp{GRUB_CMDLINE_LINUX_DEFAULT} for Linux and Xen menu entries.
1399
and @samp{GRUB_CMDLINE_LINUX_DEFAULT} for Linux and Xen menu entries.
1400
1400
1401
@item GRUB_EARLY_INITRD_LINUX_CUSTOM
1402
@itemx GRUB_EARLY_INITRD_LINUX_STOCK
1403
List of space-separated early initrd images to be loaded from @samp{/boot}.
1404
This is for loading things like CPU microcode, firmware, ACPI tables, crypto
1405
keys, and so on. These early images will be loaded in the order declared,
1406
and all will be loaded before the actual functional initrd image.
1407
1408
@samp{GRUB_EARLY_INITRD_LINUX_STOCK} is for your distribution to declare
1409
images that are provided by the distribution. It should not be modified
1410
without understanding the consequences. They will be loaded first.
1411
1412
@samp{GRUB_EARLY_INITRD_LINUX_CUSTOM} is for your custom created images.
1413
1414
The default stock images are as follows, though they may be overridden by
1415
your distribution:
1416
@example
1417
intel-uc.img intel-ucode.img amd-uc.img amd-ucode.img early_ucode.cpio microcode.cpio
1418
@end example
1419
1401
@item GRUB_DISABLE_LINUX_UUID
1420
@item GRUB_DISABLE_LINUX_UUID
1402
Normally, @command{grub-mkconfig} will generate menu entries that use
1421
Normally, @command{grub-mkconfig} will generate menu entries that use
1403
universally-unique identifiers (UUIDs) to identify the root filesystem to
1422
universally-unique identifiers (UUIDs) to identify the root filesystem to
(-)a/util/grub-mkconfig.in (+8 lines)
Lines 147-152 if [ x"$GRUB_FS" = xunknown ]; then Link Here
147
    GRUB_FS="$(stat -f --printf=%T / || echo unknown)"
147
    GRUB_FS="$(stat -f --printf=%T / || echo unknown)"
148
fi
148
fi
149
149
150
# Provide a default set of stock linux early initrd images.
151
# Define here so the list can be modified in the sourced config file.
152
if [ "x${GRUB_EARLY_INITRD_LINUX_STOCK}" = "x" ]; then
153
	GRUB_EARLY_INITRD_LINUX_STOCK="intel-uc.img intel-ucode.img amd-uc.img amd-ucode.img early_ucode.cpio microcode.cpio"
154
fi
155
150
if test -f ${sysconfdir}/default/grub ; then
156
if test -f ${sysconfdir}/default/grub ; then
151
  . ${sysconfdir}/default/grub
157
  . ${sysconfdir}/default/grub
152
fi
158
fi
Lines 211-216 export GRUB_DEFAULT \ Link Here
211
  GRUB_CMDLINE_NETBSD \
217
  GRUB_CMDLINE_NETBSD \
212
  GRUB_CMDLINE_NETBSD_DEFAULT \
218
  GRUB_CMDLINE_NETBSD_DEFAULT \
213
  GRUB_CMDLINE_GNUMACH \
219
  GRUB_CMDLINE_GNUMACH \
220
  GRUB_EARLY_INITRD_LINUX_CUSTOM \
221
  GRUB_EARLY_INITRD_LINUX_STOCK \
214
  GRUB_TERMINAL_INPUT \
222
  GRUB_TERMINAL_INPUT \
215
  GRUB_TERMINAL_OUTPUT \
223
  GRUB_TERMINAL_OUTPUT \
216
  GRUB_SERIAL_COMMAND \
224
  GRUB_SERIAL_COMMAND \
(-)a/util/grub.d/10_linux.in (-6 / +27 lines)
Lines 136-144 EOF Link Here
136
  if test -n "${initrd}" ; then
136
  if test -n "${initrd}" ; then
137
    # TRANSLATORS: ramdisk isn't identifier. Should be translated.
137
    # TRANSLATORS: ramdisk isn't identifier. Should be translated.
138
    message="$(gettext_printf "Loading initial ramdisk ...")"
138
    message="$(gettext_printf "Loading initial ramdisk ...")"
139
    initrd_path=
140
    for i in ${initrd}; do
141
      initrd_path="${initrd_path} ${rel_dirname}/${i}"
142
    done
139
    sed "s/^/$submenu_indentation/" << EOF
143
    sed "s/^/$submenu_indentation/" << EOF
140
	echo	'$(echo "$message" | grub_quote)'
144
	echo	'$(echo "$message" | grub_quote)'
141
	initrd	${rel_dirname}/${initrd}
145
	initrd	$(echo $initrd_path)
142
EOF
146
EOF
143
  fi
147
  fi
144
  sed "s/^/$submenu_indentation/" << EOF
148
  sed "s/^/$submenu_indentation/" << EOF
Lines 188-194 while [ "x$list" != "x" ] ; do Link Here
188
  alt_version=`echo $version | sed -e "s,\.old$,,g"`
192
  alt_version=`echo $version | sed -e "s,\.old$,,g"`
189
  linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
193
  linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
190
194
191
  initrd=
195
  initrd_early=
196
  for i in ${GRUB_EARLY_INITRD_LINUX_STOCK} \
197
	   ${GRUB_EARLY_INITRD_LINUX_CUSTOM}; do
198
    if test -e "${dirname}/${i}" ; then
199
      initrd_early="${initrd_early} ${i}"
200
    fi
201
  done
202
203
  initrd_real=
192
  for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \
204
  for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \
193
	   "initrd-${version}" "initramfs-${version}.img" \
205
	   "initrd-${version}" "initramfs-${version}.img" \
194
	   "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
206
	   "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
Lines 198-208 while [ "x$list" != "x" ] ; do Link Here
198
	   "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
210
	   "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
199
	   "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}"; do
211
	   "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}"; do
200
    if test -e "${dirname}/${i}" ; then
212
    if test -e "${dirname}/${i}" ; then
201
      initrd="$i"
213
      initrd_real="${i}"
202
      break
214
      break
203
    fi
215
    fi
204
  done
216
  done
205
217
218
  initrd=
219
  if test -n "${initrd_early}" || test -n "${initrd_real}"; then
220
    initrd="${initrd_early} ${initrd_real}"
221
222
    initrd_display=
223
    for i in ${initrd}; do
224
      initrd_display="${initrd_display} ${dirname}/${i}"
225
    done
226
    gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&2
227
  fi
228
206
  config=
229
  config=
207
  for i in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do
230
  for i in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do
208
    if test -e "${i}" ; then
231
    if test -e "${i}" ; then
Lines 216-224 while [ "x$list" != "x" ] ; do Link Here
216
      initramfs=`grep CONFIG_INITRAMFS_SOURCE= "${config}" | cut -f2 -d= | tr -d \"`
239
      initramfs=`grep CONFIG_INITRAMFS_SOURCE= "${config}" | cut -f2 -d= | tr -d \"`
217
  fi
240
  fi
218
241
219
  if test -n "${initrd}" ; then
242
  if test -z "${initramfs}" && test -z "${initrd_real}" ; then
220
    gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2
221
  elif test -z "${initramfs}" ; then
222
    # "UUID=" and "ZFS=" magic is parsed by initrd or initramfs.  Since there's
243
    # "UUID=" and "ZFS=" magic is parsed by initrd or initramfs.  Since there's
223
    # no initrd or builtin initramfs, it can't work here.
244
    # no initrd or builtin initramfs, it can't work here.
224
    linux_root_device_thisversion=${GRUB_DEVICE}
245
    linux_root_device_thisversion=${GRUB_DEVICE}

Return to bug 645088