You are not logged in.

#1 2009-12-07 18:04:23

jspreis
Member
Registered: 2009-12-07
Posts: 14

Grup PRoblem!

I´ve just tried to instal Archlinx 2009.08 on my toshiba laptop and everything went normally until i made my first boot. Grub loaded the rescue prompt. "set" commands put prefix and root in Hd0,5. My particion setup is

sda1 bootWin
sda2Win
sda3Data
sda4 extended
sda5linux
sda6swap:

So, as sugested in the instalation guide, i instaled grub in sda5 = hd0,4( there´s no boot independent partition, everything is in /.
When i try to set for hd0,4, grub tell´s me that such a partition doesn´t exist.

Any sugestions for my problem ?

Offline

#2 2009-12-07 18:24:41

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

Re: Grup PRoblem!

So - how do you expect a windows (or ms/dos) loader - which is residing on the master boot record - to be able to recognize your archlinux partition?

Let me give you a hint ...: grub + mbr

Last edited by perbh (2009-12-07 18:25:16)

Offline

#3 2009-12-07 20:24:51

jspreis
Member
Registered: 2009-12-07
Posts: 14

Re: Grup PRoblem!

And installing Grub in the MBR isn´t going to disturb the windows loading? I´m guessing that my questions are pretty basic, which is not surprising for since my experience with linux revolved around ubuntu. When ubuntu instals the GRub ( in the same partition setup that i refered) he does it in the sda1 ( in the mbr) ?

Even so, the guide referes several times that in the case that there are more that one OS ( being windows one of them), the grub should be installed in the "/boot" partition, or - as in this case - the / linux partition. You are telling me to install in the sda1?

Offline

#4 2009-12-07 20:37:01

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Grup PRoblem!

Behold - the wiki answers all your questions:

http://wiki.archlinux.org/index.php/Grub

At least the ones you've been asking here wink. I trust, being new and things, that you also enjoyed a thorough read of the beginner's guide and installation guide, both also part of our excellent wiki?


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#5 2009-12-07 21:37:31

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Re: Grup PRoblem!

Take care. sda1 is NOT the same as the MBR. As perbh mentioned, you should install grub to the MBR

You have a physical disk with one MBR which may contain a boot loader. If it does, the BIOS will load that regardless of any "active" partition flag. You can have up to four primary partitions, each may contain a boot loader. Only one partition can be active. If there is no boot loader on the MBR, then the BIOS will try and load one from the active partition. If one is not found on the active partition then you won't boot.

Do not install grub to sda1, that's where your Windows boot loader is (an entry on the grub menu "chainloads" to that boot loader - you can chainload to other partitions where there may be other grub boot loaders).

Beware of the wiki:

"The GRUB bootloader will not be loaded by the BIOS if it is not on the MBR."

Really? If I have no boot loader on the MBR, Windows on sda1 and that is my active partition then Windows boot loader will be found by the BIOS.
If I install grub to sda2 and set the active partition to sda2 then grub will be found by the BIOS.

Offline

#6 2009-12-08 05:15:18

jspreis
Member
Registered: 2009-12-07
Posts: 14

Re: Grup PRoblem!

....well, ok: for B: though  i believe you, i don´t find an obvious solution for my problem from http://wiki.archlinux.org/index.php/Grub. I tryied, being  new and things, to read and follow the instalation and beguiner guide.
For Vacant: ok, don´t install to sda1. So... what should i do? i change the "active" partition ? Again, i´m curious, how ( and i searched that without an easy response) does ( and where) ubuntu installs the grub for the same partition setup - that is:
sda1 bootWin
sda2Win
sda3Data
sda4 extended
sda5linux ( ubuntu or archlinux)
sda6swap:

Offline

#7 2009-12-08 08:29:53

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Re: Grup PRoblem!

Install grub to the MBR. BIOS will look there first so it doesn't matter which (if any) partition is marked as active.

Offline

#8 2009-12-08 13:17:50

MattSmith
Member
From: Wellington, New Zealand
Registered: 2009-02-08
Posts: 108

Re: Grup PRoblem!

I did an Ubuntu install for a friend the other day and I clicked on advanced options (being an arch user) to see the grub was already ticked to be installed to the MBR. So you have been installing grub to the MBR this whole time, except in Arch it gives you a choice (which is why i love arch!)

behold more wiki's to become learned about MBR's wink

http://en.wikipedia.org/wiki/Master_boo … rtitioning


A thing of beauty is a joy forever
                         
                               -John Keats

Offline

#9 2009-12-08 13:39:30

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

Re: Grup PRoblem!

@jspreis:
It would seem that you do not quite understand _how_ a pc boots.
Booting is a multi-stage process. The MBR is the first 512-byte sector on any harddisk - it is _not_ a partition.
The MBR consists of a short piece of assembly code (the initial bootloader - 446 bytes), a partition table for the 4 primary partitions (16 bytes each) and a 'sentinel' (0xAA55 - or is 0x55AA? can't remember).

The 'original' windows (or rather ms/dos) bootloader will check the partition table for one and only one 'active' partition and then read in a X sectors from this partition and then transfer control to there. This is why your initial dos-loader will not be able to boot your archlinux partition - it can only cater for an 'active, primary' partition.

If grub is installed on the MBR - it is able to boot from _any_ partition whether it is primary or logical. grub-install uses _two_ 'directives', namely 'setup' which is where the initial bootloader is placed, and 'root' which is the partition where the next loader-stage (stage-1.5) can be found.  At stage 1.5 (which will be sda5/boot/grub in your case) there are a number of 'helper'-programs/utilities which will enable grub to use the actual filesystem in use in order to find and load 'initrd' and 'vmlinuz'.

In your particular case - I would reinstall grub as follows:

grub
grub> root (hd0,4)
grub> setup (hd0)
grub> quit

Your menu.lst (/dev/sda5/boot/grub/menu.lst) should then have the following entries:

default 0
timeout 10
title archlinux
   root (hd0,4)
   kernel /boot/vmlinuz26 ro root=/dev/sda5
   initrd /boot/kernel26.img
title windows xp
   rootnoverify (hd0,1)
   chainloader +1

Note that this is assuming that your windows-proper is on /dev/sda2 and that /dev/sda1 is a 'recover'-partition (this is the usual case, but it may be different for you).

[edit]
Also note that if you give windows half a chance - it will rewrite your MBR and put its own initial loader there - in which case you will have to go through the grub install again.

Last edited by perbh (2009-12-08 13:55:56)

Offline

#10 2009-12-08 17:06:45

jspreis
Member
Registered: 2009-12-07
Posts: 14

Re: Grup PRoblem!

ok! thank you very much, i will try to reinstal grub as you sugests. Again, i´m trying to learn more about all this and, frankly, i´m a bit bored with ubuntu, so i really apreciate your help, in particular, and the community´s help generally.
I will give news, soon.

Offline

#11 2009-12-08 19:09:41

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: Grup PRoblem!

Ive always found it a lot easier to install grub to the MBR, every time I try to install it to a partition it wont load correctly, maybe its because I have to set that partition as active?

About a week ago I tried to install chakra on my dads pc, at first I was going to try and install it on his RAID0 array but found it to be way more trouble than it was worth since he wont use linux and Id rarely be using it since I have my own computer. I decided to install it onto his 1TB hdd and decided to install it to a partition because I didnt know if it would work if it was installed to the MBR of the RAID array since I read that grub doesn't understand RAID arrays. After a reboot I got one of the wonderful grub error messages (i forget which, I want to say 17 or 22) and decided not to bother with it since I had to go back up to college the next day and didnt want to spend a day reinstalling windows if I screwed something up. I ended up just doing fdisk /mbr from dos to restore the windows MBR.

Offline

#12 2009-12-10 17:19:53

jspreis
Member
Registered: 2009-12-07
Posts: 14

Re: Grup PRoblem!

Ok, everything went nice - did basically what you said -  and now i have gnome ED working with no aparent problems. So, i again, thank you!

Offline

Board footer

Powered by FluxBB