Skip to contentSkip to conversation

Problem installing GRUB2 on a 2.1TB system

DISCUSSION Poe Chen 2 participants 4 messages Jan 25, 2006 – Jan 26, 2006

lore
Share & tools
lore

Poe Chen

author
#0 lore raw

I'm the same guy who has successfully floppy boot GRUB2 on a 2.1TB system. =)

Here are the problems that I've encountered to get GRUB2 installed onto my system running CentOS 4.2 with latest updates.

-grub-probefs can't detect the file system on my server.

Here are the system info:

[root@colossus ~]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 4032124 2810480 1016816 74% /
/dev/sda1 101086 11576 84291 13% /boot
none 516768 0 516768 0% /dev/shm
/dev/sda4 2300710112 1547872 2182292912 1% /home

And here is the result:

[root@colossus ~]# grub-probefs -v /dev/sda
grub-probefs: info: changing current directory to /dev
grub-probefs: info: changing current directory to cpu
grub-probefs: info: changing current directory to mapper
grub-probefs: info: changing current directory to input
grub-probefs: info: changing current directory to net
grub-probefs: info: changing current directory to shm
grub-probefs: info: changing current directory to pts cannot find a GRUB device for /dev/sda.

But grub-mkdevicemap can get correct device map:

[root@colossus ~]# grub-mkdevicemap -m /boot/grub/device.map -v [root@colossus ~]# cat /boot/grub/device.map
(fd0) /dev/fd0
(hd0) /dev/sda

-grub-install will fail since it can't find GRUB device for /dev/sda...so the next thing I've tried is to run grub-setup directly

-run the following command to install GRUB2 onto the system:

grub-setup -d /boot/grub -v -r '(hd0)' -m /boot/grub/device.map '(hd0)'

and it fails:

