LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-11-2004, 03:48 AM   #1
ToothlessRebel
Member
 
Registered: Jun 2004
Location: FL, USA
Distribution: Slackware 9.1
Posts: 190

Rep: Reputation: 30
Question Configure LILO for multi-boot tips


I need some help, I've heard LILO can dual boot Linux and a Windows system. Even NTFS from what I here. I, however, need a hand. I know I can edit lilo.config and add an option manually, but being as new as I am to this I am unsure how to identify where the Windows boots from under the Linux filesystem. I know it is somewhere on hdb, but the actual partition is unknown to me and I hate just guessing to get it right. Got any clues for me?

I've read how to do this with the NTLDR. Looking for that but any help would be appreciated.

Last edited by ToothlessRebel; 06-11-2004 at 04:29 AM.
 
Old 06-11-2004, 04:30 AM   #2
scott_R
Member
 
Registered: Jul 2003
Location: Brighton, Michigan, USA
Distribution: Lots of distros in the past, now Linux Mint
Posts: 746

Rep: Reputation: 31
Windows demands to be your first partition. This usually means it's /dev/hda1, though it can be in other spots, if youve played around with partitions alot. (For instance, you have an older 98/ME partition, and installed XP onto some other freespace.) Fdisk through Linux or MS-DOS should help ou determine which are which. If you don't "get" this part of the program, it might be best to wait a bit, and learn about partitions and the way disks are set up, before you play around and risk losing your important files. This isn't necessarily true, but I'd prefer to error on caution, than to regret it later, or have you get a bad impression of Linux.

The reason there might be problems at this point is because it's in MS's best interest to make Linux migration as difficult as possible. MS get 45% of their operating income from Windows, and 65% from Office. Both are easily supplanted by Linux, for the majority of users. If MS and Linux filesystems were easily read by MS OS's, Linux would slide into MS's spot even faster.
 
Old 06-11-2004, 04:33 AM   #3
drowstar
Member
 
Registered: Apr 2004
Location: Germany
Distribution: Slackware, Gentoo, Fedora
Posts: 205

Rep: Reputation: 30
Hi ToothlessRebel,
I am unsure how to identify where the Windows boots from under the Linux filesystem. I know it is somewhere on hdb, but the actual partition is unknown to me and I hate just guessing to get it right. Got any clues for me?
Open a terminal, become root ("su -") and issue the command "fdisk -l /dev/hdb". It will produce a list of partitions on your hdb. One will be of type NTFS. Thats the one. (see the first item of the same line to see what the partition is).

You can check the man-page on lilo.conf (man lilo.conf) for the format of this file.

Good luck,
- drowstar

NTLDR is the program windows uses to boot up. This is usually automatically called when the NTFS partition is made active. You dont need to deal with that at all.
If you are unsure about lilo, you may want to use GRUB, which is very capable of booting all kinds of OSs.

Last edited by drowstar; 06-11-2004 at 04:38 AM.
 
Old 06-11-2004, 04:37 AM   #4
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK .
Distribution: *buntu (usually Kubuntu)
Posts: 2,674
Blog Entries: 9

Rep: Reputation: 45
Well, it's sort of standard that you would have your bootloader on the first section of the MBR (main boot record), so it offer's you the option of booting window's or a linux distro, as opposed to booting windows, and then trying to work out how to boot the installed linux.

Now you mention "hdb" which suggest's that you have more than one hard drive or, like my system, the install has nominated one of the removeable media (cd/dvd etc) drive's as hdb, probably because of the way you've got your IDE cables connected.

It shouldn't matter whether it's a multi hard drive set up or not, the boot loader should still be in the first section of the MBR, but with a multi hard drive, it's gonna want to be pointing at whichever partition or even disc that you've got your linux install at.

I've been using grub, but as I've got the luxury of easy configuration, I'll nip off, change the bootloader to lilo, and post my lilo.conf so you can see how it looks.

regards

John
 
Old 06-11-2004, 04:42 AM   #5
scott_R
Member
 
Registered: Jul 2003
Location: Brighton, Michigan, USA
Distribution: Lots of distros in the past, now Linux Mint
Posts: 746

Rep: Reputation: 31
You want details, here ya go:

[root@linuxbox scott]# fdisk -l

Disk /dev/ide/host0/bus0/target0/lun0/disc: 8455 MB, 8455200768 bytes
255 heads, 63 sectors/track, 1027 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/ide/host0/bus0/target0/lun0/part1 * 1 1026 8241313+ 7 HPFS/NTFS

Disk /dev/ide/host0/bus0/target1/lun0/disc: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/ide/host0/bus0/target1/lun0/part1 * 1 2961 23784201 83 Linux
/dev/ide/host0/bus0/target1/lun0/part3 2962 9729 54363960 f Win95 Ext'd (LBA)/dev/ide/host0/bus0/target1/lun0/part5 2962 6878 31463271 83 Linux
/dev/ide/host0/bus0/target1/lun0/part6 6879 6917 313236 82 Linux swap
/dev/ide/host0/bus0/target1/lun0/part7 6918 9729 22587358+ 83 Linux

Basically, the first drive is W2K, the other drive consists of three Linux partitions, and one swap area.

------------------------


