You are not logged in.

#1 2010-04-22 17:08:02

c008
Member
Registered: 2010-04-17
Posts: 20

Need help, Grub2

Hi all,
OK, so I am trying to get Grub2 to work and so far no luck.
I had problems with the older Grub so I decided to go for Grub2.
First, my harddrives are one SATA and the other one is an IDE drive.
I have Windows XP on my SATA drive, which shows up as /dev/sdb under Linux.
And my IDE drive is /dev/sda.
I am not able to change the boot order of these drives at the moment in the Bios.
So my system firsts boots /dev/sdb. Now, here is what I did:
I installed Arch on /dev/sda. At the end of the installation I skipped the boot loader installation.
Then I installed Grub2 like this:
cp /mnt/etc/pacman.d/mirrorlist /etc/pacman.d/
pacman --root=/mnt/ --cache=/mnt/var/cache/pacman/pkg/ -Sy grub2
Then I selected to remove the old grub.
Then I did as suggested at:
wiki.archlinux.org/index.php/GRUB2
Don't know if I really have to do this:
mount -o bind /dev /mnt/dev
chroot /mnt bash
Then I reviewed the file in /boot/grub/grub.cfg. Here is the content of this file:
# Config file for GRUB2 - The GNU GRand Unified Bootloader
# /boot/grub/grub.cfg

# DEVICE NAME CONVERSIONS
#
#  Linux           Grub
# -------------------------
#  /dev/fd0        (fd0)
#  /dev/sda        (hd0)
#  /dev/sdb2       (hd1,2)
#  /dev/sda3       (hd0,3)
#

# Timeout for menu
set timeout=5

# Set default boot entry as Entry 0
set default=0

# (0) Arch Linux
menuentry "Arch Linux" {
set root=(hd0,1)
linux /vmlinuz26 root=/dev/sda1 ro
initrd /kernel26.img
}

## (1) Windows
menuentry "Windows" {
set root=(hd1,1)
chainloader +1
#}


So, any comments?
My system is not booting. Have I missed something?
Many thanks!

Offline

#2 2010-04-22 20:19:55

lens
Member
Registered: 2010-04-17
Posts: 20

Re: Need help, Grub2

You have the last brace commented
#}

Offline

#3 2010-04-23 01:36:21

c008
Member
Registered: 2010-04-17
Posts: 20

Re: Need help, Grub2

Hi,
Yes, oops saw that.
One thing I forgot to tell was that I didn't run the configuration script since when I installed grub2 using pacman the grub.cfg file was already there.
But except for that, Arch should boot? It does not and its very frustrating.

Offline

#4 2010-04-23 03:39:33

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: Need help, Grub2

Is your boot in a separate partition? Doesn't look like it if your root is /dev/sda1. If boot is on the same partition as root then you should have "/boot/vmlinuz26" and "/boot/kernel26.img". Read the wiki carefully. If there is still a problem you should report the error messages.

Offline

#5 2010-04-23 16:28:21

c008
Member
Registered: 2010-04-17
Posts: 20

Re: Need help, Grub2

Hi,
I did as you suggested, but still the same result.
i am visually impaired so I am not able to see the screen at boot time I apologize for that.
I have not had this problem before with other distros and I am soon giving up. I had to reset the MBR now so that I could boot into my Windows installation so the boot loader seems to be installed. I do not have a seperate boot partition, only got one.

Offline

#6 2010-04-23 17:04:45

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Need help, Grub2

Just a simple question ... why do you use grub2?
To _my_ mind - grub2 is a gigantic step backwards. Grub legacy, on the other hand, is just a pleasure to use and is far easier to handle than its successor. I have played around with multiboot for about as long as I can remember - and the only thing I have to keep in mind is (for each distro) to install the loader (be it grub or grub2) on the root partition of the distro I am installing.
If you have a small (say 50M) partition, let's call it a 'grub' partition because all it will ever do is to chainload (oh - it needs to be a 'primary' partition - at least if you use windows' braindead MBR) - and your grub/menu.lst will only chainload to whereever ...
I can give you an example of _my_ 'mastergrub' ...:

#root=/dev/hd(0,2) 
default 0
timeout 10
title archlinux-i686
  root (hd0,4)
  chainloader +1
title archlinux-x86_64
  root (hd0,5)
  chainloader +1
title windaes seven
  rootnoverify (hd0,0)
  chainloader +1
title slackware
  root (hd0,6)
  chainloader +1
title linuxmint
  root (hd1,0)        # hey, I might have linuxmint on a 2nd drive!!
  chainloader +1

As you see - there is _nothing_ to it! (and eg. linuxmint uses grub2!)

I guess the moral of the story is: Use what you have, use the disks in the order your bios finds them - and then just make the most out of it.
The big, big thing to remember - do not let any distro-grub take over your MBR - keep them on their own.

[edit]oooops, I guess I forgot to say.
I'm using a live-cd to install my master grub - that way, if anything ever goes wrong - it's easy to boot from the live cd and put things back in order.
In my case, its grml-2009.05 (there _is_ a 2009.11, but it uses grub2!!)
[/edit]

Last edited by perbh (2010-04-23 17:15:08)

Offline

#7 2010-04-24 01:29:23

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: Need help, Grub2

I would agree with perbh - grub is certainly simpler to use.

Since you are unable to provide the error message, I would be shooting in the dark. My guess is that there is an inconsistency in ascertaining the 2 hard disks - I have had that problem too. Grub sees the 2 hard disks in one order while linux sees it another. The way out is to use UUID or LABEL (instead of /dev/sda1 or /dev/sdb1).  You use

search --no-floppy --fs-uuid <UUID> --set root

(replace <UUID> with actual UUID) in place of

set root=(hd0,1)

and

linux /boot/vmlinuz26 root=/dev/disk/by-uuid/<UUID> ro

(replace <UUID> with actual UUID) in place of

linux /boot/vmlinuz26 root=/dev/sda1 ro

See the wiki under "Other options" and "persistent block device naming".

All this assuming that you have installed grub2 properly.

Offline

#8 2010-04-24 02:04:34

c008
Member
Registered: 2010-04-17
Posts: 20

Re: Need help, Grub2

Hi,
OK, I have got it working now!
I did the grub-mkgconfig -o /boot/grub/grub.cfg then it created a little different grub.cfg file but it's working now.
So now it's time to figure out how to get Windows to boot as well.
One other reason for me to use Grub2 is because my screen reader for Windows has a license scheme which places the license key somewhere in the MBR and with the older Grub, Grub changes something and removes it so I have to activate it again and this doesn't happen with the new Grub2. I have already lost an activation due to the old Grub.

Offline

#9 2010-04-24 02:34:23

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: Need help, Grub2

Glad you got it working. Would be good if you post the working grub.cfg so others with similar problems have a point of reference. And remember to mark this thread [solved].

Offline

Board footer

Powered by FluxBB