This is not really related to Qubes, but since this is a user list and the 
qubes installer usually facilitate for the user to use a LUKS+BTRFS scheme, 
I'll share this endeavour.

Long story of how my SSD drive got corrupted: I went to sleep one day after 
making sure all torrents were seeding, unaware that the power chord of 
qubestop-1 (that's how I call the computer) was loose, and therefore it ran 
from battery for some hours, but when I woke up qubestop-1 was off. I plugged 
the power cord, tried to boot and after I unencrypted the hard disk, I got a 
warning that the second partition couldn't mount because of a superblock error. 
Then I got dropped to an emergency shell.

So I was left with a disk that was mounting only the boot partition and the 
encrypted swap, but not the qubes root filesystem. I could decrypt it, but not 
mount the BTRFS filesystem.

I then boot qubestop-1 from a Kali Linux live usb. It didn't have btrfs, so I 
had to install it:

root@kali:~# apt-get update; apt-get install btrfs-tools

The next step (or could have been the prior) was to mount the qubes SSD drive 
and decrypt the partition with errors. I used gnome-disks for that. It is 
important to note that the device that I will use below is not /dev/sdb2. When 
the partition was unencrypted, gnome-disks "created" a new file which looks 
like /dev/mapper/luks-01234567-890a-bcde-f012-3456789abcde.

I first made sure that btrfs-check was going to fix the error by running in 
read only mode. This is the default and normally don't require any further 
action:

root@kali:~# btrfs check -p 
/dev/mapper/luks-01234567-890a-bcde-f012-3456789abcde

After I've done saying my prayers and convinced myself that I knew what I was 
doing, I ran the real deal with the scary --repair option:

root@kali:~# btrfs check -p --repair 
/dev/mapper/luks-01234567-890a-bcde-f012-3456789abcde

I could then mount the partition normally and resume seeding my torrents.

One thing totally unrelated but which should be noted is that KDE or some other 
tool at dom0 should have hibernated before the battery finished, and it didn't. 
I'm not sure if this was my fault.

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/d8bbb42d-4336-49fb-9845-b3590efabd38%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to