Rescue Shell timeout

I am trying to reset my root password using the steps found here: http://rockstor.com/docs/reset-root-password.html

After selecting “Rescue a RockStor System” in step 2, I eventually get dracut-initqueue timeout errors, and drop to the emergency shell. I’m not very familiar with Linux, but my searching pointed me to a possible bad USB image. I did try re-burning my USB key with Rufus (using the DD option), and tried a second USB key. The “Test this media and Install Rockstor” returned a “Pass”.

I can access my storage for now, but I’d like to reset my root password.

Failing that, If I set up a new system disk, would I be able to import my existing drives?

@digitalsawdust Welcome to the Rockstor community.

Yes this is a bug in our latest iso (3.9.1 as of writing) where we accidentally have a “3.0” which should be “3”. The work around is fiddly but easy.

Please see the Note: section at the end of Step 7 of theMirroring Rockstor OS using Linux Raid howto as the rescue system is also required in that howto and has the work around kindly documented by forum member @HBDK. See the following forum thread for the backround:

Yes, assuming you have not created any shares on the system (rockstor_rockstor) pool; the import procedure is at the end of our Reinstalling Rockstor in the Data Import sub section. You might also want to take a look at the Restoring Configuration subsection that follows directly on from the Data Import one. Only useful if you have also saved and downloaded a config backup before hand of course; please see the Configuration Backup and Restore doc section, it’s linked in the prior Restoring Configuration section but I’ve linked here for convenience. But better / potentially less disruptive to just reset your root pass really as then your existing config is unaffected.

Hope that helps and let us know how you get on.

@digitalsawdust Sorry but I just noticed this more directly relevant post, linked in one of the ones I’ve just posted as it goes:

States the same procedure but in a different way so might been useful to understand the required procedure.

Hope that helps some more :slight_smile:

Changing the boot parameter got me into the rescue shell.

On the next step,

-4.2# chroot /mnt/sysimage

I’m getting an error

chroot: failed to run command /bin/bash : no such file or directory

/mnt/sysimage is there, but it does appear empty.

Showing my inexperience with linux now, but does it matter that my system disk is also a USB key?

@digitalsawdust Hello again.

I think I see what’s happened here.

You correctly changed the “3.0” to “3” after pressing the TAB key while the “Rescue a Rockstor system” but you may then have selected “Skip” (as per later section of Step 7 on raid howto) rather than the required “Continue” as per “Resetting root password”.

Skip - as in skip the /mnt/sysimage:

The rescue environment will now attempt to find your Linux installation and mount it under the directory /mnt/sysimage.

But we need this mounted prior to the chroot command.

Sorry I should have said that all you need of my “Step 7” reference was the 3.0 to 3 change. After that continue as per the “Resetting root password” howto, ie select “Continue” not “Skip” or “Read-Only”.

However, having just tested this procedure on both a pcie-msata based system disk and a USB key install I got the following:

“You don’t have any Linux partitions. The system will reboot automatically when you exit from the shell.”
followed by:
“Please press to get a shell.”
So if you get this then you will have to enter this shell and mount your root manually before proceding with the rest of the howto:

First find your system disk/partition:

lsblk

Look for the sd*3 partition where the ‘*’ is a letter. There should be only one.
In my test here it was named sdc3

mount -t btrfs -o subvol=root /dev/sd*3 /mnt/sysimage

or alternatively you could find the device by it’s by-id name, which in your case will begin with a “usb-…”, as the name begins with the bus type, and use that instead of the sd*3 bit above (in this case use the device ending in part3).
An example of manually mounting the sysimage via by-id name for a usb Sandisk-Extreme:

mount -t btrfs -o subvol=root  /dev/disk/by-id/usb-SanDisk_Extreme_AA01127.....-0:0-part3 /mnt/sysimage

Hint here is that once you get to the “… /dev/disk/by-id/” bit you can press the TAB key to auto suggest the available device names.

Assuming that mount command succeeded you can proceed with the howto ie with the “chroot /mnt/sysimage” step, now that the installed system’s root has been mounted there.

This procedure was successfully for me in changing the root password on one of my usb Sandisk Extreme based systems here.

Unfortunately I don’t currently know why the sysimage wasn’t successfully mounted (probably another ‘3.0’ / ‘3’ mismatch elsewhere) but this manual mount should suffice for you to do a password reset as per the howto.

Do let us know how it goes for you and if the manual mount was 1: necessary, and 2: worked for your.

Also once your root password reset is accomplished you could take a look at the rather fancy (and as yet undocumented) password reset / OTP / pincard mechanism coded and contributed by @Flyer. See the card icon in the actions column of a user’s entry in:

System - Users

Hope that helps and thanks for persevering.

Thank you for the help. I was able to reset my root password.

This is what I was seeing after pressing “1” to continue:

This is what worked for me:

I also tried the second method that you suggested:

but, pressing TAB did not provide any suggestions.

I will try the PIN card method when I get a chance to configure e-mail access for rockstor.

Thanks again for the help.