Boot with prefixed UUID

With certain versions of udev/blkid on specific hosts, resolving
the rootfs livecd by label fails to the wrong partition (e.g. efi), preventing to boot.
Meanwhile workaround it by writing an hardcoded udf UUID, but this could be
also automatically generated to have also predictable builds.

Requires sys-fs/udftools.
This commit is contained in:
Ettore Di Giacinto
2019-01-18 22:57:47 +01:00
parent 33fd4af08e
commit e54fc67a01
6 changed files with 36 additions and 38 deletions

View File

@@ -3,9 +3,6 @@ set default=0
set fallback=2
set pager=1
label=SABAYON
export label
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
@@ -62,7 +59,7 @@ menuentry "Start Sabayon __VERSION__ SpinBase" {
echo "Language: ${bootlang}"
echo "Keyboard: ${bootkeymap}"
echo "Please wait..."
linux /boot/sabayon overlayfs cdroot root=CDLABEL=$label rootfstype=auto rd.live.overlay.overlayfs ${init_opt} splash quiet rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} locale=${bootlang} ${modeset_opt} ${acpi_opt} --
linux /boot/sabayon overlayfs cdroot root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs ${init_opt} splash quiet rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} locale=${bootlang} ${modeset_opt} ${acpi_opt} --
initrd /boot/sabayon.igz
}
@@ -71,7 +68,7 @@ menuentry "Installation" {
echo "Language: ${bootlang}"
echo "Keyboard: ${bootkeymap}"
echo "Please wait..."
linux /boot/sabayon overlayfs cdroot root=CDLABEL=$label rootfstype=auto rd.live.overlay.overlayfs ${init_opt} splash quiet installer-gui rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} locale=${bootlang} ${modeset_opt} ${acpi_opt} --
linux /boot/sabayon overlayfs cdroot root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs ${init_opt} splash quiet installer-gui rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} locale=${bootlang} ${modeset_opt} ${acpi_opt} --
initrd /boot/sabayon.igz
}
@@ -82,7 +79,7 @@ submenu "Advanced Options" {
echo "Language: ${bootlang}"
echo "Keyboard: ${bootkeymap}"
echo "Please wait..."
linux /boot/sabayon overlayfs cdroot root=CDLABEL=$label rootfstype=auto rd.live.overlay.overlayfs ${init_opt} splash checkdisc rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} locale=${bootlang} ${modeset_opt} ${acpi_opt} --
linux /boot/sabayon overlayfs cdroot root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs ${init_opt} splash checkdisc rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} locale=${bootlang} ${modeset_opt} ${acpi_opt} --
initrd /boot/sabayon.igz
}
@@ -119,7 +116,7 @@ submenu "Advanced Options" {
echo "Language: ${bootlang}"
echo "Keyboard: ${bootkeymap}"
echo "Please wait..."
linux /boot/sabayon overlayfs cdroot root=CDLABEL=$label rootfstype=auto rd.live.overlay.overlayfs ${init_opt} rd.debug debug rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} locale=${bootlang} ${modeset_opt} ${acpi_opt} --
linux /boot/sabayon overlayfs cdroot root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs ${init_opt} rd.debug debug rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} locale=${bootlang} ${modeset_opt} ${acpi_opt} --
initrd /boot/sabayon.igz
}

View File