grub-mkimage: info: getting the size of /boot/grub/kernel.img
grub-mkimage: info: getting the size of /boot/grub/normal.mod
grub-mkimage: info: getting the size of /boot/grub/ls.mod
grub-mkimage: info: getting the size of /boot/grub/fshelp.mod
grub-mkimage: info: getting the size of /boot/grub/ext2.mod
grub-mkimage: info: getting the size of /boot/grub/gpt.mod
grub-mkimage: info: getting the size of /boot/grub/pc.mod
grub-mkimage: info: getting the size of /boot/grub/_linux.mod
grub-mkimage: info: getting the size of /boot/grub/linux.mod
grub-mkimage: info: getting the size of /boot/grub/boot.mod
grub-mkimage: info: getting the size of /boot/grub/_chain.mod
grub-mkimage: info: getting the size of /boot/grub/chain.mod
grub-mkimage: info: getting the size of /boot/grub/configfile.mod
grub-mkimage: info: getting the size of /boot/grub/default.mod
grub-mkimage: info: getting the size of /boot/grub/help.mod
grub-mkimage: info: the total module size is 0x10c6c
grub-mkimage: info: reading /boot/grub/kernel.img
grub-mkimage: info: getting the size of /boot/grub/kernel.img
grub-mkimage: info: getting the size of /boot/grub/normal.mod
grub-mkimage: info: reading /boot/grub/normal.mod
grub-mkimage: info: getting the size of /boot/grub/normal.mod
grub-mkimage: info: getting the size of /boot/grub/ls.mod
grub-mkimage: info: reading /boot/grub/ls.mod
grub-mkimage: info: getting the size of /boot/grub/ls.mod
grub-mkimage: info: getting the size of /boot/grub/fshelp.mod
grub-mkimage: info: reading /boot/grub/fshelp.mod
grub-mkimage: info: getting the size of /boot/grub/fshelp.mod
grub-mkimage: info: getting the size of /boot/grub/ext2.mod
grub-mkimage: info: reading /boot/grub/ext2.mod
grub-mkimage: info: getting the size of /boot/grub/ext2.mod
grub-mkimage: info: getting the size of /boot/grub/gpt.mod
grub-mkimage: info: reading /boot/grub/gpt.mod
grub-mkimage: info: getting the size of /boot/grub/gpt.mod
grub-mkimage: info: getting the size of /boot/grub/pc.mod
grub-mkimage: info: reading /boot/grub/pc.mod
grub-mkimage: info: getting the size of /boot/grub/pc.mod
grub-mkimage: info: getting the size of /boot/grub/_linux.mod
grub-mkimage: info: reading /boot/grub/_linux.mod
grub-mkimage: info: getting the size of /boot/grub/_linux.mod
grub-mkimage: info: getting the size of /boot/grub/linux.mod
grub-mkimage: info: reading /boot/grub/linux.mod
grub-mkimage: info: getting the size of /boot/grub/linux.mod
grub-mkimage: info: getting the size of /boot/grub/boot.mod
grub-mkimage: info: reading /boot/grub/boot.mod
grub-mkimage: info: getting the size of /boot/grub/boot.mod
grub-mkimage: info: getting the size of /boot/grub/_chain.mod
grub-mkimage: info: reading /boot/grub/_chain.mod
grub-mkimage: info: getting the size of /boot/grub/_chain.mod
grub-mkimage: info: getting the size of /boot/grub/chain.mod
grub-mkimage: info: reading /boot/grub/chain.mod
grub-mkimage: info: getting the size of /boot/grub/chain.mod
grub-mkimage: info: getting the size of /boot/grub/configfile.mod
grub-mkimage: info: reading /boot/grub/configfile.mod
grub-mkimage: info: getting the size of /boot/grub/configfile.mod
grub-mkimage: info: getting the size of /boot/grub/default.mod
grub-mkimage: info: reading /boot/grub/default.mod
grub-mkimage: info: getting the size of /boot/grub/default.mod
grub-mkimage: info: getting the size of /boot/grub/help.mod
grub-mkimage: info: reading /boot/grub/help.mod
grub-mkimage: info: getting the size of /boot/grub/help.mod
grub-mkimage: info: kernel_img=0x8c86118, kernel_size=0x177b4
grub-mkimage: info: compressing the core image
grub-mkimage: info: the core size is 0xbead
grub-mkimage: info: getting the size of /boot/grub/diskboot.img
grub-mkimage: info: reading /boot/grub/diskboot.img
grub-mkimage: info: getting the size of /boot/grub/diskboot.img
grub-mkimage: info: writing 0x200 bytes
grub-mkimage: info: the first module address is 0xed48
grub-mkimage: info: writing 0xbead bytes
grub-setup: info: prefix = /grub
grub-setup: info: getting the size of /boot/grub/boot.img
grub-setup: info: reading /boot/grub/boot.img
grub-setup: info: getting the size of /boot/grub/boot.img
grub-setup: info: getting the size of /boot/grub/core.img
grub-setup: info: reading /boot/grub/core.img
grub-setup: info: getting the size of /boot/grub/core.img
grub-setup: info: the size of hd0 is 0
grub-setup: info: the size of hd0 is 0
grub-setup: info: setting the root device to `hd0'
grub-setup: error: out of disk

So it complains that it's "out of disk"...since the size of hd0 is zero.

Then I tried to install onto (hd0,1) or specify root device to be (hd0,1), it gives a different error:

grub-setup: info: the size of hd0 is 0
grub-setup: info: the size of hd0 is 0
grub-setup: error: unknown device

It looks like that GRUB2 can't correctly detect the size of (hd0). Is it kernel related? Because I've found out that if I'm using Ubuntu, it's even worse because I can't even mount the file system that is partitioned with GPT (meaning that I can't even floppy boot the system). But it's a very old system...so I don't know what might be the problem.

Should I try to use the CVS version? Anything I can try to get it working? For the time being, booting from floppy is ok.

Thanks a lot for the helps... =)

Poe

#1 lore raw
Quoted 19 lines · Poe Chen

I'm the same guy who has successfully floppy boot GRUB2 on a 2.1TB system. =)

Here are the problems that I've encountered to get GRUB2 installed onto my system running CentOS 4.2 with latest updates.

-grub-probefs can't detect the file system on my server.

Here are the system info:

[root@colossus ~]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 4032124 2810480 1016816 74% /
/dev/sda1 101086 11576 84291 13% /boot
none 516768 0 516768 0% /dev/shm
/dev/sda4 2300710112 1547872 2182292912 1% /home

And here is the result:

Quoted 9 lines

[root@colossus ~]# grub-probefs -v /dev/sda
grub-probefs: info: changing current directory to /dev
grub-probefs: info: changing current directory to cpu
grub-probefs: info: changing current directory to mapper
grub-probefs: info: changing current directory to input
grub-probefs: info: changing current directory to net
grub-probefs: info: changing current directory to shm
grub-probefs: info: changing current directory to pts cannot find a GRUB device for /dev/sda.

What kind of filesystem do you use? Can you show the output of `mount'?

