[syslinux] Newbie question: need assistance setting up a boot menu for linux dist + win98

Nazo nazosan at gmail.com
Tue Jan 24 08:27:55 PST 2006


On 1/24/06, Alon Solell <alon at wsco.com> wrote:
> Hi Nazo,
>
> Thanks for the lengthy and very thourgh reply :)
>
> I had a jump start from a friend, so it helped to see at least most of the
> stuff you were talking about already half configured.
> I managed to understand the various renaming options, to deferntiate the
> different kernels of the different distro.
> One thing that I'm not sure of..
>
> I like things organized and nicely ordered.
> Is it possible to create a directory say:    wbel30   wbel40 etc.. and throw
> the files in them?
> I just had a breakthrough :) and managed to pull up White Box 3 from the
> menu and it shows up the next menu that was hoping
> to see, but I'm not sure what files are of importance between the different
> distributions.
> By that, I mean, I copied the files from the WBEL30 isolinux into the root
> of the USB disk, and added a few:
>
> boot.cat
> boot.msg
> chain.c32
> general.msg
> grub.exe
> grub.txt
> initrd.img
> isolinux.bin
> isolinux.cfg
> memdisk
> menu.c32
> menu.lst
> options.msg
> param.msg
> rescue.msg
> snake.msg
> syslinux.cfg
> vmlinuz
>
> In my syslinux.cfg I have the following entry:
>
> DEFAULT menu.c32
> PROMPT 0
> MENU TITLE Alon is Here.
>
> LABEL White Box 3.0
> KERNEL vmlinuz
> APPEND vga=normal initrd=initrd.img root=/dev/ram0 rw
>
>
> Now,. my understanding as of now is that    I can change:
>
> vmlinuz  to   wb3vmlnzl
> AND
> initrd.img   to   wb3initr.img
>
>
> What about the boot.cat and boot.msg and all the rest of those files?
> I copied those from the White Box 3.0   isolinux directory.
>
> Won't those get in conflict with CentOS 4.2 files?
> I would rather have complete set of files residing it its directory,. but I
> don't know how to reference the directory
>
> APPEND vga=normal initrd=wb3initr.img root=/dev/ram0 rw       IS THERE A WAY
> TO ADD A DIRECTORY PATH?
>
> Such that all the WBEL30 will reside in a wbel30/      and  WBEL40 will
> reside in wbel40/ ??
>
>
> Alon Solell
> alon at wsco.com
> Tel: +972-3-642-1228
> Cellcom Cellular in Israel: +972-52-386-9891
> Fax: +972-3-744-0989
>
>
> ----- Original Message -----
> From: "Nazo" <nazosan at gmail.com>
> To: "Alon Solell" <alon at wsco.com>
> Cc: <syslinux at zytor.com>
> Sent: Tuesday, January 24, 2006 2:51 PM
> Subject: Re: [syslinux] Newbie question: need assistance setting up a boot
> menu for linux dist + win98
>
>
> > On 1/23/06, Alon Solell <alon at wsco.com> wrote:
> >> Hi,
> >>
> >> I want to Boot up from a USB Disk-On-Key, Pull up a menu of:
> >>
> >>
> >> Start Fresh install of   WBEL 3.0
> >> Start Fresh install of   WBEL 4.0
> >> Start Fresh install of   CentOS 3.6
> >> Start Fresh install of   CentOS 4.2
> >> Load Win98 boot disk and end with command prompt.
> >>
> >>
> >>
> >> My problem is that I'm a novice user (sounds nicer than a newbie :)) )
> >> and
> >> my experience with Linux was
> >> vanilla installs with no actuall modifications for the install process.
> >>
> >> I believe the process itself is fairly simple, as it only requires
> >> setting
> >> up a boot menu and then run the
> >> boot images of the distribution selected.
> >> When I start the linux install, I choose "linux askmethod" and then being
> >> prompted for the install method FTP, HTTP, CD or NFS Image.
> >> I have no need for an auto install beyond that part.
> >> All I need is to reach this screen, and I'll populate the values
> >> manually.
> >> I just need a simple menu at the onset of the boot that will ask me:
> >> "Which
> >> flavour of linux do you want to install" and thereafter
> >> the selected distribution will initiate the install process of the
> >> selected
> >> distribution.
> >>
> >> That's all I need to have,. and I'm stuck here!
> >> This is just a simple boot menu configuration.. (I think),. isn't it, and
> >> upon selection,. it just pull the install boot image of the
> >> distribution selected.
> >>
> >>
> >> VERY IMPORTANT:  This must be from a USB Disk On Key (I've booted from it
> >> before so
> >> there is no hardware problems - all brand new hardware and it supports
> >> the boot from USB DiskOnKey)
> >>
> >> Any pointers on this?
> >>
> >>
> >> - Alon
> >> _______________________________________________
> >> 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.
> >>
> >>
> > Well, maybe I can help you out a little as what you want to do is kind
> > of similar to what I do all the time, just I run multiple versions of
> > linux live distros while you run installers (which technically are
> > their own little live distros with some quite specialized scripting.)
> > I'll just kind of start from the very beginning and if any of this
> > sounds redundant or overly simplistic for you, it's not intended to be
> > insulting (you say newbie, but, I don't know just how new.)
> >
> > Firstly, most of those are designed to run off of a CD, and I haven't
> > seen very many bootable cds other than those made by microsoft which
> > do not use Isolinux.  So the first thing to do is to pop in the
> > original installation disc and find that Isolinux configuration file
> > (usually /isolinux, but, I've seen a few who put it in /boot/isolinux
> > or whatever, and some actually modify isolinux to put the boot files
> > in another directory entirely, but, either way, you should have a
> > isolinux.cfg file relatively easy to find.)  Find the choice you
> > usually would make to begin the installation with default options and
> > follow that label to find out which kernel (ok, most just have the
> > one) and what options are specified.  You might be surprised just how
> > many options get passed for simple tasks sometimes.  Anyway, write
> > those options down, or, if you're lazy like me, just leave that
> > isolinux.cfg file open in a text editor and refer over to your
> > multiboot files.
> >
> > A lot of distros are lazy and leave their kernel named just plain
> > vmlinuz and the ramdrive image just plain initrd.gz, so you probably
> > want to rename these to avoid conflicts when you copy them to the new
> > location.  Personally, I like to rename all the kernel and ramdrive
> > images to something very sensible even if the originals aren't plain
> > names I'd have to worry about overwriting.  It's just so easier to
> > remember what "mandriva" is versus vmlinuz-mdk-2.6.whatever.  The main
> > thing is, you have to remember to adjust the kernel and append
> > options, which can be an easy thing to forget.  In particular, the
> > ramdrive image.  If you don't have an initrd= statement for some
> > reason, but, you've renamed your ramdrive image, then you'll
> > definitely need to give it one (ok, I think everyone has this already
> > so you only have to remember to change it to the correct value.)
> >
> > So, let's say I've copied over the files from my Mandriva installation
> > disc.  I've copied the "vmlinuz" file from the alt0 folder and renamed
> > it to "mandriva" and the "all.rdz" ramdrive image has been copied and
> > renamed to "mandinit.gz"  The normal installation label in their
> > isolinux.cfg file is like this:
> >  kernel alt0/vmlinuz
> >  append initrd=alt0/all.rdz  automatic=method:cdrom acpi=ht vga=788
> > splash=silent
> > So in my new image, I'll make one more like this:
> >  kernel mandriva
> >  append initrd=mandinit.gz  automatic=method:cdrom acpi=ht vga=788
> > splash=verbose
> > (Ok, the splash wasn't necessary, but, darn I hate silent splash screens.)
> > Repeat this for each installation involved.  Be careful not to forget
> > to rename and overwrite and be careful not to loose track of the
> > renames and forget to adjust your menu accordingly.  Well, I usually
> > make a CD with these, so it's more troublesome to find out that I just
> > burned a disc that I forgot to fully test first since in your case you
> > have only to make new changes to your obviously read/write media
> > instead of write once.
> >
> > Once you've gotten all the kernels and their ramdrives and any other
> > needed files copied over and appropriately worked with, you'll want to
> > change your syslinux.cfg file to include the code for the simple menu
> > now.  Firstly, copy the menu.c32 file into that folder if you haven't
> > already (you can get this from /syslinux-version/com32/modules/ of the
> > archive.)  Change your default statement to menu.c32 so the menu is
> > loaded by default, and I for one usually prefer to set prompt to 0.
> > Add an ontimeout statement to load whatever options you want to be
> > default if the user waits for the timer to run out without any
> > keypresses (or don't if you don't want that of course.)  A while back
> > there was a problem where the ontimeout statement wasn't calling
> > labels correctly, so if you do use ontimeout, I personally feel it's
> > easiest just to go ahead and put the full statement instead.  Eg:
> > "ONTIMEOUT kernel append" where you have kernel, you just replace with
> > the name of the kernel, and where you have append you put all the
> > statements that are appended to that kernel.  This method will
> > probably never stop working I suspect, so no matter what goes wrong,
> > it should still work.
> >
> > Next up, under each label, create an extra option that says "MENU
> > LABEL so-and-so" obviously replacing the so-and-so with a more
> > appropriate spelled out title.  These don't have to be typed by the
> > user (though if you place a carat '^' before a letter it marks that
> > letter as a hotkey and the selection moves to it if the user presses
> > that key) so just be thorough.  It can say Mandriva 2006 Powerpack for
> > example, complete with spaces and all.  No 8.3 mangling there.  Only
> > catch is, the menu doesn't hold a lot of text and will just cut off
> > anything that doesn't fit on the screen, so make it fit or it looks
> > silly.  While you're adding menu label statements, you may with to
> > place a menu default statement under whichever item you want the
> > cursor to sit on when it first starts if you want it to be anything
> > other than the first one.  Personally, I get redundant so I have lots
> > of failsafes in case something or other goes wrong (in the past I've
> > triggered bugs without even noticing because the redundancy went right
> > around them) so I like to put that there even if it's the first item
> > for me.
> >
> > Once you've added nice little labels so the user is presented with
> > something more useful than "mandriva", "fedora", "fedx64", etc, you
> > might optionally want to add a like between the initial statements (eg
> > stuff like default, ontimeout, etc) and the first label that says MENU
> > TITLE and some sensable title.  Optional, but, kind of a nice touch.
> > Well, save your file and try it all out at this point.  I may be
> > forgetting something, but, if I have I've forgotten it, so can't think
> > of what it is right now and think I'm done.  ^_^
> >
>
>
Don't bother copying boot.cat from the other distros.  The .msg files
are basically just text files that can be displayed in normal
syslinux/isolinux/etc via the DISPLAY command or set to show on a
function key.  Showing these is pointless since the menu clears the
display and the menu doesn't support showing those files like the
plain boot prompt does.  However, bear in mind that those are there
for a reason.  They usually tell you the various parameters you can
specify, particularly for a buggy or picky system.  If you hit tab in
the menu, you can manually type in any parameter changes you wish to
make, so it might be handy to have one or two things from those files
handy since it can come in handy sometimes (rarely though, usually the
defaults work fine.)  Anyway, you don't have to worry about conflicts
since typically most distros have two main files, a kernel and initial
ramdrive.  A few things, such as live distros, keep a third file as a
filesystem image, which you'll want to keep the same filename unless
you plan to modify the startup scripts appropriately (let's just say
you don't right now.)

As for the directory, I don't remember for certain if syslinux handled
directories or not, though I know all the others do (including
extlinux.)  I know syslinux can't run from a directory, though I never
really understood why, but, whether it can use them or not I'm not
sure.  One way to find out, test.  ^_^  Just create a simple directory
in the root, say "wbel30" and move the kernel and initrd file into
that, then, you'll have KERNEL /wbel30/wb3vmlnzl and
initrd=/wbel30/wb3initr.img but, to be honest, it's not going to help
much since only the two files really matter (and you can't toss a
filesystem image in there either because the startup scripts look for
it in an exact location, so if you change that location, you'll have
to modify the scripts.)

Uhm, speaking of startup scripts, I think it only fair to warn you
that some distros have startup scripts designed to look for very
specific things.  For example, they may assume you do not have a SCSI
cd-rom, because very few people do anymore (what's the point, only
harddrives benefit from SCSI...)  The reason this is important is
because quite a number won't work with a USB drive because they won't
look for their files on /dev/sdX#, which is where a proper distro will
set up your usb key to (I think there are alternate ways to access
this without the emulation, but, if they don't work with the massively
simple fake scsi, they probably won't do the more complicated method.)
 I have this problem a lot with live distros in particular which must
look for that filesystem image early in the startup process and will
usually be unable to continue if they don't find it.

I imagine installers will be a little less picky.  At least well
designed ones will, so you may never see this problem, but, it seems
only fair to warn you.  In particular, it occurs to me that if they
made an ultra-minimalistic kernel, they may have excluded fat support
inside the kernel with intentions of loading via a module much later
on AFTER the source filesystem is mounted (which they assume will
always be ISO9660.)  Anyway, just letting you know the kind of things
you can run into trying to make things boot off of a USB drive that
were originally designed for a CD/DVD.




More information about the Syslinux mailing list