Alon Solell
2006-Jan-23 15:01 UTC
[syslinux] Newbie question: need assistance setting up a boot menu for linux dist + win98
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
Nazo
2006-Jan-24 12:51 UTC
[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. ^_^