--- share/config_files/isolinux.cfg | 107 +++++++++++++++++++++++++++++++++++++++ src/pylorax/images.py | 29 ++++------ src/pylorax/installtree.py | 4 ++ 3 files changed, 123 insertions(+), 17 deletions(-) create mode 100644 share/config_files/isolinux.cfg diff --git a/share/config_files/isolinux.cfg b/share/config_files/isolinux.cfg new file mode 100644 index 0000000..6cd18dc --- /dev/null +++ b/share/config_files/isolinux.cfg @@ -0,0 +1,107 @@ +default vesamenu.c32 +timeout 600 + +display boot.msg + +# Clear the screen when exiting the menu, instead of leaving the menu displayed. +# For vesamenu, this means the graphical background is still displayed without +# the menu itself for as long as the screen remains in graphics mode. +menu clear +menu background splash.png +menu title @PRODUCT@ @VERSION@ +menu vshift 8 +menu rows 18 +menu margin 8 +#menu hidden +menu helpmsgrow 15 +menu tabmsgrow 13 + +# Border Area +menu color border * #00000000 #00000000 none + +# Selected item +menu color sel 0 #ffffffff #00000000 none + +# Title bar +menu color title 0 #ff7ba3d0 #00000000 none + +# Press [Tab] message +menu color tabmsg 0 #ff3a6496 #00000000 none + +# Unselected menu item +menu color unsel 0 #84b8ffff #00000000 none + +# Selected hotkey +menu color hotsel 0 #84b8ffff #00000000 none + +# Unselected hotkey +menu color hotkey 0 #ffffffff #00000000 none + +# Help text +menu color help 0 #ffffffff #00000000 none + +# A scrollbar of some type? Not sure. +menu color scrollbar 0 #ffffffff #ff355594 none + +# Timeout msg +menu color timeout 0 #ffffffff #00000000 none +menu color timeout_msg 0 #ffffffff #00000000 none + +# Command prompt text +menu color cmdmark 0 #84b8ffff #00000000 none +menu color cmdline 0 #ffffffff #00000000 none + +# Do not display the actual menu unless the user presses a key. All that is displayed is a timeout message. + +menu tabmsg Press Tab for full configuration options on menu items. +menu separator # insert an empty line +menu separator # insert an empty line +label linux + menu label ^Install or upgrade @PRODUCT@ + menu default + kernel vmlinuz + append initrd=initrd.img quiet +menu separator # insert an empty line +# utilities submenu +menu begin ^Troubleshooting + menu title Troubleshooting +label vesa + menu indent count 5 + menu label Install @PRODUCT@ in ^basic graphics mode. + text help + Try this option out if you're having trouble installing + @PRODUCT@. + endtext + kernel vmlinuz + append initrd=initrd.img xdriver=vesa nomodeset quiet +label rescue + menu indent count 5 + menu label ^Rescue a @PRODUCT@ system. + text help + If the system will not boot, this lets you access files + and edit config files to try to get it booting again. + endtext + kernel vmlinuz + append initrd=initrd.img rescue quiet +label memtest + menu label Run a ^memory test. + text help + If your system is having issues, a problem with your + system's memory may be the cause. Use this utility to + see if the memory is working correctly. + endtext + kernel memtest +menu separator # insert an empty line +label local + menu label Boot from ^local drive. + localboot 0xffff +menu separator # insert an empty line +menu separator # insert an empty line +label returntomain + menu label Return to ^main menu. + menu exit +menu end +#label local +# menu label Exit this menu and boot from ^local disk. +# localboot 0xffff + diff --git a/src/pylorax/images.py b/src/pylorax/images.py index 75d38e0..8f2e16f 100644 --- a/src/pylorax/images.py +++ b/src/pylorax/images.py @@ -65,7 +65,7 @@ ISOLINUXDIR = "isolinux" PXEBOOTDIR = "images/pxeboot" ISOLINUX_BIN = "usr/share/syslinux/isolinux.bin" -SYSLINUX_CFG = "usr/share/anaconda/boot/syslinux.cfg" +ISOLINUX_CFG = "usr/share/anaconda/boot/isolinux.cfg" ISOHYBRID = "isohybrid" @@ -384,9 +384,9 @@ class X86(object): self.reqs["isolinux_bin"] = cpfile(isolinux_bin, workdir) - # syslinux.cfg - syslinux_cfg = joinpaths(self.installtree.root, SYSLINUX_CFG) - self.reqs["syslinux_cfg"] = cpfile(syslinux_cfg, workdir) + # isolinux.cfg + isolinux_cfg = joinpaths(self.installtree.root, ISOLINUX_CFG) + self.reqs["isolinux_cfg"] = cpfile(isolinux_cfg, workdir) # memtest memtest = glob.glob(joinpaths(self.installtree.root, "boot", @@ -436,10 +436,9 @@ class X86(object): cpfile(self.reqs["isolinux_bin"], joinpaths(self.outputroot, ISOLINUXDIR)) - # copy syslinux.cfg to isolinux dir (XXX rename to isolinux.cfg) - isolinux_cfg = cpfile(self.reqs["syslinux_cfg"], - joinpaths(self.outputroot, ISOLINUXDIR, - "isolinux.cfg")) + # copy isolinux.cfg to isolinux dir + isolinux_cfg = cpfile(self.reqs["isolinux_cfg"], + joinpaths(self.outputroot, ISOLINUXDIR)) replace(isolinux_cfg, r"@PRODUCT@", self.product) replace(isolinux_cfg, r"@VERSION@", self.version) @@ -449,11 +448,11 @@ class X86(object): cpfile(self.reqs["memtest"], joinpaths(self.outputroot, ISOLINUXDIR)) - with open(isolinux_cfg, "a") as f: - f.write("label memtest86\n") - f.write(" menu label ^Memory test\n") - f.write(" kernel memtest\n") - f.write(" append -\n") + #with open(isolinux_cfg, "a") as f: + # f.write("label memtest86\n") + # f.write(" menu label ^Memory test\n") + # f.write(" kernel memtest\n") + # f.write(" append -\n") # copy *.msg files for src in self.reqs["msgfiles"]: @@ -468,10 +467,6 @@ class X86(object): cpfile(self.reqs["vesamenu"], joinpaths(self.outputroot, ISOLINUXDIR)) - # set up isolinux.cfg - replace(isolinux_cfg, r"default linux", "default vesamenu.c32") - replace(isolinux_cfg, r"prompt 1", "#prompt 1") - # copy grub.conf grubconf = cpfile(self.reqs["grubconf"], joinpaths(self.outputroot, ISOLINUXDIR)) diff --git a/src/pylorax/installtree.py b/src/pylorax/installtree.py index e0ddd9a..7a2beda 100644 --- a/src/pylorax/installtree.py +++ b/src/pylorax/installtree.py @@ -431,6 +431,10 @@ class LoraxInstallTree(BaseLoraxClass): dst = joinpaths(self.root, "etc/sysconfig") shutil.copy2(src, dst) + src = joinpaths(src_dir, "isolinux.cfg") + dst = joinpaths(self.root, "usr/share/anaconda/boot") + shutil.copy2(src, dst) + def setup_sshd(self, src_dir): # get sshd config src = joinpaths(src_dir, "sshd_config.anaconda") -- 1.7.3.2 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list