View previous topic :: View next topic |
Author |
Message |
c00l.wave Apprentice
Joined: 24 Aug 2003 Posts: 264
|
Posted: Sun Sep 08, 2013 9:36 pm Post subject: GRUB 0.97 misreading hybrid MBR |
|
|
I installed a 3TB hard drive yesterday. In order to use the full 3TB, I used GPT and added a hybrid MBR as I did many times before on other boxes. However, this one behaves a bit whacky, as GRUB sees just garbage:
Code: | grub> root (hd0,
Possible partitions are:
Partition num: 0, Filesystem type unknown, partition type 0x83
Partition num: 1, Filesystem type unknown, partition type 0x83
Partition num: 2, Filesystem type unknown, partition type 0x83
Partition num: 3, Filesystem type unknown, partition type 0x83
Partition num: 4, Filesystem type unknown, partition type 0x83
Partition num: 5,
Error 18: Selected cylinder exceeds maximum supported by BIOS |
Code: | # gdisk /dev/sda
GPT fdisk (gdisk) version 0.8.6
Partition table scan:
MBR: hybrid
BSD: not present
APM: not present
GPT: present
Found valid GPT with hybrid MBR; using GPT.
Command (? for help): p
Disk /dev/sda: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 0D0B5AC5-FA29-4853-B44A-8CD9C7D8F755
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 2048-sector boundaries
Total free space is 8158 sectors (4.0 MiB)
Number Start (sector) End (sector) Size Code Name
1 8192 212991 100.0 MiB 8300 boot
2 212992 136527871 65.0 GiB FD00 raid_rootfs
3 136527872 153305087 8.0 GiB 8200 swap
4 153305088 1201881087 500.0 GiB 0700 windows
5 1201881088 2250457087 500.0 GiB 8E00 lvm
6 2250457088 5860533134 1.7 TiB FD00 raid_lvm
Command (? for help): r
Recovery/transformation command (? for help): o
Disk size is 5860533168 sectors (2.7 TiB)
MBR disk identifier: 0x275B40BB
MBR partitions:
Number Boot Start Sector End Sector Status Code
1 1 8191 primary 0xEE
2 8192 212991 primary 0x83
3 * 153305088 1201881087 primary 0x07 |
Any idea what's going on? I spent the last 5 hours or so installing Windows 7 to sda4 (MBR: sda3) and it worked fine. Not sure if that has anything to do with GRUB being unable to read the MBR, I forgot to check if it could read the MBR correctly before I started the Windows install. I've setup 4 other machines before using the same method (all Linux-only) and never encountered such a problem.
And unless GRUB 2 has been greatly improved on Gentoo since last year, I'm not willing to spend another couple of hours trying to figure out how to get it installing to disk... _________________ nohup nice -n -20 cp /dev/urandom /dev/null & |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
|
Back to top |
|
|
c00l.wave Apprentice
Joined: 24 Aug 2003 Posts: 264
|
Posted: Mon Sep 09, 2013 8:17 am Post subject: |
|
|
I tried again, this time asserting I see GPT partition numbers, not MBR, and it worked (hd0,3 for sda4 instead of hd0,2 for sda3@MBR). I'm just wondering: I read that GRUB Legacy is able to read GPT only with a patch. I suppose that is included in Gentoo? I still don't get why it worked on other systems by reading the MBR, though.
If it's just a hacky patch I'm not too surprised the partition types are all off. GRUB should have displayed 83, FD, 82, 07, 8E, FD in my case but shows all partitions as 83 instead. That's not too helpful when identifying partitions.
@Protective MBR: I have to use a hybrid MBR as I'm going to replace all older disks (2x 750GB, 1x 300GB) with 2x 3TB and maybe a SSD later on (that way, there's no pure MBR left to boot from except the optional SSD that I don't have yet). Windows can only install to GPT if the system is booting via UEFI which I don't have (mainboard is from 2007), so I have to rely on a hybrid MBR to get dual-boot. But good to know GRUB (on Gentoo) can handle GPT directly so I won't have to use hybrid MBRs in the future on Linux-only machines. _________________ nohup nice -n -20 cp /dev/urandom /dev/null & |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Mon Sep 09, 2013 6:16 pm Post subject: |
|
|
Disclaimer: gpt disk but with protective mbr:
Either entry works fine in grub.conf: Quote: | default 0
timeout 5
#splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Gentoo 3.10.9
root (hd0,0)
kernel /boot/vmlinuz-3.10.9-gentoo root=/dev/sdf1
title Gentoo 3.10.9 PARTUUID
root (hd0,0)
kernel /boot/vmlinuz-3.10.9-gentoo root=PARTUUID=c14c603c-c0fa-48d4-9124-36bd18e43756 |
PARTUUID available from blkid or gdisk or in /dev/disk/by-partuuid
I have an idle disk, will give building a hybrid mbr a shot, never tried it. _________________ Defund the FCC. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|