Help! Upgraded remote server from Squeeze to Wheezy, grub install fails
Hi all, I have a remote server hosted by Hetzner over in Germany (I am in US), so I don't have console access. It has software RAID1 over two 3TB SATA drives. It came with Debian Squeeze by default, and I have to upgrade it to Wheezy, so I just went through that process with apt-get. Everything went well until it came time to install grub. It gave me four choices on where to install, namely something like (from memory):
It said if I didn't know which partition the machine was set to boot off, then it was probably safe to install on all of them, so I just checked all. It segfaulted and failed to install. So I unchecked the md entries, just so that the dist-upgrade could finish, and it succeeded... but I don't think that was right.
The apt-get dist-upgrade finished. Currently I am still running in the original kernel, not rebooted yet.
I know that with the big 3TB disks, it uses GPT rather than MBR - I became aware of this when Hetzner had to replace one of the RAID drives and I had to copy the partitions over to the new one, but I don't know what this means in terms of installing grub.
Apparently /boot is on /dev/md1, / is on /dev/md2 and /home is on /dev/md3.
I guess to summarize: Could anyone just lead me through the steps I need to do here in order to get a successful remote grub install on a GPT RAID1 system? When I finally come to reboot, I'd like the server to actually come up again...
Thanks very much,
Update: I eventually found this page:
It talks specifically about installing Grub2 on RAID1 - namely, it seems like it's ok to do the grub-install on each of /dev/sda and /dev/sdb.
Then, separately I found that for GPT, you need to have a small partition that is not used for anything else, but is simply marked as "bios_grub". Using parted, I was able to confirm that this already exists on my system:
1. Use swapoff to disable swap partition, and comment it out of /etc/fstab
2. Use parted to delete the swap partition
3. Create a new small partition (I gave it 100MB)
4. Use parted to set bios_grub to "on" on the new partition (e.g. if the new partition number is 4, then you would put 'set 4 bios_grub on' in parted command line - make sure you have the partition number right!)
5. Create new swap partition with remaining space
6. mkswap on new swap partition
7. Add uuid of new swap partition back to /etc/fstab
Then I was able to do grub-install without error. Phew!
I got the info on how to use parted to enable bios_grub from here:
I don't know why this has to be so complicated, lots of people use RAID and GPT is common now with larger drives. I really had to hunt around to find this stuff. I'm just noting it down here in case it might be useful to anyone else (and also as a note to my future self).
|All times are GMT -5. The time now is 07:05 PM.|