You are not logged in.

#1 2015-11-15 04:28:39

monkeypants
Member
Registered: 2014-08-18
Posts: 64

[SOLVED] luks encrypted partition is missing

I had Arch running on my C720 Chromebook with system encryption, it has been running just fine for months. A couple of days ago I tried to boot up, I select Arch Linux from the boot list and get an error:

ERROR: device '/dev/mapper/vg0-root' not found. Skipping fsck.

ERROR: Unable to find root device '/dev/mapper/vg0-root'.

I then get dropped to a recovery shell. /etc/fstab is empty. I booted into a live environment to diagnose. fdisk shows two partitions on the drive but gpart shows four 0mb partitions. http://pastebin.com/tq7mwCUj

lvscan returns 'No volume groups found' and lsblk -f returns

NAME   FSTYPE   LABEL     UUID                                 MOUNTPOINT
sda                                                            
├─sda1 ext4               c4bc594b-2092-4024-b5ad-28a2fafba06e 
└─sda2                                                         
sdb    iso9660  ISOIMAGE  2015-06-26-17-14-13-00               
└─sdb1 vfat     MULTIBOOT 1919-2249                            /lib/live/mount/m
loop0  squashfs

So it appears that my sda3 partition has disappeared, how can I get it back?

Last edited by monkeypants (2015-11-15 07:59:20)

Offline

#2 2015-11-15 04:52:22

frostschutz
Member
Registered: 2013-11-15
Posts: 1,422

Re: [SOLVED] luks encrypted partition is missing

The next partition would start at sector 264192.

You could test if anything's there:

losetup --find --show --read-only --offset $((264192*512)) /dev/sda
# should print a /dev/loopX name which you use accordingly
file -s /dev/loopX
cryptsetup luksDump /dev/loopX

Offline

#3 2015-11-15 04:56:59

monkeypants
Member
Registered: 2014-08-18
Posts: 64

Re: [SOLVED] luks encrypted partition is missing

frostschutz wrote:

The next partition would start at sector 264192.

You could test if anything's there:

losetup --find --show --read-only --offset $((264192*512)) /dev/sda
# should print a /dev/loopX name which you use accordingly
file -s /dev/loopX
cryptsetup luksDump /dev/loopX

losetup returned /dev/loop1, and even required my password for the encrypted volume which is encouraging.

Here is the output of the commands you suggested.

Offline

#4 2015-11-15 05:03:41

frostschutz
Member
Registered: 2013-11-15
Posts: 1,422

Re: [SOLVED] luks encrypted partition is missing

Is that the only partition that is missing or are there more of them?

If the only one:

parted /dev/sda unit s mkpart luks 264192s 100%

Offline

#5 2015-11-15 06:29:03

monkeypants
Member
Registered: 2014-08-18
Posts: 64

Re: [SOLVED] luks encrypted partition is missing

frostschutz wrote:

Is that the only partition that is missing or are there more of them?

If the only one:

parted /dev/sda unit s mkpart luks 264192s 100%

There is just the one missing partition on that drive, but it contains two logical volumes (swap and root).

root@kali:~# parted /dev/sda unit s mkpart luks 264192s 100%
Information: You may need to update /etc/fstab.

This restored my missing partition.  Thank you!

Last edited by monkeypants (2015-11-15 09:48:33)

Offline

Board footer

Powered by FluxBB