[syslinux] Append boot device to /proc/cmdline

Patrick Verner exodusrobot at yahoo.com
Wed Dec 2 15:05:03 PST 2009


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.

> If the person
> > has "eleventy billion" drives, with eight drives
> filled with the same
> > version of Parted Magic, then it doesn't matter which
> of those eight are
> > used to continue loading Parted Magic dependencies, I
> would hope.

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.

Patrick

--- On Tue, 12/1/09, H. Peter Anvin <hpa at zytor.com> wrote:

> From: H. Peter Anvin <hpa at zytor.com>
> Subject: Re: [syslinux] Append boot device to /proc/cmdline
> To: syslinux at zytor.com
> Date: Tuesday, December 1, 2009, 11:13 AM
> On 11/30/2009 09:14 PM, Shao Miller
> wrote:
> > H. Peter Anvin wrote:
> >>
> >> The only way to really deal with that kind of
> stuff is by using
> >> content-based identification, rather than
> device-based.
> >>
> > Agreed.  If Parted Magic has a different
> signature or other content
> > magic for each version, then the OS can scan for
> this.  If the person
> > has "eleventy billion" drives, with eight drives
> filled with the same
> > version of Parted Magic, then it doesn't matter which
> of those eight are
> > used to continue loading Parted Magic dependencies, I
> would hope.
> > 
> > Bernd Blaauw wrote:
> >> It then shows last-used-bootloader-ID, which would
> be Isolinux, which
> >> then incorrectly implies you booted from physical
> CD (and thus are in
> >> trouble as CD drivers won't find any device, nor
> scripts will find the
> >> remainder of files on a disc in physical CD
> drive).
> > Yes.  A Linux driver for MEMDISK would certainly
> be nice to have. 
> > Perhaps someday.
> 
> Linux already has a driver for "memory technology
> devices"... it is
> really just missing the detection part.
> 
> > Patrick Verner wrote:
> >> When isolinux is the boot loader APPEND the file
> system type to
> >> /proc/cmdline.
> >> ...
> >> If syslinux is used, simply apply the size of the
> device to
> >> /proc/cmdline.
> > Users and kernels loaded by one of the Syslinux suite
> might not want
> > this.  I'd suggest that this extra functionality
> be implemented via a
> > COM32 module, if needed.  linux.c[32] could be
> used for reference, perhaps.
> 
> That is what I'm thinking anyway -- keep in mind the code
> that is now
> linux.c32 is slated to replace the core code anyway.
> 
>     -hpa
> 
> -- 
> H. Peter Anvin, Intel Open Source Technology Center
> I work for Intel.  I don't speak on their behalf.
> 
> _______________________________________________
> Syslinux mailing list
> Submissions to Syslinux at zytor.com
> Unsubscribe or set options at:
> http://www.zytor.com/mailman/listinfo/syslinux
> Please do not send private replies to mailing list
> traffic.
> 
> 


      




More information about the Syslinux mailing list