Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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 03:29 AM.
Distribution: Lots of distros in the past, now Linux Mint
Posts: 746
Rep:
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.
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.
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.
Distribution: Lots of distros in the past, now Linux Mint
Posts: 746
Rep:
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):
-----------------------
-----------------------------------------
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. :|
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.