The lilo.conf (don't forget to run lilo as root after you make changes):
-----------------------

[root@linuxbox etc]# cat lilo.conf
boot=/dev/hda
map=/boot/map
vga=normal
default="linux"
keytable=/boot/us.klt
prompt
nowarn
timeout=50
message=/boot/message
menu-scheme=wb:bw:wb:bw
image=/boot/vmlinuz
label="linux"
root=/dev/hdb5
initrd=/boot/initrd.img
append="quiet devfs=mount hdd=ide-scsi acpi=off"
vga=788
read-only
image=/boot/vmlinuz
label="linux-nonfb"
root=/dev/hdb5
initrd=/boot/initrd.img
append="devfs=mount hdc=ide-scsi acpi=off"
read-only
image=/boot/vmlinuz
label="failsafe"
root=/dev/hdb5
initrd=/boot/initrd.img
append="failsafe devfs=nomount hdc=ide-scsi acpi=off"
read-only
other=/dev/hda1
label="windows"
table=/dev/hda
other=/dev/fd0
label="floppy"
unsafe

-----------------------------------------
As you can see, the windows part is fairly straight forward. MS isn't about to make it look eays, however, and to most people who are used to "fixing" systems by reinstalling them (another pet peeve, because we NEVER reinstalled systems unless they were beyond help (viruses), in the old days--not out of ego, but because finding the problem helped us to understand the solution, something MS seeks to avoid, because bug fixes are one of their major sources of revenue.) I've very recently seen people reinstall a system because of a simple error during the usual "hit enter" installation.

Sad, very sad. How MS built an empire on that makes be fear for the future of humanity. :|
 
Old 06-11-2004, 06:14 AM   #6
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK .
Distribution: *buntu (usually Kubuntu)
Posts: 2,674
Blog Entries: 9

Rep: Reputation: 45
Ha, so much for having the luxury of easily changing my bootloader from grub to lilo. I must be a pillock, because I even managed to screw that up.

Still, even though scott_R has posted his /etc/lilo.conf, here's mine

Quote:
# File generated by DrakX/drakboot
# WARNING: do not forget to run lilo after modifying this file

boot=/dev/hda
map=/boot/map
default="windows"
keytable=/boot/uk.klt
prompt
nowarn
timeout=100
message=/boot/message
menu-scheme=wb:bw:wb:bw
image=/boot/vmlinuz
label="linux"
root=/dev/hda5
initrd=/boot/initrd.img
append="devfs=mount acpi=ht resume=/dev/hda3 splash=silent"
vga=788
read-only
image=/boot/vmlinuz
label="linux-nonfb"
root=/dev/hda5
initrd=/boot/initrd.img
append="devfs=mount acpi=ht resume=/dev/hda3"
read-only
image=/boot/vmlinuz-2.6.3-7mdk
label="263-7"
root=/dev/hda5
initrd=/boot/initrd-2.6.3-7mdk.img
append="devfs=mount acpi=ht resume=/dev/hda3 splash=silent"
read-only
image=/boot/vmlinuz
label="failsafe"
root=/dev/hda5
initrd=/boot/initrd.img
append="failsafe acpi=ht resume=/dev/hda3 devfs=nomount"
read-only
other=/dev/hda1
label="windows"
table=/dev/hda
other=/dev/fd0
label="floppy"
unsafe
you should see that at the bottom, the "other=/dev/hda1" section, that's how windows is identified + at the top, I've got the default set to windows as well (though that's only because my partner is a teacher and at her school, they only have window's/M$ stuff, so she refuses to learn linux).

As far as I can work out, lot's of it is unnecessary i.e. mandrake set their version up to include addition versions for troubleshooting/repair/etc etc, and that to get the lilo booting as a dual boot, you'd only need the first "image=/boot/vmlinuz" section and the "other=/dev/hda1" bit for window's. and yes, don't forget to run lilo before you reboot (presuming you've got the details of the kernel image bit, and initrd - if you've got your sys configured to use it) - i.e. in a terminal, su to root, the type "/sbin/lilo" (no quotes) and that should run lilo and tell you what's been added.

A nuisance, but with distro's like slack, you have to do a fair amount manually, like sort the bootloader for instance. Though once it's done, it's got a very good reputation.

hope this help's a little.

regards

John
 
Old 06-11-2004, 10:14 AM   #7
ToothlessRebel
Member
 
Registered: Jun 2004
Location: FL, USA
Distribution: Slackware 9.1
Posts: 190

Original Poster
Rep: Reputation: 30
I have yet to be able to even modify that file. Though is probably do my severe ignorance with this system. I am learning though and appreciate your help.
 
Old 06-11-2004, 11:40 PM   #8
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK .
Distribution: *buntu (usually Kubuntu)
Posts: 2,674
Blog Entries: 9

Rep: Reputation: 45
It wouldn't matter whether it's lilo or grub, you'd only be able to modify the lilo.conf or grub.conf as root.

Either open a terminal and the issue "su" (no quotes) and put in your root password. Then you'd have to do
Code:
vi /etc/lilo.conf
it should then open the file for modification. A quick suggestion though, you should take a look at how thing's are done in the vi editor, because it's not quite as intuitive as you'd think.

Or just log in as root, and go to the /etc/lilo.conf (or as I said the /etc/grub.conf) and click to open, and you should find kwrite (if you set up to use kde) when it ask's you what app do you want to open the file with, it's under editor's (which may be in side system or something like that) and you can then edit it as if you're using a word processor.

regards

John
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Boot Multi Windows & Multi Linux olkar Linux - Newbie 5 10-03-2005 12:52 PM
Can't configure Lilo to boot multiple Linux partitions SlackwareInAZ Slackware 11 09-10-2005 02:04 PM
configure lilo to use two different /boot partitions TheOneAndOnlySM Linux - Software 4 05-23-2004 09:31 PM
Multi User Security Tips jestah84 Linux - Security 2 05-12-2004 11:08 AM
GRUB, Multi Linux/Multi Disk Boot gtnorton Linux - Software 1 03-16-2003 04:48 AM


All times are GMT -5. The time now is 10:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration