You are not logged in.

#1 2009-02-03 08:14:18

konni
Member
From: berlin
Registered: 2008-09-25
Posts: 99

grub2 with separate boot partition

hey...
somehow grub2 won't install properly on my system.
partitions:

sda1 /boot
sda2 luksEncrypted /
sda4 luksEncrypted /home

things i tried:

$ grub-install '(hd0)'
grub-setup: error: Cannot read `/boot/grub/core.img' correctly

but

$ ls -l /boot/grub | grep core
-rw-r--r-- 1 root root 24791 2009-02-03 09:06 core.img

same with --recheck

i can install it with

$ grub-install --root-directory=/boot '(hd0)'

but then its in /boot/boot/grub/
when i try

$ grub-install --root-directory=/ '(hd0)'

it gives me the same error i got before.

any help would be greatly appreciated!

Offline

#2 2009-02-17 13:12:19

cwjiof
Member
From: Taichung, TW
Registered: 2008-01-27
Posts: 131

Re: grub2 with separate boot partition

I have separate /boot partition too, and same error for me.

Any help will be appreciated.

Maybe I should install grub2-svn from the AUR.

Last edited by cwjiof (2009-02-17 13:34:47)

Offline

#3 2009-02-17 14:00:58

presario
Member
From: Tashkent, Uzbekistan
Registered: 2008-12-07
Posts: 57
Website

Re: grub2 with separate boot partition

post your fstab here


Running ArchLinux on Compaq Presario v2000

Offline

#4 2009-02-18 12:22:47

konni
Member
From: berlin
Registered: 2008-09-25
Posts: 99

Re: grub2 with separate boot partition

fstab

none                   /dev/pts      devpts    defaults            0      0
none                   /dev/shm      tmpfs     defaults            0      0

/dev/sr0             /media/cd     auto ro,user,noauto,unhide  0 0
/dev/sda1             /boot        ext3 defaults                 0 1
/dev/mapper/root    /             ext4 defaults,noatime         0 1
/dev/mapper/data     /media/data ext4 defaults,noatime         0 1
/dev/mapper/home     /home         ext4 defaults,noatime         0 1
/swapfile             swap          swap defaults                 0 0

Last edited by konni (2009-02-18 12:24:24)

Offline

#5 2009-02-19 04:19:47

cwjiof
Member
From: Taichung, TW
Registered: 2008-01-27
Posts: 131

Re: grub2 with separate boot partition

Almost the same with me, smile

I used LVM2 and LUKS. So I have "/dev/mapper/..." in my fstab.

Offline

#6 2009-02-19 16:51:06

konni
Member
From: berlin
Registered: 2008-09-25
Posts: 99

Re: grub2 with separate boot partition

but the boot partition is a regular, unencrypted one. so i don't get the problem. especially why i can install in /boot/boot/grub and not in /boot/grub.

Offline

#7 2009-04-06 01:10:46

Yaro
Member
Registered: 2009-04-03
Posts: 154

Re: grub2 with separate boot partition

I am having this exact same problem with grub2-gfxmenu.

Offline

#8 2009-04-07 08:48:36

thetrivialstuff
Member
Registered: 2006-05-10
Posts: 191

Re: grub2 with separate boot partition

grub-install is just a wrapper for the grub mini-shell thingie. I've sort of given up on it, since it seems to only work in those few cases where /boot really is /dev/hda-something (or sda-something now) -- it fails miserably on RAID, etc.

Anyway, all you really need to do most of the time is:

$ grub

[ GNU GRUB the grub welcome text blah blah ]

grub> root (hdX,X)

grub> setup (hdX)

For instance if /boot is your first partition on your first hard drive, the commands are:

root (hd0,0)
setup (hd0)

All of the rest of grub-install is just some complicated logic for translating /dev/hda-something into those grub device names.

Two other things to double-check:
- if you first installed arch a long time ago (before the switch from "hd" to "sd" for IDE hard drives) the install CD will use the wrong device names. You need to make sure your root= line in /boot/grub/menu.lst says what you're used to seeing, unless you know that your last kernel upgrade changed your device names.
- sometimes grub-install gets confused about the difference between /boot/grub and /grub . When you're first booting, the stage 2 files are in /grub, because you're thinking relative to the boot partition (rootfs hasn't been mounted yet, so you are in /, not /boot).

Offline

#9 2009-04-07 10:16:19

koeleck
Member
From: Germany
Registered: 2009-04-07
Posts: 4

Re: grub2 with separate boot partition

grub-install --grub-setup=/bin/true /dev/sda
did solve this for me

Offline

#10 2009-04-07 12:30:58

Yaro
Member
Registered: 2009-04-03
Posts: 154

Re: grub2 with separate boot partition

thetrivialstuff wrote:

grub-install is just a wrapper for the grub mini-shell thingie. I've sort of given up on it, since it seems to only work in those few cases where /boot really is /dev/hda-something (or sda-something now) -- it fails miserably on RAID, etc.

Anyway, all you really need to do most of the time is:

$ grub

[ GNU GRUB the grub welcome text blah blah ]

grub> root (hdX,X)

grub> setup (hdX)

For instance if /boot is your first partition on your first hard drive, the commands are:

root (hd0,0)
setup (hd0)

All of the rest of grub-install is just some complicated logic for translating /dev/hda-something into those grub device names.

Two other things to double-check:
- if you first installed arch a long time ago (before the switch from "hd" to "sd" for IDE hard drives) the install CD will use the wrong device names. You need to make sure your root= line in /boot/grub/menu.lst says what you're used to seeing, unless you know that your last kernel upgrade changed your device names.
- sometimes grub-install gets confused about the difference between /boot/grub and /grub . When you're first booting, the stage 2 files are in /grub, because you're thinking relative to the boot partition (rootfs hasn't been mounted yet, so you are in /, not /boot).

Yeah, there's no grub command with grub2-gfxmenu.

Offline

#11 2009-04-08 11:54:37

fettouhi
Member
Registered: 2007-05-07
Posts: 745

Re: grub2 with separate boot partition

Same problem here with GRUB2 and Fake-RAID running grub-install doesn't work for me so I need a grub promp to set everything manually.

Regards

André

Offline

#12 2009-04-26 16:05:22

der_ronny
Member
Registered: 2009-04-26
Posts: 2

Re: grub2 with separate boot partition

had the same problem and solved it gladfully. Wrote the instructions into the wiki.

greets

Offline

#13 2009-09-10 08:10:47

fettouhi
Member
Registered: 2007-05-07
Posts: 745

Re: grub2 with separate boot partition

Where exactly did you write your instructions in the wiki?

Regards

André

Offline

#14 2009-09-10 17:07:23

scio
Member
From: Buffalo, NY
Registered: 2008-08-05
Posts: 366

Re: grub2 with separate boot partition

Remember with GRUB2:

(hdn,m) is the partition m on disc n, partition numbers starting with 1, disc numbers starting with 0

You do NOT use (hd0,0) anymore.

Offline

#15 2009-09-13 22:19:38

der_ronny
Member
Registered: 2009-04-26
Posts: 2

Re: grub2 with separate boot partition

sry, it stopped working in the meantime. I don't think it would help. )-:

Offline

Board footer

Powered by FluxBB