Hda And Hdb,grub To Boot Windows


Recommended Posts

I have got two HDs, each one 40 GB. Connected to one cable to IDE0 (one hard disk master and the other is slave).

First HD (master or hda) is divided to :

15 GB NTFS for XP, 5 GB FAT32 for Storage, and 20 GB NTFS for win2003,,,,I had already installed both windows (XP and 2003).

Second HD (slave or hdb) is divided to :

20 GB Solaris (hdb1,,,to be installed later) , 5 GB NTFS for Storage (hdb2) , 500 MB Linux swap (hdb3), 14.5 GB ext3 Linux (hdb4).

I installed Linux FC4 on hdb4 and chose the option for GRUB bootloader to be installed on : " /dev/hda Master Boot Record (MBR) ".

When I finished the installation of Linux, I was greeted by GRUB.

When I tried to boot into windows, I received this message :

Booting "Windows"

rootnoverify (hd1,0)

chaninloader+1

Why was the partition for windows numbered with hd1,0,,,,it should be hd0 because both windows were installed on the first hard disk (i.e hd0, not hd1) ?

When I checked the /etc/grub.conf,,,,I found two entry one for Fedora and the other for windows, with same number (hd1)

Edited by zillah
Link to post
Share on other sites
20 GB Solaris (hdb1,,,to be installed later) , 5 GB NTFS for Storage (hdb2) , 500 MB Linux swap (hdb3), 14.5 GB ext3 Linux (hdb4).

make sure your linux and linux swap are on extended partitions if you put solaris on there.. solaris will write over your linux partition as RAW swap, and Soalris and a Linux swap partiton use the same header.. so linux could overwrite your solaris partition.

Link to post
Share on other sites
solaris will write over your linux partition as RAW swap, and Soalris and a Linux swap partiton use the same header

This issue has been solved in Solaris 10 as has been mentioned in a discussion forum

really, please point me to that fourm.. Linux still overwrites my solaris 10 partiton, thinking its a swap file.. UFS is still a 82 header.. so I would like to see what changed.. and maybe why the SUN engineers in our lab have this all messed up

edit

ok found it

(9.5) Can I install Linux and Solaris on the same drive?

Yes, with certain precautions. Be especially careful with RedHat Linux 6.1 (see below) Unfortunately, Solaris 9 and earlier and Linux swap partitions use the same ID, 0x82. So if you install Solaris on a drive with a Linux swap partition already on it, it will install on the Linux swap partition. You have three choices:

1. Use Solaris 10. Solaris 10 uses ID 0xBF, which does not conflict with Linux Swap partitions (0x82).

2. You can put the Linux swap partition on another drive (or not use a swap partition if you have enough memory).

3. You can install Linux after (not before Solaris). If you try the latter, the install program will probably ask if you want to format what it thinks is your Linux swap partition (and is actually your Solaris partition) as a swap file. Be sure to not do this!

so I now have to figure out why Solaris 10 (on all my installs, 50+ so far) still say 82 and not BF

Edited by iccaros
Link to post
Share on other sites
really, please point me to that fourm.. Linux still overwrites my solaris 10 partiton, thinking its a swap file.. UFS is still a 82 header.. so I would like to see what changed.. and maybe why the SUN engineers in our lab have this all messed up

http://www.linuxquestions.org/questions/sh...772#post1990772

"Solaris partition ID conflicting with Linux Swap is resolved since Solaris 10"

Link to post
Share on other sites
Have you tried changing the line to rootnoverify (hd0,0)?

Yes I did, It did not work.

I have got very strange thing, when I checked the grub.conf,,,I found this :

title Fedora Core (2.6.11-1.1369_FC4)

root (hd 0,3)

Kernel-----------------

My linux partitions on hdb not hda,,,how does the root become hd0 ?

Linux FC4 can boot normaly without any problem.,,,,,Do I need to modify it as well ?

Link to post
Share on other sites

it seems like you have your master and slave opposite as you thought they are. You initially said XP was on your master, and ubuntu on your slave. According to your grub.conf, it seems to be the opposite. Take a look in your bios and see what it says. Or after booting up ubuntu try this command

/sbin/fdisk -l /dev/hda

this should print out the partition table, including the size, of your master drive. My hunch says it will list the 20gb drive.

Link to post
Share on other sites
really, please point me to that fourm.. Linux still overwrites my solaris 10 partiton, thinking its a swap file.. UFS is still a 82 header.. so I would like to see what changed.. and maybe why the SUN engineers in our lab have this all messed up

