Grub and Install Device Selection

drott

Member
Apr 18, 2012
53
0
6
USA
Hello,

I see with the latest dist-upgrade there is a new Grub. Which is ok but this time it was a bit different so I followed the prompts to do a No. I then asked for Grub Install Devices. I have three options 1) /dev/sda (599932)MB; Logical Volume; 2) - /dev/sda (535 MB: /dev/sda1) and 3) /dev/dm-o (103079 MB; pve-root)

I checked on my other server that has not been upgraded yet and check in /boot/grub/grub.cfg to get a hint as they they are the same servers and running Proxmox 3.3.

I am inclined to check /dev/sda Logical Volume) but really don't want to botch a production server.

Normally grub picks up on an upgrade where it was originally loaded?

Here is original Config

Filesystem 1K-blocks Used Available Use% Mounted on
udev 10240 0 10240 0% /dev
tmpfs 3293060 380 3292680 1% /run
/dev/mapper/pve-root 99083868 3400168 90650536 4% /
tmpfs 5120 0 5120 0% /run/lock
tmpfs 6586100 3108 6582992 1% /run/shm
/dev/mapper/pve-data 445086800 150723612 294363188 34% /var/lib/vz
/dev/sda1 506724 293853 186708 62% /boot

From grub.cfg
set root='(pve-root)'
search --no-floppy --fs-uuid --set=root 8467c8c7-7445-4b58-9414-903fd80b5465

menuentry 'Proxmox Virtual Environment GNU/Linux, with Linux 2.6.32-34-pve (recovery mode)' --class proxmox --class gnu-linux --class gnu --class os {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 8fa8c452-037c-4bf7-bf80-ce28459b385e
echo 'Loading Linux 2.6.32-34-pve ...'
linux /vmlinuz-2.6.32-34-pve root=/dev/mapper/pve-root ro single
echo 'Loading initial ramdisk ...'




Thanks for help on this question.
 
Last edited:
Looks like I may have also run into this issue with grub. :(

I just finished installing v3.3 on a clean PowerEdge 415 with 2 drives in raid1 config.

All went well so I setup the "pve-no-subscription repository" and did a apt-get update && apt-get dist-upgrade.

At some point during the upgrade it stopped and asked if I wanted to skip the upgrade of grub. It warned that there might be issues if I skipped the upgrade so I choose "no" to not skip. It then showed me a list of 3 partitions and asked which one to place the grub onto, I chose the one that I thought was correct but when I rebooted, grub had the error: file not found and gave the prompt grub rescue>.

One note: there are a couple of other servers that I was also going through the same process with and since I ran into this issue on the first one, I decided to run "update-grub" and "grub-install /dev/sda" before rebooting. These servers seem to boot ok.

Anyone have any ideas on how to fix the server with the grub rescue mode issue?

Thanks,

-Glen
 
Hi. Thanks for the quick response.

This is the first time I have run in to this and have been using proxmox since the 1.9 days. This server started off as a 2.2 and has been a 3.3 for quite some time. I have not seen Debian behave this way.

The good is I am still have the screen up to answer the prompt, the bad its a production non clustered server and the ugly upgrade was done via SSH and not running screen. So I am at the mercy of the power gods and losing the ssh session. :) and walking down the hall way to the server.

I guess my first hunch would have been wrong.

I went to /dev/disk/by--uuid and found my SDA1 points to the referenced uuid in grub.cfg. That begs the question is if we use the the /dev/sda? will that have an impact down the road since many systems favor uuid. I know that the the uuid is a link to the /dev/sda1

Interesting problem. I have done some googleing and found some references to various products referenced in some UBUNTU formus that seem to inducate there was a product out there that could help. I wan to get this researched if I really crater hard.

Thanks a million.
 
Hi.

Below is what grub.cfg has for its orginal configuration and the one post update.

I see some large differences between the orginal and what it changed to in terms of the root partition. The concern is the change in set root= which pre update pointed to pve-root and post grub update points to the LVM

I have yet to reboot dueto an abundance of caution.

Thanks in advance for you help.

Original:

insmod lvm
insmod part_msdos
insmod ext2
set root='(pve-root)'
search --no-floppy --fs-uuid --set=root a827cb31-6dfd-4676-b3e1-edebf2666230
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 8a5a84ac-676a-46c0-988f-bbbededc21e5
set locale_dir=($root)/grub/locale
set lang=en_US
insmod gettext
fi

Updated grub.cfg elements.

I selected /dev/sda1 as the partition. It did find the older Kernels etc but it set root to the LVM partition vs the original which was pve-root. I see the if statement which does show the the uuid of /dev/sda1.

if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod lvm
insmod ext2
set root='lvmid/JbHhsf-5KdJ-1fYg-Ipbo-gAY1-9Jcq-KAqchK/GOGmsg-rqyA-9V10-vxbz-HMEB-KNIh-u87MxW'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='lvmid/JbHhsf-5KdJ-1fYg-Ipbo-gAY1-9Jcq-KAqchK/GOGmsg-rqyA-9V10-vxbz-HMEB-KNIh-u87MxW'
8467c8c7-7445-4b58-9414-903fd80b5465
else
search --no-floppy --fs-uuid --set=root 8467c8c7-7445-4b58-9414-903fd80b5465
fi
font="/usr/share/grub/unicode.pf2"
fi
 
Last edited:
Hi

Thanks for the help.

I did a grub-install /dev/sda as the boot device it boots except, I lost the ability to select the older kernels. I see Proxmox listed as the boot optionin the list.

Should I do a grub-install /dev/sda1 so in the event I need to go back to a prior kernel. Will this affect future kernel upgrades etc.


Thanks in advance.

Wk