[SOLVED] Fix file on ZFS drive

mproxk

Member
Jun 2, 2019
18
1
23
41
I was using https://www.rodsbooks.com/refind/ from USB stick to boot the Proxmox 5. I think the installer was not seeing the disk at the time so I probably installed Proxmox in a different computer and then moved it in the new one.. and booting worked with the help of eEFInd,

Now two years later I upgraded my whole cluster to version 6. I noticed that on this node I was getting unknown status for all CTs and no stats. The reason was that it was using the older 4.5 kernel. There is a config file in /boot/refind.conf that lists only a single kernel. That file is on the ZFS pool not the stick.

Instead of adding an item I replaced it with the new kernel. All fine, just that there is an error on boot, ZFS ARC is having a bad value (some illegal character at the end after the digits). I was probably not running 'update-initramfs -u' to apply ZFS tweaks and even after few upgrades I was still using older kernel.

Now the question is.. how to edit that file /boot/refind.conf ? I can put the disk in a different proxmox box if it is easier that way. I want to boot in the older kernel, fix the ZFS config file, update-initramfs and then try kernel 5.4 again.

Any other ideas how to fix this or eventually totally forget the stick would be great.
 
the PVE-ISO since PVE 5.4 installs the kernel images on a vfat partition for ZFS installs on UEFI systems. With the release of PVE 6.4 (today ! :) this also applies to legacy bios boot systems with ZFS.
This is due to the problems grub has reading zpools setup with newer versions of ZFS.

My suggestion - if possible - try installing PVE 6.4 on a separate disk and see if your system works with that - should be much more hassle free :)

see
https://pve.proxmox.com/pve-docs/chapter-sysadmin.html#sysboot
for documentation

I hope this helps!
 
I will probably reinstall the node. But at the moment I would like to fix that file and start the node so I can relocate the CTs. I do have 3 days old backups but would like to have the latest images.

Can you give me the steps? I attached the drive on a different Proxmox node, but not sure how to mount the pool in a arbitrary path with different name (rpool is in use)
 
Can you give me the steps?
don't have any experience with refind ... neither with the custom setup - but I guess anybody with experience would need the refind.conf as it currently is on your USB stick.

My guess is that it should be possible to place a current pve-kernel + initrd from the system on the usb-drive and let the refind config boot that

else - I personally find the arch-wiki on most topics quite helpful:
https://wiki.archlinux.org/index.php/REFInd

I hope this helps!
 
  • Like
Reactions: mproxk
refind.conf is not not on the stick, that is the problem, it is on the / of the ZFS drive (in /boot subfolder).

When the PC boots from the stick, refind scans all the disks and if it finds a config, it imports the entries. The file contains only boot item to the latest kernel. I need to modify the file first. So not really refind issue... just how to edit files from one proxmox disk (now attached as external usb drive) in another proxmox computer. This is how it looked lie before I changed it to the latest kernel


viber_image_2021-04-27_20-28-33.jpg
 
When the PC boots from the stick, refind scans all the disks and if it finds a config, it imports the entries.
as far as i can tell (from https://wiki.archlinux.org/index.php/REFInd) - refind does not have support for reading ZFS - so the kernel and initrd need to be somewhere apart from the zfs disk.

what's the output of `find /mnt/to/usb` - when the usb-stick is mounted on /mnt/to/usb ?

ust how to edit files from one proxmox disk (now attached as external usb drive) in another proxmox computer.
if it is a zfs on root install you should see the pool when typing
`zpool import`
if you don't have another rpool you should be able to import it with `zpool import rpool` (else import it under a different name (see `man zpool`)

in all cases make sure the pool is then exported with a name of rpool (else the original system will not be able to import it)
 
  • Like
Reactions: mproxk
Hmmm, you are right. I fixed it. I have bad sectors in my brain, not sure why I was looking the file there :/

/mnt/usb-stick# nano ./efi/boot/refind.conf

Thanks a lot!!!
 
  • Like
Reactions: Stoiko Ivanov
Glad you solved the issue! :)

please mark the thread as 'SOLVED'
Thanks!
 

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!