Grub Crash, dual boot on two Hard drives

Installer Issues via Installer -- Not for global upgrades or upgrading individual packages -- ONLY ISSUES WITH INSTALLATION OF THE OS -- Can't get Sabayon installed, than post here, otherwise use correct forums

Moderator: Moderators

Grub Crash, dual boot on two Hard drives

Postby riazm » Thu Aug 02, 2007 12:13

Hi, I've got two hard drives, both sata, the first has windows installed on sda1. The second has a boot partition sdb1 and the "/" partition sdb5.

My intention is to use my bios HD boot selection thing to choose which OS I boot, so I installed SL 3.4a from DVD to sdb, told it to put Grub onto sdb1 and / onto sdb5 (as mentioned above)

However, when I select the second hard drive to boot from, I get a blank screen saying GRUB with the flashing cursor. If I don't select the second hd my computer boots into windows normally (from the first hd)

I thought I'd try poking about this /boot partition, I hear people talk of "grub.conf" so I tried to look at that, but when I try to open it in konqueror it throws me an error saying it could not read it.

any ideas?
riazm
Baby Hen
 
Posts: 5
Joined: Thu Aug 02, 2007 12:03

Postby joost » Thu Aug 02, 2007 14:15

You need to be root to have access to such files.

:D

I also think you need to reinstall grub.



http://www.gnu.org/software/grub/manual ... ively.html

Code: Select all
Once started, GRUB will show the command-line interface (see Command-line interface). First, set the GRUB's root device1 to the partition containing the boot directory, like this:

     grub> root (hd0,0)

If you are not sure which partition actually holds this directory, use the command find (see find), like this:

     grub> find /boot/grub/stage1

This will search for the file name /boot/grub/stage1 and show the devices which contain the file.

Once you've set the root device correctly, run the command setup (see setup):

     grub> setup (hd0)


remember that Grub count starts at zero!
joost
Sagely Hen
 
Posts: 2571
Joined: Fri Nov 17, 2006 12:11
Location: The Netherlands

Postby riazm » Thu Aug 02, 2007 20:26

alright, I can now boot into a grub prompt. What is wierd is when I do a search for /boot/grub/stage1 it says it is in hd0,0 which I take to mean the first partition of the first drive? Which I know for a fact is windows (when I boot to that drive there is no Grub prompt of any sort, just boot straight into windows) Is Grub naming the hard drives differently due to the drive it was booted from?

Either way, where do I want to install Grub, should it be installed to the root of the second drive? or the partition of the second drive that Sabayon is installed to? Or perhaps the first partition of the second drive?

Sda1:Windows
Sda2:Windows stuff

sdb1:100 meg /boot
sdb2:2 gig swap
sdb3:sabayon instal
sdb4: fat32

I assume that the presence of the grub> _ means I have actually installed grub and must now teach it to boot sabayon. I will try to do this.

EDIT

I managed to boot to sabayon using

Code: Select all

Root (hd0,0)

kernel /boot/kernel-genkernel-x86_64-2.6 root=/dev/sdb3 (if you press tab it autocompletes)

boot


This boots me into SL, when I reboot I am presented with the grub prompt again.

I believe I must edit the grub.conf, I will learn this.

The fact I can boot into sabayon linux gives me great hope that I will triumph.

EDIT

my grub.conf follows, does anyone have any ideas of what should be changed?

Code: Select all
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd1,0)
#          kernel /kernel-genkernel real_root=UUID=58ac8970-73c9-47dc-ab6a-bfb0a8283334
#          initrd /initramfs-genkernel
#boot=sdb1
default=0
timeout=6
splashimage=(hd1,0)/grub/splash.xpm.gz
title Sabayon Linux x86-64 3.4
   root (hd0,0)
   kernel /kernel-genkernel-x86_64-2.6.22-sabayon  root=/dev/ram0 ramdisk=8192 real_root=UUID=58ac8970-73c9-47dc-ab6a-bfb0a8283334  quiet  init=/linuxrc splash=silent,theme:sabayon vga=791 CONSOLE=/dev/tty1 dodmraid pci=nomsi res=1600x1200
   initrd /initramfs-genkernel-x86_64-2.6.22-sabayon
riazm
Baby Hen
 
Posts: 5
Joined: Thu Aug 02, 2007 12:03

Postby Eden » Thu Aug 02, 2007 22:26

Its hd0,0 because when you switch drives sdb becomes sda and sda becomes sdb, I don't know why your putting yourself through so much though, make sabayon the first drive to boot and install grub on the MBR of that drive, then configure it to be able to boot windows as well.

It wont overwrite your windows MBR because its on the other drive and if you really want to waste time you can still switch drives, though i really dont see the point.
Eden
Growing Hen
 
Posts: 176
Joined: Fri May 18, 2007 16:44
Location: Scotland, UK

Postby riazm » Fri Aug 03, 2007 18:41

I see, so if I switch (In the bios, or do you mean physically inside the case?) the order of boot drives so the windows drive is second, I will be able to install to sda, write grub to mbr there and still boot windows through grub?

I had read the windows does not like being on a secondary drive, though I suppose it wouldn't be able to tell.

The reason i am trying to avoid changing my windows drive is I spend long amounts of time at university without my windows cd and would like my windows install to be as "stable" as possible.

EDIT

I did what you said (switched cables inside the case) this nearly worked, but I got an error about where my root mount..or something. I typed root=/dev/sda3 and it worked, I edited the grub.conf to be:

Code: Select all
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /kernel-genkernel real_root=UUID=58ac8970-73c9-47dc-ab6a-bfb0a8283334
#          initrd /initramfs-genkernel
#boot=sda
default=0
timeout=6
splashimage=(hd0,0)/grub/splash.xpm.gz
title Sabayon Linux x86-64 3.4
   root (hd0,0)
   kernel /kernel-genkernel-x86_64-2.6.22-sabayon  root=/dev/ram0 ramdisk=8192 real_root=/dev/sda3 quiet  init=/linuxrc splash=silent,theme:sabayon vga=791 CONSOLE=/dev/tty1 dodmraid pci=nomsi res=1600x1200 resume2=swap:/dev/sda2
   initrd /initramfs-genkernel-x86_64-2.6.22-sabayon


This works, I can boot sabayon from grub, I imagine adding windows to this would not be extremely hard.
riazm
Baby Hen
 
Posts: 5
Joined: Thu Aug 02, 2007 12:03


Return to Installer Issues - Calamares **Not for Package Manager Stuff**

Who is online

Users browsing this forum: No registered users and 0 guests