Getting Linux installed on 3rd partition of 2nd HD to boot.

I have installed Mandrake-Linux to my computer.  The drives are laid out like this:

/dev/hda1 - NTFS - NT boot
/dev/hda2 - NTFS

/dev/hdb1 - NTFS (3 Gig)
/dev/hdb2 - Linux (2.8 Gig)
/dev/hdb5 - Linux swap (200 K)

As you would guess Lilo doesn't boot into Linux in this situation because the Linux is too far from the beginning of /dev/hdb.

When I was installing Linux I remember seeing a 7Meg section at the beginning of /dev/hdb that is not used.  I'm assuming it is there to put a small kernel loader in, which is exactly what I want to do.

Is it possible to format this 7M section and put the kernel on it without re-installing?  If so, how?

If it is not possible, how do I need to set it up upon re-install?  I'm thinking I need to make this 7M partition the mount point "/" and the partition with linux "/boot", or is it the other way around?

If you can give the solution without re-install I'll give the full points, if I have to re-install - half.

Thanks for all of your help.
LVL 1
NT_ProgrammerAsked:
Who is Participating?
 
mapcCommented:
0
 
toneusCommented:
When you installed LILO, where did you put it? Have you tried the MBR record of /dev/hda ?
0
 
NT_ProgrammerAuthor Commented:
When I install LILO to /dev/hda and boot I get:

L 01 01 01 01 01 01 01 01

etc... on the screen.
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
friebeleCommented:
Your hd is not too big, provided the hd is running in LBA mode. I have linux on my computed installed after a 4 GB windows partition. The trick is that the entire root partition must be under 1023 cylinders, not the entire linux system. Therefore, set up your partitions as follows:

hdb1 - NTFS (3 GB)
hdb2 - linux native - / (100 MB)
hdb5 - linux swap (128 MB) - note linux does not use more that 128 mb for swap
hdb6 - linux native - /home (300 MB)
hdb7 - linux native - /var (300 MB)
hdb8 - linux native - /usr (rest)

Then set lilo to write to your MBR on hda. This will start your linux system since / partition should be under 1023 cylinders.
0
 
NT_ProgrammerAuthor Commented:
Thanks friebele.  I've tried your suggestions, but I still can't get it to work properly.  As matter of fact it wiped my NT install, fdisk /mbr didn't even fix it.  I had to re-install NT.

Now I have NT installed, and I have Liny installed, but for Liny I need to boot off of the floppy (which I have), but it seems kinda 1960ish to have to have a floppy to boot "such a great OS".

So I'll be happy to award the points to whoever can tell me how to set up my LILO correctly to not need the floppy.  And since I've already been burned once, tell me how I can first back up my current boot so if your LILO fix doesn't work I can restore it back the way it was without having to do a re-install.
0
 
friebeleCommented:
I don't know why lilo wiped your NT install. The only thing I can think of is that lilo wrote to your hda1 partition and not your hda mbr. The way to get around this is write lilo to your linux boot partition, and before your shut down, reconfigure lilo as follows:
 boot=/dev/hda
 map=/boot/map
 install=/boot/boot.b
 prompt
 timeout=50
 image=/boot/zImage
      label=linux
      root=/dev/hda2
      read-only
 other=/dev/hda1
        label=NT
        table=/dev/hda
0
 
calvinrsmithCommented:

Personally I like the idea of keeping linux as one partition.  The best way to boot linux after the 1024 cylinder is to first boot DOS then use a program called loadlin (comes with mandrake).  To do this:
1) Install DOS on a very small partition of the first disk.
2) Install NT on rest of first disk.
3) Setup NT to use as much of second disk as you want
4) Install Linux on rest of second disk.  Mandrake will complain that it's after the first 1024 cylinder but it't ok.  
5) Make the boot disk when prompted.
6) After you install linux use the boot disk to boot linux
7) mount the small dos partition
8) make directory linux
9) copy the vmlinuz file from / to the new DOS linux directory, and copy the loadlin.exe program from the mandrake CD to the linux directory.
10) reboot computer, tell NT to load DOS
11) create a file called: c:\autoexec.bat This file has one line that reads:
c:\linux\loadlin.exe c:\linux\vmlinuz root=/dev/hdb2 mem=128m
Modify the mem=128m part to however much RAM you have if you have more than 64M or linux will only use 64M.  However do NOT lie and say you have more than you do or linux will crash.
12) Reboot.

Now when you see the NT loader, if you pick NT then NT will load.  If you pick linux then DOS will load and then linux will take over at which point DOS is no longer used.

Here is why this works:
Linux can't boot right when installed on last part of large disk so it needs some help to load the kernel into memory after which it can load from anywhere.  This is what the boot floppy does.  Since you don't want to use a floppy DOS can be used to get the kernel into memory.  Once the kernel starts to load linux does not use dos at all so dos limitations are not any issue.

Also this same trick can be used to get linux to boot off of anything.  This is the same approach that mandrake uses with '95 to load linux from a file, so new users will not have to re-partition their drive.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.