LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-29-2007, 11:36 PM   #1
L_Jenkins
LQ Newbie
 
Registered: Oct 2006
Distribution: Fedora Core 6
Posts: 21

Rep: Reputation: 15
dual booting with grub


Having a little problem. Installed Fedora Core 6 on my 80GB sata drive, while my XP is on another 110GB sata drive. Because my BIOS does not allow me to specify which hard drive to boot from, I have to go through and swap the cables around every time I want xp or fedora to boot. I imitially installed fedora on the 80gb hard drive, set as master. Set lik e this it booted fine, but when I tried to select the windows partition from the grub boot menu, it just had the commands in the top left corner, pretty much everything after "title Windows"

grub.conf looks like this:
title Windows
rootnoverify (hd1,1)
chainloader +1

thats about it. I did a 'fdisk -l' (dont have the output for that right now) for some reason i thought the hd1,1 was wrong and changed it to hd1,0 and thats when it started to get screwy. I got a Missing Loader error and from then on i just get to the grub> menu when I try to boot up on the fedora drive. I swapped around the cables again to boot into XP and got this crazy Dell utility i have never seen before. I think maybe this weird Dell utility shows up from the fdisk -l command I did. Okay is there anything I can do to the grub.conf file? I want to have the boot loader on the fedora drive so I don't have to touch the XP installation at all. If there are any more files that can help you guys help me figure out whats wrong I will post the output from them. Why does the grub> thing come up... I changed everything back to normal with linux rescue, but fedora wont boot anymore. Any help would be great.
 
Old 01-30-2007, 03:04 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
Because my BIOS does not allow me to specify which hard drive to boot from, I have to go through and swap the cables around every time I want xp or fedora to boot.
You mean the bios will always select the first hard drive to boot ... this is not a problem, and you do not need to swap the cables around. When you installed fedora, you should have asked grub to install to the windows drive master boot record (then hda or (hd0)). After that, GRUB decides which drive to boot.

Of course it is working now ... your problem is that windows expects to be the only OS on your system... so it is surprised to find itself on the second drive.

You need to edit the grub.conf windows section to look like this:
Code:
title Concentrated Evil
rootnoverify (hd1,0)
map (hd0,0) (hd1,0)
map (hd1,0) (hd0,0)
makeactive
chainloader +1
Here assuming that windows occupies all of the second HDD.
Of course, removing windows entirely would also solve your problem
(Biased, moi...)
 
Old 01-31-2007, 04:04 PM   #3
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
I think GRUB maps entire drives, not just partitions:
Code:
grub> map (hd0) (hd1)
grub> map (hd1) (hd0)
(See: http://www.gnu.org/software/grub/man...OS_002fWindows)

BTW, be sure you keep that suggested title for the XP stanza in your GRUB menu.
 
Old 01-31-2007, 04:59 PM   #4
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
I was going to raise the same point as archtoad6. It is possible Grub ignores the partition reference parts and the commands have worked for years. However the Grub Manual does states
Quote:
13.3.23 map
— Command: map to_drive from_drive

Map the drive from_drive to the drive to_drive. This is necessary when you chain-load some operating systems, such as DOS, if such an OS resides at a non-first drive. Here is an example:

grub> map (hd0) (hd1)
grub> map (hd1) (hd0)
It is also relevant to point out a direct equivalent exists in Lilo in the form of
Quote:
map-drive = 0x81
to = 0x80

map-drive = 0x80
to = 0x81
I believe hard disk 0x80 and 0x81 are the 1st and 2nd disks known to the Bios.

I favour an united front on giving out advices, especially it is the drives we swap.

The implication of including the partition is we could potentially swap (hd0,0) with (hd1,3) and that is clearly out of context.

Last edited by saikee; 01-31-2007 at 05:04 PM.
 
Old 02-01-2007, 07:38 PM   #5
L_Jenkins
LQ Newbie
 
Registered: Oct 2006
Distribution: Fedora Core 6
Posts: 21

Original Poster
Rep: Reputation: 15
Thanks Simon, I tried what you wrote, and after one little change, it boots up wonderfully. Has anyone sen something like this:

[root@localhost ~]# fdisk -l

Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 9726 78019672+ 8e Linux LVM

Disk /dev/sdb: 120.0 GB, 120000000000 bytes
255 heads, 63 sectors/track, 14589 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 5 40131 de Dell Utility
/dev/sdb2 * 6 14589 117145980 7 HPFS/NTFS

sdb is the XP installation, and every time I tried to boot from hd1,0 this wierd Dell utility would pop up. It ran some basic tests (like testing the disk surface, etc) and then just rebooted. I changed all references to hd1,0 to hd1,1 and now it boots up great. Thanks for the help!
 
Old 02-02-2007, 04:35 AM   #6
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Yep - I've seen that sort of thing.
I take it that sdb contains an oem install of windows... my laptop originally had a small acer partition, as well as a recovery partition and the windows partitions (windows was installed to two partitions configured as raid0 for some weird reason). So yeah - weird schemes exist.
 
Old 02-03-2007, 09:33 AM   #7
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Me too, I have seen OEM (Dell ?, Gateway ?) (laptop only?) installs w/ 3 partitions:
  1. Diagnostics
  2. "C:" (the actual "Winders" installation)
  3. Recovery (the original OEM stuff in lieu of a proper install disk)
#3 may have to be at the end of the drive to work correctly. When I have done a dual-boot install, I have resized #2 & then created an extended part. between it & #3. The GNU/Linux install goes, of course, entirely in logical partitions.

I never disturb 1 & 3 until the owner is sure s/he is ready to finally "divorce Bill" & wipe all 3 original partitions.

Last edited by archtoad6; 02-03-2007 at 09:36 AM.
 
Old 02-03-2007, 05:36 PM   #8
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Yeah - the extra partitions can be trouble.
The best bet is to use the OEM CD to reinstall windows, if you want a dual-boot.
If you want a linux only machine, it is usually safe to erase the windows and the recovery partition. However, some firmware will use the vendor partition to store ACPI information ... erase that and you'll have broken power management. I havn't been able to figure out any way of telling.

I have also seen an OEM partitioning scheme where windows occupies only half the drive... the other half is labeled after the vendor, but is empty! (This was a store demo... nobody knew why.) Anybody buying a windows OEM computer is well advised to check the installation out as soon as they can.

I'm surprised this isn't more widely spoken of.

Last edited by Simon Bridge; 02-03-2007 at 05:41 PM.
 
Old 02-04-2007, 11:58 AM   #9
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Not that I'm likely to do too many more dual-boot installs, let alone total conversions; but I'll try to remember that firmware thing & be sure to back up the OEM stuff before wiping any drives. Thanks, Simon.
 
  


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
GRUB help with dual booting kev19 Linux - Newbie 17 12-21-2005 03:26 AM
Dual-booting using grub damasta55r Linux - Newbie 13 11-20-2005 08:02 AM
Grub dual booting assatron Linux - Software 9 11-09-2004 10:11 AM
Dual booting and GRUB jfrye Linux - Newbie 1 10-09-2003 10:48 AM
GRUB, and dual booting sammyballz Linux - General 9 10-14-2002 11:26 PM


All times are GMT -5. The time now is 02:37 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