[SOLVED] Resetting Root Password Problem (ZFS)

ShooterMcGavin

New Member
Sep 15, 2023
3
1
3
I've searched though many forum posts about resetting the root password for Proxmox but I seem to be in a debacle because every option keeps hitting a wall. TBH, I should just re-install Proxmox at this point since its outdated. My main dedication is because I have a TrueNAS VM that I created that I wanted to see if I can get back.

I have a desktop and a server that I set up a couple years ago both with Proxmox. They were working fine and probably still do, however I stopped using them for a year and have no idea what the passwords were set too.

The desktop was super easy because it is setup simple and showed me a GRUB menu so I was able to reset the password. However, the server is another situation.

I can only blame myself because I set it up this way. I have two separate PCIe NVMe adapters that are running Proxmox in ZFS Raid 1 (I believe). In order to boot Proxmox, I use Clover Bootloader to select the NVMe drives. It can load the current installed Proxmox fine. When I select the drive from the bootloader, it goes straight to loading Proxmox. There is no GRUB menu. I've tried many things that I can't keep track. The number one thing that was suggested was to use a Live CD to reset the password. However, within the NVMe drives it does not show a Linux partition. It only allows me to mount dev2 but I can't do anything with it as well as the other partitions. Some other post talked about ZFS utility on Ubuntu which I installed but not fully sure what to do with it.

If this can't be resolved, would it be possible to re-install Proxmox and bring over my current drive configurations. I don't want to wipe them if I don't have too, but there's nothing super important on it so it not that big of a deal.

NVMe (1 & 2):
/dev/(name)1 - BIOS boot
/dev/(name)2 - System
/dev/(name)3 - Solaris /usr & Apple ZFS

Server:
Dell PowerEdge R720
BIOS: 2.9.0 (Latest)
Drives: 16 drives (8 for Proxmox VMs // 8 for TrueNAS VM) (Maybe RAID 10 for each set, I don't remember)

Proxmox Version:
Desktop - Updated from 5.1.3 to 7.4
Server - 5.1.3

I'm also open for recommendations for a better storage configurations if they are any. I just like having fault tolerance. Now only if I could implement this mentality into my gaming pc which has none.
 
I've searched though many forum posts about resetting the root password for Proxmox
It's Linux, so every way works and the easiest is to use init=/bin/bash on the kernel command line, remount your FS, passwd and reboot. That's it. Nothing complicated and this worked for many decades. Have yout tried that?
 
It's Linux, so every way works and the easiest is to use init=/bin/bash on the kernel command line, remount your FS, passwd and reboot. That's it. Nothing complicated and this worked for many decades. Have yout tried that?
I think the problem I'm facing is getting to the Kernel command line since I don't have GRUB as an option. I should have Systemd-boot, but I'm not sure if its getting replaced by Clover. I'm only using Clover because I read that was the only way to boot from PCIe NMVe drives.

When I try to mount any of the three partitions within a Live CD, this is what it says:

Partition: /dev/(name)1 - BIOS boot
Output: Wrong FS type, bad option, bad superblock on /dev/(name)1, missing codepage or helper program, or other error

Partition: /dev/(name)2 - System
Output: I can mount this partition but when I try to chroot, it say failed to run command '/bin/bash'

Partition: /dev/(name)3 - Solaris /usr & Apple ZFS
Output: Unknown filesystem type 'zfs_member'
 
Last edited:
I think the problem I'm facing is getting to the Kernel command line since I don't have GRUB as an option. I should have Systemd-boot, but I'm not sure if its getting replaced by Clover. I'm only using Clover because I read that was the only way to boot from PCIe NMVe drives.
I assume that that is specific to your system? I have no experience with Clover but other systems boot fine from PCIe NVMe drives. With systemd-boot you can also press e during the (short) boot menu.
When I try to mount any of the three partitions within a Live CD, this is what it says:

Partition: /dev/(name)1 - BIOS boot
Output: Wrong FS type, bad option, bad superblock on /dev/(name)1, missing codepage or helper program, or other error

Partition: /dev/(name)2 - System
Output: I can mount this partition but when I try to chroot, it say failed to run command '/bin/bash'

Partition: /dev/(name)3 - Solaris /usr & Apple ZFS
Output: Unknown filesystem type 'zfs_member'
You need a Live CD with (new enough) ZFS support (like the Proxmox installation ISO) and zpool import the rpool on the third partition. Then chroot into that and change the root password.
 
I assume that that is specific to your system? I have no experience with Clover but other systems boot fine from PCIe NVMe drives. With systemd-boot you can also press e during the (short) boot menu.
This might be a Dell PowerEdge thing. I could be wrong, but when I first put the NVMe drives in the server they were detected within the boot menu. After I installed proxmox and set them to a RAID configuration, they were no longer seen in the boot menu so I needed a seperate boot loader to detect them.

You need a Live CD with (new enough) ZFS support (like the Proxmox installation ISO) and zpool import the rpool on the third partition. Then chroot into that and change the root password.
This looks promising. I went though more forums and wiki pages to learn about the zfs commands. I'm now aware that the pve-1 is the root file system for ZFS. I am able to see all three RAID configurations with the zpool list and was able to mount the rpool. However, I'm having trouble doing anything about importing the pool to a partition. I could easily be missing syntax. I can change mount points and CD into them but they show no files. I will keep looking around, but you may have more insight.

Name:
rpool
rpool/ROOT
rpool/ROOT/pve-1
rpool/data

Edit:
--------
After a couple more forums. I was able to combine what they were stating to resolve this issue.

Essentially, I changed the mountpath of pve-1 to /mnt and was able to CD into the dir and edit the shadow file to remove the root password. Once I booted proxmox, it got stuck in the boot process after showing all the connected drives. However, after booting again and hitting Ctrl+D it was able to proceed the rest of the boot. I was able to login to root with no password. Now I just have to deal with the networking since that changed since the last time I used it.

I have now reconfigured the networking and my proxmox node is right were I left it. My TrueNAS VM is present and working with my RAID drives.


I want to thank leesteken for pointing me in the right direction. I've learned a lot more about ZFS.
 
Last edited:
  • Like
Reactions: leesteken
I changed the mountpath of pve-1 to /mnt
This can be easily done by importing the pool to a directory instead of just importing. With this, all mountpoints are shifted to the subdirectory and the ROOT/pve-1 is then the base of the new mountpoint, which is what you want in this case:

Code:
zpool import -R /mnt <pool>
 
  • Like
Reactions: leesteken

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!