Saturday, November 21, 2015

Proxmox boot failure - missing proxmox entry from grub menu - caused by answering YES during upgrade

Proxmox boot failure - missing proxmox entry from grub - can not boot

I got into a problem during a proxmox upgrade.  I was trying to do a proxmox upgrade from 3.1 to 3.5.
I have performed this proxmox upgrade many times, however this time I answered the wrong question during grub upgrade. The question was “Upgrade GRUB 2 (continue without upgrading Grub 2)“, I should have answered NO, but I made a mistake and answered YES.

Answering yes, means grub configuration will not be updated, which is a huge mistake, and I did not realize this mistake until I reboot the server and realized that proxmox is missing from the grub menu, and it booted to memtest immediately.

I start googling and found that many people have experience this problem… most people have this same issue from a bug that proxmox had, and some people experienced error during upgrade, nevertheless the same solution may work for many of the proxmox grub installation / upgrade issues you may have.

Here are the steps I did to make my server boots properly again:

  1. BOOT TO EXISTING PROXMOX INSTALLATION USING PROXMOX CD / USB live drive

    on the proxmox boot screen, type in ‘pveboot’ and press enter.

    pveboot will allow you to boot into your existing proxmox installation (yes, the one you can not automatically boot into)
  2. FIX GRUB CONFIGURATION AND RE-INSTALL GRUB TO BOOT DEVICE

    nano /boot/grub/grub.cfg

    look for the first entry, similar to this:


    menuentry 'Proxmox Virtual Environment GNU/Linux, with Linux 2.6.32-43-pve' --class proxmox --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-2.6.32-43-pve-advanced-' {
    load_video
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 699b8223-64d7-4963-82b2-1b0c14db974a
    else
    search --no-floppy --fs-uuid --set=root 699b8223-64d7-4963-82b2-1b0c14db974a
    fi
    echo 'Loading Linux 2.6.32-43-pve ...'
    linux /vmlinuz-2.6.32-43-pve root= ro quiet
    echo 'Loading initial ramdisk ...'
    initrd /initrd.img-2.6.32-43-pve
    }


    replace whatever necessary to something that works (I compared and copied from another proxmox server I have - does not have to be same version)
    The menu entry below is the right one I copied from another hardware node:

  3. menuentry 'Proxmox Virtual Environment GNU/Linux' --class proxmox --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-' {
    load_video
    insmod gzio
    insmod part_gpt
    insmod ext2
    set root='(hd0,gpt2)'
    search --no-floppy --fs-uuid --set=root 699b8223-64d7-4963-82b2-1b0c14db974a
    echo 'Loading Linux 2.6.32-43-pve ...'
    linux /vmlinuz-2.6.32-43-pve root=/dev/mapper/pve-root ro quiet gfxpayload=text nomodeset
    echo 'Loading initial ramdisk ...'
    initrd /initrd.img-2.6.32-43-pve
    }
    I have bolded the text that I have noticed to be different and I have corrected
    Please note:
    - your Linux kernel version may be different, mine is 2.6.32-43-pve
    - your root UUID should be different, mine is 699b8223-64d7-4963-82b2-1b0c14db974aif you don't know your UUID you can type 'blkid' command to get a list of your device's UUID.
    - my root device path is /dev/mapper/pve-root because I use LVM partition, yours may be different.

    Then install the corrected configuration to your boot device:


    grub-install /dev/sda

    then we are done, we are ready to reboot


    reboot



The steps above took me hours to figure out. I hope this helps and saves somebody some time.

No comments:

Post a Comment