@@ -3,9 +3,6 @@ set default=0
set fallback=2
set pager=1
label=SABAYON
export label
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
@@ -62,7 +59,7 @@ menuentry "Start Sabayon __VERSION__ __FLAVOUR__" {
echo "Language: ${bootlang}"
echo "Keyboard: ${bootkeymap}"
echo "Please wait..."
linux /boot/sabayon overlayfs cdroot root=CDLABEL=$label rootfstype=auto rd.live.overlay.overlayfs splash quiet rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} locale=${bootlang} ${modeset_opt} ${acpi_opt} --
linux /boot/sabayon overlayfs cdroot root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs splash quiet rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} locale=${bootlang} ${modeset_opt} ${acpi_opt} --
initrd /boot/sabayon.igz
}
@@ -71,7 +68,7 @@ menuentry "Installation" {
echo "Language: ${bootlang}"
echo "Keyboard: ${bootkeymap}"
echo "Please wait..."
linux /boot/sabayon overlayfs cdroot root=CDLABEL=$label rootfstype=auto rd.live.overlay.overlayfs splash quiet rd.live.image vconsole.keymap=${bootkeymap} systemd.unit=multi-user.target installer-gui locale=${bootlang} ${modeset_opt} ${acpi_opt} --
linux /boot/sabayon overlayfs cdroot root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs splash quiet rd.live.image vconsole.keymap=${bootkeymap} systemd.unit=multi-user.target installer-gui locale=${bootlang} ${modeset_opt} ${acpi_opt} --
initrd /boot/sabayon.igz
}
@@ -83,7 +80,7 @@ submenu "Advanced Options" {
echo "Language: ${bootlang}"
echo "Keyboard: ${bootkeymap}"
echo "Please wait..."
linux /boot/sabayon overlayfs cdroot root=CDLABEL=$label rootfstype=auto rd.live.overlay.overlayfs quiet rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} gentoo=nox systemd.unit=multi-user.target locale=${bootlang} ${modeset_opt} ${acpi_opt} --
linux /boot/sabayon overlayfs cdroot root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs quiet rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} gentoo=nox systemd.unit=multi-user.target locale=${bootlang} ${modeset_opt} ${acpi_opt} --
initrd /boot/sabayon.igz
}
@@ -92,7 +89,7 @@ submenu "Advanced Options" {
echo "Language: ${bootlang}"
echo "Keyboard: ${bootkeymap}"
echo "Please wait..."
linux /boot/sabayon overlayfs cdroot root=CDLABEL=$label rootfstype=auto rd.live.overlay.overlayfs splash quiet rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} locale=${bootlang} ${modeset_opt} ${acpi_opt} --
linux /boot/sabayon overlayfs cdroot root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs splash quiet rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} locale=${bootlang} ${modeset_opt} ${acpi_opt} --
initrd /boot/sabayon.igz
}
@@ -122,7 +119,7 @@ submenu "Advanced Options" {
echo "Language: ${bootlang}"
echo "Keyboard: ${bootkeymap}"
echo "Please wait..."
linux /boot/sabayon overlayfs cdroot root=CDLABEL=$label rootfstype=auto rd.live.overlay.overlayfs rd.debug debug rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} locale=${bootlang} ${modeset_opt} ${acpi_opt} --
linux /boot/sabayon overlayfs cdroot root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs rd.debug debug rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} locale=${bootlang} ${modeset_opt} ${acpi_opt} --
initrd /boot/sabayon.igz
}

View File

@@ -3,37 +3,37 @@ default sabayon
label sabayon
menu label ^Start Sabayon __VERSION__ __FLAVOUR__
kernel /boot/sabayon
append initrd=/boot/sabayon.igz overlayfs root=CDLABEL=SABAYON rootfstype=auto rd.live.overlay.overlayfs cdroot rd.live.image splash quiet --
append initrd=/boot/sabayon.igz overlayfs root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs cdroot rd.live.image splash quiet --
label install
menu label ^Installation
kernel /boot/sabayon
append initrd=/boot/sabayon.igz overlayfs root=CDLABEL=SABAYON rootfstype=auto rd.live.overlay.overlayfs cdroot rd.live.image splash vga=791 rd.live.image systemd.unit=multi-user.target installer-gui quiet --
append initrd=/boot/sabayon.igz overlayfs root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs cdroot rd.live.image splash vga=791 rd.live.image systemd.unit=multi-user.target installer-gui quiet --
label genuine
menu label Safe ^Mode
kernel /boot/sabayon
append initrd=/boot/sabayon.igz overlayfs root=CDLABEL=SABAYON rootfstype=auto rd.live.overlay.overlayfs cdroot rd.live.image noproprietary rd.live.image nomodeset pci=routeirq irqpoll nokvm modprobe.blacklist=nvidia modprobe.blacklist=nouveau modprobe.blacklist=nv xdriver=vesa --
append initrd=/boot/sabayon.igz overlayfs root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs cdroot rd.live.image noproprietary rd.live.image nomodeset pci=routeirq irqpoll nokvm modprobe.blacklist=nvidia modprobe.blacklist=nouveau modprobe.blacklist=nv xdriver=vesa --
label console
menu label ^Console mode
kernel /boot/sabayon
append initrd=/boot/sabayon.igz overlayfs root=CDLABEL=SABAYON rootfstype=auto rd.live.overlay.overlayfs cdroot rd.live.image splash gentoo=nox systemd.unit=multi-user.target quiet --
append initrd=/boot/sabayon.igz overlayfs root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs cdroot rd.live.image splash gentoo=nox systemd.unit=multi-user.target quiet --
label console-safe
menu label ^Console mode (no splash)
kernel /boot/sabayon
append initrd=/boot/sabayon.igz overlayfs root=CDLABEL=SABAYON rootfstype=auto rd.live.overlay.overlayfs cdroot rd.live.image gentoo=nox systemd.unit=multi-user.target quiet --
append initrd=/boot/sabayon.igz overlayfs root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs cdroot rd.live.image gentoo=nox systemd.unit=multi-user.target quiet --
label checkdisk
menu label ^Check disc for defects
kernel /boot/sabayon
append initrd=/boot/sabayon.igz overlayfs root=CDLABEL=SABAYON rootfstype=auto rd.live.overlay.overlayfs cdroot rd.live.image splash quiet checkdisc --
append initrd=/boot/sabayon.igz overlayfs root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs cdroot rd.live.image splash quiet checkdisc --
label debug
menu label Deb^ug mode
kernel /boot/sabayon
append initrd=/boot/sabayon.igz overlayfs root=CDLABEL=SABAYON rootfstype=auto rd.live.overlay.overlayfs rd.live.image cdroot debug --
append initrd=/boot/sabayon.igz overlayfs root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs rd.live.image cdroot debug --
label memtest
menu label Memory ^test

