update-grub2 hanging with 6.1 while using my "boot NVME via USB" workaround

gadgetfreak

Member
Mar 27, 2019
4
0
21
40
Hello,
I'm using an NVME Drive (Samsung EVO 970) with a PCIe->M.2 adapter on a Dell R710. The Dell R710 does not support NVME booting so I've made myself a tutorial, gathered from other tutorials on the internet, to move the /boot partition to an USB drive (connected to the internal USB port) at the end of the proxmox setup. I've been using this procedure with a proxmox 5.3 installation and for nearly one year proxmox runs without a problem. (see procedure at the end of this post)
Now I wanted to install another R710 with exactely the same hardware setup. I tried the same procedure with the current proxmox 6.1 installer but it hangs forever at the last "update-grub2" command.
As the first machine is still running 5.3 and I didn't want to risk an failed upgrade to 6.1 I tried this path with the second machine, installing proxmox 5.3 with my procedure. Afterwards I upgraded it to 6.1 via apt and the system still boots without any problems!
I'm now curious why my process does not work during the 6.1 setup?
Could someone tell me if there is some fundamental fault in my /boot setup which might break with some other upgrade?

# At the end of the Setup use Strg+Alt+F1 to get to the terminal
lsblk #to check which one is the USB drive
fdisk /dev/sdX
#Next steps ins fdisk
#g
#n
#1
#2048
#+1M

#n
#2
#4096
#+8G

#t
#1
#04

#w #quits fdisk

mkfs.ext3 /dev/sdX2

mount /dev/mapper/pve-root /target
mv /target/boot /target/boot-old
mkdir /target/boot
mount /dev/sdX2 /target/boot

cp -ar /target/boot-old/. /target/boot/

lsblk /dev/sdX2 -o PARTUUID >> /target/etc/fstab

nano /target/etc/fstab
#correct new entry to following line
#PARTUUID="xxxxxx-xxxx-xxxx-xxxx-xxxxxxxx" /boot ext3 errors=remount-ro 0 1

mount -t proc none /target/proc
mount -o bind /dev /target/dev
mount -t sysfs sys /target/sys
chroot /target /bin/bash
update-initramfs -u
update-grub2 #this is where it fails with 6.1 installer
grub-install /dev/sdX
sync
 
Hi,
update-grub2 is a stub for running grub-mkconfig -o /boot/grub/grub.cfg.
You could try to run it without the -o option and check if you get the output to stdout.
Is /boot correctly mounted and writable in the chroot environment?
 
Hello,
thank you first for answering so fast and sorry for the late feedback.
With grub-mkconfig /boot/grub/grub.cfg I also get absolutely no output, the same as with update-grub2.
And /boot should be mounted correctly, I created under /boot a text file with nano and filled it with random data to test if its writeable!
Is there any other place I could look into to find out what is going wrong? I'm not so familiar with linux and was very happy/lucky to get all the pieces together to get the first system running so I would be very glad if someone could point me into the right direction!
 
Well, running grub-mkconfig should give you an output. Try to check the output of which grub-mkconfig and file $(which grub-mkconfig) in order to see if it points to the correct shell script.
Maybe the script is corrupt?
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!