0

Was able to successfully install a fully functional virtualized Kubuntu/Ubuntu 24.04 Server on my Apple M2 Max MacBook Pro using UTM 4.5.3 (99) as the hypervisor.

However, I forgot my user's password and tried running it in recovery mode but there is no root user or recovery mode option in GRUB:


         GNU GRUB version 2.12

*Try or Install Ubuntu Server Boot from next volume UEFI Firmware Settings

When trying to edit:

setparams `Try or Install Ubuntu Server`
    set gfxpayload=keep
    linux         /casper/vmlinux   --- 
    initrd         /casper/initrd 

Tried appending rw init=/bin/bash to following line (and also removed the ---) as follows:

 linux         /casper/vmlinux rw init=/bin/bash

It outputs:

   Booting a command list

EFI stub: Booting Linux Kernel... EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path EFI stub: Generating empty DTB EFI stub: Exiting boot services...

It hangs there and nothing happens?

How can I run Ubuntu 24.04 Server in Recovery mode so I can issue the following command?

mount -o remount,rw /

If there is an alternative way to reset my password is also greatly appreciated...

1 Answers1

0

If you want to start the recovery mode instead of the normal live session, edit the kernel line in the menu entry like this example:

linux /casper/vmlinux boot=casper recovery nomodset --

In this recovery mode you can create new user:

adduser username 
adduser username sudo 
adduser username adm

Replace username by your name. Now you can exit the recovery mode and log in with the new user to the live session. also you can change the password of the user. for your information, the normal live session don't require the password, but you can change the password for any user:

passwod username

Replace username by the user name that you want to change his password.

Talaat Etman
  • 1,340