Solved

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

Posted on 2000-03-13
7
270 Views
Last Modified: 2013-12-15
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.
0
Comment
Question by:NT_Programmer
7 Comments
 
LVL 1

Expert Comment

by:toneus
ID: 2614915
When you installed LILO, where did you put it? Have you tried the MBR record of /dev/hda ?
0
 
LVL 1

Author Comment

by:NT_Programmer
ID: 2616006
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
 
LVL 1

Expert Comment

by:friebele
ID: 2617700
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
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
LVL 1

Author Comment

by:NT_Programmer
ID: 2630895
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
 
LVL 1

Expert Comment

by:friebele
ID: 2634065
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
 
LVL 2

Accepted Solution

by:
mapc earned 150 total points
ID: 2645709
0
 
LVL 1

Expert Comment

by:calvinrsmith
ID: 2699077

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

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Currently, there is not an RPM package available under the RHEL/Fedora/CentOS distributions that gives you a quick and easy way to allow PHP to interface with Oracle. As a result, I have included a set of instructions on how to do this with minimal …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now