[arch-releng] [RFC] [PATCH] [configs/releng] Converts relative to absolute paths inside syslinux*.cfg
* In this way we have unified directory scheme between pxelinux and {sys,ext,iso}linux * Also enable IPAPPEND (will show a non-harm warning message under non-pxelinux bootloaders Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> --- configs/releng/syslinux.dual/syslinux.cfg | 6 +++--- configs/releng/syslinux.dual/syslinux_32only.cfg | 6 +++--- configs/releng/syslinux.dual/syslinux_arch32.cfg | 3 +-- configs/releng/syslinux.dual/syslinux_arch64.cfg | 3 +-- configs/releng/syslinux.dual/syslinux_both.cfg | 8 ++++---- configs/releng/syslinux.dual/syslinux_head.cfg | 4 ++-- configs/releng/syslinux.dual/syslinux_tail.cfg | 8 ++++---- configs/releng/syslinux/syslinux.cfg | 17 ++++++++--------- 8 files changed, 26 insertions(+), 29 deletions(-) diff --git a/configs/releng/syslinux.dual/syslinux.cfg b/configs/releng/syslinux.dual/syslinux.cfg index ac92998..ffc0b71 100644 --- a/configs/releng/syslinux.dual/syslinux.cfg +++ b/configs/releng/syslinux.dual/syslinux.cfg @@ -2,11 +2,11 @@ DEFAULT choose PROMPT 0 LABEL choose -KERNEL ifcpu64.c32 +KERNEL /%INSTALL_DIR%/boot/syslinux/ifcpu64.c32 APPEND have64 -- nohave64 LABEL have64 -CONFIG syslinux_both.cfg +CONFIG /%INSTALL_DIR%/boot/syslinux/syslinux_both.cfg LABEL nohave64 -CONFIG syslinux_32only.cfg +CONFIG /%INSTALL_DIR%/boot/syslinux/syslinux_32only.cfg diff --git a/configs/releng/syslinux.dual/syslinux_32only.cfg b/configs/releng/syslinux.dual/syslinux_32only.cfg index c7a452d..e320848 100644 --- a/configs/releng/syslinux.dual/syslinux_32only.cfg +++ b/configs/releng/syslinux.dual/syslinux_32only.cfg @@ -1,3 +1,3 @@ -INCLUDE syslinux_head.cfg -INCLUDE syslinux_arch32.cfg -INCLUDE syslinux_tail.cfg +INCLUDE /%INSTALL_DIR%/boot/syslinux/syslinux_head.cfg +INCLUDE /%INSTALL_DIR%/boot/syslinux/syslinux_arch32.cfg +INCLUDE /%INSTALL_DIR%/boot/syslinux/syslinux_tail.cfg diff --git a/configs/releng/syslinux.dual/syslinux_arch32.cfg b/configs/releng/syslinux.dual/syslinux_arch32.cfg index 9b4030e..fa1bcdc 100644 --- a/configs/releng/syslinux.dual/syslinux_arch32.cfg +++ b/configs/releng/syslinux.dual/syslinux_arch32.cfg @@ -7,5 +7,4 @@ MENU LABEL Boot Arch Linux (i686) LINUX /%INSTALL_DIR%/boot/i686/vmlinuz INITRD /%INSTALL_DIR%/boot/i686/archiso.img APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% -# Next line should be uncommented when prepare enviroment to boot from PXE. -#IPAPPEND 3 +IPAPPEND 3 diff --git a/configs/releng/syslinux.dual/syslinux_arch64.cfg b/configs/releng/syslinux.dual/syslinux_arch64.cfg index 6cc644d..9a35c32 100644 --- a/configs/releng/syslinux.dual/syslinux_arch64.cfg +++ b/configs/releng/syslinux.dual/syslinux_arch64.cfg @@ -7,5 +7,4 @@ MENU LABEL Boot Arch Linux (x86_64) LINUX /%INSTALL_DIR%/boot/x86_64/vmlinuz INITRD /%INSTALL_DIR%/boot/x86_64/archiso.img APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% -# Next line should be uncommented when prepare enviroment to boot from PXE. -#IPAPPEND 3 +IPAPPEND 3 diff --git a/configs/releng/syslinux.dual/syslinux_both.cfg b/configs/releng/syslinux.dual/syslinux_both.cfg index 9cd1584..94fe516 100644 --- a/configs/releng/syslinux.dual/syslinux_both.cfg +++ b/configs/releng/syslinux.dual/syslinux_both.cfg @@ -1,4 +1,4 @@ -INCLUDE syslinux_head.cfg -INCLUDE syslinux_arch32.cfg -INCLUDE syslinux_arch64.cfg -INCLUDE syslinux_tail.cfg +INCLUDE /%INSTALL_DIR%/boot/syslinux/syslinux_head.cfg +INCLUDE /%INSTALL_DIR%/boot/syslinux/syslinux_arch32.cfg +INCLUDE /%INSTALL_DIR%/boot/syslinux/syslinux_arch64.cfg +INCLUDE /%INSTALL_DIR%/boot/syslinux/syslinux_tail.cfg diff --git a/configs/releng/syslinux.dual/syslinux_head.cfg b/configs/releng/syslinux.dual/syslinux_head.cfg index f46ba78..b49f2bc 100644 --- a/configs/releng/syslinux.dual/syslinux_head.cfg +++ b/configs/releng/syslinux.dual/syslinux_head.cfg @@ -1,8 +1,8 @@ SERIAL 0 38400 -DEFAULT vesamenu.c32 +DEFAULT /%INSTALL_DIR%/boot/syslinux/vesamenu.c32 PROMPT 0 MENU TITLE Arch Linux -MENU BACKGROUND splash.png +MENU BACKGROUND /%INSTALL_DIR%/boot/syslinux/splash.png TIMEOUT 3000 MENU WIDTH 78 diff --git a/configs/releng/syslinux.dual/syslinux_tail.cfg b/configs/releng/syslinux.dual/syslinux_tail.cfg index 7dd1270..822c679 100644 --- a/configs/releng/syslinux.dual/syslinux_tail.cfg +++ b/configs/releng/syslinux.dual/syslinux_tail.cfg @@ -4,7 +4,7 @@ Boot an existing operating system. Press TAB to edit the disk and partition number to boot. ENDTEXT MENU LABEL Boot existing OS -COM32 chain.c32 +COM32 /%INSTALL_DIR%/boot/syslinux/chain.c32 APPEND hd0 0 # http://www.memtest.org/ @@ -16,14 +16,14 @@ LINUX /%INSTALL_DIR%/boot/memtest LABEL hdt MENU LABEL Hardware Information (HDT) COM32 hdt.c32 -APPEND modules_alias=hdt/modalias.gz pciids=hdt/pciids.gz +APPEND modules_alias=/%INSTALL_DIR%/boot/syslinux/hdt/modalias.gz pciids=/%INSTALL_DIR%/boot/syslinux/hdt/pciids.gz LABEL reboot MENU LABEL Reboot -COM32 reboot.c32 +COM32 /%INSTALL_DIR%/boot/syslinux/reboot.c32 LABEL poweroff MENU LABEL Power Off -COMBOOT poweroff.com +COMBOOT /%INSTALL_DIR%/boot/syslinux/poweroff.com ONTIMEOUT arch32 diff --git a/configs/releng/syslinux/syslinux.cfg b/configs/releng/syslinux/syslinux.cfg index 7762278..f102ee4 100644 --- a/configs/releng/syslinux/syslinux.cfg +++ b/configs/releng/syslinux/syslinux.cfg @@ -1,8 +1,8 @@ SERIAL 0 38400 -DEFAULT vesamenu.c32 +DEFAULT /%INSTALL_DIR%/boot/syslinux/vesamenu.c32 PROMPT 0 MENU TITLE Arch Linux -MENU BACKGROUND splash.png +MENU BACKGROUND /%INSTALL_DIR%/boot/syslinux/splash.png TIMEOUT 3000 MENU WIDTH 78 @@ -36,8 +36,7 @@ MENU LABEL Boot Arch Linux LINUX /%INSTALL_DIR%/boot/%ARCH%/vmlinuz INITRD /%INSTALL_DIR%/boot/%ARCH%/archiso.img APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% -# Next line should be uncommented when prepare enviroment to boot from PXE. -#IPAPPEND 3 +IPAPPEND 3 LABEL existing TEXT HELP @@ -45,7 +44,7 @@ Boot an existing operating system. Press TAB to edit the disk and partition number to boot. ENDTEXT MENU LABEL Boot existing OS -COM32 chain.c32 +COM32 /%INSTALL_DIR%/boot/syslinux/chain.c32 APPEND hd0 0 # http://www.memtest.org/ @@ -56,15 +55,15 @@ LINUX /%INSTALL_DIR%/boot/memtest # http://hdt-project.org/ LABEL hdt MENU LABEL Hardware Information (HDT) -COM32 hdt.c32 -APPEND modules_alias=hdt/modalias.gz pciids=hdt/pciids.gz +COM32 /%INSTALL_DIR%/boot/syslinux/hdt.c32 +APPEND modules_alias=/%INSTALL_DIR%/boot/syslinux/hdt/modalias.gz pciids=/%INSTALL_DIR%/boot/syslinux/hdt/pciids.gz LABEL reboot MENU LABEL Reboot -COM32 reboot.c32 +COM32 /%INSTALL_DIR%/boot/syslinux/reboot.c32 LABEL poweroff MENU LABEL Power Off -COMBOOT poweroff.com +COMBOOT /%INSTALL_DIR%/boot/syslinux/poweroff.com ONTIMEOUT arch -- 1.7.7.4
the absolute paths make the configs less elegant IMHO. but if you have your reasons, go ahead. you're the archiso maintainer ;) Dieter
Am 24.11.2011 08:24, schrieb Gerardo Exequiel Pozzi:
* In this way we have unified directory scheme between pxelinux and {sys,ext,iso}linux * Also enable IPAPPEND (will show a non-harm warning message under non-pxelinux bootloaders
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
As mentioned in the other email, this will force everyone to use /arch/ as the archiso folder. When putting this on USB, you might want to use a different path - this would force you to edit tons of config files. I am more and more convinced we should do this for PXE 1) Use a separate configuration for pxelinux, specify /arch as option 210 and "boot/syslinux/pxelinux.cfg" as 209. 2) Use a loadconfig trick, including a chdir (as for isolinux) to switch directory. I guess ".." in addresses works the same as with syslinux then. Absolute paths are very ugly. Uglier than a stupid loadconfig trick. Even uglier than providing two completely different sets of config files (one for PXE, one for the rest). On another note: Don't you have to modify the config files for PXE anyway? You need to add the nbd/curl/nfs options to the command line, right?
On 11/24/2011 06:55 AM, Thomas Bächler wrote:
Am 24.11.2011 08:24, schrieb Gerardo Exequiel Pozzi:
* In this way we have unified directory scheme between pxelinux and {sys,ext,iso}linux * Also enable IPAPPEND (will show a non-harm warning message under non-pxelinux bootloaders
Signed-off-by: Gerardo Exequiel Pozzi<vmlinuz386@yahoo.com.ar> As mentioned in the other email, this will force everyone to use /arch/ as the archiso folder. When putting this on USB, you might want to use a different path - this would force you to edit tons of config files. When "repacking" yes, not when build since this is controlled by %INSTALL_DIR%. We are actually doing this for kernel and initramfs.
I am more and more convinced we should do this for PXE
1) Use a separate configuration for pxelinux, specify /arch as option 210 and "boot/syslinux/pxelinux.cfg" as 209. 2) Use a loadconfig trick, including a chdir (as for isolinux) to switch directory. I guess ".." in addresses works the same as with syslinux then.
OK, but as prefix we can have / This is what I done now: * All paths in *.cfg like now I just changed absolute path thats reference kernel and initramfs to relative ../%ARCH%/vmlinuz * enabled IPAPPEND 3 (I can not see the warning message) put a file %INSTALL_DIR%/boot/syslinux/pxelinux.cfg with the same contents as doing in /isolinux/isolinux.cfg # dnsmasq --port=0 --enable-tftp --tftp-root=/tmp/pxeboot --dhcp-boot=/arch/boot/syslinux/gpxelinux.0,192.168.0.77 --dhcp-range=192.168.0.2,192.168.0.254,8640 --dhcp-option-force=210,http://192.168.0.77 --dhcp-option-force=209,/arch/boot/syslinux/pxelinux.cfg # darkhttpd /tmp/pxeboot
Absolute paths are very ugly. Uglier than a stupid loadconfig trick. Even uglier than providing two completely different sets of config files (one for PXE, one for the rest).
haha, yes they are really ugly.
On another note: Don't you have to modify the config files for PXE anyway? You need to add the nbd/curl/nfs options to the command line, right?
Yes for curl and nfs, since nbd is the default when ip= is present and nothing more. -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
Am 24.11.2011 15:24, schrieb Gerardo Exequiel Pozzi:
On 11/24/2011 06:55 AM, Thomas Bächler wrote:
As mentioned in the other email, this will force everyone to use /arch/ as the archiso folder. When putting this on USB, you might want to use a different path - this would force you to edit tons of config files. When "repacking" yes, not when build since this is controlled by %INSTALL_DIR%.
I am interested in repackaging, and it should be as smooth as possible.
We are actually doing this for kernel and initramfs.
Which is bad (see your latest patch though).
I am more and more convinced we should do this for PXE
1) Use a separate configuration for pxelinux, specify /arch as option 210 and "boot/syslinux/pxelinux.cfg" as 209. 2) Use a loadconfig trick, including a chdir (as for isolinux) to switch directory. I guess ".." in addresses works the same as with syslinux then.
OK, but as prefix we can have /
I like /arch as prefix. Then we have a self-contained /arch folder which can be moved anywhere and renamed at the user's will. The only thing that needs to remain intact is the tree structure INSIDE /arch.
This is what I done now:
* All paths in *.cfg like now I just changed absolute path thats reference kernel and initramfs to relative ../%ARCH%/vmlinuz * enabled IPAPPEND 3 (I can not see the warning message)
put a file %INSTALL_DIR%/boot/syslinux/pxelinux.cfg with the same contents as doing in /isolinux/isolinux.cfg
# dnsmasq --port=0 --enable-tftp --tftp-root=/tmp/pxeboot --dhcp-boot=/arch/boot/syslinux/gpxelinux.0,192.168.0.77 --dhcp-range=192.168.0.2,192.168.0.254,8640 --dhcp-option-force=210,http://192.168.0.77 --dhcp-option-force=209,/arch/boot/syslinux/pxelinux.cfg # darkhttpd /tmp/pxeboot
I like this much more than your proposed approach with absolute paths. But as mentioned, I would run --dhcp-option-force=210,http://192.168.0.77/arch/ --dhcp-option-force=209,boot/syslinux/pxelinux.cfg The chdir/config trick in isolinux.cfg/pxelinux.cfg is a bit ugly, but it allows to use relative paths everywhere, which is a win for me.
Absolute paths are very ugly. Uglier than a stupid loadconfig trick. Even uglier than providing two completely different sets of config files (one for PXE, one for the rest). haha, yes they are really ugly.
:)
On another note: Don't you have to modify the config files for PXE anyway? You need to add the nbd/curl/nfs options to the command line, right?
Yes for curl and nfs, since nbd is the default when ip= is present and nothing more.
Okay. If we could solve that - that would be even greater. However, for the "boot.archlinux.org" service which I drafted in another mail, I was going to use the ISO without the syslinux files anyway: I am planning to make a script that generates syslinux menus to select several versions of the releng ISO, as well as official ISOs with mirror selection. That would require the syslinux files to be separate from the extracted .iso anyway.
participants (3)
-
Dieter Plaetinck
-
Gerardo Exequiel Pozzi
-
Thomas Bächler