You are not logged in.

#1 2023-03-18 12:29:18

Daedalus24
Member
From: Bucharest, Romania
Registered: 2015-03-27
Posts: 39
Website

Refind does not see /dev/mapper/luks

I had to reinstall ArchLinux after 9 months. I did it due to an issue with LibreOffice that can not see docx or Excel files any more, unless they are created by it. And $ paru -Rnc libreoffice-bin-dev did not solve my issue. If there are also other paths, I would gladly go for it.

I followed the footsteps of a previous successful install of Arch with encryption and refind that I performed last June

https://bbs.archlinux.org/viewtopic.php?id=277049

The partitions did not change since, so I opened the encrypted partition and

 # cryptsetup luksOpen /dev/nvme0n1p7 luks
            # mkfs. btrfs -L ROOT /dev/mapper/luks 

Then I created the subvolumes

# mount /dev/mapper/luks /mnt
# cd /mnt
# btrfs su cr @
# btrfs su cr @snapshots
# btrfs su cr @home
# btrfs su cr @cache
# btrfs su cr @log
...

Then mounted the subvolumes

# mount -o noatime, compress=zstd,space_cache=v2,ssd,discard=async,subvol=@ /dev/mapper/luks /mnt 
# mount -o noatime, compress=zstd,space_cache=v2,ssd,discard=async,subvol=@{.snapshots,home,cache,log} /dev/mapper/luks /mnt/(.snapshots,home,/var/cache,/var/log}
# mount /dev/nvme0n1p1 /mnt/boot

And all went smooth up to installing refind

I have edited refind_linux.conf as follows

"Boot with standard options" "cryptodevice=UUID=911fcc24-b622-4f36-8f79-057acdc40393:luks root=/dev/mapper/luks luks=UUID=d462e2e3-632b-434f-86bc-2f2067933808 rw rootflags=subvol=@ amd-ucode.img initramfs-%v.img"
.....

lsblk outputs

(/dev/mapper)/luks     UUID=d462e2e3-632b-434f-86bc-2f2067933808

/dev/nvme0n1p7   UUID=911fcc24-b622-4f36-8f79-057acdc40393   TYPE="crypto_LUKS"

Refind outputs:

ERROR: device '/dev/mapper/luks' not found. Skipping fsck
mount: /new_root: special device /dev/mapper/luks does not exist

I booted using the usB install disk and I am able to enter the system by

# cryptsetup luksOpen /dev/nvme0n1p7 crypto1
# mount /dev/mapper/crypto1 /mnt
# mount /dev//nvme0n1p1 /mnt/boot

and no matter what changes i have tried it does not work. Can you please give me a hint what to do? I am effectively left without ideas.

Thank you very much.

Last edited by Daedalus24 (2023-03-18 12:30:16)

Offline

#2 2023-03-18 12:34:29

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,463

Re: Refind does not see /dev/mapper/luks

You never mentioned setting up mkinitcpio.conf?

Offline

#3 2023-03-18 12:42:51

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

Re: Refind does not see /dev/mapper/luks

Daedalus24 wrote:
"Boot with standard options" "cryptodevice=UUID=911fcc24-b622-4f36-8f79-057acdc40393:luks root=/dev/mapper/luks luks=UUID=d462e2e3-632b-434f-86bc-2f2067933808 rw rootflags=subvol=@ amd-ucode.img initramfs-%v.img"

It's cryptdevice not cryptodevice.

I don't know why you have that luks=... parameter, but I'm quite sure you don't need that.

Offline

#4 2023-03-18 12:43:21

Daedalus24
Member
From: Bucharest, Romania
Registered: 2015-03-27
Posts: 39
Website

Re: Refind does not see /dev/mapper/luks

I did it set it up. I only modified

MODULES = (btrfs)

After I install nvidia I also add amdgpu and nvidia

Offline

#5 2023-03-18 12:44:45

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,463

Re: Refind does not see /dev/mapper/luks

You don't need that in the MODULES line, and you need to set up the correct HOOKS.

Offline

#6 2023-03-18 12:45:12

Daedalus24
Member
From: Bucharest, Romania
Registered: 2015-03-27
Posts: 39
Website

Re: Refind does not see /dev/mapper/luks

nl6720 wrote:
Daedalus24 wrote:
"Boot with standard options" "cryptodevice=UUID=911fcc24-b622-4f36-8f79-057acdc40393:luks root=/dev/mapper/luks luks=UUID=d462e2e3-632b-434f-86bc-2f2067933808 rw rootflags=subvol=@ amd-ucode.img initramfs-%v.img"

It's cryptdevice not cryptodevice.

I don't know why you have that luks=... parameter, but I'm quite sure you don't need that.

I added an "o", indeed it's cryptdevice

Offline

#7 2023-03-18 14:14:21

Daedalus24
Member
From: Bucharest, Romania
Registered: 2015-03-27
Posts: 39
Website

Re: Refind does not see /dev/mapper/luks

I also added encrypt to HOOKS

HOOKS = ( ....block encrypt filesystem fsck)

but there is no change, it still does not find /dev/mapper/luks

Last edited by Daedalus24 (2023-03-18 14:28:27)

Offline

#8 2023-03-18 15:54:05

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,463

Re: Refind does not see /dev/mapper/luks

Did you regenerate the initramfs after doing that?

Offline

