6

I've been trying all day to get my new Wheezy install completed but it fail to install Grub every time. I'm using x64 netinstall iso.

Here is my partition table:

Model: ATA ST3000DM001-1CH1 (scsi) Disk /dev/sda: 5860533168s Sector size (logical/physical): 512B/4096B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 2048s 6143s 4096s grub bios_grub 2 6144s 1953791s 1947648s boot raid 3 1953792s 31250431s 29296640s root raid 4 31250432s 5860532223s 5829281792s home raid 

Disk /dev/sdb has the same partition table. You can see I've added that infamous small partition and marked it as bios_grub to give Grub space because GPT takes more than legacy msdos table.

Error message I get from installer is "Failed to install Grub to /dev/sda" (or similar).

Partitions 2, 3 and 4 make three RAID1 partitions for /boot, /, and /home. All properly selected and formatted in Debian installer.

Please help!

2 Answers 2

3

Looks like somehow Debian installer screws up the partition table. The "bios_grub" flag gets removed and becomes "raid" flag. The fix is to rework the partition table again with parted and set it back.

parted /dev/sda set 1 bios_grub on quit 

Same for /dev/sdb, and then chrooting and installing grub with answer from this question: How can I fix/install/reinstall grub?

1

you can also set grub partition with gdisk(8)

 Command (? for help): t Partition number (1-4): 1 Current type is 'BIOS boot partition' Hex code or GUID (L to show codes, Enter = 8300): EF02 Changed type of partition to 'BIOS boot partition' 

Important thing to note is that you CANNOT reuse your existing /boot or any other partition for this - 64KB might be enough (it should be just big enough to fit your /boot/grub/i386-pc/*.img files), but there is usually about 1MB free which is way more than enough.

If the partition was missing instead, you could have create New one, there is even usually enough space free before your first partition. For example, then it would be like:

 # gdisk /dev/sdb Command (? for help): p Disk /dev/sdb: 7814037168 sectors, 3.6 TiB Logical sector size: 512 bytes Disk identifier (GUID): CEFE1861-C13E-4E30-AEC4-0037CA6CBE8D Partition table holds up to 128 entries First usable sector is 34, last usable sector is 7814037134 Partitions will be aligned on 2048-sector boundaries Total free space is 2014 sectors (1007.0 KiB) Number Start (sector) End (sector) Size Code Name 1 2048 3893247 1.9 GiB 0700 Microsoft basic data 2 3893248 12281855 4.0 GiB 8200 Linux swap 3 12281856 12806143 256.0 MiB FD00 Linux RAID 4 12806144 7814037134 3.6 TiB FD00 Linux RAID Command (? for help): n Partition number (5-128, default 5): First sector (34-2047, default = 34) or {+-}size{KMGTP}: 34 Last sector (40-2047, default = 2047) or {+-}size{KMGTP}: Current type is 'Linux filesystem' Hex code or GUID (L to show codes, Enter = 8300): EF02 Changed type of partition to 'BIOS boot partition' Command (? for help): p Disk /dev/sdb: 7814037168 sectors, 3.6 TiB Logical sector size: 512 bytes Disk identifier (GUID): CEFE1861-C13E-4E30-AEC4-0037CA6CBE8D Partition table holds up to 128 entries First usable sector is 34, last usable sector is 7814037134 Partitions will be aligned on 2048-sector boundaries Total free space is 6 sectors (3.0 KiB) Number Start (sector) End (sector) Size Code Name 1 2048 3893247 1.9 GiB 0700 Microsoft basic data 2 3893248 12281855 4.0 GiB 8200 Linux swap 3 12281856 12806143 256.0 MiB FD00 Linux RAID 4 12806144 7814037134 3.6 TiB FD00 Linux RAID 5 40 2047 1004.0 KiB EF02 BIOS boot partition Command (? for help): w Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!! Do you want to proceed? (Y/N): y OK; writing new GUID partition table (GPT) to /dev/sdb. Warning: The kernel is still using the old partition table. The new table will be used at the next reboot. The operation has completed successfully. 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.