You are not logged in.

#1 2009-10-10 19:26:02

fpb
Member
Registered: 2009-10-10
Posts: 8

GRUB2 can't load my system

Hello everyone,

I'm new to Archlinux. After having installed the system and configuring it for a few weeks I decided to install GRUB2. I removed GRUB, installed GRUB2 and rebooted. Now I'm stuck with a command line (grub>) and I can't start my system. I have tried several things, booted with a live CD and changed the grub.cfg file, used the command setup to install GRUB to a different partition. I don't know where to go from here...

My grub.cfg looks like this:
set timeout=5
set default=0

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

I have a 250gb SATA HD with 4 partitions (sda1-4). My first partition contains kernel26.img and a grub folder containing all the files from grub. My system is on the partition sda3.

Can anyone help me? If you need more info, please tell me.

Thanks.

Offline

#2 2009-10-10 19:29:09

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Re: GRUB2 can't load my system

I think you should change root=/dev/sda1 to /dev/sda3

Offline

#3 2009-10-10 19:43:18

fpb
Member
Registered: 2009-10-10
Posts: 8

Re: GRUB2 can't load my system

Ok, I changed it to /dev/sda3, but still no luck.
The only thing I get is the grub command. When I type boot, it says: Error 8: Kernel must be loaded before booting.

Any other ideas?

Offline

#4 2009-10-10 20:07:12

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Re: GRUB2 can't load my system

Change the "set root" as well, it may be hd0,2

Offline

#5 2009-10-10 20:59:37

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

Re: GRUB2 can't load my system

I have vista on sda1
Here's my grub.cfg entry for /boot on /sda2
If I wasn't using LVM my root would be /dev/sda3

Note the disk numbering starts from zero but the partitions start from 1 in grub2 sad
Also, I have braces {}

menuentry " arch" {
set root=(hd0,2)
linux /vmlinuz26 root=/dev/mapper/vg-arch cryptdevice=/dev/sda3:vg ro
initrd /kernel26.img
}

Offline

#6 2009-10-10 22:45:57

Archangel-13
Member
From: The sunshine city.
Registered: 2006-07-23
Posts: 7
Website

Re: GRUB2 can't load my system

I believe you need to change the set root line to (hd0,1).  Grub2 starts numbering disks from 0 but partitions start from 1, so the Arch Linux part of your grub.cfg should look like:

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

I don't know if the brackets are required, they are included in the defaults grub.cfg, and it may be possible that that is why you are getting no menu.

Last edited by Archangel-13 (2009-10-10 22:49:25)

Offline

#7 2009-10-11 07:50:00

fpb
Member
Registered: 2009-10-10
Posts: 8

Re: GRUB2 can't load my system

Thanks for the tips guys. I changed the grub.cfg to the suggestion from Archangel-13, still no luck. I changed it around a bit trying every combination with set root and root, but it still won't start. I think the problem is somewhere else, but I don't know where. I starting to think I have to reinstall my system.

(p.s. the brackets are required, I checked that smile)

Offline

#8 2009-10-11 07:53:58

fpb
Member
Registered: 2009-10-10
Posts: 8

Re: GRUB2 can't load my system

One other thing I read about is starting the system manually once your in the grub command line. Does anybody know how to do that? There is a command called boot, but it just keeps telling me that the kernel needs to be loaded first.

Offline

#9 2009-10-11 08:19:31

*david_a*
Member
Registered: 2009-06-19
Posts: 80

Re: GRUB2 can't load my system

How are the partitions listed in your /etc/fstab ? That might give you some more info about what's going on.

My grub is installed to the MBR of the disk, which as far as I know is sort of at the "root level" of the disk before the partitions start. If your grub is installed on one of the partitions, maybe you have to adjust for that in the (hd0,0) or (hd0,1) or whatever it may turn out to be.

In any case, it sounds to me as if the place you're telling grub to look for the kernel is not where the kernel really is...

Last edited by *david_a* (2009-10-11 08:21:19)

Offline

#10 2009-10-11 08:29:45

fpb
Member
Registered: 2009-10-10
Posts: 8

Re: GRUB2 can't load my system

My fstab looks like this:

#
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
none                   /dev/pts      devpts    defaults            0      0
none                   /dev/shm      tmpfs     defaults            0      0

#/dev/cdrom             /media/cd   auto    ro,user,noauto,unhide   0      0
#/dev/dvd               /media/dvd  auto    ro,user,noauto,unhide   0      0
#/dev/fd0               /media/fl   auto    user,noauto             0      0

/dev/sda1 /boot ext2 defaults 0 1
/dev/sda2 swap swap defaults 0 0
/dev/sda3 / ext4 defaults 0 1
/dev/sda4 /home ext4 defaults 0 1

/dev/sdb1 /data_1 ext4 defaults 0 0
/dev/sdb2 /data_2 ext4 defaults 0 0

Offline

#11 2009-10-11 08:37:47

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

Re: GRUB2 can't load my system

fpb wrote:

One other thing I read about is starting the system manually once your in the grub command line. Does anybody know how to do that? There is a command called boot, but it just keeps telling me that the kernel needs to be loaded first.

I think "tab completion" may help.


from the grub ">" prompt type

kernel (hd[TAB]

that's tapping the [TAB] key, you should get a list of you disks (0, 1), so select the disk (e.g.0), enter a comma and press TAB again for a list of partitions
select the partition then after the closing bracket enter part of the kernel location and tab TAB for a list, you might have:

kernel (hd0,1)/vm[TAB]

enter the kernel you want, and complete the line (root=/dev/sda3 ro), pressing [ENTER]
repeat for the initrd line

initrd (hd0,1)/ker[TAB]

on the next line

boot[ENTER]

Last edited by vacant (2009-10-11 09:02:15)

Offline

#12 2009-10-11 08:49:27

fpb
Member
Registered: 2009-10-10
Posts: 8

Re: GRUB2 can't load my system

I'm not sure if I got this, so in the prompt I typed (with the help of tab) kernel (hd0,0)/kernel26.img. After I hit enter it says Invalid or unsupported executable format.
What do you mean by "complete the line (root=/dev/sda3 ro), pressing [ENTER]"?

Offline

#13 2009-10-11 09:01:20

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

Re: GRUB2 can't load my system

Sorry that example should read "vm" rathe than "ke", I'll edit that.  partition number start at 1 not zero (disks do start at zero). And your complete lines should look like this:

kernel (hd0,1)/vmlinuz26 root=/dev/sda3 ro
initrd (hd0,1)/kernel26-fallback.img
boot

That's assuming
1) your boot partition is on sda1
2) but your grub/grub.cfg file on that partition isn't right
3) your arch root partition is sda3

edit: I'm suggesting the fallback initrd just to be safe, if that works you can try kernel26.img

Last edited by vacant (2009-10-11 09:05:51)

Offline

#14 2009-10-11 09:14:21

fpb
Member
Registered: 2009-10-10
Posts: 8

Re: GRUB2 can't load my system

YES!!! Thank you, I was able to boot my system. Something is still not right, as soon as I log on compiz starts and everything turns grey, but I think I'll manage.

Thank you so much smile

Offline

#15 2009-10-11 11:19:14

fpb
Member
Registered: 2009-10-10
Posts: 8

Re: GRUB2 can't load my system

So after I was able to logon (Failsafe Gnome) I removed Grub2 und installed Grub. My system boots up again, yeah.

Thanks everyone for your help! smile

Offline

Board footer

Powered by FluxBB