Boot menu fixes (both isolinux and Grub2/EFI)

1. Significantly redesigned the grub2 menu for EFI boot: made it similar to the isolinux menu; more user-friendly product name; returned graphical theme; etc.
2. Fixed non-displaying plymouth in isolinux menu items.
3. Disabled plymouth for 'basic graphics' mode.
This commit is contained in:
Konstantin Vlasov 2014-09-23 17:35:22 +04:00
parent b4694cb68e
commit b9e82b7405
3 changed files with 153 additions and 1 deletions

View file

@ -0,0 +1,106 @@
diff --git a/imgcreate/live.py b/imgcreate/live.py
index 634088d..a23efa7 100755
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -760,28 +760,37 @@ menu end
def __get_basic_efi_config(self, **args):
return """
-set default="1"
+set default="0"
function load_video {
insmod efi_gop
insmod efi_uga
- insmod video_bochs
- insmod video_cirrus
- insmod all_video
}
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
+insmod part_msdos
insmod ext2
-
+insmod iso9660
+
+set gfxmode=1024x768,1024x600,800x600,640x480
+insmod gfxterm
+insmod gettext
+terminal_output gfxterm
+insmod gfxmenu
+loadfont /EFI/BOOT/themes/rosa/dejavu_sans_bold_14.pf2
+loadfont /EFI/BOOT/themes/rosa/dejavu_sans_mono_11.pf2
+loadfont /EFI/BOOT/themes/rosa/terminal_font_11.pf2
+insmod png
+set theme=/EFI/BOOT/themes/rosa/theme.txt
+export theme
+background_image -m stretch /EFI/BOOT/themes/rosa/terminal_background.png
set timeout=%(timeout)d
-### END /etc/grub.d/00_header ###
search --no-floppy --set=root -l '%(isolabel)s'
-### BEGIN /etc/grub.d/10_linux ###
""" %args
def __get_efi_image_stanza(self, **args):
@@ -789,7 +798,7 @@ search --no-floppy --set=root -l '%(isolabel)s'
args["rootlabel"] = "live:LABEL=%(fslabel)s" % args
else:
args["rootlabel"] = "CDLABEL=%(fslabel)s" % args
- return """menuentry '%(long)s' --class fedora --class gnu-linux --class gnu --class os {
+ return """menuentry '%(long)s' --class rosa --class gnu-linux --class gnu --class os {
linuxefi /isolinux/vmlinuz%(index)s root=%(rootlabel)s %(liveargs)s %(extra)s
initrdefi /isolinux/initrd%(index)s.img
}
@@ -803,30 +812,32 @@ search --no-floppy --set=root -l '%(isolabel)s'
cfg = ""
+ if os.path.exists(self._instroot + "/etc/system-release"):
+ long = subprocess.check_output("echo -n `sed 's, release .*$,,g' /etc/system-release`", shell=True)
+ else:
+ long = self.product
+
for index in range(0, 9):
# we don't support xen kernels
if os.path.exists("%s/EFI/BOOT/xen%d.gz" %(isodir, index)):
continue
+ cfg += """menuentry 'Boot from local drive' {
+ reboot
+}
+"""
cfg += self.__get_efi_image_stanza(fslabel = self.fslabel,
liveargs = kernel_options,
- long = "Start " + self.product,
- extra = "", index = index)
- if checkisomd5:
- cfg += self.__get_efi_image_stanza(fslabel = self.fslabel,
- liveargs = kernel_options,
- long = "Test this media & start " + self.product,
- extra = "rd.live.check",
- index = index)
- cfg += """
-submenu 'Troubleshooting -->' {
-"""
+ long = "Start " + long,
+ extra = "rhgb splash=silent logo.nologo", index = index)
cfg += self.__get_efi_image_stanza(fslabel = self.fslabel,
liveargs = kernel_options,
- long = "Start " + self.product + " in basic graphics mode",
- extra = "nomodeset", index = index)
+ long = "Install " + long,
+ extra = "install rhgb splash=silent logo.nologo", index = index)
+ cfg += self.__get_efi_image_stanza(fslabel = self.fslabel,
+ liveargs = kernel_options,
+ long = "Install " + long + " in basic graphics mode",
+ extra = "install nomodeset plymouth.enable=0", index = index)
- cfg+= """}
-"""
break
return cfg

View file

@ -0,0 +1,42 @@
diff --git a/imgcreate/live.py b/imgcreate/live.py
index 79ce1aa..634088d 100755
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -600,7 +600,7 @@ menu separator
liveargs = kern_opts,
long = "Start " + long,
short = "linux" + index,
- extra = "quiet",
+ extra = "rhgb splash=silent logo.nologo vga=788",
help = "",
index = index))
kern_opts = kernel_options + " install"
@@ -611,7 +611,7 @@ menu separator
liveargs = kern_opts,
long = "Install " + long,
short = "linux" + index,
- extra = "quiet vga=788",
+ extra = "rhgb splash=silent logo.nologo vga=788",
help = "",
index = index))
linux.append(self.__get_image_stanza(is_xen, isDracut,
@@ -620,9 +620,9 @@ menu separator
liveargs = kern_opts,
long = "Install " + long + " in basic graphics mode.",
short = "basic" + index,
- extra = "xdriver=vesa nokmsboot install",
+ extra = "xdriver=vesa plymouth.enable=0 nokmsboot",
help = "Try this option out if you're having trouble installing.",
- index = index))
+ index = index))
kern_opts = kernel_options
if checkisomd5:
check.append(self.__get_image_stanza(is_xen, isDracut,
@@ -661,6 +661,7 @@ menu separator
def __get_local_stanza(self, isodir):
return """label local
menu label Boot from local drive
+ menu default
localboot 0xffff
"""
def __get_grub2_stanza(self, isodir):

View file

@ -5,7 +5,7 @@
Summary: Tools for building live CDs
Name: livecd-tools
Version: 21.1
Release: 10
Release: 11
Epoch: 1
License: GPLv2
Group: System/Base
@ -21,6 +21,8 @@ Patch4: livecd-tools-21.1.hack2.patch
Patch5: livecd-tools-21.1.hack3.patch
Patch6: livecd-tools-21.1.hack4.patch
Patch7: livecd-tools-21.1.no.mac.img.patch
Patch8: livecd-tools-21.1.isolinux.plymouth.fixes.patch
Patch9: livecd-tools-21.1.efi.grub.cfg.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires: python-imgcreate = %{epoch}:%{version}-%{release}
@ -77,6 +79,8 @@ like live image or appliances.
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%build
make