You are not logged in.

#1 2020-02-03 09:27:51

drossbox
Member
Registered: 2019-12-04
Posts: 24

[Solved]Can't mount Luks partition.

Hi all, apologies if this is badly formatted but I'm having to write this on mobile. I was an idiot and need to chroot into my machine, the root partition being luks with a detached header. I've opened it with 'cryptsetup luksOpen /dev/nvme1 --header /path/to/header root'. Running ls -a /dev/mapper then shows root. BUT, when I try 'mount /dev/mapper/root /mnt', it says 'wrong fs type, bad option, bad superblock on /dev/mapper/root, missing codepage or helper program, or other error'. Anyone know where I'm going wrong? It's not a missing helper programme because I'm able to mount /boot fine, which is also luks but without a detached header. Any help on this one greatly appreciated, because I'll lose a lot of stuff if I don't get back in!

Last edited by drossbox (2020-02-03 17:30:57)

Offline

#2 2020-02-03 09:30:34

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 718

Re: [Solved]Can't mount Luks partition.

What's the output of:

# file -Ls /dev/mapper/root

Offline

#3 2020-02-03 09:33:07

drossbox
Member
Registered: 2019-12-04
Posts: 24

Re: [Solved]Can't mount Luks partition.

It comes back with '/dev/mapper/root: data'. Thanks for the quick response by the way.

Offline

#4 2020-02-03 09:38:54

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 718

Re: [Solved]Can't mount Luks partition.

"data" means that it doesn't recognize any structure of it.
My guess is that either the file system superblock is fully corrupt or you opened the LUKS volume with the wrong header. The second option is the most likely scenario.

Edit:
Or possibly you specified the right header, but the wrong device.

Last edited by nl6720 (2020-02-03 09:47:10)

Offline

#5 2020-02-03 09:47:28

drossbox
Member
Registered: 2019-12-04
Posts: 24

Re: [Solved]Can't mount Luks partition.

You're absolutely right - I am, in fact,  retarded. Just realised I've tried to open using the header of a different drive. Thanks mate!

Offline

#6 2020-02-03 09:55:18

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 718

Re: [Solved]Can't mount Luks partition.

I only now noticed that your first post mentions /dev/nvme1. I very much doubt that that is the correct device path, see https://wiki.archlinux.org/index.php/Device_file#NVMe .


If your issue if fixed, please mark this thread as [SOLVED].

Offline

#7 2020-02-03 09:59:23

drossbox
Member
Registered: 2019-12-04
Posts: 24

Re: [Solved]Can't mount Luks partition.

You're correct - I was just being lazy as I'm on mobile. The full device path was /dev/nvme0n1p3. I've mounted it with the correct header and can now chroot in, so will mark it as solved. Many thanks for pointing out my stupidity!

Offline

Board footer

Powered by FluxBB