All passwords forgotten/ recovery from live-cd?

Dear Experts,
I have a problem. I have forgotten all passwords (don´t ask why :slight_smile: ) for my linux laptop with manjaro (kde edition).
Browsing the internet I found the possibility to do this with an Live CD and mount the the root partition of the hard drive.
In most tutorials I see the old /dev/sda name and I cann´t translate this to the name scheme of nvm-ssds of today. Or is there a linux command to do this ?
Trying findmnt /dev/nvme0 didn´t show any result at all.

Greetings and thanks in advance
Andreas

manjaro-chroot should normally take care of this, provided that the filesystem is ext4. It should have been patched for btrfs by now — I wrote the patch myself — although I’m not sure whether the patched version is already included in the new ISOs.

That said, you can also always use the filesystem’s UUID or (if set) filesystem LABEL for mounting.

1 Like

Findmnt expects a partition. So it will be something like /dev/nvme0n1p2 if the second partition is the root. lsblk will list all partitions and you can then guess what is what from the sizes.

2 Likes

I’m afraid that recovering human memory is beyond the scope of the Manjaro forum; however, having forgotten all passwords is indeed a problem.

A possible resolution is to boot with a Manjaro Installer ISO (creating Ventoy USB is recommended) and copy your /home content to another location.

Then perform a fresh install – write down any passwords on an old-fashioned notepad and keep it in a safe place – and then restore your /home data when done.

There is no tool to translate this – one has to use whatever innate intelligence one may have and perform some research.

As you have already found, the syntax differs between HDD/SSD and NVMe disk types. :eyes:

These differences are rather simple once the pattern becomes more familiar and the purpose of each part of that syntax is understood:

For SATA/HDD:

/dev/sdXY

In the case of a HDD or SDD, substitute X and Y in the above template for the disk and partition to reference:

  • X is the disk node (sda, sdb, sdc, etc)
  • Y is the partition number (sda1, sda2)

For NVME:

/dev/nvmeXnYpZ

In the case of an NVMe, substitute X, Y and Z in the above template for the controller, disk and partition to reference:

  • X is the NVMe controller
  • Y is the disk node
  • Z is the partition number

Note that the X is relevant when you have multiple NVMe devices in play; otherwise, it will typically be the first and only controller (0), so one can focus on Y and Z.


I hope this was helpful.

Regards.

2 Likes

Thanks for the help and detailed explanations.
The tip with “manjaro-chroot” solved the problem.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.