Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Bootloader problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Omegaice
n00b
n00b


Joined: 18 Sep 2005
Posts: 15

PostPosted: Sun Sep 18, 2005 4:06 pm    Post subject: Bootloader problems Reply with quote

Iv manage to get to the stage of installing a boot loader and configuring it of which i chose grub and installed it to the MBR of my disk.

The problem is that i have 2 serial ata drives in my computer, one has windows on and the other has linux on, i installed grub into the mbr of the second disk which held my linux but only windows boots.

I tryed install it to the other hard drive's mbr using the live cd it says that there are directorys missing on the hard drive. I mounted all of the partitions to what i mounted before and chrooted into the new enviroment but it still comes up with the error. I also tryed using the nt bootloader which didnt help.
Back to top
View user's profile Send private message
paulbarker
n00b
n00b


Joined: 27 Feb 2005
Posts: 70
Location: Manchester, UK

PostPosted: Sun Sep 18, 2005 4:21 pm    Post subject: Reply with quote

Could you post your grub.conf file, and if you have fstab properly listing the windows partitions et al could you post that as well please? The third paragraph sounds like you have grub looking at the wrong disk/partition when trying to boot linux.

With grub on the first drive, can you boot windows properly?

Cheers,
Paul
Back to top
View user's profile Send private message
user118696
Apprentice
Apprentice


Joined: 16 Sep 2005
Posts: 276

PostPosted: Sun Sep 18, 2005 4:23 pm    Post subject: Reply with quote

Can you modify your BIOS so that your second HDD boots first? You'll see if grub's OK for gentoo. Then just add a Win* chainloader etc. into your grub.conf. If so, you'll have to use the following 'cause Win* is picky about being started from a second HDD :

Code:
map (hd0) (hd1)
map (hd1) (hd0)


If your BIOS doesn't let you choose which HDD to boot from, maybe you could try to wire them differently i.e. master/slave stuff (if not too complicated).
Back to top
View user's profile Send private message
MickKi
Veteran
Veteran


Joined: 08 Feb 2004
Posts: 1173

PostPosted: Sun Sep 18, 2005 5:28 pm    Post subject: Re: Bootloader problems Reply with quote

Omegaice wrote:
The problem is that i have 2 serial ata drives in my computer, one has windows on and the other has linux on, i installed grub into the mbr of the second disk which held my linux but only windows boots.
This is because the M$Windoze bootloader in the MBR of the first drive knows how to boot only your Windoze OS. To be able to boot linux from the second drive you will need to chainload grub using the Windoze ntldr file. Google for chainloading Grub using WinXP bootloader and something is bound to pop up. Alternatively, install Grub in the MBR of the first drive and set your grub.conf as it is explained in the Gentoo guide.

Omegaice wrote:
I tryed install it to the other hard drive's mbr using the live cd it says that there are directorys missing on the hard drive. I mounted all of the partitions to what i mounted before and chrooted into the new enviroment but it still comes up with the error. I also tryed using the nt bootloader which didnt help.
Assuming that I understand what you're thinking (but not really expressing accurately enough for me to be sure), it says there are directories missing because the paths in your grub.conf are wrong. Check the Gentoo guide, use the tab completion feature in your Grub and you should find the correct path for the root directory.
_________________
Regards,
Mick
Back to top
View user's profile Send private message
Omegaice
n00b
n00b


Joined: 18 Sep 2005
Posts: 15

PostPosted: Sun Sep 18, 2005 5:35 pm    Post subject: Reply with quote

Code:
grub.conf

default 0
timeout 30
splashimage=(sd1,0)/grub/splash.xpm.gz

title=Gentoo Linux
root (sd1,2)
kernel /kernel-2.6.12-gentoo-r10 root=/dev/sdb3

title=Windows XP
rootnoverify (sd0,0)
makeactive
chainloader +1


Code:
fstab

/dev/sdb1       /boot            ext2            noauto,noatime       1,2
/dev/sdb2       none             swap            sw                   0,0
/dev/sdb3       /                ReiserFS        noatime              0,1
/dev/sdb5       /home            ReiserFS        noatime              0,1
/dev/sdb6       /usr             ReiserFS        noatime              0,1
/dev/sdb7       /var             ReiserFS        noatime              0,1
/dev/cdrom0     /mnt/cdrom       iso9660         noauto,ro            0,0
/dev/fd0        /mnt/floppy      auto            noauto               0,0

proc            /proc            proc            auto                 0,0

shm             /dev/shm         tmpfs           nodev,nosuid,noexec  0,0


I switched the hard drives around and restarted, grub loaded but didnt give me any options insted it decompressed a kernel and then something happened but i dont know what because the screen was covered in white dots.

