[syslinux] Append boot device to /proc/cmdline
H. Peter Anvin
hpa at zytor.com
Wed Dec 2 15:16:37 PST 2009
On 12/02/2009 03:05 PM, Patrick Verner wrote:
> Maybe it's just me, but adding information to /proc/cmdline is not going to hurt anything. It's just information that the kernel will ignore if it isn't a valid kernel parameter. I thought that /proc/cmdline would be just a good a place as any because syslinux in a way, is already writing to it.
Actually, a lot of people object to it, and so it will not be done
> The reason this is an issue is because people use various types of save session routines with most of the small live distributions. Parted Magic already has ways of loading the correct version of a squashfs. If you are booting with version 4.6 it will only use pmagic-4.6.sqfs. Parted Magic won't let you use the wrong bzImage either. Parted Magic allows you to use external packages that automatically install at boot time, but again it needs to know where they are.
> The main reason I would like this information added is because when you boot a LiveCD/USB from any distribution, it should then only mount the drive syslinux originated from instead of "try mounting" every drive until it finds what is supposed to be the correct one. Even when you install something like Slackware and you get to the point when it's starts installing packages, it has to stop and look for the media that contains the packages. Debian and most other distributions do something similar once you are inside of the initramfs. It has to find itself. To me that seems weird.
> I'm not proposing an idea that would selfishly benefit only my distribution. I think if this was available everybody would eventually start using it. It doesn't inhibit or cause any disruption to what you are already doing or may do in the future. It's simply information that can be used on a voluntarily basis.
> Live distributions are very popular and currently the Live OS has no idea where it came form. There is no way of knowing because the initramfs might as well be in outer space when you factor in storage hardware. The initramfs doesn't know where it cam from.
Well, it really isn't a trivial question to answer even with help from
the bootloader, as the BIOS view of things and the Linux view of things
can be dramatically different.
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
More information about the Syslinux