Today I messed up and it's got my stomach in knots. I switched to my windows ssd for a legacy task that i have yet to migrate to linux. After I finished, i told the laptop to shut down. Then, perhaps too quickly, i closed the lid, flipped it over, pulled off the cover, took out the windows ssd and put in the qubes ssd. When i flipped it back over, to my horror i realized the laptop was still powered on.
Immediately i fear i have either shorted the ssd or corrupted it.
When I boot, it reached the password screen. After I enter my password it enters emergency mode. As instructed, i ran journalctl. The only errors are near the end, where it says:
/dev/mapper/qubes_dom0-root contains a file system with errors, check forced.
Then fsck failed with error code 4, and then a file system check failed on qubes_dom0-root. (See attached picture)
I ran fsck /dev/mapper/qubes_dom0-root, but said no to every prompt, as I have no experience in this situation and I fear making things worse. But I did want to see what it had to say.
Next I boot to the qubes install USB stick and choose Rescue a Qubes system.
It reaches a point where Rescue asks me to choose:
1. find and mount the installed OS to /mnt/sysimage,
2. Mount it as read-only,
3. skip to shell, or
4. quit.
I chose to continue. I enter my password when prompted, then it tells me that it has been mounted under /mnt/sysimage, and that I am able to mount it with chroot /mnt/sysimage.
I ran chroot /mnt/sysimage, and it said:
bash: /tmp/.bashrc: Structure needs cleaning
I'm not sure what to do here but I assume I would be able to do something if I only knew what.
It appears I have two potential courses of action: run the fsck, say yes to everything and hope for the best, or perhaps attempt something else from the chroot. However, I am new to linux. Usually I'm fairly cautious and don't get myself into these sorts of situations, but alas, here I am.
I'm terrified of making things worse. I would rather wait to hear from the community on how to proceed. I would be grateful for any help in rescuing my data. I promise to do a full backup immediately after getting it running again.
I am at your mercy.
I've rebooted once again to the usb install stick and try to rescue. Again I chose option 1 to mount the partition, and when i run chmod /mnt/sysimage, i dont get any errors.
From here I woud like to run a checkdisk or something like in windows. Am I on the right track?
If I coud just get these VMs to boot I could get my data off of them and do a full reinstall.
Any help would be appreciated.
Is there any way get this to boot, or to extract a few files from within it to dom0?
I have since reinstalled qubes and restored everything, I'm back in business.
Thank you for the replies, and I will learn to use the private.img as well so I can be more prepared in the future.