Centos installing grub problems suspect gpt problem

grub> root (hd0,0)
root (hd0,0)
 Filesystem type is ext2fs, partition type 0xfd
grub> setup (hd0)
setup (hd0)


But if you do:
root (hd1,0)
setup (hd1)

it does work, I think hd0/sda had a GPT partition that was not removed properly (what I did was just dd bs=512 count=1 the partition table from another drive since the partition table should be identical).

 Checking if "/boot/grub/stage1" exists... no
 Checking if "/grub/stage1" exists... yes
 Checking if "/grub/stage2" exists... yes
 Checking if "/grub/e2fs_stage1_5" exists... yes
 Running "embed /grub/e2fs_stage1_5 (hd1)"...  27 sectors are embedded.
succeeded
 Running "install /grub/stage1 (hd1) (hd1)1+27 p (hd1,0)/grub/stage2 /grub/grub.conf"... succeeded
Done.

==============
Checking for gpt with gdisk:

GPT fdisk (gdisk) version 0.8.10

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************


===========

gdisk /dev/sda
GPT fdisk (gdisk) version 0.8.10

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************


Command (? for help): p
Disk /dev/sda: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 4DE51E1D-DC93-43EC-B670-44A0A9FEE114
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 8-sector boundaries
Total free space is 5099 sectors (2.5 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              63         2120575   1.0 GiB     FD00  Linux RAID
   2         2120576        44066295   20.0 GiB    FD00  Linux RAID
   3        44066296       976768064   444.7 GiB   FD00  Linux RAID

Command (? for help): g
b    back up GPT data to a file
c    change a partition's name
d    delete a partition
i    show detailed information on a partition
l    list known partition types
n    add a new partition
o    create a new empty GUID partition table (GPT)
p    print the partition table
q    quit without saving changes
r    recovery and transformation options (experts only)
s    sort partitions
t    change a partition's type code
v    verify disk
w    write table to disk and exit
x    extra functionality (experts only)
?    print this menu

Command (? for help): r

Recovery/transformation command (? for help): p
Disk /dev/sda: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 4DE51E1D-DC93-43EC-B670-44A0A9FEE114
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 8-sector boundaries
Total free space is 5099 sectors (2.5 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              63         2120575   1.0 GiB     FD00  Linux RAID
   2         2120576        44066295   20.0 GiB    FD00  Linux RAID
   3        44066296       976768064   444.7 GiB   FD00  Linux RAID

Recovery/transformation command (? for help): ?
b    use backup GPT header (rebuilding main)
c    load backup partition table from disk (rebuilding main)
d    use main GPT header (rebuilding backup)
e    load main partition table from disk (rebuilding backup)
f    load MBR and build fresh GPT from it
g    convert GPT into MBR and exit
h    make hybrid MBR
i    show detailed information on a partition
l    load partition data from a backup file
m    return to main menu
o    print protective MBR data
p    print the partition table
q    quit without saving changes
t    transform BSD disklabel partition
v    verify disk
w    write table to disk and exit
x    extra functionality (experts only)
?    print this menu

Recovery/transformation command (? for help): g

MBR command (? for help): g
a    toggle the active/boot flag
c    recompute all CHS values
l    set partition as logical
o    omit partition
p    print the MBR partition table
q    quit without saving changes
r    set partition as primary
s    sort MBR partitions
t    change partition type code
w    write the MBR partition table to disk and exit

MBR command (? for help): g
a    toggle the active/boot flag
c    recompute all CHS values
l    set partition as logical
o    omit partition
p    print the MBR partition table
q    quit without saving changes
r    set partition as primary
s    sort MBR partitions
t    change partition type code
w    write the MBR partition table to disk and exit

MBR command (? for help): w

Converted 3 partitions. Finalize and exit? (Y/N): y
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot.
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.

===========
I can even do
root (hd1,0)
setup (hd0) and it will work.........but not hd0,0 even though both are in the same RAID array on the same partition


Tags:

centos, installing, grub, gpt, problemgrub, hd, filesystem, ext, fs, partition, xfd, sda, dd, bs, identical, quot, fs_stage, _, embed, sectors, embedded, succeeded, install, conf, gdisk, fdisk, scan, mbr, bsd, apm, invalid, valid, converting, format, potentially, destructive, typing, convert, partitions, dev, disk, gib, sector, bytes, identifier, guid, dc, ec, fee, entries, usable, aligned, boundaries, mib, fd, linux, raid, delete, detailed, transformation, experts, verify, functionality, header, rebuilding, hybrid, transform, disklabel, toggle, active, recompute, chs, omit, primary, converted, finalize, kernel, reboot, structures, utilities, array,

Latest Articles

  • QEMU / KVM How To Manually Create Basic Virtual Machine VM
  • Linux wlan0 check all wireless clients
  • PHP Issues With Decoding Strange Smart Quotes And Non-Standard ASCII Characters
  • /etc/iproute2/rt_tables default settings file in Linux Centos 6,7 and most other NIX's
  • bind named error solutions named[2169]: error (no valid DS) resolving / error (broken trust chain) resolving / : error (no valid RRSIG) resolving 'com/DS/IN':
  • iptables how to log ALL dropped incoming packets
  • How To Edit Linux Based NM Network Manager Connection Settings Without GUI
  • Linux Disable IPV6 Centos / Debian / Mint Howto
  • Linux use growisofs to burn a larger file on a BD-R / Bluray Disc
  • Linux partprobe/partx cannot access last and 4th partition
  • DRBD Errors Caused By Physical Corruption
  • mdadm: add new device failed for /dev/sdb4 as 3: Invalid argument solution
  • Linux named / bind how to dump, view and clear the cache!
  • Centos 6 / 7 / 8 How To Change Default nameservers in /etc/resolv.conf when using DHCP / dhclient
  • Adobe Acrobat Reader for Linux to use and view XFA Fillable Forms
  • Debian Linux Mint Ubuntu iptables save and restore settings automatically onboot and reboot
  • Why SMART is not smart at all and doesn't properly predict disk errors that cause a kernel panic or crash
  • scp: ambiguous target error and solution
  • VirtualBox How To Add iSCSI Storage using VBoxManage
  • iSCSI on Centos 7 Configuration and Setup Guide for Initiator and Target