http://www.linuxquestions.org/questions/sh...772#post1990772

"Solaris partition ID conflicting with Linux Swap is resolved since Solaris 10"

now I see what my problem may be, I have been installing using fdisk in solaris to create partitions, then installing solaris 10 then install linux.. The fdisk Soalris tool I am using must still put 82 in the header.. did not think of that untill I saw your thread and mentioning using knoppix ot partition..

Thanks..

Back to the LAB...

Link to post
Share on other sites
You initially said XP was on your master, and ubuntu on your slave. According to your grub.conf, it seems to be the opposite.

[root@localname]# fdisk -l

Disk /dev/hda: 40.0 GB, 40016019456 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 1824 14651248+ 7 HPFS/NTFS
/dev/hda2 1825 2432 4883760 c W95 FAT32 (LBA)
/dev/hda3 * 2433 4865 19543072+ 7 HPFS/NTFS

Disk /dev/hdb: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 1 2432 19535008+ af Unknown
/dev/hdb2 * 2433 3040 4883760 7 HPFS/NTFS
/dev/hdb3 3041 3101 489982+ 82 Linux swap / Solaris
/dev/hdb4 3102 4865 14169330 83 Linux

Disk /dev/sda: 262 MB, 262144000 bytes
255 heads, 63 sectors/track, 31 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 32 257008+ b W95 FAT32
Partition 1 has different physical/logical endings:
phys=(30, 254, 63) logical=(31, 254, 63)








gedit /boot/grub/menu.lst

# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,3)
# kernel /boot/vmlinuz-version ro root=/dev/hdb4
# initrd /boot/initrd-version.img
#boot=/dev/hdb
default=0
timeout=15
splashimage=(hd0,3)/boot/grub/splash.xpm.gz
#hiddenmenu
title Fedora Core (2.6.11-1.1369_FC4)
root (hd0,3)
kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.11-1.1369_FC4.img
title Windows
rootnoverify (hd1,0)
chainloader +1

Edited by zillah
Link to post
Share on other sites
Why was the partition for windows numbered with hd1,0,,,,it should be hd0 because both windows were installed on the first hard disk (i.e hd0, not hd1) ?

I'm thinking that what ever wrote the grub did not know what 0xaf is (should that not be 0xbf for solaris 10 ... see I learned somthing today...)

and guesed that it's windows....

it should be hd0,0 did Fedora write this grub? as it would be how you would boot and unknown (to grub) file system like ntfs

now with solaris 10 you will need solaris 10 to write your grub so that it can understand the new 0xbf partition,

here is an exapmle of what it will write..

#---------- ADDED BY BOOTADM - DO NOT EDIT ----------

title Solaris 10 1/06

root (hd0,2,d)

kernel /platform/i86pc/multiboot

module /platform/i86pc/boot_archive

#---------------------END BOOTADM--------------------

title Solaris 9

root (hd0,2,a)

chainloader +1

makeactive

title Linux

root (hd0,1)

kernel <from Linux's GRUB menu...>

initrd <from Linux's GRUB menu...>

title Windows

root (hd0,0)

chainloader +1

EDIT----------------------------------------------------------------------------------------------------------------------------

http://www.sun.com/bigadmin/features/artic...ot_solaris.html

Edited by iccaros
Link to post
Share on other sites
I'm thinking that what ever wrote the grub did not know what 0xaf is (should that not be 0xbf for solaris 10 ... see I learned somthing today...) and guesed that it's windows....

I have not formatted the Solaris partition yet,,,just I prepared it for future installation.

Link to post
Share on other sites
I'm thinking that what ever wrote the grub did not know what 0xaf is (should that not be 0xbf for solaris 10 ... see I learned somthing today...) and guesed that it's windows....

I have not formatted the Solaris partition yet,,,just I prepared it for future installation.

That has nothing to do with it being 0xaf or 0xbf.. that is a partition header.. Grub will look at the partition header and if it knows what it is, will mount it.. if not you have the rootover to tell it not to mount..

you can put any headder and still format it diffrently...

example you can say its a 0x83 (Linux partition) and do a mkfs.vfat and it will format and mount as a fat32 partition.

The point is, what ever created the partition looks like it gave it the wrong header ID and what ever made the grub table did not know what 0xaf is and figured its windows..

you can fix a partition header with fdisk or cfdisk (I like cfdisk for speed as I have to look up fdisk paramaters)

