Solved

Linux dual boot with Win98

Posted on 2002-03-10
10
477 Views
Last Modified: 2013-11-15
Previously my computer had Win2K and Redhat7 installed and the dual-boot work fine between them. The Win2K boot menu will prompt me to select between Win2K and Linux. A few days ago my Win2K crashed and completed screwed up. Then, I decided to put Win98 on my computer instead of Win2k. Since the Win2K partition is NTFS which is not compatible with Win98, I removed the NTFS partition using fdisk. What I notice is, the LINUX partition is set as an extended DOS drives (but doesn't show a logic drive letter). After removed the NTFS partition, my computer system couldn't boot anymore. Therefore, I use a startup disk to recreate the FAT32 partition for the disk area released from the NTFS and installed the Win98. Now my computer can boot from Win98, but I like to know how to make the dual boot work between Win98 and Linux. Pls note that the Linux partition is kept intact during my Win98 installation and I don't want to re-install the Linux. Thanks.
0
Comment
Question by:dong081698
  • 3
  • 3
  • 3
  • +1
10 Comments
 
LVL 1

Expert Comment

by:swapsthegreat
ID: 6855986
hi

   u have to use the linux bootloader lilo to do this. u can boot into linux through DOS. While booting 98 go to command prompt only. Ifu dont have ur cdrom driver in dos, then boot through 98 floppy and start with cdrom support. On ur redhat cd there will be following files :

loadlin.exe (in dosutils dir)
vmlinuz (in autoboot dir)


now type

loadlin vmlinuz root=/dev/hd?? at the dos prompt. give ur proper / partition id.

u shud be able to boot.


Now edit the file /etc/lilo.conf

Make following changes
There will be some lines
image=/boot/vmlinuz
 label=linux and so on

Now u add
other=/dev/hd??  (ur win partition id)
label=dos

At the top add a line (if not present)
boot=/dev/hda
prompt
default=linux   (whichever label u want default)


save the file and run /sbin/lilo -v

Now reboot and u shud get a lilo prompt which will allow u to choose between win and linux

   
0
 
LVL 1

Accepted Solution

by:
swapsthegreat earned 100 total points
ID: 6855987
hi

   u have to use the linux bootloader lilo to do this. u can boot into linux through DOS. While booting 98 go to command prompt only. Ifu dont have ur cdrom driver in dos, then boot through 98 floppy and start with cdrom support. On ur redhat cd there will be following files :

loadlin.exe (in dosutils dir)
vmlinuz (in autoboot dir)


now type

loadlin vmlinuz root=/dev/hd?? at the dos prompt. give ur proper / partition id.

u shud be able to boot.


Now edit the file /etc/lilo.conf

Make following changes
There will be some lines
image=/boot/vmlinuz
 label=linux and so on

Now u add
other=/dev/hd??  (ur win partition id)
label=dos

At the top add a line (if not present)
boot=/dev/hda
prompt
default=linux   (whichever label u want default)


save the file and run /sbin/lilo -v

Now reboot and u shud get a lilo prompt which will allow u to choose between win and linux

   
0
 
LVL 1

Expert Comment

by:mhomoky
ID: 6856557
If "swapsthegreat" had paid closer attention to your question he would have noticed you've already given tbe required information to complete the lines above for LILO to work.

Your initial difficulty will be starting Linux again after erasing the boot entry that Windows 2000 was using to kick start it.  An alternative way to boot Linux from any Linux boot disk / CD is to simply press tab at the LILO: prompt and enter

linux single initrd= root=/dev/hda5

to start Linux using single mode (a non-secure mode).  If you still know you're root password, you can use

linux 3 initrd= root=/dev/hda5

This should run the normal Linux startup procedure and result in you reaching a command line.  If you have used the second option above (linux 3...) you will then need to login using your root account and its passsword.

At the command line type vim /etc/lilo.conf to edit the lilo.conf file (the file used to present the LILO boot menu) and examine it carefully for the following line:

lba32

If that is missing, insert it towards the top of the file - it should only be present once.

There are then two entries defining what appears in the boot menu: each is identified with the label= line.  You should have a section which probably looks like:

image=/boot/vmlinuz
root=/dev/hda5
label=linux

If so, this is fine.  Look further down for the following, and add it if necessary:

other=/dev/hda1
label=win


Finally to ensure LILO is installed in the correct place you use this near the top of the file:

boot=/dev/hda
prompt
default=linux
timeout=300

This will install LILO to the first Master Boot Record of the first hard disk (/dev/hda) and prompt for which operating system to load on bootup.  The default line can of course be changed to win if you'd prefer Win 98 to startup instead of linux.

Hope this helps...
0
 
LVL 1

Expert Comment

by:swapsthegreat
ID: 6857157
well mr mhomoky it seems u r the one not payin attention. When dong doesnt have lilo, how do u expect him to boot by pressing tab ?

the lba32 line is required only for large hard disks when the linux partition is in above 8gb

Also mr mhomoky u completely neglected the fact that after putting the boot= entries and saving the file u need to run lilo at the prompt to actually write the mbr.




0
 
LVL 1

Expert Comment

by:trenchdigger
ID: 6862935
If you don't mind booting into DOS first, loadlin might be a much simpler way to boot into Linux.
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 1

Expert Comment

by:mhomoky
ID: 6864008
swaps,

I accept I forgot to ask dong to run /sbin/lilo when he had completed the steps to edit the /etc/lilo.conf file, but I *did* specify how to start the system using LILO:

"An alternative way to boot Linux from any Linux boot disk / CD is to simply press tab at the LILO: prompt and enter..."

Now I assume dong still has his installation CD / Rescue floppy created during loading, so this shouldn't be a problem for him.

The problem with loadlin in my opinion is that it has to run under DOS in the first place so that boot process is more lengthy and cumbersome.  Start PC; press Esc at the moment where the Win 98 boot loader pauses to allow this (but with no indication - this can be easily missed); select DOS Safe Mode (Command prompt only) from the menu - otherwise other drivers are loaded; finally from the DOS prompt enter the full path to loadlin to start Linux.

My alternative (and that of most Linux users) is to use the one of the excellently written LInux LOaders (in my case my preference is LILO - but Grub is equally good).  Here you can choose between Linux in several kernel versions and Windows.  Lest us forget that Microsoft aren't accumstomed to allowing us to boot alternative operating systems - until Windows NT this was not possible without third party support such as loadlin.

dong - apologies for forgetting to ask you to run /sbin/lilo at the end of the procedure I outline above.  The line LBA32 is not required but is highly recommended (it does not harm if not required, but you won't be able to boot if it's missed off a large hard disk installation).  You made no mention as to the size of your partitions - only that you managed to remove the NTFS one using fdisk from the (Win 98?) boot disk.  I would tread very carefully herer as fdisk has been known to write invalid partition boundaries that sometimes overlap, but this depends very much on your circumstances.
0
 
LVL 1

Expert Comment

by:trenchdigger
ID: 6864469
I disagree with the comment about Loadlin being lengthy/difficult. When I had Windows 98 on my computer, I found it to be the simplest way to get to Linux. With a quick edit to config.sys you can have a graphical menu (just like the one you get when you hit F8 while starting Windows) with options to load Linux, Windows, etc. I set mine up to load Linux after 2 seconds, unless I hit a key and selected a Windows boot instead. Total configuration time was about five minutes, and by setting the default DOS shell to loadlin.exe for the Linux settings, I bypassed having to load command.com and type stuff in. The only difference between Loadlin and any "pure" Linux loader is that Loadlin is run from DOS (and, can be run at any time when DOS is loaded) while others run at startup. LILO may offer more flexibility, but Loadlin is simpler to configure.
0
 
LVL 1

Expert Comment

by:mhomoky
ID: 6864527
Fair comment trenchdigger.  Your point about config.sys is correct and to be fair there is about the same amount of config needed whichever way you choose to do it.

Some people prefer tinkering with the DOS / Windows settings, others prefer to leave that well alone and tinker only with the Linux side.  I have no preference either way.

0
 

Author Comment

by:dong081698
ID: 6883824
Thanks a lot.
0
 
LVL 1

Expert Comment

by:trenchdigger
ID: 6884660
I think the reason I was drawn to Loadin initially is that it required no knowledge of the complicated stuff that LILO seemed to need. In retrospect I was wrong (my system is, in fact, exactly like one of the sample setups in the readme) but I was still much more comfortable within the confines of an OS I already knew. Now that I've gotten into Linux and have become more knowledgable about such things I'm doing all sorts of stuff I wouldn't have done, like LILO.
I've also recently tuned my hard drive with hdparm, and I was scared that I'd kill my computer for a long while because of the warnings in the man page... the point is, even though they're dealing with about the same amount of setup, Loadlin is an easier approach to grasp at first.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

920 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

12 Experts available now in Live!

Get 1:1 Help Now