You are not logged in.

#1 2006-05-17 12:15:47

peque
Member
From: Denmark - Møn
Registered: 2005-06-26
Posts: 441

Problem with installing GRUB [SOLVED]

Hi Guys!

I´ve just bought a new harddrive just for Linux. But having problems with installing Arch´s bootloader grub:
The setup:

hda -> hda1 Windows XP

sda -> sda1 storage for XP  -> sda2 --> storeage for XP
sdb -> sdb1 boot - sdb2 swap - sdb3 /

After trying install grub on any disk it comes with the error:
Error installing grub. (see /dev/tty5 for output) -
in there it says -
grub> root (hd1,0)
Filesystem type unknown, partition type 0X7
grub> setup (hd0)

error 17 cannot mount the selected partition???

Normally the bios is set to this order=
hda - sda - sdb
and there installing grub on hda
afterwards change to bios to this order =
sdb - sda -hda

But still the same ???

I would thought that if the bios order was - hda -sda-sdb
the mene should look like this:

(0) Arch Linux
title arch linux
root (hd1,0)        -??? why ?? even though I changes this it returns back
kernel /vmlinuz26 root=/dev/sdb3 ro
initrd /initrd26.img

I getting really confused about this - that I havent got this kind of problem before. Even though I change the (hd?,?) to something it just keep comming with error. If I put my old harddrive in (hdb) then i just works great - But not with sdb!

Thanks in advice ?


Just getting better .... All the time

Offline

#2 2006-05-17 12:23:22

ScriptDevil
Member
From: In Front of My PC
Registered: 2006-04-06
Posts: 253

Re: Problem with installing GRUB [SOLVED]

try it with lilo, i had a problem with grub in my noodle install cd too


Be yourself, because you are all that you can be

Offline

#3 2006-05-17 14:37:15

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: Problem with installing GRUB [SOLVED]

So you have:
IDE0 - hda1 with winxp
SATA0 - sda1/2 for winxp too
SATA1 - sdb1 - boot, sdb2 - swap and sdb3 /
right?

Grub doesn't always map disks correctly and you need to fix it or install "manually".

You should be able to switch to the second console during install (alt f2) and do it.

When you receive the error try checking how grub can see your disks:

cat /boot/grub/device.map

If it doesn't exist you can run

grub --device-map /boot/grub/device.map

then quit grub and do cat.

To install grub in interactive mode run

grub
find /boot/grub/stage1

If it returns error run

find /grub/stage1

and is should return something like "(hd0,0)".

Now run

root (hd0,0)

(no spaces near ",") replacing hd0,0 with the value found before. This should return something like: "Filesystem type is ext2fs, partition type 0x83".

Now you have to install grub physically to the MBR. It's possible to install it to MBR of a second or third harddisk or even to the partition but it would require from you to switch boot order in BIOS or chainloading grub from windows bootloader. It's much better IMHO to just install grub to the MBR of the first hard disk. To do this run

setup (hd0)

replacing hd0 to the number of the first hard disk that grub can see (cdrom doesn't count) - check the device.map file to find this number.
After this grub should show something similar to this:

Checking if "/grub/stage1" exists... yes 
 Checking if "/grub/stage2" exists... yes 
 Checking if "/grub/e2fs_stage1_5" exists... yes 
 Running "embed /grub/e2fs_stage1_5 (hd0)"...  16 sectors are embedded. 
succeeded 
 Running "install /grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/grub/stage2 /grub/menu.lst"... succeeded 
Done

Now run quit and edit /boot/grub/menu.lst. Remember to add section for windows as grub will overwrite windows bootloader - you can find examples on the forum, in the menu.lst file and on the wiki of course.

Offline

#4 2006-05-17 14:39:08

peque
Member
From: Denmark - Møn
Registered: 2005-06-26
Posts: 441

Re: Problem with installing GRUB [SOLVED]

Lilo works - but its the first time using this!!!

When I did an upgrade (pacman -Syu) and reboot then i would not start...

I did a small bit of reading. Should you run lilo after an kernel upgrade or is there any other times you have to run lilo again.
the command is just -

lilo

??


Just getting better .... All the time

Offline

#5 2006-05-17 14:42:02

peque
Member
From: Denmark - Møn
Registered: 2005-06-26
Posts: 441

Re: Problem with installing GRUB [SOLVED]

I´m normally quite sure bout how grub works - but thats was a really good explanation.

Thanks for that.

I normally like grub better than Lilo - so afterwards I´ll give it a try to make that one works"

Thanks again


Just getting better .... All the time

Offline

#6 2006-05-17 14:43:14

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: Problem with installing GRUB [SOLVED]

Yes, you should run lilo after every kernel upgrade. Grub doesn't require this. You can fix this easy if you forgot - check the wiki docs.

Offline

#7 2006-05-17 14:49:41

peque
Member
From: Denmark - Møn
Registered: 2005-06-26
Posts: 441

Re: Problem with installing GRUB [SOLVED]

Thanks .

Afterwards i´ll try to go back to Grub - I like that one much better :-)

Thanks for the answer


Just getting better .... All the time

Offline

#8 2006-05-17 15:25:23

ScriptDevil
Member
From: In Front of My PC
Registered: 2006-04-06
Posts: 253

Re: Problem with installing GRUB [SOLVED]

Really, i dont understand i like grub better. I dont know aabout others but i stick to the thing that does the job. For me lilo did and also note this peque-> the command for lilo is /sbin/lilo
(To be run as root)


Be yourself, because you are all that you can be

Offline

#9 2006-05-17 21:42:37

peque
Member
From: Denmark - Møn
Registered: 2005-06-26
Posts: 441

Re: Problem with installing GRUB [SOLVED]

Some where you got a point.

PS the command     lilo     also works  big_smile


Its not the thing - stick to what you know - but somewhere i like the others look better. You only look at it i 5sec  big_smile  big_smile  big_smile


Just getting better .... All the time

Offline

#10 2006-05-18 10:22:58

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: Problem with installing GRUB [SOLVED]

ScriptDevil wrote:

Really, i dont understand i like grub better. I dont know aabout others but i stick to the thing that does the job. For me lilo did and also note this peque-> the command for lilo is /sbin/lilo
(To be run as root)

You don't need to remember to run lilo after each kernel upgrade for example :-)

Offline

Board footer

Powered by FluxBB