Loadlin (Re: [plug] Mandrake 7.2 install hassles)

Matt Kemner zombie at wasp.net.au
Fri Nov 10 09:24:52 WST 2000


On Thu, 9 Nov 2000, Dennis Plester wrote:

> So as far as I know, I now have a Mandrake 7.2 system ready to fire, but no
> grub or LILO set up. Is there an easy way to get the install bootloader
> section to do its thing by itself without going through the install again?
> My system has Win98 in the primary partition

The easiest way (IMO) would be to grab a kernel image and use loadlin to
boot from DOS straight into Linux

In fact if you dual boot between win98 and Linux a lot you may find it
easier to set up a dual-boot menu using the menu facilities in config.sys,
which is a lot more userfriendly (to the uninitiated) than LILO

First you convince win98 to boot into DOS rather than the GUI by editing
c:\msdos.sys and changing the line that says BootGUI=1 to 0

Secondly you edit config.sys so it looks something like:

-----------------cut here------------------------
DEVICE=C:\WINDOWS\HIMEM.SYS
[MENU]
MENUITEM=Win,Windows
MENUITEM=Linux, Linux
MENUITEM=DOS, DOS
MENUDEFAULT=Linux,20

[WIN]

[LINUX]
SHELL=C:\COMMAND.COM /C c:\linux\linux.bat

[DOS]
-----------------cut here------------------------

Make sure you have a C:\COMMAND.COM
You may need to change the SHELL= line so it points to whereever you have
a command.com

Thirdly you edit autoexec.bat so it looks like:

-----------------cut here------------------------
@echo off

if %config% == Win goto win
goto end

:win
c:\windows\win
:end
-----------------cut here------------------------

Fourthly, create a C:\Linux directory which contains loadlin.exe, a kernel
image (usually called vmlinuz) and a small batch file called linux.bat
which contains:

-----------------cut here------------------------
@echo off
C:\Linux\loadlin C:\Linux\vmlinuz root=/dev/hda2 ro
-----------------cut here------------------------

Change /dev/hda2 to your primary Linux partition.

Then, if you reboot you should get a menu with 3 options, the first of
which will boot into Windows, the second runs the shell script that calls
loadlin, and boots into linux, and the third boots into the DOS command
prompt only.

If you don't know where to find loadlin (should come on your Linux CD) it
can be downloaded from most Debian mirrors, or from my FTP site
(ftp://live.wasp.net.au/pub/linux/loadlin/)

You should be able to find a kernel on your install CD

 - Matt




More information about the plug mailing list