LinuxQuestions.org
Review your favorite Linux distribution.
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 08-28-2004, 01:06 PM   #1
tearinox
Member
 
Registered: Aug 2003
Location: you dont want to know
Distribution: Gentoo 2004.2, Slackware 10, Windows XP, Windows 2003 Server
Posts: 348

Rep: Reputation: 30
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
/etc/lilo.conf
Code:
boot = /dev/hda1
prompt
timeout = 50
vga = 773

image = /boot/vmlinuz
  root = /dev/hda1
  label = Linux
  read-only
other = /dev/hdb1
  label = WinXP
  table = /dev/hdb
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.

Any Ideas?
 
Old 08-28-2004, 01:18 PM   #2
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
try
Code:
other = /dev/hdb1
 boot-as = 0x80
 label = WinXP
 table = /dev/hdb
 
Old 08-28-2004, 01:55 PM   #3
tearinox
Member
 
Registered: Aug 2003
Location: you dont want to know
Distribution: Gentoo 2004.2, Slackware 10, Windows XP, Windows 2003 Server
Posts: 348

Original Poster
Rep: Reputation: 30
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'
 
Old 08-28-2004, 02:19 PM   #4
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
ok your version of LILO is old, try this one instead
Code:
other = /dev/hdb1
  label = WinXP
  map-drive=0x80 to=0x81  
  map-drive=0x81 to=0x80
 
Old 08-28-2004, 03:28 PM   #5
dsegel
Member
 
Registered: Aug 2004
Location: Davis, California
Distribution: Gentoo, always Gentoo.
Posts: 159

Rep: Reputation: 30
Try it the simple way:

Code:
other=/dev/hdb1
  label=windows
Forget all the map, table, boot-as, etc. options.
 
Old 08-28-2004, 03:40 PM   #6
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 54
...should'nt you install lilo to mbr of the whole hd - that would mean a line like this:

boot = /dev/hda

if you install it like:

boot = /dev/hda1

it gets installed to the first partition of hda - and will probably not be found - there needs to be a mbr for the disk as a whole - I think
 
Old 08-28-2004, 05:38 PM   #7
dsegel
Member
 
Registered: Aug 2004
Location: Davis, California
Distribution: Gentoo, always Gentoo.
Posts: 159

Rep: Reputation: 30
Quote:
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.
 
Old 08-28-2004, 09:31 PM   #8
tearinox
Member
 
Registered: Aug 2003
Location: you dont want to know
Distribution: Gentoo 2004.2, Slackware 10, Windows XP, Windows 2003 Server
Posts: 348

Original Poster
Rep: Reputation: 30
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?

btw- it works now
 
Old 08-28-2004, 10:13 PM   #9
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
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.

Last edited by Demonbane; 08-29-2004 at 01:52 AM.
 
Old 08-29-2004, 12:24 AM   #10
tearinox
Member
 
Registered: Aug 2003
Location: you dont want to know
Distribution: Gentoo 2004.2, Slackware 10, Windows XP, Windows 2003 Server
Posts: 348

Original Poster
Rep: Reputation: 30
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
 
Old 08-29-2004, 01:49 AM   #11
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
put it this way
Code:
  map-drive=0x80 to=0x81  
  map-drive=0x81 to=0x80
is equivalent to
Code:
boot-as = 0x80
except that the use of "boot-as" is only supported in newer versions of LILO, it is prefered simply because there's less letters to type.
 
  


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
Duel Boot,XP Pro+Suse 9.1 pro wont work. jonny.k Linux - Laptop and Netbook 6 11-28-2004 08:37 AM
Logitech Mouseman Optical Duel Sensor does not work limdeswein Linux - Hardware 8 02-13-2004 07:42 PM
LInux+mosix+nas+duel procs will it work? Creamon Linux - Newbie 0 12-22-2003 02:07 AM
duel boot seingoku *BSD 2 06-05-2003 05:57 PM
Duel Boot KrazyKid Linux - Software 5 07-03-2002 07:16 PM


All times are GMT -5. The time now is 10:31 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration