Re: [arch-releng] [PATCH] [configs/releng] Make kernel and initramfs patch relative for syslinux
Aha! I now rebember why I pushed absolute paths in syslinux.cfg: isolinux does not support ".." in paths! Only (ext|sys)linux have this and other nice features like install it on any path. ;) PS: Sorry I for "de-chain-email" am outside my home from webmail.
Am 24.11.2011 17:01, schrieb Gerardo Exequiel Pozzi:
Aha! I now rebember why I pushed absolute paths in syslinux.cfg: isolinux does not support ".." in paths!
Only (ext|sys)linux have this and other nice features like install it on any path. ;)
PS: Sorry I for "de-chain-email" am outside my home from webmail.
Holy shit! This needs to be fixed, otherwise we cannot unify the configuration files without ugliness. See my previous mail about ".." in TFTP paths.
On 11/24/2011 01:20 PM, Thomas Bächler wrote:
Am 24.11.2011 17:01, schrieb Gerardo Exequiel Pozzi:
Aha! I now rebember why I pushed absolute paths in syslinux.cfg: isolinux does not support ".." in paths!
Only (ext|sys)linux have this and other nice features like install it on any path. ;)
PS: Sorry I for "de-chain-email" am outside my home from webmail. Holy shit! This needs to be fixed, otherwise we cannot unify the configuration files without ugliness. See my previous mail about ".." in TFTP paths.
Yes I read it. So as you can see we have these choices we want to unify dir struct for all bootloaders: (in resume) 1) Change directory scheme, put kernel/initramfs inside syslinux/%ARCH%, keep _all_ files references *relative* (also we can change current absolute paths to make it relative) 2) Keep directory scheme as now, but change _all_ files references to make it *absolute*. Plus adding a pxelinux.cfg with "loadconfig". 3) Wait some time for feature ".." in pxelinux/isolinux. For each scheme I see some points: 1) Is not nice, we have mixed files. 2) Does not look to bad like (1), and if you think we have currently absolute paths _mixed_ with relative path, I this way we have _all_ path in only way form. Is trivial if you want to rename "/arch" to "/anyotherdirectory", or move "syslinux/" to another place. 3) The beautiful solution, but I guess will take some time to be implemented, in the case that can be possible. I think we can use (2) until we get (3). -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
On 11/24/2011 01:20 PM, Thomas Bächler wrote:
Am 24.11.2011 17:01, schrieb Gerardo Exequiel Pozzi:
Aha! I now rebember why I pushed absolute paths in syslinux.cfg: isolinux does not support ".." in paths!
Only (ext|sys)linux have this and other nice features like install it on any path. ;)
PS: Sorry I for "de-chain-email" am outside my home from webmail. Holy shit! This needs to be fixed, otherwise we cannot unify the configuration files without ugliness. See my previous mail about ".." in TFTP paths.
Yes I read it. So as you can see we have these choices we want to unify dir struct for all bootloaders: (in resume)
1) Change directory scheme, put kernel/initramfs inside syslinux/%ARCH%, keep _all_ files references *relative* (also we can change current absolute paths to make it relative) 2) Keep directory scheme as now, but change _all_ files references to make it *absolute*. Plus adding a pxelinux.cfg with "loadconfig".
On 11/24/2011 07:32 PM, Gerardo Exequiel Pozzi wrote: pxelinux.cfg "loadconfig" not needed putting it will change the prefix, and will not work for tftp. This is currently implemented in pxe_enhanced branch [#1] Is working in *all* bootloaders. Just mount iso in some path, make it as tftp_root or http_root and thats all. # mount iso in some place mount -o ro /tmp/out/archlinux-2011.11.24-netinstall-i686.iso /mnt/iso # Setup DHCP only for HTTP method (gpxe only) dnsmasq --port=0 \ --dhcp-range=192.168.0.2,192.168.0.254,8640 \ --dhcp-boot=arch/boot/syslinux/gpxelinux.0,192.168.0.77 \ --dhcp-option-force=209,arch/boot/syslinux/syslinux.cfg \ --dhcp-option-force=210,http://192.168.0.77/ # Setup DHCP for TFTP/HTTP (others pxe) dnsmasq --port=0 \ --enable-tftp \ --tftp-root=/mnt/iso \ --dhcp-range=192.168.0.2,192.168.0.254,8640 \ --dhcp-boot=arch/boot/syslinux/gpxelinux.0,192.168.0.77 \ --dhcp-option-force=209,arch/boot/syslinux/syslinux.cfg \ --dhcp-option-force=210,/ # Setup a quickly HTTP server (for both cases) darkhttpd /mnt/iso [#1] https://github.com/djgera/archiso/compare/experimental...pxe_enhanced
3) Wait some time for feature ".." in pxelinux/isolinux.
For each scheme I see some points: 1) Is not nice, we have mixed files. 2) Does not look to bad like (1), and if you think we have currently absolute paths _mixed_ with relative path, I this way we have _all_ path in only way form. Is trivial if you want to rename "/arch" to "/anyotherdirectory", or move "syslinux/" to another place. 3) The beautiful solution, but I guess will take some time to be implemented, in the case that can be possible.
I think we can use (2) until we get (3).
-- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
Am 24.11.2011 23:32, schrieb Gerardo Exequiel Pozzi:
On 11/24/2011 01:20 PM, Thomas Bächler wrote:
Holy shit! This needs to be fixed, otherwise we cannot unify the configuration files without ugliness. See my previous mail about ".." in TFTP paths.
Yes I read it. So as you can see we have these choices we want to unify dir struct for all bootloaders: (in resume)
1) Change directory scheme, put kernel/initramfs inside syslinux/%ARCH%, keep _all_ files references *relative* (also we can change current absolute paths to make it relative)
My problem here is: I like to keep bootloader and archiso files separate. There were several occasions when I wanted to just take the archiso files and didn't need the bootloader files. I don't like mixing them.
2) Keep directory scheme as now, but change _all_ files references to make it *absolute*. Plus adding a pxelinux.cfg with "loadconfig".
I don't like it either, absolute paths will complicate things.
3) Wait some time for feature ".." in pxelinux/isolinux.
I would love that. I'll send a mail to the syslinux mailing list later, inquiring about this possibility.
I think we can use (2) until we get (3).
I disagree. If we use (2), I will have to edit config files in some use cases, too. To summarize: 1) With isolinux (and hybrid), we can access everything, but only via absolute paths, or below the "current directory". If we want relative paths, we need a prefix at / or /arch. 2) With pxelinux, we can only access files below the prefix, no matter if relative or absolute. 3) With syslinux, we can access everything. However, the prefix will always equal the directory where ldlinux.sys and syslinux.cfg are. My new suggestion - keep the old directory scheme, use only relative paths with /arch as prefix: 1) isolinux - loadconfig trick in /isolinux/isolinux.cfg, set prefix to /arch/, config to /arch/boot/syslinux/archiso.cfg 2) pxelinux - set (via DHCP options) prefix to /arch/ and config to boot/syslinux/archiso.cfg 3) syslinux - have a loadconfig trick in /arch/boot/syslinux/syslinux.cfg - there, set the prefix to /arch/ and the config to /arch/boot/syslinux/archiso.cfg (same as for isolinux) If I didn't miss things, this should work. We can now have all paths relative to /arch, we don't need .. and we can remaster easily with all bootloaders. Thoughts?
On 11/25/2011 06:22 AM, Thomas Bächler wrote:
On 11/24/2011 01:20 PM, Thomas Bächler wrote:
Holy shit! This needs to be fixed, otherwise we cannot unify the configuration files without ugliness. See my previous mail about ".." in TFTP paths.
Yes I read it. So as you can see we have these choices we want to unify dir struct for all bootloaders: (in resume)
1) Change directory scheme, put kernel/initramfs inside syslinux/%ARCH%, keep _all_ files references *relative* (also we can change current absolute paths to make it relative) My problem here is: I like to keep bootloader and archiso files separate. There were several occasions when I wanted to just take the archiso files and didn't need the bootloader files. I don't like mixing
Am 24.11.2011 23:32, schrieb Gerardo Exequiel Pozzi: them.
2) Keep directory scheme as now, but change _all_ files references to make it *absolute*. Plus adding a pxelinux.cfg with "loadconfig". I don't like it either, absolute paths will complicate things.
3) Wait some time for feature ".." in pxelinux/isolinux. I would love that. I'll send a mail to the syslinux mailing list later, inquiring about this possibility.
I think we can use (2) until we get (3). I disagree. If we use (2), I will have to edit config files in some use cases, too. To summarize:
1) With isolinux (and hybrid), we can access everything, but only via absolute paths, or below the "current directory". If we want relative paths, we need a prefix at / or /arch.
2) With pxelinux, we can only access files below the prefix, no matter if relative or absolute.
3) With syslinux, we can access everything. However, the prefix will always equal the directory where ldlinux.sys and syslinux.cfg are.
My new suggestion - keep the old directory scheme, use only relative paths with /arch as prefix:
1) isolinux - loadconfig trick in /isolinux/isolinux.cfg, set prefix to /arch/, config to /arch/boot/syslinux/archiso.cfg 2) pxelinux - set (via DHCP options) prefix to /arch/ and config to boot/syslinux/archiso.cfg 3) syslinux - have a loadconfig trick in /arch/boot/syslinux/syslinux.cfg - there, set the prefix to /arch/ and the config to /arch/boot/syslinux/archiso.cfg (same as for isolinux)
If I didn't miss things, this should work. We can now have all paths relative to /arch, we don't need .. and we can remaster easily with all bootloaders. Thoughts?
Sounds good, this should work we are decending one directory level. Working on it... -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
This is a reworks of my previous RFC but with changes proposed by Thomas (plus other changes). Boot as: * (isolinux) cdrom and cdrom-hibrid-disk: OK * (pxelinux) TFTP and HTTP: OK * (extlinux) /arch and /pepe: OK * (syslinux) /arch and /coco: OK, but see note (@) (@) Due bug in mmove (from mtools), ldlinux.sys install fails: (install also fails with real devices like /dev/sdX, unrelated to loop) # syslinux -i -d /mnt/loop/arch/boot/syslinux /dev/loop1p1 s:/mnt/loop/arch/boot/syslinux/ldlinux.sys: no match for target syslinux: warning: unable to move ldlinux.sys * Workaround (always want to read syslinux.cfg on /syslinux even if moving ld-linux.sys to /arch/boot/syslinux) # mkdir /mnt/loop/syslinux # mv /mnt/loop/ldlinux.sys /mnt/loop/syslinux # cp /mnt/loop/isolinux/isolinux.cfg /mnt/loop/syslinux/syslinux.cfg * Mount ISO # mount -o ro /tmp/out/archlinux-2011.11.25-netinstall-i686.iso /mnt/iso * DHCP/HTTP method # dnsmasq --port=0 \ --dhcp-range=192.168.0.2,192.168.0.254,8640 \ --dhcp-boot=boot/syslinux/gpxelinux.0,192.168.0.77 \ --dhcp-option-force=209,boot/syslinux/archiso.cfg \ --dhcp-option-force=210,http://192.168.0.77/arch/ * DHCP/TFTP method # dnsmasq --port=0 \ --enable-tftp \ --tftp-root=/mnt/iso \ --dhcp-range=192.168.0.2,192.168.0.254,8640 \ --dhcp-boot=/arch/boot/syslinux/gpxelinux.0,192.168.0.77 \ --dhcp-option-force=209,boot/syslinux/archiso.cfg \ --dhcp-option-force=210,/arch/ * HTTP server # darkhttpd /mnt/isolinux
* In that way, we have unified directory scheme among {pxe,sys,ext,iso}linux,
sharing the same directory structure and config files.
* Also enable IPAPPEND (will show a warning message about unknown directive in non-pxelinux before menu)
NEW:
* Rename syslinux*.cfg -> archiso*.cfg
* Now syslinux.cfg is only a "loadconfig" trick like we are doing for isolinux
* All paths are now relative to %INSTALL_DIR% ($archisobasedir) (Default: /arch/)
Signed-off-by: Gerardo Exequiel Pozzi
Am 25.11.2011 22:01, schrieb Gerardo Exequiel Pozzi:
This is a reworks of my previous RFC but with changes proposed by Thomas (plus other changes).
Very cool, thanks.
Boot as: * (isolinux) cdrom and cdrom-hibrid-disk: OK * (pxelinux) TFTP and HTTP: OK * (extlinux) /arch and /pepe: OK * (syslinux) /arch and /coco: OK, but see note (@)
(@) Due bug in mmove (from mtools), ldlinux.sys install fails: (install also fails with real devices like /dev/sdX, unrelated to loop) # syslinux -i -d /mnt/loop/arch/boot/syslinux /dev/loop1p1 s:/mnt/loop/arch/boot/syslinux/ldlinux.sys: no match for target syslinux: warning: unable to move ldlinux.sys
You can use extlinux on FAT32, too (nowadays, it is just a different installer of syslinux). You don't need mtools/syslinux at all if you can mount the device.
On 11/25/2011 07:24 PM, Thomas Bächler wrote:
Am 25.11.2011 22:01, schrieb Gerardo Exequiel Pozzi:
This is a reworks of my previous RFC but with changes proposed by Thomas (plus other changes). Very cool, thanks. You are welcome!
Boot as: * (isolinux) cdrom and cdrom-hibrid-disk: OK * (pxelinux) TFTP and HTTP: OK * (extlinux) /arch and /pepe: OK * (syslinux) /arch and /coco: OK, but see note (@)
(@) Due bug in mmove (from mtools), ldlinux.sys install fails: (install also fails with real devices like /dev/sdX, unrelated to loop) # syslinux -i -d /mnt/loop/arch/boot/syslinux /dev/loop1p1 s:/mnt/loop/arch/boot/syslinux/ldlinux.sys: no match for target syslinux: warning: unable to move ldlinux.sys You can use extlinux on FAT32, too (nowadays, it is just a different installer of syslinux). You don't need mtools/syslinux at all if you can mount the device.
OMG!, was my fault! syslinux works different than extlinux! 1) Device must not be mounted, before running syslinux (like in extlinux) 2) -d DIRECTORY is relative to root directory of the drive, so the _right_ command is # syslinux -i -d arch/boot/syslinux /dev/loop0p1 Wow, extlinux on fat32! great, I never know! Thanks you! So... is working! https://github.com/djgera/archiso/tree/pxe_enhanced pushing this to master when next version of mkinitpcio hits [core]. -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
On 11/25/2011 11:55 PM, Gerardo Exequiel Pozzi wrote:
On 11/25/2011 07:24 PM, Thomas Bächler wrote:
Am 25.11.2011 22:01, schrieb Gerardo Exequiel Pozzi:
This is a reworks of my previous RFC but with changes proposed by Thomas (plus other changes). Very cool, thanks. You are welcome!
Boot as: * (isolinux) cdrom and cdrom-hibrid-disk: OK * (pxelinux) TFTP and HTTP: OK * (extlinux) /arch and /pepe: OK * (syslinux) /arch and /coco: OK, but see note (@)
(@) Due bug in mmove (from mtools), ldlinux.sys install fails: (install also fails with real devices like /dev/sdX, unrelated to loop) # syslinux -i -d /mnt/loop/arch/boot/syslinux /dev/loop1p1 s:/mnt/loop/arch/boot/syslinux/ldlinux.sys: no match for target syslinux: warning: unable to move ldlinux.sys You can use extlinux on FAT32, too (nowadays, it is just a different installer of syslinux). You don't need mtools/syslinux at all if you can mount the device.
OMG!, was my fault!
syslinux works different than extlinux!
1) Device must not be mounted, before running syslinux (like in extlinux) 2) -d DIRECTORY is relative to root directory of the drive, so the _right_ command is # syslinux -i -d arch/boot/syslinux /dev/loop0p1
Wow, extlinux on fat32! great, I never know! Thanks you!
So... is working!
https://github.com/djgera/archiso/tree/pxe_enhanced
pushing this to master when next version of mkinitpcio hits [core].
When it does, can you update the wiki accordingly please?
On 11/26/2011 01:23 AM, Sven-Hendrik Haase wrote:
On 11/25/2011 11:55 PM, Gerardo Exequiel Pozzi wrote:
On 11/25/2011 07:24 PM, Thomas Bächler wrote:
Am 25.11.2011 22:01, schrieb Gerardo Exequiel Pozzi:
This is a reworks of my previous RFC but with changes proposed by Thomas (plus other changes). Very cool, thanks. You are welcome! Boot as: * (isolinux) cdrom and cdrom-hibrid-disk: OK * (pxelinux) TFTP and HTTP: OK * (extlinux) /arch and /pepe: OK * (syslinux) /arch and /coco: OK, but see note (@)
(@) Due bug in mmove (from mtools), ldlinux.sys install fails: (install also fails with real devices like /dev/sdX, unrelated to loop) # syslinux -i -d /mnt/loop/arch/boot/syslinux /dev/loop1p1 s:/mnt/loop/arch/boot/syslinux/ldlinux.sys: no match for target syslinux: warning: unable to move ldlinux.sys You can use extlinux on FAT32, too (nowadays, it is just a different installer of syslinux). You don't need mtools/syslinux at all if you can mount the device.
OMG!, was my fault!
syslinux works different than extlinux!
1) Device must not be mounted, before running syslinux (like in extlinux) 2) -d DIRECTORY is relative to root directory of the drive, so the _right_ command is # syslinux -i -d arch/boot/syslinux /dev/loop0p1
Wow, extlinux on fat32! great, I never know! Thanks you!
So... is working!
https://github.com/djgera/archiso/tree/pxe_enhanced
pushing this to master when next version of mkinitpcio hits [core].
When it does, can you update the wiki accordingly please?
Yes, no problem. I Just changed how build initramfs, using mkinitcpio -b can be broken for depending on what you are doing. The rest (syslinux config unification) is just a "releng" feature, in fact "baseline" profile is not affected, I just changed the initramfs build step ;) -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
participants (3)
-
Gerardo Exequiel Pozzi
-
Sven-Hendrik Haase
-
Thomas Bächler