Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#21766 - extlinux - create/new package?

Attached to Project: Arch Linux
Opened by Matthew Gyurgyik (pyther) - Saturday, 20 November 2010, 23:11 GMT
Last edited by Ray Rashif (schivmeister) - Monday, 22 November 2010, 08:40 GMT
Task Type Feature Request
Category System
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Wasn't sure of a good name for the title, so I apologize.

Pierre's email on arch-dev-public caused me to think how we can integrate extlinux into the installer. The problem we face is that extlinux is part of syslinux. The files in the syslinux package are used for isolinux and other programs, therefore we shouldn't move the location.

With grub there is a sample configuration file in /boot/grub. However, there is no such sample file in /boot for syslinux.

I suggest a new package gets created

Package name: extlinux
Depends On: syslinux
Files:
*/boot/syslinux/ (create dir)
*/boot/menu.c32 (needed for text menu)
*/boot/syslinux/vesamenu.c32 (needed for gui menu)
*/boot/syslinux/chain.c32 (needed to boot windows and other OS)
*/boot/syslinux/extlinux.conf (syslinux configuration file, can also be called syslinux.conf)
*/boot/syslinux/splash.png (arch splash logo that is on the cd)

Default Config
*Do we want to supply a text menu or graphical menu (like the cd) configuration file
*Arch Linux
*Arch Linux Fallback
*Windows <== Commented out Example

This package could easily be created in the syslinux pkgbuild using a split pkgbuild

Flaws/Problems/Issues:
*Duplicate copies of the same file on system (chain.c32, menu.c32, vesamenu.c32)

Symlinks won't work because boot and / (root) are on separate partitions for many users
extlinux --install /boot/syslinux will still have to been run to generate ldlinux.sys and write the boot code to the partition boot sector

I wouldn't mind doing the backend work (creating an example config and modify the syslinux pkgbuild) if this idea is approved. The other thing to decide is whether we want the default example config file to contain a background image and colored texts?

I can not think of any way to avoid duplicate copies of files. Although this package would NOT be needed to install extlinux (everything is provided by syslinux) it would make it much easier. All users have had to in the past is go into /boot edit the lilo or grub config file and then run lilo or grub-install. This package would allow this same behavior for extlinux.

Using just the syslinux package the following procedure must take place
1. mkdir /boot/syslinux
2. cp /usr/lib/syslinux/{menu.c32, vesamenu.c32, chain.c32} /boot/syslinux.cfg
3. Create /boot/syslinux/extlinux.conf
4. extlinux --install

However with the extlinux pkg:
1. Edit /boot/syslinux/extlinux.conf
2. extlinux --install /boot/syslinux

From the prospective of the installer, the installer would simply have to let the user edit the config file and then execute extlinux --install /boot/syslinux. Whereas, without this package the installer would have to create /boot/syslinux and copy the needed *.c32 files. When this happens the .c32 files in /boot are no longer managed by pacman, therefore those files will never get updated when syslinux is updated.
This task depends upon

Closed by  Ray Rashif (schivmeister)
Monday, 22 November 2010, 08:40 GMT
Reason for closing:  Won't implement
Additional comments about closing:  Installer can handle copying of files.
Comment by Ray Rashif (schivmeister) - Sunday, 21 November 2010, 09:34 GMT
I don't see any need for this. syslinux can provide an example configuration file if needed, but any further tweaking needs to be done by the user. Copying/linking files is just part of that extended configuration. You do realise that a lot of stuff in /boot are not owned by pacman, right? So that's not an issue. Other than that most of what you have described (dirs and installing the bootloader) is probably what's going to happen if and when syslinux gets into the installer.
Comment by Anonymous Submitter - Sunday, 21 November 2010, 09:56 GMT
Archboot's setup script is a good place to find out how to integrate extlinux (and maybe grub2) into the installer. Tobias Powalowski does a great job maintaining archboot.
Comment by Matthew Gyurgyik (pyther) - Sunday, 21 November 2010, 15:06 GMT
Keshav: Why would I look at archboot. Archboot isn't officially supported. Wouldn't I want to dig into aif?

@Ray
Although there are files in /boot that are not managed by the grub package, they are managed by the grub-installer. As in, when you run grub-installer those files in /boot will be updated. However, with extlinux --update, the only file that is updated is the bootloader code (ldlinux.sys). Any *.c32 files needed for a menu / chainloading / extra functionality are not updated.

The problem becomes that the users copy the *.c32 files to /boot, an update to syslinux occurs. User runs extlinux --update and now the files on /boot are old and outdated, unless if the user remembers to copy them. I'm no expert on syslinux, but I suspect that may case breakage or problems at some point.

From the installer standpoint (aif), the installer for grub currently doesn't copy anything over to boot. It just runs grub-install. Would be nice to allow the same behavior with extlinux.

Upstream will argue that the *.c32 files aren't needed in /boot/syslinux, which is true, because with no config or *.c32 you'll be given a syslinux prompt and you will be able to boot. However this would not be a friendly solution by any means (think grub prompt).

Lastly, syslinux is much more than just extlinux. Therefore I strongly feel that we should not be putting any /boot files into the syslinux package. Remember, that isolinux and pxelinux are part of syslinux and users may want to use those tools, instead of extlinux.

Just to be clear, I'm suggesting the package provide an example config file and *duplicates* of a few *.c32 files that would be commonly used by users and would be normally found in the syslinux package.
Comment by Ray Rashif (schivmeister) - Sunday, 21 November 2010, 16:07 GMT
That's exactly what I meant - it's upto the user to _remember_ to carry out the post-update steps. A boot prompt is fine, and that is the "default" behaviour. Reading up on docs should be sufficient to improve that behaviour with a menu and what not.

Anyway, inclusion of extlinux/syslinux is not happening yet, so I doubt anyone would bother about this now.
Comment by Matthew Gyurgyik (pyther) - Sunday, 21 November 2010, 16:31 GMT
In most cases I would agree. In the case of a bootloader, I think we should try to aim to prevent breakage. The package would be small in size <250K and would require almost no additional work. The initial work, I am willing to do. If we create an extlinux package it would be completely optional for users.

My biggest focus is the installer. I'm not a fan of letting the installer copy files around (cp stuff from /usr/lib/syslinux/ to /boot/syslinux). As for the inclusion of syslinux/extlinux I am hoping to patch AIF for support in the coming weeks. I have taken a look at the code and it doesn't look too difficult.

Pros: Installation is easier for installer and users
Cons: Package provides same file as syslinux package and it is a special package

If copying files for the user in the installer is acceptable then I don't care either way. I am assuming copying files in the installer without using pacman would be frowned upon, though.

In my most humble opinion, it just seems like creating this small package would ensure a bit safety on a critical part of the operating system and I don't really see any major negatives. If we weren't talking about a bootloader, I would likely share the same opinions as you.

On a side note, I have updated the wiki a bit and feel that the wiki provides clear directions on how to install and configure extlinux - https://wiki.archlinux.org/index.php/Syslinux

Loading...