Please be *very* careful with installing on GPT. The only way to use GRUB with GPT is by using a floppy. This is because it does not have a bootsector. The intended way of booting such system is by using EFI. Unfortunately I don't have such system available and GRUB 2 is not changed so it can deal with EFI.

Also see my other email regarding this issue:
http://lists.gnu.org/archive/html/grub-devel/2005-11/msg00163.html

Any ideas and suggestions regarding this problem are welcome. I expect more people will run into this problem.

Thanks,
Marco

author
#2 lore raw

Hi, Marco,

Here is the mount output:

[root@colossus ~]# mount
/dev/sda2 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620) usbfs on /proc/bus/usb type usbfs (rw) /dev/sda1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
/dev/sda4 on /home type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

And you are right about boot sector with EFI GPT. I'm having a hard time to get GRUB2 boot even after I install GRUB2 "successfully" on the disk (a different system though). If I've ever run parted again, it will recover the "corrupted" partition table, GRUB2 is gone....

So is there any plan to support EFI in GRUB2 at all? =)

For the time being, I'll keep booting from the floppy then.... =)

Thanks a lot,

Poe

Quoted 58 lines · Marco Gerards
Quoted 4 lines · Poe Chen

I'm the same guy who has successfully floppy boot GRUB2 on a 2.1TBsystem. =)

Here are the problems that I've encountered to get GRUB2 installed onto

my

Quoted 15 lines

system running CentOS 4.2 with latest updates.

-grub-probefs can't detect the file system on my server.

Here are the system info:

[root@colossus ~]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 4032124 2810480 1016816 74% /
/dev/sda1 101086 11576 84291 13% /boot
none 516768 0 516768 0% /dev/shm
/dev/sda4 2300710112 1547872 2182292912 1% /home

And here is the result:

Quoted 9 lines

[root@colossus ~]# grub-probefs -v /dev/sda
grub-probefs: info: changing current directory to /dev
grub-probefs: info: changing current directory to cpu
grub-probefs: info: changing current directory to mapper
grub-probefs: info: changing current directory to input
grub-probefs: info: changing current directory to net
grub-probefs: info: changing current directory to shm
grub-probefs: info: changing current directory to pts cannot find a GRUB device for /dev/sda.

What kind of filesystem do you use? Can you show the output of `mount'?

Please be *very* careful with installing on GPT. The only way to use GRUB with GPT is by using a floppy. This is because it does not have a bootsector. The intended way of booting such system is by using EFI. Unfortunately I don't have such system available and GRUB 2 is not changed so it can deal with EFI.

Also see my other email regarding this issue:
http://lists.gnu.org/archive/html/grub-devel/2005-11/msg00163.html

Any ideas and suggestions regarding this problem are welcome. I expect more people will run into this problem.

Thanks,
Marco

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

#3 lore raw

Poe Chen <[email protected]> writes:

Hi,

Quoted 11 lines

[root@colossus ~]# mount
/dev/sda2 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620) usbfs on /proc/bus/usb type usbfs (rw) /dev/sda1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
/dev/sda4 on /home type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

Hm, it should be able to detect ext3, weird. I will test grub-probefs some day. :-)

Quoted 4 lines

And you are right about boot sector with EFI GPT. I'm having a hard time to get GRUB2 boot even after I install GRUB2 "successfully" on the disk (a different system though). If I've ever run parted again, it will recover the "corrupted" partition table, GRUB2 is gone....

This is what actually should happen. Either parted or the BIOS notices the partition table was destroyed and recovers it.

Quoted 1 line

So is there any plan to support EFI in GRUB2 at all? =)

Yes, I think so. :)

--
Marco