LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-30-2006, 07:10 AM   #1
qwerty
Member
 
Registered: Feb 2005
Location: England
Distribution: Ubuntu 5.10
Posts: 80

Rep: Reputation: 15
Dual boot problem


After having an accident installing ubuntu dapper with the buggy livecd installer, I lost both my linux and windows partitions. Knowing that it is easier to install XP before linux I installed XP first. I then installed Dapper.

My partition setup is as follows:
hda1 /boot
hda2 swap
hda3 /
hda4 extended
hda5 /home
hda6 /Multimedia
hda7 where XP is installed

Previously, I had /boot as FAT16 so that both XP and Windows could share it and used grub as bootloader. When I installed XP i put it on hda7, and though it didn't ask me to specify, i presume it put its mbr stuff on hda1. This was all ok. The problem came when I then tried to install Dapper. For some reason it wouldn't let me keep hda1 as FAT16 and insisted I change it to ext2 so that I could put /boot on there. (ubuntu Breezy didn't mind me having /boot on hda1 as FAT16)

Dapper boots fine but I am unable to get into XP. I have tried to edit /boot/grub/menu.lst by adding the following at the end
Code:
title		Windows XP
root		(hd0,6)
makeactive
chainloader	+1
as is suggested in the comments in the menu.lst file and various sites I have googled. When I try to boot into windows I now get an grub error (15 iirc) and windows does not boot. I presume this is because the XP mbr was on hda1 which got formatted to be converted into ext2.

I have considered putting grub onto a floppy disk, with intention of using the floppy to boot linux and reinstalling windows onto hda7 and putting hda1 back to FAT16. However, I notice that menu.lst refers to /boot and the various kernels stored in it. Does this means that I can't use a boot floppy and delete the stuff on hda1?

Would the solution be to unmount /boot and delete it's entry in /etc/fstab and create a new directory called /boot on hda3 in the root directory and copy the kernels etc to it and then edit menu.lst on the floppy to point to that partition instead? and then reinstall windows onto hda7 and format hda1 to fat?

Alternatively, is there a way to put /boot on hda1 back to FAT16 and still get dapper to work with it? that way I can share the partition between linux and XP again.

Please can some one help me, i'm confused and don't really understand how the booting process works and also really don't want to have to reinstall linux again if it can be avoided. TIA

p.s. Here's the part of menu.lst that does the booting stuff
Code:
title		Ubuntu, kernel 2.6.15-23-386
root		(hd0,0)
kernel		/vmlinuz-2.6.15-23-386 root=/dev/hda3 ro quiet splash
initrd		/initrd.img-2.6.15-23-386
savedefault
boot

title		Ubuntu, kernel 2.6.15-23-386 (recovery mode)
root		(hd0,0)
kernel		/vmlinuz-2.6.15-23-386 root=/dev/hda3 ro single
initrd		/initrd.img-2.6.15-23-386
boot

title		Ubuntu, memtest86+
root		(hd0,0)
kernel		/memtest86+.bin 
boot

title		Windows XP
root		(hd0,6)
makeactive
chainloader	+1
 
Old 05-30-2006, 08:32 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I don't understand why you would want to make /boot FAT16--Windows does not need to be able to read your Linux partitions except for shared data. The best way to do this is a FAT32 partition just for data.

Note that the "mbr stuff" goes in the mbr---not in any partition. (The mbr is the first 512-byte sector---before any of the partitions). If you load Windows first, then its bootloader goes in the mbr. Then, when you load Linux, GRUB replaces it.

Normally, people put Windows in the first partition, but I don't think this is required.

My GUESS on Windows not booting is that "chainloader +1" only works with Windows in the first partition. The grub manual--or someone else on LQ--may have a better answer.
 
Old 05-30-2006, 08:56 AM   #3
qwerty
Member
 
Registered: Feb 2005
Location: England
Distribution: Ubuntu 5.10
Posts: 80

Original Poster
Rep: Reputation: 15
The reason why I had set hda1 to FAT16 wasn't to share data, that's what XP put it to install its booting stuff on.

I just tried to install XP onto hda7 and it gave the following message
Quote:
To install XP on the partition you selected, Setup must write some startup files to the following disk:
117240MB Disk 0 at Id 0 on bus 0 on atapi [MBR]
However, this disk does not contain a Windows XP compatible partition
I had encountered this message on a previous install and that's why I had put hda1 to FAT16 so that Windows was happy. Ubuntu Breezy then let me install /boot to this partition. However, when I tried the same thing with Dapper it complained and said the partition had to be ext2.
 
Old 05-30-2006, 10:06 AM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Windows wants to be on the first partition of the first drive. You have to convince it that it is indeed there.

Change this config in your grub menu.lst:
titleWindows XP
root(hd0,6)
makeactive
chainloader+1

to this:
titleWindows XP
root(hd0,6)
map (hd0,0) (hd0,6)
map (hd0,6) (hd0,0)
makeactive
chainloader+1
 
Old 05-30-2006, 10:22 AM   #5
qwerty
Member
 
Registered: Feb 2005
Location: England
Distribution: Ubuntu 5.10
Posts: 80

Original Poster
Rep: Reputation: 15
Thanks for that. I tried what you said but unfortunately it didn't work, grub gave the following error
Quote:
Error 12: Invalid device requested
Can windows still be started even after the startup files it put on hda1 have been removed?
 
Old 05-31-2006, 04:19 AM   #6
qwerty
Member
 
Registered: Feb 2005
Location: England
Distribution: Ubuntu 5.10
Posts: 80

Original Poster
Rep: Reputation: 15
I decided last night that it would take to long for me to try and fix grub and I've got some work that I need to do on my PC. Therefore I decided to just reinstall both windows and dapper.

This time I used the following partition set up
hda1 : Windows mbr FAT16
hda2 : swap
hda3 : /
hda4 : extended
hda5 : /home
hda6 : /media/Multimedia
hda7 : windows

Notice that I didn't use a separate partition for /boot this time, I just kept it in /. Because of this the dapper installer didn't complain about hda1 not being in ext2. After the install it grub installed itself with no problems. I can now use both operating systems.

For anyone who may have similar problems here is the relavent part of my menu.lst

Code:
title		Ubuntu, kernel 2.6.15-23-386
root		(hd0,2)
kernel		/boot/vmlinuz-2.6.15-23-386 root=/dev/hda3 ro quiet splash
initrd		/boot/initrd.img-2.6.15-23-386
savedefault
boot

title		Ubuntu, kernel 2.6.15-23-386 (recovery mode)
root		(hd0,2)
kernel		/boot/vmlinuz-2.6.15-23-386 root=/dev/hda3 ro single
initrd		/boot/initrd.img-2.6.15-23-386
boot

title		Ubuntu, memtest86+
root		(hd0,2)
kernel		/boot/memtest86+.bin 
boot

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title		Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/hda1
title		Microsoft Windows XP Professional
root		(hd0,0)
savedefault
makeactive
chainloader	+1
Since reinstalling dapper this time around I have decided not to bother with XGL. As nice as it may be it meant that i couldn't watch fullscreen tv and xine didn't work ( xine is needed for dvds because the gstreamer engine won't work for dvds in dapper).

Thanks for all those that tried to help
 
Old 05-31-2006, 06:34 AM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Interesting setup....
I infer from this that GRUB is in the mbr---ie the first 512 bytes on the drive---and that NTLDR is on hda1 (NTLDR is what Windows boot code points to).

How do you install Windows and get it to put NTLDR in hda1 and everything else in HDA7?
 
Old 05-31-2006, 07:06 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Some clarification:
- Current Windows (and recent derivatives) does *not* have to be on the first partition. Win95 was probably the last that had that limitation.
- All Windows (so far) *do* require that the system partition (contains ntldr, boot.ini plus a few other files) be a primary.
The boot partition (contains the system files) may be a logical, provided the system partition is a primary. If there is only the one partition, it must be a primary (network installs can get around this).

Hence the above setup is valid.

(and yes, I wrote what I meant - if you think the names of the partitions are f*cked up, complain to Seattle).

Last edited by syg00; 05-31-2006 at 07:07 AM.
 
Old 05-31-2006, 09:42 AM   #9
qwerty
Member
 
Registered: Feb 2005
Location: England
Distribution: Ubuntu 5.10
Posts: 80

Original Poster
Rep: Reputation: 15
In response to pixellany...
The reason my partition setup is 'interesting' is that I'd never originally intended to use windows so originally hda6 was larger and included the space now taken by hda7. I only added windows on at the end because I needed to use it for a University coursework.

The way to get windows to install itself to hda7 and the ntldr into hda1 is to select the hda7 partition during the install process, the installer will then say that it has to install setup files to very first partition and so then you just agree to that and it does it (it may be necessary to reformat it to fat).
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Boot problem Ubuntu on Dual Boot Mickey1 Ubuntu 3 01-29-2006 08:14 AM
Need help fixing boot problem on Ubuntu/WinXp dual-boot Ay-Karamba! Linux - General 5 09-06-2005 09:20 PM
Problem with dual boot/dual drive setup Norab Linux - Hardware 10 08-29-2005 03:13 PM
Fedora Core 3 Dual Boot, Dual Hard drives, Grub Boot Loader Denali03 Linux - Newbie 1 03-04-2005 01:44 PM
problem with Installing red hat linux dual boot(/boot < for 1024 cylinders ) praveenb Linux - Newbie 2 02-13-2004 08:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:30 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
Open Source Consulting | Domain Registration