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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Gentoo 2004.2, Slackware 10, Windows XP, Windows 2003 Server
Posts: 348
Rep:
Getting a duel boot to work
Okay, I've done this a million times.. But for some reason today, after i reformatted and installed windows again, lilo wont boot into windows anymore.
Fdisk -l
Code:
Disk /dev/hda: 122.9 GB, 122942324736 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 12176 97803688+ 83 Linux
/dev/hda2 12177 14608 19535040 b W95 FAT32
/dev/hda3 14609 14946 2714985 82 Linux swap
Disk /dev/hdb: 33.8 GB, 33820286976 bytes
16 heads, 63 sectors/track, 65531 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 65530 33027088+ 7 HPFS/NTFS
Does anyone see anything thats wrong there. Linux (/dev/hda1) is where i put lilo and lilo boots up just fine.. Its just when I select the windows ntfs partition, it just restarts lilo.
Distribution: Gentoo 2004.2, Slackware 10, Windows XP, Windows 2003 Server
Posts: 348
Original Poster
Rep:
When I changed it to that, and I try to run lilo:
Code:
Warning: LBA32 addressing assumed
Warning: Int 0x13 function 8 and function 0x48 return different
head/sector geometries for BIOS drive 0x80
fn 08: 1024 cylinders, 255 heads, 63 sectors
fn 48: 58853 cylinders, 16 heads, 63 sectors
Added Linux *
Unrecognized token "boot-as" at or above line 12 in file '/etc/lilo.conf'
Originally posted by jomen ...should'nt you install lilo to mbr of the whole hd - that would mean a line like this:
boot = /dev/hda
This is true, but he did say lilo was working fine and it was only booting into Windows that was failing.
But this brings up another point - is the OP re-running lilo after each edit of the lilo.conf file? If you don't re-run lilo then it won't install the new options into the MBR. Also, if he does specify it as /dev/hda1 instead of /dev/hda then it might not update the correct MBR.
Distribution: Gentoo 2004.2, Slackware 10, Windows XP, Windows 2003 Server
Posts: 348
Original Poster
Rep:
No, I do not need to install it on the mbr.. As long as it is the first hard drive parititon with the boot attribute (from cfdisk/fdisk) it will boot..
And thank you demonbane, this was a wierd problem and i dont understand how that fixed it.. Care to explain?
It depends on how yor drives were configured when Windows was installed. If your hdb was either set to the first boot device in bios or physicaly moved to hda while installing Windows, then it needs to stay in the first boot device in order to boot, therefore when you set the first boot device back to your 120gig drive it fails to load.
The workaround is to trick the Windows os loader into thinking it is on the first boot device, which is exactly what the "map-drive" or "boot-as" directives in lilo.conf is doing.
Note that this is not always the case, for example if you left the 120gig drive as the first boot device while installing Windows, chances are Windows os loader gets installed /dev/hda2 where it's able to write into and set to active by the installer, in that case you configure lilo to load /dev/hda2 without the drive mappings.
Distribution: Gentoo 2004.2, Slackware 10, Windows XP, Windows 2003 Server
Posts: 348
Original Poster
Rep:
Oh okay, I did choice A (took out the 120gb and installed windows) because when I tried to install windows with the 120gb still in (installing windows on my 40gb) However It came up with an error saying NTLDR.exe not found or something along those lines.
So I figured I should just unplug the 120gb's power, install windows, plug the 120gb back in and reconfig lilo to boot the new windows.
Then I got that error
Demonbane came to the rescue, thanks buddy. For reference to others about this "boot-as" / "map-drive" trick, heres part of the manual (lilo.conf)
Code:
This flag (LILO version 22.5) indicates a DOS/Win_
dows/OS2 or other system which will only boot from
BIOS device 0x80, the "C:" drive, or BIOS device 0,
the A: drive. When this flag is specified, if this
drive is not assigned device code 0x80 or 0 by the
BIOS, then the chain loader will dynamically swap
the device code actually assigned with device code
0x80 or 0 to make this drive appear to be the first
hard or floppy drive, "C:" or "A:".
This flag is easier to use than "map-drive=" (see
below), and is preferred, if simple forcing of
device code 0x80 is all that is required. It is
also more general, in that the necessity to swap
BIOS device codes is determined dynamically at
boot-time, not at boot install-time, as with "map-
drive=". It is slightly more powerful than "boot-
as=", in that the device code which is assigned, 0
or 0x80, is determined dynamically.
Now I'm just curious and trying to figure out how this really works. The boot-as was supposed to LILO that windows was the first hard drive just to fool windows that it was the first hard drive. However, since my version of lilo seems to be outdated (LILO v22.3.2) Latest (22.5.9), i needed to do a little "hack" with the map-drive option. Im not sure how that part works because you switch it back and forth But it seems to end on 0x80 which is what windows needs to boot.
Sorry for the long post, i just was thinking and typing at the same time. Thanks Demonbane
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.