Difference between revisions of "Reset Proxmox Root Password via GRUB"

From Notes_Wiki
(Created page with "Home > Debian > Proxmox virtual environment > Reset Proxmox Root Password via GRUB = Reset Proxmox Root Password via GRUB = == 1. Reboot the Proxmox Server == Restart the server from the terminal or via remote management. == 2. Interrupt the GRUB Bootloader == When the GRUB menu appears, quickly press <code>e</code> to edit the default boot entry. == 3. Modify the Boot Parameters == Locate the line starting with <code>linux</code> (e.g....")
 
 
(8 intermediate revisions by the same user not shown)
Line 5: Line 5:
= Reset Proxmox Root Password via GRUB =
= Reset Proxmox Root Password via GRUB =


== 1. Reboot the Proxmox Server ==
=== 1. Reboot the Proxmox Server ===


Restart the server from the terminal or via remote management.
Restart the server from the terminal or via remote management.


== 2. Interrupt the GRUB Bootloader ==
=== 2. Interrupt the GRUB Bootloader ===


When the GRUB menu appears, quickly press <code>e</code> to edit the default boot entry.
When the GRUB menu appears, quickly press ''' 'e' ''' to edit the default boot entry.


== 3. Modify the Boot Parameters ==
=== 3. Modify the Boot Parameters ===


Locate the line starting with <code>linux</code> (e.g., <code>linux /boot/vmlinuz...</code>).
Locate the line starting with linux (e.g., linux /boot/vmlinuz...).


At the end of this line, append:
At the end of this line, append:


<syntaxhighlight lang="bash">
<pre>
init=/bin/bash
init=/bin/bash
</syntaxhighlight>
</pre>


Example full line (for reference):
Example full line (for reference):


<syntaxhighlight lang="bash">
<pre>
linux /boot/vmlinuz-5.x... root=ZFS=rpool/ROOT/pve-1 ro quiet splash init=/bin/bash
linux /boot/vmlinuz-5.x... root=ZFS=rpool/ROOT/pve-1 ro quiet splash init=/bin/bash
</syntaxhighlight>
</pre>


== 4. Boot with Modified Settings ==
=== 4. Boot with Modified Settings ===


Press <code>Ctrl + X</code> or <code>F10</code> to boot with the modified parameters.
Press '''Ctrl + X''' or '''F10''' to boot with the modified parameters.


== 5. Remount Root Filesystem as Read/Write ==
=== 5. Remount Root Filesystem as Read/Write ===


Once you are at the shell prompt (e.g., <code>bash-5.1#</code>), run:
Once you are at the shell prompt (e.g., bash-5.1#), run:


<syntaxhighlight lang="bash">
<pre>
mount -o remount,rw /
mount -o remount,rw /
</syntaxhighlight>
</pre>


== 6. Reset the Root Password ==
=== 6. Reset the Root Password ===


Execute the following command:
Execute the following command:
Line 51: Line 51:
Enter and confirm the new root password when prompted.
Enter and confirm the new root password when prompted.


== 7. Reboot the System ==
=== 7. Reboot the System ===


Try to execute:
Try to execute:


<syntaxhighlight lang="bash">
<pre>
exec /sbin/init
exec /sbin/init
</syntaxhighlight>
</pre>


If that does not work, force reboot using:
If that does not work, force reboot using:


<syntaxhighlight lang="bash">
<pre>
reboot -f
reboot -f
</syntaxhighlight>
</pre>


== 8. Login with New Password ==
=== 8. Login with New Password ===


After reboot, you should now be able to log in as <code>root</code>
After reboot, you should now be able to log in as '''root'''




[[Main Page|Home]] > [[Debian]] > [[Proxmox virtual environment]] > [[Reset Proxmox Root Password via GRUB]]
[[Main Page|Home]] > [[Debian]] > [[Proxmox virtual environment]] > [[Reset Proxmox Root Password via GRUB]]

Latest revision as of 10:55, 5 June 2025

Home > Debian > Proxmox virtual environment > Reset Proxmox Root Password via GRUB


Reset Proxmox Root Password via GRUB

1. Reboot the Proxmox Server

Restart the server from the terminal or via remote management.

2. Interrupt the GRUB Bootloader

When the GRUB menu appears, quickly press 'e' to edit the default boot entry.

3. Modify the Boot Parameters

Locate the line starting with linux (e.g., linux /boot/vmlinuz...).

At the end of this line, append:

init=/bin/bash

Example full line (for reference):

linux /boot/vmlinuz-5.x... root=ZFS=rpool/ROOT/pve-1 ro quiet splash init=/bin/bash

4. Boot with Modified Settings

Press Ctrl + X or F10 to boot with the modified parameters.

5. Remount Root Filesystem as Read/Write

Once you are at the shell prompt (e.g., bash-5.1#), run:

mount -o remount,rw /

6. Reset the Root Password

Execute the following command:

passwd

Enter and confirm the new root password when prompted.

7. Reboot the System

Try to execute:

exec /sbin/init

If that does not work, force reboot using:

reboot -f

8. Login with New Password

After reboot, you should now be able to log in as root


Home > Debian > Proxmox virtual environment > Reset Proxmox Root Password via GRUB