#9 2023-03-18 16:36:19

Daedalus24
Member
From: Bucharest, Romania
Registered: 2015-03-27
Posts: 39
Website

Re: Refind does not see /dev/mapper/luks

Yes Scimmia I did, thank you for your help. I am now trying to decrypt the partition. The wiki link is outdated

https://wiki.archlinux.org/title/Removi … encryption

My encrypted partition is /dev/nvme0n1p7.

crypsetup luksDump /dev/nvme0n1p7

 
tells me there is a single slot-key 0 (of luks2 type)

Keyslots
0: luks2
...
PKBDF: argon2id

If I try to execute step 6 in the Remove encryption page, to convert the Password-Based Key Derivation Function (PBKDF) for all key-slots to be LUKS1 compatible

sudo cryptsetup luksConvertKey --key-slot 0 --pbkdf pbkdf2 /dev/nvme0n1p7

it asks for the key, it executes but when I enter

sudo cryptsetup convert --type luks1 device_path

I get

Cannot convert to LUKS1 format - keyslot 0 is not LUKS1 compatible

So, I'm stuck again.

Last edited by Daedalus24 (2023-03-18 16:52:20)

Offline

#10 2023-03-18 22:12:11

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: Refind does not see /dev/mapper/luks

Daedalus24 wrote:

If I try to execute step 6 in the Remove encryption page, to convert the Password-Based Key Derivation Function (PBKDF) for all key-slots to be LUKS1 compatible

sudo cryptsetup luksConvertKey --key-slot 0 --pbkdf pbkdf2 /dev/nvme0n1p7

it asks for the key, it executes but when I enter

sudo cryptsetup convert --type luks1 device_path

I get

Cannot convert to LUKS1 format - keyslot 0 is not LUKS1 compatible

So, I'm stuck again.

Yes, that part is outdated, but what do you want to achieve with it now?
Do you want to get rid of the encryption or get the encrypted reinstall to boot?

Offline

#11 2023-03-21 11:37:34

Daedalus24
Member
From: Bucharest, Romania
Registered: 2015-03-27
Posts: 39
Website

Re: Refind does not see /dev/mapper/luks

I'm sorry for the delay Strike0, I tried to get rid of the encryption which I finally succeeded. I have to try it again when I'm under less pressure  at office. Thank you.

Offline

#12 2023-03-30 10:47:10

AzmuthForger
Member
Registered: 2023-01-09
Posts: 13

Re: Refind does not see /dev/mapper/luks

Daedalus24 wrote:

I had to reinstall ArchLinux after 9 months. I did it due to an issue with LibreOffice that can not see docx or Excel files any more, unless they are created by it. And $ paru -Rnc libreoffice-bin-dev did not solve my issue. If there are also other paths, I would gladly go for it.

I followed the footsteps of a previous successful install of Arch with encryption and refind that I performed last June

https://bbs.archlinux.org/viewtopic.php?id=277049

The partitions did not change since, so I opened the encrypted partition and

 # cryptsetup luksOpen /dev/nvme0n1p7 luks
            # mkfs. btrfs -L ROOT /dev/mapper/luks 

Then I created the subvolumes

# mount /dev/mapper/luks /mnt
# cd /mnt
# btrfs su cr @
# btrfs su cr @snapshots
# btrfs su cr @home
# btrfs su cr @cache
# btrfs su cr @log
...

Then mounted the subvolumes

# mount -o noatime, compress=zstd,space_cache=v2,ssd,discard=async,subvol=@ /dev/mapper/luks /mnt 
# mount -o noatime, compress=zstd,space_cache=v2,ssd,discard=async,subvol=@{.snapshots,home,cache,log} /dev/mapper/luks /mnt/(.snapshots,home,/var/cache,/var/log}
# mount /dev/nvme0n1p1 /mnt/boot

And all went smooth up to installing refind

I have edited refind_linux.conf as follows

"Boot with standard options" "cryptodevice=UUID=911fcc24-b622-4f36-8f79-057acdc40393:luks root=/dev/mapper/luks luks=UUID=d462e2e3-632b-434f-86bc-2f2067933808 rw rootflags=subvol=@ amd-ucode.img initramfs-%v.img"
.....

lsblk outputs

(/dev/mapper)/luks     UUID=d462e2e3-632b-434f-86bc-2f2067933808

/dev/nvme0n1p7   UUID=911fcc24-b622-4f36-8f79-057acdc40393   TYPE="crypto_LUKS"

Refind outputs:

ERROR: device '/dev/mapper/luks' not found. Skipping fsck
mount: /new_root: special device /dev/mapper/luks does not exist

I booted using the usB install disk and I am able to enter the system by

# cryptsetup luksOpen /dev/nvme0n1p7 crypto1
# mount /dev/mapper/crypto1 /mnt
# mount /dev//nvme0n1p1 /mnt/boot

and no matter what changes i have tried it does not work. Can you please give me a hint what to do? I am effectively left without ideas.

Thank you very much.


I think you should use

"Boot with standard options" "cryptodevice=UUID=911fcc24-b622-4f36-8f79-057acdc40393:luks root==UUID=d462e2e3-632b-434f-86bc-2f206793380 ...."

Try using uuid instead of /dev/mapper/luks

Last edited by AzmuthForger (2023-03-30 10:50:20)

Offline

Board footer

Powered by FluxBB