When i said that i tryed to install it on the other mbr i ment that u used the grub-install command with the perameter /dev/sda which is my first hard disk containing windows. The problem was that it seemed to be missing files from the linux file system and this may be because i restarted my computer found there was a problem and remounted the partitions and chrooted into the enviroment again where i may have done something wrong in that part.


Last edited by Omegaice on Sun Sep 18, 2005 5:40 pm; edited 1 time in total
Back to top
View user's profile Send private message
paulbarker
n00b
n00b


Joined: 27 Feb 2005
Posts: 70
Location: Manchester, UK

PostPosted: Sun Sep 18, 2005 5:38 pm    Post subject: Reply with quote

The root command for loading Linux should be the partition where the kernel is located (ie. the boot partition), not the actual root. I think this is pretty unclear on the part of GRUB. So you should have (I think):

Code:

title=Gentoo Linux
root (sd1,0)
kernel /kernel-2.6.12-gentoo-r10 root=/dev/sdb3


And grub should be installed in the MBR of the booting disc. If you swap the drives, be sure to swap the sd1 and sd0's around, and the" root=..." argument for the linux kernel.

HTH, Paul Barker
Back to top
View user's profile Send private message
user118696
Apprentice
Apprentice


Joined: 16 Sep 2005
Posts: 276

PostPosted: Sun Sep 18, 2005 5:45 pm    Post subject: Reply with quote

paulbarker wrote:
The root command for loading Linux should be the partition where the kernel is located (ie. the boot partition), not the actual root. I think this is pretty unclear on the part of GRUB. So you should have (I think):

Code:

title=Gentoo Linux
root (sd1,0)
kernel /kernel-2.6.12-gentoo-r10 root=/dev/sdb3


And grub should be installed in the MBR of the booting disc. If you swap the drives, be sure to swap the sd1 and sd0's around, and the" root=..." argument for the linux kernel.

HTH, Paul Barker


That's right. And don't forget the mapping stuff if your Win*'s on the second HDD.
Back to top
View user's profile Send private message
Omegaice
n00b
n00b


Joined: 18 Sep 2005
Posts: 15

PostPosted: Sun Sep 18, 2005 6:01 pm    Post subject: Reply with quote

Ok, updated the file and that changed nothing but this time i wrote down the error that was being said when i tryed to grub-install /dev/sda and it was saying different things that all looked like "df '/newroot': not a directory" and so on.

Now the other file i thought of was /etc/mtab and looked in it and it had things related to newroot, can someone post what an mtab should look like or explaing what it does and how to correct it.
Back to top
View user's profile Send private message
MickKi
Veteran
Veteran


Joined: 08 Feb 2004
Posts: 1173

PostPosted: Sun Sep 18, 2005 10:58 pm    Post subject: Reply with quote

Omegaice,

You have changed too many parameters, too fast, to know which one is right or wrong. It is better if you install Grub manually so that you know what goes where. If you are uncertain which drive/partition root ought to be, then use the tab completion feature as the guide explains. Fire up Grub, then type:
Code:
# root (     <--press tab here-->
This will give a list of drives and partitions where Grub can find its own files. Usually, assuming you installed your system as the guide says Grub's fs is in the /boot partition.

Now, a point to note is that when you swap drives around you need to reset your BIOS to recognise the new drives and the order in which you want them to boot. Most modern BIOS' do this automatically, but it's good to check just to be sure. Then edit your grub.conf to correspond with the correct drive/partition.

Just to clarify matters; the entry in your grub.conf: root (sd1,2) is wrong for two reasons. First Grub does not care if a drive is ATA, or SATA, or SCSI. It'll boot what ever drive the BIOS passes onto to it first. As far as grub.conf code goes all drives are hdX. Secondly if you changed the drives around and you have installed Grub in the MBR of the first drive which contains the Linux /boot in its first partition, it should be: root (hd0,0) On the other hand if the Linux /boot is in the second drive, first partion, then it should be: root (hd1,0), because Grub counts devices starting from zero. The same applies for the splash entry, which is perhaps the reason you got a screen covered in white dots.

The entry root (hdX,0) refers to Grub's filesystem. So this should point to the /boot drive/partition where Grub installs its files (# ls -la /boot/grub will show you what's there). The entry kernel /kernel-2.6.12-gentoo-r10 root=/dev/sdb3 refers to the OS root fs, i.e. your Gentoo's root file system.

I hope this helps clarify any misunderstandings with Grub. :)

If you read the installation guide PROPERLY you should be able to resolve these issues yourself.
_________________
Regards,
Mick
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum