How to automate things at the boot time
-----------------------------------------

by Fabio Gurini


The follow instructions are just to make a little more easy share linux, mulinux and windows systems, or just two of them.
I do not know if it might work with all version of msdos, I think after version 5 there is no problem.
I use this little way under win98 and it does work well. In spite of that, I will not assume any responsibility for any damage you can make to your pc. So be aware of you are doing, don't blame me.

Let's start.

I will describe you my configuration, you have just to repeat it and modify a little bit if you have one different.
Into my pc I got win98 in hda1, linux redhat in hda5, the swap partition in hda6, and two! (but I usually use only one :) copy of mulinux, one in hda7 as ext2 and the other in the directory /linux in hda1 as loop.
I used to start linux using penguin.bat,(in which was just the command loadlin) but before that, every time, I had to press F8 at the boot time, otherwise Winbug started on his own.
I was quite boring to do that, and I didn't want come back to boot from floppy, so I've modified a little bit the two everytime useful files config.sys and autoexec.bat with a program like notepad.exe or vi, which, don't blame me, I consider much more better :)
Before you proceed, I will suggest you to make a copy of the two files, just to replace them if something goes wrong.
i created different configurations to be chosen. 
I assume you usually use linux.bat to launch mulinux from your umsdos or loop "partition".

My original config.sys was something like that:
-----------------------------
device=C:\WINDOWS\COMMAND\display.sys con=(ega,,1)
Country=039,850,C:\WINDOWS\COMMAND\country.sys
-----------------------------


At this time my config looks like that:
-----------------------------
[menu]
menuitem=Linux, Carica Linux
menuitem=Mulinux, Carica Mulinux
menuitem=Win98, Carica Winbug
menucolor=14
menudefault=Linux, 10

[Linux]
shell=c:\loadlin.exe vmlinuz root=/dev/hda5 ro

[Mulinux]

[Win98]
device=C:\WINDOWS\COMMAND\display.sys con=(ega,,1)
Country=039,850,C:\WINDOWS\COMMAND\country.sys
-----------------------------

As you can see I've used the command "menuitem" which configures those three chances. It's not difficult to understand, if you still got your little manual of msdos you will be able to use it naturally.
Anyway, let's talk about just a litte for people who has thrown away that book :)
The command menuitem allows you to get a new configuration, you can call it as I did, or in an other way, it doesn't matter. But it is important that you after write the same name into the square brackets.
The command menucolor is just to change the background, if you like it you can try change the number, just to have a look, otherwise you can avoid it.
The command menudefault sets the default system that will be launched, the number after the comma sets the delay, in this case ten seconds.

Right, we have done half work.

Now we need to change the autoexec.bat. I'll show you how in the same way I did above:

My original autoexec.bat:
-----------------------------
mode con codepage prepare=((850) C:\WINDOWS\COMMAND\ega.cpi)
mode con codepage select=850
keyb it,,C:\WINDOWS\COMMAND\keyboard.sys
-----------------------------

My autoexec.bat now:
-----------------------------
goto %config%

:Win98
mode con codepage prepare=((850) C:\WINDOWS\COMMAND\ega.cpi)
mode con codepage select=850
keyb it,,C:\WINDOWS\COMMAND\keyboard.sys
goto end

:Mulinux
c:
cd mulinux
linux.bat
goto end

:end
-----------------------------

This is easier to understand than config.sys. Easily only the lines of which configuration you've chosen will be processed.
Maybe it appear to you difficult, but once you've tried this method will seem extremely easy, I do not understand why I written so much about, perhaps to be sure making everybody able to help themselves without worrying too much.

An other thing, maybe you don't need it: I've a bit modified the linux.bat created by the mulinux installation, unfortunately I don't have here the original, I don't remember how does it look, anyway I've put all the staff to make mulinux boot into the mulinux directory and now my .bat looks so:

------------------------------
loadlin.exe c:\mulinux\@loadlin.cfg
------------------------------

Now, you are quite ready to reboot. 
But I will suggest to be sure you have written everything in the right way and, to be really sure, I advice you to have ready, for any eventuality, your boot disk of win (into which you'd better copy also edit.com) and of mulinux. I didn't need, but you know what I mean.
However, if what I wrote seems don't work, don't worry, you can stop it just pressing F8 at the boot or SHIFT+F5 when you are into the menu to come back to the dear prompt c:\_ and use edit to modify again what was wrong.
Well, you are ready.
Reboot your system and, if everything was all right, you could see a screen like that:

Menu di Windows98:
1. Carica Linux
2. Carica Mulinux
3. Carica Winbug

Remember that you have set 10 seconds, so hurry up :) and make your choice!
If you choose Winbug, Winbug will start as well as the other time, otherwise use the arrow setting Mulinux and press Enter or press 2.
Mulinux will start making you to have a lot of fun!

Fabio Gurini
E-mail: gfabio@geocities.com

P.S.
As you can see there is a big mystery which I couldn't found the reason: in fact the usual linux start direct after config.sys, as you can see no lines were written in autoexec.bat. Meanwhile, to start mulinux, we must not write anything (a part the square brackets) into the config.sys. I don't have discovered why yet. I tried many times to add into the config a line with shell=and so on, for mulinux, but it didn't seem to be willing to work :(
Anyway, this is just one of my curiosities. It doesn't matter. The thing works well in the way I wrote, so why take care of it?
