Recover From Grub Failure: Difference between revisions

From Proxmox VE
Jump to navigation Jump to search
(Created page with "During to the upgrade from 3.x to 4.x, I found myself without a working grub and unable to boot. I attempted to use the proxmox 4.1 install disk, but found it had a bug where ...")
 
No edit summary
Line 7: Line 7:


First We need to activate LVM and mount the the root partition that is inside the LVM container.
First We need to activate LVM and mount the the root partition that is inside the LVM container.
sudo vgscan
*sudo vgscan
sudo vgchange -ay
*sudo vgchange -ay


Mount all the filesystems that are already there so we can upgrade/install grub.  Your paths may vary depending on your drive configuration.
Mount all the filesystems that are already there so we can upgrade/install grub.  Your paths may vary depending on your drive configuration.
sudo mkdir /media/USB
*sudo mkdir /media/USB
sudo mount /dev/pve/root /media/USB/
*sudo mount /dev/pve/root /media/USB/
sudo mount /dev/sda1 /media/USB/boot
*sudo mount /dev/sda1 /media/USB/boot
sudo mount -t proc proc /media/USB/proc
*sudo mount -t proc proc /media/USB/proc
sudo mount -t sysfs sys /media/USB/sys
*sudo mount -t sysfs sys /media/USB/sys
sudo mount -o bind /dev /media/USB/dev
*sudo mount -o bind /dev /media/USB/dev


Chroot into your proxmox install.
Chroot into your proxmox install.
chroot /media/USB
*chroot /media/USB


Then upgrade grub and install it.
Then upgrade grub and install it.
grub-upgrade
*grub-upgrade
grub-install /dev/sda
*grub-install /dev/sda


If there are no error messages, you should be able to reboot now.
If there are no error messages, you should be able to reboot now.


Credit: https://www.nerdoncoffee.com/operating-systems/re-install-grub-on-proxmox/
Credit: https://www.nerdoncoffee.com/operating-systems/re-install-grub-on-proxmox/

Revision as of 14:55, 14 March 2016

During to the upgrade from 3.x to 4.x, I found myself without a working grub and unable to boot. I attempted to use the proxmox 4.1 install disk, but found it had a bug where the prompt would not accept input.

You'll need a ISO for a 64 bit version of Ubuntu, I used 14.04 LTS.

Boot ubuntu off the ISO. We do not want to install ubuntu, just run it live off the ISO/DVD.

First We need to activate LVM and mount the the root partition that is inside the LVM container.

  • sudo vgscan
  • sudo vgchange -ay

Mount all the filesystems that are already there so we can upgrade/install grub. Your paths may vary depending on your drive configuration.

  • sudo mkdir /media/USB
  • sudo mount /dev/pve/root /media/USB/
  • sudo mount /dev/sda1 /media/USB/boot
  • sudo mount -t proc proc /media/USB/proc
  • sudo mount -t sysfs sys /media/USB/sys
  • sudo mount -o bind /dev /media/USB/dev

Chroot into your proxmox install.

  • chroot /media/USB

Then upgrade grub and install it.

  • grub-upgrade
  • grub-install /dev/sda

If there are no error messages, you should be able to reboot now.

Credit: https://www.nerdoncoffee.com/operating-systems/re-install-grub-on-proxmox/