View File

@@ -3,9 +3,6 @@ set default=0
set fallback=2
set pager=1
label=SABAYON
export label
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
@@ -62,7 +59,7 @@ menuentry "Start Sabayon __VERSION__ __FLAVOUR__" {
echo "Language: ${bootlang}"
echo "Keyboard: ${bootkeymap}"
echo "Please wait..."
linux /boot/sabayon overlayfs root=CDLABEL=$label rootfstype=auto rd.live.overlay.overlayfs cdroot splash quiet rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} locale=${bootlang} ${modeset_opt} ${acpi_opt} --
linux /boot/sabayon overlayfs root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs cdroot splash quiet rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} locale=${bootlang} ${modeset_opt} ${acpi_opt} --
initrd /boot/sabayon.igz
}
@@ -71,7 +68,7 @@ menuentry "Installation" {
echo "Language: ${bootlang}"
echo "Keyboard: ${bootkeymap}"
echo "Please wait..."
linux /boot/sabayon overlayfs root=CDLABEL=$label rootfstype=auto rd.live.overlay.overlayfs cdroot splash quiet rd.live.image vconsole.keymap=${bootkeymap} systemd.unit=multi-user.target installer-gui locale=${bootlang} ${modeset_opt} ${acpi_opt} --
linux /boot/sabayon overlayfs root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs cdroot splash quiet rd.live.image vconsole.keymap=${bootkeymap} systemd.unit=multi-user.target installer-gui locale=${bootlang} ${modeset_opt} ${acpi_opt} --
initrd /boot/sabayon.igz
}
@@ -82,7 +79,7 @@ submenu "Advanced Options" {
echo "Language: ${bootlang}"
echo "Keyboard: ${bootkeymap}"
echo "Please wait..."
linux /boot/sabayon overlayfs root=CDLABEL=$label rootfstype=auto rd.live.overlay.overlayfs cdroot quiet rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} gentoo=nox systemd.unit=multi-user.target locale=${bootlang} ${modeset_opt} ${acpi_opt} --
linux /boot/sabayon overlayfs root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs cdroot quiet rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} gentoo=nox systemd.unit=multi-user.target locale=${bootlang} ${modeset_opt} ${acpi_opt} --
initrd /boot/sabayon.igz
}
@@ -91,7 +88,7 @@ submenu "Advanced Options" {
echo "Language: ${bootlang}"
echo "Keyboard: ${bootkeymap}"
echo "Please wait..."
linux /boot/sabayon overlayfs root=CDLABEL=$label rootfstype=auto rd.live.overlay.overlayfs cdroot splash quiet rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} locale=${bootlang} ${modeset_opt} ${acpi_opt} --
linux /boot/sabayon overlayfs root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs cdroot splash quiet rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} locale=${bootlang} ${modeset_opt} ${acpi_opt} --
initrd /boot/sabayon.igz
}
@@ -121,7 +118,7 @@ submenu "Advanced Options" {
echo "Language: ${bootlang}"
echo "Keyboard: ${bootkeymap}"
echo "Please wait..."
linux /boot/sabayon overlayfs cdroot root=CDLABEL=$label rootfstype=auto rd.live.overlay.overlayfs rd.debug debug rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} locale=${bootlang} ${modeset_opt} ${acpi_opt} --
linux /boot/sabayon overlayfs cdroot root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs rd.debug debug rd.live.image rd.vconsole.keymap=${bootkeymap} vconsole.keymap=${bootkeymap} locale=${bootlang} ${modeset_opt} ${acpi_opt} --
initrd /boot/sabayon.igz
}