cfdisk /dev/hdb

choose partition

select type (type in bf)

write

exit

pluse the title windows is just that a title.. and may be a default for fedora to call any partition its does not know windows..

also you only need one bootable parttion.. I have a /boot which is my boot partition.. where I keep all my kernels and my grub

Edited by iccaros
Link to post
Share on other sites
it should be hd0,0 did Fedora write this grub? as it would be how you would boot and unknown (to grub) file system like ntfs

Yes,,,,By the way I can boot the system with Linux FC4.

you can fix a partition header with fdisk or cfdisk (I like cfdisk for speed as I have to look up fdisk paramaters)

I had alreday used cfdisk form Knoppix CD, to create partitions for second hard disks.

cfdisk /dev/hdb

choose partition

select type (type in bf)

write

exit

I am going to redo it again by using cfdisk form Knoppix CD,,,but at this stage this is not my problem,,,the problem I can not boot to Windows

Link to post
Share on other sites
That has nothing to do with it being 0xaf or 0xbf.. that is a partition header.. Grub will look at the partition header and if it knows what it is, will mount it.. if not you have the rootover to tell it not to mount..

See this quoted form the link below:

http://www.knoppix.net/forum/viewtopic.php?p=97594#97594

What will the case be if I create partitions "Type"

a- Solaris (BF)

b- Linux swap (83)

c- Linux ext3 (82)

----

---

---

---

do I need to format them in order to be recognized by Solaris OS or Linux OS ?

Edited by zillah
Link to post
Share on other sites
Any help or thought ?

no when you install solaris let it install its grub loader.. then it will understand the solaris partition...

I don't know of any linux distro who has upgraded Grub to the Sun changes to it.. yet

Link to post
Share on other sites

did you change hd(1,0) to hd(0,0)?

Link to post
Share on other sites
did you change hd(1,0) to hd(0,0)?

yes, I did , It did not work.

What about this :

title Fedora Core (2.6.11-1.1369_FC4)

root (hd0,3)

kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ rhgb quiet

initrd /boot/initrd-2.6.11-1.1369_FC4.img

Do I need to change it as well ?

Link to post
Share on other sites

can you cat this file

/boot/grub/device.map

here is mine for example

huskeyw grub # cat device.map

(fd0) /dev/fd0

(hd0) /dev/hda

(hd1) /dev/sda

after reading your grub.conf and looking at your partitions, it looked like it fliped the drives...

is nothing booting?

here is how I see it should be (due to what you have marked bootable see the * in your partition table)

windows should be (hd0,2)

fedora (hd1,3)

Link to post
Share on other sites
after reading your grub.conf and looking at your partitions, it looked like it fliped the drives...

I want to know How does it flip ?

is nothing booting?

I can boot into linux only.

windows should be (hd0,2)

fedora (hd1,3)

How did you figure it out ?

Link to post
Share on other sites
here is mine for example

huskeyw grub # cat device.map

(fd0) /dev/fd0

(hd0) /dev/hda

(hd1) /dev/sda

When I did :

#cat /boot/grub/device.map

(fd0) /dev/fd0

(hd1) /dev/hda

(hd0) /dev/hdb

Yes it has been flipped, what should I do to correct this issue ?

Edited by zillah
Link to post
Share on other sites

you can edit that file, or you can use it adn just edit grub.conf

so lets look at what you posted

Device Boot	  Start		 End	  Blocks   Id  System
/dev/hda1 1 1824 14651248+ 7 HPFS/NTFS
/dev/hda2 1825 2432 4883760 c W95 FAT32 (LBA)
/dev/hda3 * 2433 4865 19543072+ 7 HPFS/NTFS

Disk /dev/hdb: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 1 2432 19535008+ af Unknown
/dev/hdb2 * 2433 3040 4883760 7 HPFS/NTFS
/dev/hdb3 3041 3101 489982+ 82 Linux swap / Solaris
/dev/hdb4 3102 4865 14169330 83 Linux

things with * are bootable partitinos..s

so with hda = hd1 and hdb = hd0

you have a ntfs bootable partition on hd1,2 (remember start at zero its logical not conical)

and a linux partition on hd0,3 (there is only need for one bootable partiton with a MBR teh other is ignored)

as for how it happened, fedora must have made the decision that you would use linux and it would make it the primary drive..

I always build grub from scratch so I'm guessung here.... I'll look at the fedora build and ask them for you..

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...