• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 182
  • Last Modified:

dual boot problem

I tried to install WinXP dual boot with gentoo.

after selecting it on grub menu i get "Disk Error".
windows is on sda4, MBR is sda1.   (gentoo on 3, swap on 2)

grub.conf reads :

title=Windows
rootnoverify (hd0,3)
makeactive
chainloader +1
0
kloodzman
Asked:
kloodzman
  • 10
  • 5
  • 5
  • +3
1 Solution
 
PUNKYCommented:
Which OS that you installed first?
0
 
kloodzmanAuthor Commented:
gentoo. ive just  <tried> to install winXp
0
 
kloodzmanAuthor Commented:
PS: the lines in grub.conf are being printed on screen - rootnoverivy and etc. after diskerror.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
PUNKYCommented:
I have many machines which have dual boot XP with Linux, but from what I understand, I have never done install Linux first in such dual boot system (so I can not say that is OK or not). Install M$ os first, then install Linux.
0
 
kloodzmanAuthor Commented:
not an option. ive got a fully functional gentoo, took me way too long to set it up...
0
 
alextoftCommented:
The legacy windoze OS will ALWAYS install its own bootloader onto the MBR, regardless of wat you may have there before. It doesn't play with other OS's.. period. Considerate huh?

If you install Linux first, then BillOS, you'll need to drop your Linux install disc in and reinstall Grub.
0
 
Duncan RoeSoftware DeveloperCommented:
I've done this with LILO (install Windoze second). Rather than use the install disk, I've loaded Knoppix and re-written the MBR from there: chroot to the mounted root disk so the config still works, mount /proc, rerun lilo. I get a few warnings about /proc not agreeing with /dev (or something ...) but it worked OK.
0
 
nedvisCommented:
Hi,kloodzman!
Could it possibly be that your computer has antivirus protection enabled in BIOS?
Antivirus protection enabled in BIOS usually means that viruses as well as ordinary and legitimate programs
 ( such as GRUB or LILO installers) are prohibited from writing to MBR ( master boot record area of hard-disk).
Try disabling BIOS AV protection and installing WinXP . Once you're done with XP setup reenable AV in BIOS.

good luck

 
0
 
kloodzmanAuthor Commented:
grub has been reinstalled using a liveCD, gentoo works fine. grub is set up on sda1, the /boot. sda2 is swap, sda3 /, and sda4 FAT32, on which  winXP has been installed. when trying to boot the XP, i get disk error.
perhaps my grub syntax is wrong? maybe the boot files arent set up right in sda4?
0
 
Duncan RoeSoftware DeveloperCommented:
You have to write the boot record to /dev/sda. Does your grub config do that? Post your config if in doubt
0
 
nedvisCommented:
duncan_roe is correct : You have to write the boot record to /dev/sda ( hard-disk )
  and not to the first partition of the hard-disk ( dev/sda1 )!
0
 
kloodzmanAuthor Commented:
my grub install looked like this:
grub> root (hd0,0)
grub>setup (hd0)
grub>quit
0
 
nedvisCommented:
Hi,kloodzman,

would you please post your current  /etc/fstab  and  /boot/grub/menu.lst  files .


 
0
 
kloodzmanAuthor Commented:
fstab:

/dev/sda1             /boot              ext2            defaults,noatime
/dev/sda3             /                     ext3             noatime
/dev/sda2             none              swap            sw
/dev/cdrom          /mnt/cdrom    iso9660       user,ro
proc                    /proc               proc            defaults
shm                     /dev/shm        tmpfs           nodev,nosuid,noexec

menu.lst

default 0
timeout 3
#splashimage=(sd0,0) /boot/grub/splash.xpm.gz

title=Gentoo Suspend2
root (hd0,0)
kernel /boot/kernel-2.6.18-suspend2-r1.temp root=/dev/sda3

title=Gentoo Sources
root (hd0,0)
kernel /boot/kernel-2.6.20-gentoo-r7 root=/dev/sda3

title=Windows
rootnoverify (hd0,3)
makeactive
chainloader +1
0
 
nedvisCommented:
According to your fstab THERE IS NO WINDOWS FAT32 NOR NTFS PARTITION  DETECTED AND MOUNTED when you  boot Gentoo.
You said "windows is on sda4".
I don't think it possible : because sda4 i placeholder for extended partition
and I thnik your Windows partition ( either FAT32 or NTFS ) is most likely
/dev/sda5
In that case the line:
rootnoverify (hd0,3) under title=WIndows
should read:
rootnoverify (hd0,4)
--------------------------------------------------------------------------------------------
Let's wait for second opinion from duncan_roe nad other experts!!!
---------------------------------------------------------------------------------------------
0
 
kloodzmanAuthor Commented:
the fact that its not on fstab simply means i didnt add it there.
i got only four partitions on my hdd, so there is no sd4.
0
 
nedvisCommented:
"the fact that its not on fstab simply means i didnt add it there.
I got only four partitions on my hdd, so there is no sd4."
Nothing wrong with that!
I only said that if you really have four partitions three primary and one extended
( and in your case those are :
                                        /dev/sda1  for  /boot
                                        /dev/sda2  for swap  and
                                        /dev/sda3  for / ( system root together with /home etc.)
then your windows partition ( or unalocated free space on disk once formated)
 will get device name /dev/sda5  ( as a logical partition within /dev/sda4 as extended partition)

Please open terminal login as su ( root) and get the hard-disk partition list and post it
Command is:
 fdisk    -l   /dev/sda

( NOTE:   -l  stands  for  "l" as in List )
0
 
Duncan RoeSoftware DeveloperCommented:
No that is wrong. Your 4 primary partitions are sda1 sda2 sda3 & sda4. Any of these can be extended partitions (linux allows any number, dos only 1).
sda0 == sda == the raw disk (where you write the MBR)
0
 
kloodzmanAuthor Commented:
Well guys, I've solved the problem - winXP has to be on the first partition.
using Gparted i moved all partitions to the right, and reinstalled GRUB.
it all booted like a charm...
0
 
gigix18Commented:

No, that's not the correct answer :) Windows does not have to be on the first partition.
The boot loader installed in MBR cannot see beyond the 8GB sector of the hard drive as i recall so if your windows partition was after some 40G of the drive it is normal to behave like that.
Ofcourse all went well because the windows partition was probably smaller than 8G and thus the /boot partion of linux was before the 8GB sector of the drive...
0
 
kloodzmanAuthor Commented:
then why does it work now, after i moved the thing from side to side?
0
 
gigix18Commented:

As i mentioned in my post, windows partition as well as the /boot partition for linux are both before the 8G sector, that's why it's working
0
 
Duncan RoeSoftware DeveloperCommented:
Actually ... does fdisk show you an "active" partition? (with a '*' beside it)
fdisk can manipulate that (toggle a partition's "active" flag), but it's only there for the benefit of Windows - linux doesn't care about it. I *think* Windows boots the "active" partition
0
 
kloodzmanAuthor Commented:
thanks guys, but i couldnt care less... problem solved, and i dont care why...
0
 
Duncan RoeSoftware DeveloperCommented:
You should close the question then
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

  • 10
  • 5
  • 5
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now