View File

@@ -3,37 +3,37 @@ default sabayon
label sabayon
menu label ^Start Sabayon __VERSION__ __FLAVOUR__
kernel /boot/sabayon
append initrd=/boot/sabayon.igz root=CDLABEL=SABAYON rootfstype=auto rd.live.overlay.overlayfs overlayfs cdroot rd.live.image splash quiet --
append initrd=/boot/sabayon.igz root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs overlayfs cdroot rd.live.image splash quiet --
label install
menu label ^Installation
kernel /boot/sabayon
append initrd=/boot/sabayon.igz root=CDLABEL=SABAYON rootfstype=auto rd.live.overlay.overlayfs overlayfs cdroot rd.live.image splash vga=791 quiet systemd.unit=multi-user.target installer-gui --
append initrd=/boot/sabayon.igz root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs overlayfs cdroot rd.live.image splash vga=791 quiet systemd.unit=multi-user.target installer-gui --
label genuine
menu label Safe ^Mode
kernel /boot/sabayon
append initrd=/boot/sabayon.igz root=CDLABEL=SABAYON rootfstype=auto rd.live.overlay.overlayfs overlayfs cdroot rd.live.image noproprietary nomodeset pci=routeirq irqpoll nokvm rd.modprobe.blacklist=nvidia rd.modprobe.blacklist=nouveau rd.modprobe.blacklist=nv xdriver=vesa --
append initrd=/boot/sabayon.igz root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs overlayfs cdroot rd.live.image noproprietary nomodeset pci=routeirq irqpoll nokvm rd.modprobe.blacklist=nvidia rd.modprobe.blacklist=nouveau rd.modprobe.blacklist=nv xdriver=vesa --
label console
menu label ^Console mode
kernel /boot/sabayon
append initrd=/boot/sabayon.igz root=CDLABEL=SABAYON rootfstype=auto rd.live.overlay.overlayfs overlayfs cdroot rd.live.image splash gentoo=nox systemd.unit=multi-user.target quiet --
append initrd=/boot/sabayon.igz root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs overlayfs cdroot rd.live.image splash gentoo=nox systemd.unit=multi-user.target quiet --
label console-safe
menu label ^Console mode (no splash)
kernel /boot/sabayon
append initrd=/boot/sabayon.igz overlayfs root=CDLABEL=SABAYON rootfstype=auto rd.live.overlay.overlayfs cdroot rd.live.image gentoo=nox systemd.unit=multi-user.target quiet --
append initrd=/boot/sabayon.igz overlayfs root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs cdroot rd.live.image gentoo=nox systemd.unit=multi-user.target quiet --
label checkdisk
menu label ^Check disc for defects
kernel /boot/sabayon
append initrd=/boot/sabayon.igz overlayfs root=CDLABEL=SABAYON rootfstype=auto rd.live.overlay.overlayfs cdroot rd.live.image splash quiet checkdisc --
append initrd=/boot/sabayon.igz overlayfs root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs cdroot rd.live.image splash quiet checkdisc --
label debug
menu label Deb^ug mode
kernel /boot/sabayon
append initrd=/boot/sabayon.igz overlayfs root=CDLABEL=SABAYON rootfstype=auto rd.live.overlay.overlayfs cdroot rd.live.image debug --
append initrd=/boot/sabayon.igz overlayfs root=live:UUID=5c403dad00049b51 rootfstype=auto rd.live.overlay.overlayfs cdroot rd.live.image debug --
label memtest
menu label Memory ^test

View File

@@ -30,5 +30,12 @@ isohybrid ${ih_args} "${ISO_PATH}" || exit 1
cd "$(dirname "${ISO_PATH}")" || exit 1
iso_name=$(basename "${ISO_PATH}")
md5sum "${iso_name}" > "${ISO_CHECKSUM_PATH}"
exit ${?}
# FIXME: With certain versions of udev/blkid on specific hosts, resolving
# the rootfs livecd by label fails to the wrong partition (e.g. efi), preventing to boot.
# Meanwhile workaround it by writing an hardcoded udf UUID, but this could be
# also automatically generated to have also predictable builds.
# Requires sys-fs/udftools
udflabel --force -u 5c403dad00049b51 "${ISO_PATH}" SABAYON
exit ${?}