date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,651,838,414,000
My Laptop froze and after a hard shutdown the boot process won’t accept my disk encryption password anymore. I have a ‘standard’ luks-inside-lvm setup, generated while installing fedora, split in a /root, /home and /swap partition, which worked for several years. Using a live USB system I can access the encrypted volu...
I just took out one of my RAMs and it magically works fine again. This seemed to be the cause for the freeze and for cryptsetup 'silently' failing.
Encrypted LUKS volume does not accept password on boot after system freeze
1,651,838,414,000
As the title says, I've made a backup of my system before sending my laptop for tech repairs, my system was encrypted and I used CloneZilla's beginner mode so as to not mess anything up. I received my computer today and I tried to restore the image made by CloneZilla on the machine. Everything looked like it worked, b...
It turns out that somehow my Secure Boot was enabled in my BIOS. Turning it off solved my entire problem. Turns out the repair shop reset some settings in the BIOS... In brief, to solve the problem, go into BIOS and disable Secure Boot.
Restored encrypted LUKS drive with CloneZilla makes system non-bootable
1,651,838,414,000
Are there any backup/cloning/recovery tools that can pull files from LUKS-encrypted disks while dropping free blocks? Something that runs from within the unlocked system and hot-transfers the files, or maybe runs from a bootable USB flash drive, prompts the encryption key, and unlocks the disk?
The fact that your disk is encrypted is largely irrelevant. Whatever you use will need the encrypted disk to be opened (cryptsetup luksOpen ...) before operation. I'll also draw your attention to e2image which may copy more filesystem meta data. It only works with ext2,3,4 file systems. Besides e2image, your only rea...
Backup tool for pulling files out of encrypted disks?
1,651,838,414,000
I am attempting to add a new LUKS encrypted hard drive to my 18.04 setup. I already have 3 drives (2 of which are RAID) that have LUKS and they work fine - when my computer boots, I get prompted to enter password, LUKS gets mounted and detected by LVM. The problem I am encountering with this new drive is that I am ab...
Your crypttab has two devices with sda5_crypt name. Looks like processing stops at the second sda5_crypt entry, therefore sdd1_crypt is not unlocked.
additional LUKS partition does not mount on boot
1,651,838,414,000
I have a hard drive which is encrypted using LUKS. It was originally an external hard drive. Recently I removed the casing and connected it directly (via SATA). However, when I connect it directly, I'm unable to view the partition, and it doesn't prompt for the password. Out of 4 TB, it shows an unknown partition of 5...
It's probably a problem with the sector size. Some USB enclosures claim their drives have 4KiB sectors, when the drive represents itself as 512 byte sectors or vice versa. Partition tables (both msdos and gpt) unfortunately depend on the sector size. If the sector size changes, the partition table becomes invalid. Now...
LUKS on an internal hard drive
1,651,838,414,000
Anyone have any ideas for how I can automatically do a luksSuspend on a luks volume after it's been unused for a certain amount of time. I was thinking of just scheduling a command with crontab or something, but I don't want it to suspend if I'm actually using the volume.
The intent of luksSetup is to be used when the device is still in use, but you want to temporarily lock all accesses to it until the passphrase is entered from an external source. Thus it doesn't make much sense to only call luksSetup when the device is unused: if it's unused, close it with luksClose. There's no way t...
Automatically suspend luks volume after delay
1,651,838,414,000
this is my disk configure: # hlsblk -F NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS loop0 squashfs 4.0 0 100% /run/archiso/airootfs sda ...
TLDR: sda1 partition type was not set by fdisk. This is what was going on. After some discussion around it, been MBR boot section one of those, I got curious if fdisk was actually reserving disk initial bytes. So I've typed an fdisk -l /dev/sda. Than I've noticed /dev/sda1 had the type undefined or unknown, so I've pr...
cannot find a GRUB drive for /dev/sda1. Check your device.map
1,651,838,414,000
I apparently messed up today. I have to resize an encrypted root partition to make room for a windows dual boot. I followed instructions from the arch wiki since it seemed to match my needs even though I am using debian. At some point I had to use pvmove because after shrinking the root partition, the free space was b...
Thanks to @frostchutz I got this fixed by using parted to extend /dev/nvme0n1p3 by 2048 sectors.
How can I fix LVM PV size after a botched encrypted partition shrinking
1,651,838,414,000
So I've read the wiki and this answer, and I'm still a bit overwhelmed. In the wiki it feels like a lot of these are optional. Here's what I did. I used Manjaro to install into a single partition, which I may be regretting, and I enabled full disk encryption. What I observe when booting, to either windows or Linux, is...
I finally figured it out, order to fix my boot, and get the features I want I had to do this. GRUB_CMDLINE_LINUX_DEFAULT="cryptdevice=UUID=74c51543-eb14-4f61-afeb-b5de6c10a32a:root:allow-discards,no-read-workqueue,no-write-workqueue quiet udev.log_priority=3"
How should I enable discard and no workqueue for LUKS in Arch/Manjaro
1,651,838,414,000
I have encrypted my home partition via cryptsetup. Inside the mapper /dev/mapper, i have created a ext4 fs via mkfs.ext4 /dev/mapper/home Now, my home partiotion only has 91 GB. My luks partition has ~ 270 GB. Is this normal? How can i resize my ext4 home partition? Some fdisc -l data: Device Boot Start ...
To make an encrypted partition mount automatically, you'll first need /etc/crypttab set up properly. In your case, that means a line like this: home /dev/sda3 none luks (Here I'm assuming you used LUKS; if you used some other mode of cryptsetup, the two last parameters on the line may need to be different.) This shou...
Wrong EXT4 Partition size in luks encrypted partition
1,651,838,414,000
I've just finished a Debian install and I'm trying to boot. I've encrypted my hard drive (LUKS) without partitioning and set up LVM on it. I don't have a separate boot volume, so the system will boot from the logical volume root. I've replaced my BIOS with GRUB but I don't have a GRUB config generated for the system, ...
This can be resolved by adding /etc/crypttab to the initramfs (see manual page for crypttab for the file format) using update-initramfs from the Debian package initramfs-tools. First, mount the encrypted disk. Then bind-mount /dev, /proc, /sys, and /run on the host into the root filesystem with e.g. mount --bind /dev ...
Booting from LVM on encrypted device
1,651,838,414,000
We have installed Debian 8 on a new Dell PowerEdge T330, there are two partitions, / and /var, in a RAID1 array using mdadm. During testing the primary applications: mysql and tomcat were stopped. We are getting abysmal write performance from both partitions although the read performance is adequate. This is the obser...
When you ask dd for bs=16K and oflag=direct you are asking for many small writes, this is what HDDs are bad at and what SSDs are good at. You can use LVMCache to get the benefit of both (up to the SSD size) If you use bs=16M or no oflag then the writes are split/combined/cached in RAM and written at an optimal size. W...
Slow Write Speed(<2 MB/s) on Unencrypted and LUKS Encrypted ext4 filesystems using mdadm Software RAID1 Debian 8 Dell PowerEdge T330 Server
1,651,838,414,000
I upgraded my server from Debian Jessie to Debian Stretch without any issue before the reboot. After rebooting, the server now hangs with the message "Please unlock disk xxx". The disk in question is encrypted using LUKS, and there also are other encrypted disks in the system. However, these are NOT necessary to boot ...
Actually, this was my fault. PEBCAK. The system was configured with SWAP on a LVM LV on some LVM VG which is part of the encrypted disk. In other words, Debian correctly prompted me to decrypt the disk after the reboot.
Debian Stretch hangs at boot with "Please unlock disk xxx" error after upgrade from Debian Jessie
1,484,357,934,000
I have an SSD I removed from a system. It had full disk encryption via LUKS (without using LVM). I want to reuse this drive for a different purpose (in a different system). I cloned (using dd) a non-encrypted Arch Linux system (which is known to be good and does boot) to this previously encrypted drive. However, the c...
Your system boots up to the point where it tries to find the root filesystem, and fails at that point. This is often a sign that the kernel is missing a necessary driver. As your system, like most non-embedded systems, uses an initramfs, “kernel” here means the set of drivers compiled in the kernel image (/boot/bzImag...
cloned drive won't boot. (It was a LUKS encrypted drive)
1,484,357,934,000
I'm trying to install Gentoo on LVM logical volume inside LUKS container encrypted with key file encrypted by GPG with passphrase. Everything was going smoothly until I tried to boot. I'm building the kernel and initramfs with genkernel: genkernel --lvm --luks --install --menuconfig --busybox all and booting it wi...
My problem got solved after changing kernel version to 3.10 and changing gpg version to an old one, that wasn't requiring pinentry to work and that i compiled statically. Although with new version i checked everything twice there always seemed to be an problem with pinentry. Also I think that genkernel wasn't includin...
Booting Gentoo on LVM inside LUKS with gpg encrypted keyfile
1,484,357,934,000
I'm going to create encrypted lvm on my disk. As a encryption mechanism I choose dmcrypt with LUKS. Here's my question - should I overwrite (for security reasons) whole disk before creating encrypted container, or overwrite already encrypted container (there is some information at cryptsetup FAQ - step 6) or both? Doe...
If you do not overwrite the previous contents of the disk, any old information will remain in a trivially (software-only) readable form until it happens to be overwritten, which may be a very long time (bordering on forever). If you do overwrite the previous contents of the disk with zeroes before creating the LUKS da...
Overwriting disk before encryption
1,484,357,934,000
Is there a way to recover an overwritten LUKS partition? Consider the following case: I had a (external) hard drive (not SSD) which is completely LUKS encrypted containing an ext4 file system with some (important) data (in my case images and videos). The passphrase is known. I don't have a LUKS header backup. Now I ac...
I'm afraid there's no chance without a header backup. The passphrase is only useful when a LUKS header is available that has that passphrase in a keyslot. Without that, there's pretty much no way to recover the volume key. Part of the LUKS design is that if the LUKS header is erased (and any backups) then it's forensi...
Recover overwritten LUKS partition
1,484,357,934,000
The Luks volume works fine regarding mounting it, reading from and writing to it. But when It try to create a backup for its header, with cryptsetup luksDump or cryptsetup luksHeaderBackup I get nothing, not even an error message. I tried under sudo cryptsetup luksDump /dev/mapper/<device> and cryptsetup luksDump /med...
The errors you are showing seem to indicate you are running your commands against the mapping names (search man 8 cryptsetup for "mapping" to see what it refers to), i.e. the decrypted devices created by the device mapper, and not against the actual encrypted ones. For instance, if you open a LUKS device using the com...
`cryptsetup luksDump` or `cryptsetup luksHeaderBackup` generate no output
1,484,357,934,000
I have a USB flash drive with Full Disk Encryption using LUKS. I plugged in the drive and mounted it as such using the following: cryptsetup luksOpen /dev/sdb flash mount /dev/mapper/flash /mnt/flash If I physically remove my flash drive I can still access it's contents at /mnt/flash. Why is this? I see it as a secur...
If you ran a program / script from the USB itself, you should be able to figure out what LUKS map/name and device it's on (or just tell the script the device or mapped name if you know it) and watch for when the device "disappears" when it's removed. Then unmount it. I'm pretty sure that unplugging a USB will cause th...
LUKS partition still accessible after removing drive physically
1,484,357,934,000
I was given a HDD that was encrypted using dm-crypt and I'd like to mount it as /disk2 preferably having the decryption password stored in a file, so I won't have to enter the passphrase when booting, but it's not that important. When I try to open the disk in the file manager providing the encryption passsword, I get...
This sequence allowed me to access the data cryptsetup luksOpen /dev/sdb1 disk2 modprobe dm-mod vgchange -ay mount /dev/disk2/disk2 /disk2 So I offer the reward to the one who'll tell me how to make this change permanent.
Mount encrypted volume in Debian
1,484,357,934,000
In LUKS, only files get encrypted, not the entire drive. So my question is, what is accessible if just files are encrypted. For example: Are file paths or file names visible? (Eg: For Enrypted ZIP Files using ZipCrypto i can see full paths, filenames which makes it possible to attack)?? Is there no encryption mechanis...
In LUKS, only files get encrypted, not the entire drive. This is wrong. LUKS encrypts the whole volume. LUKS operates at a lower level than the filesystem. It doesn't know anything about files, directories, free space, etc. LUKS encrypts and decrypts blocks. What the filesystem (if any) does with those blocks is its...
LUKS Encryption - Readable content
1,484,357,934,000
I'm having issues unlocking an encrypted disk over ssh using dropbear. I've followed this guide to set it up, but I just end up getting Permission denied (publickey) error I copied the public key from my machine ~/.ssh/id_rsa.pub to the server /etc/dropbear-initramfs/authorized_keys and updated with update-initramfs -...
During writing the question, I figured it out, and might as well tell anyone else wondering. When using ssh, you need to specify root as the user: ssh [email protected]
dropbear-initramfs Permission denied (publickey)
1,484,357,934,000
I try to prepare an nvme for encryption, so i first follow this post on SO. But the speed of dd is really really slow (less than 100 mb/s). I see there is new option to speed up dm-crypt on kernel 5.9 (see this post), but before updating my kernel, i want to know if using nvme-cli format zero tools is equivalent to /d...
Found the answer, this is much much better with oflag=direct, jumping from 45 Mb/s to 536 Mb/s :) dd if=/dev/zero of=/dev/mapper/ecrypt oflag=direct bs=1M status=progress Thanks to these two posts : NVMe performance hit when using LUKS encryption https://stackoverflow.com/questions/33485108/why-is-dd-with-the-direct...
Slow /dev/zero format using dd with nvme to prepare crypto, is there nvme specific tool?
1,484,357,934,000
I'm trying to create a LUKS LVM disk partition autmatically using preseed on Debian 10 (Buster). I have only a single disk /dev/sda with the size of 80GB and it has system memory of 4GB Here is my full preseed configuration: #### Preseed preconfiguration file (for Debian buster) ### Partman early command ### Kernal pa...
It's working! First as mentioned by @cas, I made a mistake when declaring the size of the home directory where I accidentally used the size of the overall disk. But the main problem here is the syntax error that prevented home directory from created. Surprisingly, the debconf-set-selections that has syntax checker usi...
Debian preseed does not create encrypted disk with LUKS LVM properly
1,484,357,934,000
Using an Ubuntu 12.04 or a Red Hat Enterprise Linux Desktop 6 for Desktop, how can we force the users to change their LUKS passwords at every 90 days?
There's not much point in doing this. Ordinarily, the point of changing passwords regularly is that if someone else has learned your password, you limit how long they can use it. But a LUKS password is used to decrypt the LUKS volume's master key, the one that's actually used to encrypt the data, so if someone learns ...
How to force the change of the LUKS password in every 90 days?
1,484,357,934,000
The documentation contains: Successfully decrypted disks are named as (cryptoX) and have increasing numeration suffix for each new decrypted disk. If the encrypted disk hosts some higher level of abstraction (like LVM2 or MDRAID) it will be created under a separate device namespace in addition to the cryptodisk names...
Like the documentation says, GRUB will know the first decrypted disk as (crypto0) if it is a regular partition. If it is some other abstraction, e.g. a LVM PV, then any detected LVs should appear as (lvm/<vgname>-<lvname>), although the documentation for this is currently extremely hard to find: I had to read the sour...
Where does cryptomount in Grub create decrypted disks
1,484,357,934,000
Ive been at this all day. I've scoured the web and this board and have tried many solutions to this issue but nothing has seemed to work. Someone on here asked a similar question and the solution did not help. I feel I'm close but don't know how to follow through. Pulled my NVME drive and hooked it via USB to my Linux...
You have a filesystem on top of LVM on top of LUKS partition. The system can automatically hot-plug the disk, read the partition table and auto-detect the partition table, but because the next layer is LUKS, the automatic processing will stop there. You'll need to proceed through the remaining layers in order. First, ...
How To MOUNT A LUKS Encrypted Linux Filesystem Unlocked Partition VIA USB on another LINUX OS to retrieve files
1,484,357,934,000
I recently created a LUKS2 device with a native --offset of 4MiB. The file command correctly identifies the device and lists its UUID, but it is neither auto-opened at boot nor visible in /dev/disk/by-uuid/... (even after update-initramfs). Manually running cryptsetup open works as expected but cryptdisks_start fails ...
Technically, the kernel here is not at fault. The only kernel's involvement here is with the dmcrypt device mapper device configured by cryptsetup. cryptsetup is able to configure the device mapper device based on the metadata as stored on the block device so is not at fault either. The fact that there's no /dev/disk/...
The `file` command correctly identifies my LUKS device but the kernel doesn't see it
1,484,357,934,000
Can I use luks (as in OpenSSL) to encrypt bash output? e.g with OpenSSL: echo "test" | openssl ..... Can I do that with Luks/Cryptsetup in some way? Like this: echo "test" | Luks...
LUKS is not a command, it is name of a technology and/or metadata format so no, you can't use LUKS for encrypting strings. Same applies for cryptsetup which is only a userspace tool (library) for configuring and managing the LUKS/dm-crypt devices and doesn't do the encrypting itself -- data written/read to/from the de...
Is it possible to use luks on output in bash?
1,484,357,934,000
My luks encrypted lvm is running out of space. I want to extend the volume group with a new physical volume. Will the data on that physical volume be encrypted automatically when added to the volume group? Do I maintain encryption when extending a luks encrypted lvm with a physical volume?
Depends on where (on what level) is your encryption configured. Usually you have encrypted physical volumes (so the stack looks like partition->luks/dm-crypt device->physical volume->volume group->logical volumes), in this case you need to make sure the new PV is also encrypted. But you can also have encrypted logical...
Do I maintain encryption when extending a luks encrypted lvm with a physical volume?
1,484,357,934,000
I have an external USB disk with ext4 unencrypted: /dev/sda1 3.6T 2.9T 613G 83% /data I wish to encrypt this disk without losing data. I migrated this disk from Raspberry3 to Raspberry4, because of better performance I now wish to encrypt. I read about Filesystem stacked level encryption and Block device-lev...
It's possible, but with all in-place conversions, there is a certain risk of data loss. To make room for the LUKS header, unless you intend to use an external header, you must first shrink the filesystem (with resize2fs if it's ext4). For LUKS1, you should shrink it by 2MiB. For LUKS2, you can shrink it by 4M, 16M or ...
How to encrypt an external disk without backing-up/restoring the existing data?
1,484,357,934,000
I am trying to setup a full-encrypted Debian os, alongside my preinstalled unencrypted Ubuntu. so far, I have(traditional BIOS) installed the Debian with the following scheme.. /boot as extended partition; format-ext4 (unencrypted) LVM on LUKS: / partition -ext4 (encrypted), SWAP (encrypted) grub2 of Debian, installe...
I also tried an alternative method with grub2. I made a mistake when mounting the logical root partition. Since, I am not good with cli, so I wanted not to mess with grub2 config file. However, grub2 can handle LVM2 & LUKS partitions efficiently. look here (https://wiki.gentoo.org/wiki/GRUB2#Extended_features). So,he...
How to boot an encrypted Debian, from an unencrypted Ubuntu?
1,484,357,934,000
Which command would you suggest to use in order to find out whether a LUKS encrypted partition is mapped or not (other than looking at or using lsblk output)? By opened device, I mean a device for which the command ctrytpsetup luksOpen <device> <map name> was executed.
I would do it like this: $ sudo dmsetup ls crypthome (254:0) $ sudo dmsetup -v table /dev/mapper/crypthome Name: crypthome State: ACTIVE Read Ahead: 256 Tables present: LIVE Open count: 1 Event number: 0 Major, minor: 254, 0 Num...
How to find out whether a LUKS encrypted partition is opened of closed?
1,484,357,934,000
I have an encrypted crypt-luks partition that is currently named sda3, and is the last partition on the disk, that is, there are no sda4 or sda5. The encrypted partition contains three logical volumes containing the filesystem. Is there anyway I can rename the partition from sda3 to sda5? This is a new installation, a...
The following solution is based on the forum posting udev rule for a symlink You have /dev/sda3 and you want to create a symlink to it to synthesise an entry for the missing device named /dev/sda5: cd /dev && ln -s sda3 sda5 This can be managed at boot time within udev with a simple rule that matches the block device...
Renumber encrypted partition - sda3 to sda5
1,484,357,934,000
I have a specific situation. On Debian there are additional 3 disks and they are Luks encrypted. After decryption these disks are configured to ZFS pool RAIDZ (Raid5). After server reboot I need to unlock these three disks one by one and after 2nd disk is unlocked ZFS pool comes online but in degraded state because 3r...
This doesn’t answer your titular question, but it will allow you to unlock your LUKS devices via SSH before the system has finished booting. If you install dropbear-initramfs, you’ll get a lightweight SSH server in early boot. This only supports key-based logins, and you’ll have to add authorized public keys to /etc/d...
Debian unlock multiple Luks encrypted disks with passphrase AFTER boot
1,673,544,383,000
I have a LUKS encrypted partition on a second hard drive that I use on my computer. When I turn on my computer, it is encrypted unless I go to it and try to open it, an operation that the system then does on its own because when I did it for the first time I left the password recorded. That is, I click on it and the s...
The system log extract reveals that this is not a problem with LUKS encryption, but with the "usage" of the unlocked EXT4 file system on the encrypted partition: at some point in the past, a filesystem inconsistency occurred, e.g. due to it being removed without properly unmounting, power outage, or any other reasons....
LUKS partition mounting just as read-only
1,673,544,383,000
I followed instructions on Speeding up LUKS decryption in GRUB - GRUB/Tips and tricks - ArchWiki. And I created Full Disk Encryption using the guide: Full_Disk_Encryption_Howto_2019 - Community Help Wiki. I want to decrease the iterations for my encrypted boot partition: $ sudo cryptsetup luksDump /dev/nvme0n1p1 LUKS...
(1.) cryptsetup swaps keyslots around for internal reasons, unfortunately you just have to deal with it. From the cryptsetup luksChangeKey manpage: If a key-slot is specified (via --key-slot), the passphrase for that key-slot must be given and the new passphrase will overwrite the specified key-slot. If no key-slot i...
Speeding up LUKS decryption in GRUB using pbkdf-force-iterations
1,673,544,383,000
I was trying to dual boot Arch on my MacBook. At first, I tried to install Arch with LUKS encryption. Unfortunately, in the middle of a guide, I understood that it was a bit outdated and I didn't have the knowledge to proceed with installation without a guide, so I erased everything and started from scratch, this time...
Normally, LUKS header does not survive formatting. Setup: # truncate -s 100M foobar.img # losetup --find --show foobar.img /dev/loop0 # parted /dev/loop0 mklabel gpt mkpart boot 1MiB 100% LUKS: # cryptsetup luksFormat /dev/loop0p1 # wipefs /dev/loop0p1 DEVICE OFFSET TYPE UUID L...
lsblk says that filesystem of EFI partition is crypto_LUKS, while diskutil says that it's FAT32 (dualbooting arch/mac)
1,673,544,383,000
When using cryptsetup with LUKS, the manual uses the terms "key" and "size" multiple time, for example: --keyfile-size (in bytes) --key-size (in bits) The allowed values for --key-size is 256 bits (default) or 512 bits. Later, under the clause 'Default compiled-in key and passphrase parameters:' it says: Maximum keyf...
--key-size is the size of the volume key, which is the key that encrypts all of the data in the volume. It is automatically generated when you format the volume and is encrypted by your passphrase. --keyfile-size is the maximum number of bytes to read from a keyfile, which you would use if you want to unlock the volum...
cryptsetup with LUKS: key size differences
1,673,544,383,000
When installing Elementary OS, I've chosen too small a size for /boot and it constantly bites me when doing updates. The rest of the drive is a single LUKS encrypted root partition: lsblk --fs NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT ... nvme0n1 ...
From the man page of fsarchiver: fsarchiver [ options ] savefs archive device ... savefs Save device filesystem to archive. So the device parameter is expected to be a reference to a filesystem. Your parameter /dev/nvme0n1p3 is a device, but it doesn't contain a filesystem. This is why you got the error message: ...
Can I backup LUKS encrypted partition with fsarchiver?
1,673,544,383,000
Is there any way to check if a LUKS device is unlocked, without having sudo permissions? I'm aware of two questions, but all the answers require sudo. It seems that I've found an indirect way (processing the CleartextDevice value of udisksctl info's output), but even assuming it's a stable solution, it's a hack at bes...
Gnome-disks, for example, doesn't require sudo permissions, but it still decodes the locked/unlocked status of LUKS devices. GNOME Disks uses UDisks to get the information. There's nothing hacky about it, the CleartextDevice property will be always either / if the device is locked or a valid object path in form of /...
How to check if a LUKS device is unlocked, without sudo permissions?
1,673,544,383,000
Hello I have a question about LUKS encryption. I have used LUKS to encrypt a disk on my server but when I create a file and add content to it, and cat the file, the content is still in plain text. Even when I create a backup of the file, and put it on the non-encrypted hard drive, the data is in plain text. I'm not su...
LUKS/dm-crypt works on the block device level, not on the filesystem level so yes, this is correct and this is how it works. When you open the encrypted device (/dev/sdb in your case) a new virtual device mapper device is created (/dev/mapper/mybackup in your case) on top of it. All data on sdb is encrypted and myback...
Unable to validate LUKS encryption
1,673,544,383,000
I've made a small mistake, I've removed my boot partition by mistake. Using testdisk I was able to recover the boot partition without problem but I either misused it or did not understand and only write partition table with my boot partition. So now my / and swap partition are missing from my system. I've found this a...
Finally I've used testdisk to solve the issue I've identify my other partition : #main partition /sys/class/block/nvme0n1p2/start 618496 /sys/class/block...
Recover partition table from running system and encrypted disk
1,673,544,383,000
Following various guides online, I've attempted to reduce my LUKS-encrypted hard-drive partition (specifically, root / data). I've gotten to the point where GParted recognizes the new unallocated space, but it is "stuck inside" the original partition. In the screenshot below, you can see how the unallocated space is j...
The problem is that while you resized the filesystem inside of the partition, the partition itself was not resized. Think of it like putting your foot inside of a shoe that fits perfectly. You have made your foot (the filesystem) smaller, but the shoe (partition) is the same size, thus there is unused space in the sho...
Resizing LUKS encrypted partition - had success but can't use the unallocated space now?
1,673,544,383,000
After all these years of using Linux, I have never goofed up this badly. I should have known better, I honestly don't know what I was thinking. While trying to fix a small error message I was getting (this is irrelevant to my now much bigger issue), I found a post that said to "just run pacdiff and overwrite old files...
I have never used Manjaro, but the process that works for Arch Linux should be fine in your case too. You should be able boot off a Manjaro live USB, mount the root file system of your Manjaro installation, mount your existing /home directory and put the backup copy you have of shadow back to its place. Then you shoul...
Locked out: overwrote /etc/shadow and /etc/grub.d with pacnew
1,673,544,383,000
I have a master key for an encrypted partition on a machine that I have SSH + root access to. I don't have access to any of the passphrases associated with the partition. Is there a way that I can verify that the master key is valid for that partition? I can't unmount the partition as it is the root partition for the...
Like @HaukeLaging said, dmsetup table --showkeys might show the master key of a still open LUKS container (might not work for LUKS2 containers, see also 6.10 How do I recover the master key from a mapped LUKS1 container?). You could copy like the first 128M of the device then experiment with it at home. ssh root@serv...
How can I verify a LUKS master key? [duplicate]
1,673,544,383,000
I find it cool that you can change the passphrase and even have multiple keyslots with LUKS. But can you change the pbkdf after formatting? When running luksFormat you give --pbkdf and arguments for that: cryptsetup -y -v luksFormat --sector-size 4096 \ --pbkdf-memory 4000000 --pbkdf argon2id --iter-time 300 \ /de...
You can specify what arguments to use every time you add a key. So simply add a new key and remove the old: cryptsetup luksAddKey --pbkdf-memory 4000000 --pbkdf argon2id --pbkdf-parallel 1 --iter-time 3000 /dev/sda4
LUKS: Change --pbkdf arguments without reformat?
1,673,544,383,000
Google cloud services (computing instance) offer encryption by default for disk storage, the customer can provide its own key with the feature customer supplied encryption (detailed here also). How can we apply a disk encryption with cryptsetup without giving the encryption key to google?
On Linux, when using an encrypted disk (luks), it is unlocked at boot time with a password the idea here is to encrypt the disk with cryptsetup on top of the google system (default encryption) and get an earlier access to the instance to be able to unlock the drive at the boot time. This can be implemented with the he...
How to force a custom disk encryption on a google cloud compute instance (gcloud)?
1,673,544,383,000
I'm trying to understand the relationship between LUKS detached headers and their respective block device. From what I understand "formatting" with a detached header doesn't actually change the content of it's respective block device, that only occurs when you begin to write to the opened (cryptsetup luksOpen) partit...
It's possible. If you read the cryptsetup manual and FAQ, you'll find that such things are discouraged. But there is nothing anywhere preventing you from doing so anyway. You can use as many copies of the header as you like and even modify those copies, e.g. so one copy uses passphrase A, the other uses passphrase B -...
What are the limitations of a detached LUKS header
1,673,544,383,000
I have a triple boot setup (3xLinux). All Linuces share /home and swap, and their / partitions are next to each other. All reside in an LVM on LUKS: # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT nvme0n1 259:0 0 951.8G 0 disk |-nvme0n1p1 259:1 0 800M 0...
Start Your system with the rd.debug (init-ramdisk debug) kernel flag added. This should shed some light on what is going wrong. If You have it You kan bost the last one or two screens with xtrace output if You cannot the the problem Yourself then. You can also direct the output to files in addition (i.e. add rd.log=...
LVM on LUKS FDE: GRUB won't mount my root partition / during boot even though cryptomount and cryptdevice are given in grub.cfg
1,673,544,383,000
I have a single HDD and there's LVM set up on top of LUKS └─sda5 8:5 0 883,2G 0 part └─sda5_crypt (dm-0) 252:0 0 883,2G 0 crypt ├─vg1-root (dm-1) 252:1 0 30G 0 lvm / ├─vg1-swap (dm-2) 252:2 0 4G 0 lvm [SWAP] ├─vg1-usr (dm-3) 252:3 0 15G 0 lvm /usr ...
Ideally, you initialize the new LUKS partition as a LVM PV, add it to your volume group with: vgextend vg1 /path/to/new/LUKS/device Then use the LVM pvmove command to migrate your data to it like so: pvmove /path/to/old/LUKS/device /path/to/new/LUKS/device When the data migration is done, be sure to remove the old ...
Best way to move LVM on luks to a new hdd?
1,673,544,383,000
If i’m rebuilding an encrypted RAID 1 with the whole array encrypted with LUKS, if I decrypt the array to use it, will the data still be encrypted, or will the array rebuild decrypted?
This looks like a misunderstanding, or possibly incorrect terminology. I'm assuming that "encrypted RAID 1 with the whole array encrypted with LUKS" you mean that you've first built up a RAID array out of physical /dev/sd* devices, creating an array device, and then set up a LUKS encryption on top of the array device...
Is it safe to use LUKS encrypted raid 1 during rebuild?
1,673,544,383,000
I have 2 LUKS containers, one with default OpenSUSE installer settings, another one with -h sha512 -s 512 -i 5000 and detached header. On top of each of them there is LVM - one with only 1 OS volume which is btrfs, another one (detached) with 3 volumes - swap, ssd cache and btrfs data. The problem is that btrfs on OS ...
Oh my... I didn't mention this drive was moved from laptop where as the only drive it was 99% filled up with data. First LVM is mounted automatically at OS startup and has enabled TRIM (I know it's not recommended on encrypted devices as it reveals data organization on disk but OS partition contains only OS, not actua...
btrfs on LVM on LUKS - one LUKS container performs WAY better than the other
1,673,544,383,000
I created a separate partition on a CentOS install (VirtualBox), and am attempting to encrypt it using cryptsetup and LUKS. I'm using the following commands to get this set up: cryptsetup luksOpen /dev/mapper/VolGroup-db00 db_fips (no error, all clear) mkfs -t ext4 /dev/mapper/db_fips (no error, all clear) e2fsck -f ...
Creating an encrypted volume does just that: create an encrypted volume on the disk. Using the volume on your live system is a concept that only makes sense as long as the system remains live: it needs to be done all over again if the system reboots. So you need to arrange for the volume to be brought up during the sy...
luks volume disappears after reboot
1,673,544,383,000
I've been working a bash script to automate the process of opening and closing an LVM over LUKS external hard drive. However I continue to receive errors on line 28: $(vgchange -a n ; cryptsetup luksClose vol) The error I receive: $ sudo ./encryption.sh -l Locking System.............. ./encryption.sh: line 28: 0: co...
By putting commands inside a $( .. ) block you're doing command substitution. That means that the commands inside that block is executed, and the output of those commands will be evaluated by bash as other commands to be executed. So if the command outputs the text 0 logical volume(s) in volume group "vol" now active ...
BASH - Command not found - LVM over LUKS Automation Script
1,673,544,383,000
I overwrote some LVM2 metadata in much the same way as Recovering overwritten LVM metadata . That is, I attempted to install Debian 6.0.7 on a system with existing encrypted volumes and LVM2 volumes. The structure of the disk was that a LUKS volume covered a 90% partition (sdc1) on the disk; an LVM2 physical volume us...
You can use gpart to search for file systems on /dev/dm-2. After that or even as an alternative you can create dm volumes without LVM using dmsetup directly. On my systems the first LV always starts at offset 384: dmsetup create restore-lv --table "0 25165824 linear /dev/dm-2 384" The size is not important (and usual...
Reading encrypted partition with broken LVM2 inside?
1,673,544,383,000
I had a working ubuntu with root and swap partitions encrypted with an LVM on LUKS set-up. Name of the LVM virtual group is vg-ubuntu. Due to a maintenance need (a boot partition, not on LVM, becomming too small), I used LVM ability to move data to another partition (vgextend, pvmove, etc. using a live USB OS). As it ...
After a couple of days of research, I found the solution in this blog. The important step is to reinstall lvm2 and cryptsetup-initramfs after the chroot and before update-initramfs chroot /mnt apt install lvm2 cryptsetup-initramfs update-initramfs -c -k all In my case, it was necessary to do this reinstall, even thou...
LVM on LUKS - linux not booting with error "vg-xxx" not found after moving to encrypted partition
1,673,544,383,000
I have an Arch installation on a LUKS-encrypted LVM. After I installed Debian on a different NVME drive I'm no longer able to cryptsetup open the partition from other systems, nor can I boot into Arch. # cryptsetup open /dev/nvme0n1p3 arch Device /dev/nvme0n1p3 is not a valid LUKS device. Here is a hexdump -C of ...
The issue was solved using Method #1 created and kindly suggested by frostschutz. Everything worked out smoothly and without any errors. After dumping and repairing a LUKS header file I was able to use it to open the partition. Then I mounted the volume after scanning for it using lvscan. For more extreme cases there ...
Encrypted LVM "is not a valid LUKS device", cannot boot or open
1,673,544,383,000
My /home partition (on Linux Debian testing) is encrypted with LUKS. $ mount|grep home /dev/mapper/home-crypt on /home type ext4 (rw,relatime) Configuration via /etc/crypttab: home-crypt UUID=830807e5-01fb-4d82-b2ce-c2e51b176560 none luks,timeout=180 During boot, the LUKS password to decrypt my home partition is req...
You can delay the mounting of the LUKS-encrypted partition by specifying a systemd service unit that waits for a set time before proceeding with the unlocking and mounting. Create a custom systemd service file, for example /etc/systemd/system/delay-luks-prompt.service, and add the following content: [Unit] Descripti...
How to configure waiting time for LUKS password
1,673,544,383,000
It seems that modern SSDs degrade in performance the more data they are holding. My understanding is that this is because manufacturers put less and less storage cells on the SSDs relative to their total capacity and now we reached a point where a single cell stores up to 4 bits (QLC) instead of just one, greatly redu...
The important question is, what happens if I use LUSK disk encryption on such an SSD? Will it think that is 100% full From the point of view of the disk there is no difference between LUKS and any other "non encryption" filesystem like Ext or XFS. Formatting a device to LUKS doesn't encrypt the entire device, only b...
Does LUKS disk encyption break SLC caching on QLC/TLC SSDs?
1,673,544,383,000
Following the example of how to add a FIDO2 key from a YubiKey, but I can't figure out how to use the YubiKey to unlock it form the command line. The instructions talk about unlocking at boot--but that's not what I want. Setup Make a 128 MiB file, make it a block device on loop0 and setup LUKS. $ dd if=/dev/urandom o...
Using systemd-cryptenroll to set up the encryption suggests that you need a similar tool of the systemd family to unlock it. Turns out it is essentially Example 3 in the systemd-specific version of the crypttab(5) man page. sudo /usr/lib/systemd/systemd-cryptsetup attach loop0_encrypted /dev/loop0 - fido2-device=auto...
FIDO2 (YubiKey) to unlock LUKS from command line
1,673,544,383,000
What's the easiest way to format an external SSD with encryption and RAID1-style data replication? As I recently grew suspicious of my SSD+luks+btrfs setup, I've started wondering how to reduce risk of data loss in certain infrequently used external disks of mine. While the btrfs and dm-crypt documentation is very hel...
From kernel 4.5, this can be done after filesystem creation. Just create a single btrfs volume with blivet-gui in the usual way (with encryption), and then use btrfs-balance / convert to switch the data to a DUP profile after the partition has been created and mounted, like: sudo btrfs balance start -mconvert=dup /ru...
How to create a data-redundant encrypted filesystem on an external SSD?
1,673,544,383,000
I am trying to expand an existing RAID1 array with an ext4 filesystem on a LUKS volume on Debian GNU/Linux 10 (buster). This is my disk layout from lsblk: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 9,1T 0 disk ├─sda1 8:1 0 10M 0 part ├─sda2 ...
Way too many steps. You don't want to fail drives unless absolutely necessary. (※) Assuming there is free, unpartitioned space available and no other partition in the way, you can just grow everything directly, in order. With online resize like this, there is no need to umount anything. # Partition (repeat it for all ...
How to extend madam RAID1 with LUKS and ext4 filesystem on Debian 10
1,673,544,383,000
I have a luks device and it is opened on boot by /etc/crypttab. lsblk looks like this: sdc 8:32 1 114,6G 0 disk └─luks-672dcc74-d002-47dc-b61b-525baf91dc7c 253:2 0 114,6G 0 crypt I pmount the device like this: pmount /dev/mapper/luks-672dcc74-d002-47dc-b61b-525b...
Note: I'm completely unfamiliar with pumount, and I don't even have a Debian install available for testing, so I just grabbed the source code from Debian and making wild assumptions based on what I found in there… pumount has an option, --luks-force to close LUKS devices it did not open (as you already quoted from the...
Why does pumount close a luks device it did not open?
1,673,544,383,000
I have a device I've encrypted with luks1 and I decrypt it with a script in init.d. (Centos 6, no keyscript in crypttab). Its a raid disk, with the encryption under the raid, but I don't think that matters. The lsblk looks like: sda 8:0 0 238.5G 0 disk └─md127 ...
To completely prevent dracut from scanning for LUKS devices, add the following to your kernel command line: rd.luks=0 If you want to only decrypt specific disks (e.g. I wanted it to decrypt the root partition, but not other encrypted disks), you should instead add rd.luks.uuid=<DISK_UUID_HERE> once per encrypted dis...
Stop Dracut from asking for a password
1,673,544,383,000
I've successfully created a LUKS drive from a 32Mb USB flash drive. However when I write an ext4 filesystem to it I am unable to mount the result, or even run fsck or dumpe2fs etc. The drive shows up under lsblk as sda 8:0 1 31M 0 disk └─luks 253:0 0 15M 0 crypt I'm then writing the filesys...
Sounds like a hardware problem. You should run badblocks in write mode on the device. Another option would be to create a small image file (a few 100 MiB) put a loop device upon it create the filesystem in it copy the image file to the (first part of the) device compare the image file to the respective part of the de...
Unable create ext4 filesystem under LUKS
1,673,544,383,000
I have an almost fresh Kali linux installation in an Hyper-V virtual machine. It is configured with hard disk encryption during installation. After some working days, I reduced the amount of RAM memory reserved for the VM, but when I boot up the reconfigured machine, the password used to decrypt the hard drive is repo...
LUKS2 by default uses the argon2 key derivation function which is so called memory hard -- it intentionally uses a lot of RAM (up to 1 GiB with cryptsetup) when unlocking the device to prevent brute force attacks on GPUs. Exact amount of RAM it requires depends on the amount of RAM you have when creating the LUKS devi...
Linux Hard drive encryption password invalid after memory size change
1,673,544,383,000
I have installed Ubuntu 20.04 on LUKS/LVM but unfortunately on booting I am only getting a grub> prompt. # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 465.8G 0 disk ├─sda1 8:1 0 731M 0 part /boot └─sda5 8:5 0 465G 0 ...
Since your LVM is on a LUKS-encrypted partition, the LVM root volume UUID will not be visible until the encryption is unlocked. By default, Debian/Ubuntu GRUB configuration may refer to several things located on the root filesystem, including: font file /usr/share/grub/unicode.pf2 GRUB background image, e.g. /usr/sha...
Grub is not booting Ubuntu with LUKS/LVM
1,673,544,383,000
I have an internal SSD (NVMe) on which I've installed Ubuntu 18.04 with Full Encryption using LUKS. Recently, I replaced the motherboard of my laptop which caused the signature verification of the kernel to get failed during boot. error: /boot/vmlinuz-****-generic has invalid signature error: you need to load the kern...
I finally fixed the issue. The issue occurred since the BIOS settings of SATA Operation was defaulted to RAID On mode instead of AHCI mode, with the newly replaced motherboard. So, basically changing the SATA Operation to AHCI and then disabling Secure Boot(to get rid of Invalid Kernel Signature) fixed the issue.
LUKS encrypted drive is missing. "cryptsetup: lvm is not available"
1,593,865,025,000
I plan to provide a Linux appliance to several users. These users are tech savvy and can easily reset the root password on a standard linux system. How can I create a running Linux system that keeps even the root user out of the filesystem once protected? (I looked at disk encryption like LUKS but in all cases the r...
I found the answer: encrypt the full disk with LUKS, then store the keys in the system TPM. That way the entire disk is encrypted and an end user can't extract the keys from the TPM...very secure: LUKS with TPM
Protecting (encrypting) system from even root access
1,593,865,025,000
I have my primary Ubuntu install on one disk, and a secondary install (for offline backups of the primary) on another disk. For convenience, I would like the root volume of the second install mounted within the primary install. I have a crypttab entry: sda3_ubuntu UUID=XXX keyfile luks,nofail, and an fstab entry: /dev...
LVM should be able to autoactivate the underlying VG (and LVs) after decrypting the LUKS device. The important things to check would be the LVM configuration file(s) and if the proper services are enabled and running. /etc/lvm/lvm.conf event_activation = 1 auto_activation_volume_list should not be set (the default is...
How to have a luks-protected LVM volume mounted at boot
1,593,865,025,000
I have a btrfs raid1 composed of two entire, large harddisks of the same size. Now I would like to migrate the data to a btrfs raid1 composed of two encrypted luks-devices on the same harddisks. I have separate copies of the data on other boxes as a backup. My plan is to remove one device from the raid1, create a luks...
To answer my own question I have made the following experiment on a spare hard disk. Be sure to have a valid and restorable backup. These commands can irretrievably destroy valuable data if e.g. applied to the wrong device. Creating the test system First we need two partitions to work with, I created them with fdisk t...
Converting btrfs raid1 on two disks to btrfs raid1 on two luks-encrypted disks
1,593,865,025,000
For some reason, I can't add a key to my encrypted swap. My /etc/crypttab: swap_crypt /dev/disk/by-partuuid/c4f049d5-ae21-44d6-b753-6e72b7e21770 none luks,swap,discard,keyscript=decrypt_keyctl root_crypt UUID=26f3c181-e041-47f2-929b-de631a2f1d3f none luks,discard,keyscript=decrypt_keyctl So to identify those disks: ...
So I figured this out on my own eventually. For anyone who runs into this, make sure that when running cryptsetup status /dev/mapper/<device> that the type is LUKS1 and not PLAIN. It appears the Ubuntu installer defaulted improperly, so standard LUKS commands did not work on the device. Since it was swap I was able to...
Can't add LUKS key to encrypted swap
1,593,865,025,000
I have a LUKS encrypted SSD and I would like to clear it and install a different Linux distro (Debian -> Ubuntu). I want to decrypt my drive and I tried to use: cryptsetup luksRemoveKey /dev/DRIVE It returned: This is the last keyslot. Device will become unusable after purging this key. It got me worried so I'm her...
The device will still be usable, but the data not accessible (without a header/master key backup) You will be able to overwrite the data afterwards.
How to decrypt LUKS encrypted drive
1,593,865,025,000
I use Arch Linux kernel 4.18.12-arch1-1-ARCH (november 2018). I use a SATA caddy (for a Thinkpad T400) which holds a hard drive from an old laptop. I'd like to decide on combining the contents and extending the logical volumes rootvol and lvhome or keeping the current setup (see below). I only use the ext4 filesystem ...
LVM provides logical volumes, which are logical block devices, and makes it easy to grow, shrink, relocate, snapshot, etc. those block devices. You can then use these block devices any way you like... it could be a filesystem, or something else like a virtual HDD for a VM with its own partition table and everything. L...
Can one combine logical volumes from different groups without copying the contents over?
1,593,865,025,000
I set for testing a virtual machine with debian machine is so configured 4 disk in raid10 software the md0(raid10) in encrypted with luks on the luks(luksmd0) I have create the vg (debian2-vg) wich finally has 2 volumes,root and swap. I configured boot in /(the latest grub2 can boot from raid,lvm and with boot in encr...
Solution found. I have missed the initramfs part. When we change from a clear to encrypt environment, we must configure the initramfs. a)After booting from a usbkey with iso image(slackware iso is ok, debian is ok too) b)Open the encrypted md cryptsetup luksOpen /dev/md0 luksmd0 c)Mount the eventual lvm vgchange -ay ...
debian and grub with raid10+lvm+luks
1,593,865,025,000
I was installing windows and I accidentally deleted the 2TB LUKS encrypted hard drive where I store my important things. So after realizing my mistake I immediately rebooted into a live Ubuntu disk and installed Ubuntu on my SEPARATE hard drive just to have a system to work on. I searched around and found out about te...
Based on the screenshot and our discussion, it looks like testdisk discovered your LUKS header and put it in it's own partition, leaving the rest of the LUKS container in the unallocated space. The LUKS header is stored at the beginning of the partition (or disk when not using partitions); unless you use a detached he...
How to recover LUKS encrypted hard drive?
1,593,865,025,000
I'm trying to setup a partition and I'm trying to put the luks header on a USB device so I use the argument --header /path/to/usb-device, however I am still able to decrypt the device without the usb-device being mounted. How to stop cryptsetup from creating the luks header on the encrypted device ?
You must have used a wrong command somewhere... cryptsetup does not wantonly create LUKS headers all over the place... it only does what you tell it to and it usually asks for confirmation before doing so. Example: # truncate -s 8M luksheader luksdevice # cryptsetup luksFormat --header luksheader luksdevice WARNING! ...
How to stop cryptsetup luksFormat from creating the luks header on the encrypted device?
1,593,865,025,000
I'm working on booting a headless server (Fedora 16), entering the passphrase to decrypt the root disk (LUKS) over SSH using dropbear. I've got dropbear all working: I can SSH to the server while it's sitting and waiting for the password. But I can't figure out how to actually pass the password to use. The crypt scrip...
I ended up creating a kind of hacky work around, but it is working for me, and I've been using it for several months now. It basically just replaces the cryptroot-ask shell script with a custom one that waits for you to SSH in, unlock the disk yourself, and then delete a file to indicate that it's gone. Replacement of...
Provide passphrase to plymouth ask-for-password from command line
1,593,865,025,000
I've got a luks volume setup and mounted, and when not in use I suspend it with cryptsetup luksSuspend so it cannot be accessed. But if I forget it's suspended and try to do any kind of file access in the mounted directory, the process just hangs, instead of failing immediately. CTRl-C doesn't work to kill it, and CTR...
Suspending all accesses until the passphrase is entered again is the whole point of luksSuspend. If you want to ensure that the encrypted device is not in use, call luksClose.
Prevent file access from hanging when luks volume is suspended
1,593,865,025,000
I had an encrypted ext4 partition on a Samsung T7 1TB USB drive. It was LUKS (I believe this may be called a LUKS container?) The partition was 850GB. It had about 130GB in use. I also had an unencrypted 100GB NTFS partition and a very small amount of unallocated space. I tried to use KDE Partition Manager to shrink t...
To recap, after resizing partitions, you got this mount error: wrong fs type, bad option, bad superblock on /dev/mapper/luks-5c9cfaa5-0576-4b47-8e65-05f7d8b52d39, missing codepage or helper program, or other error. Getting this far already means there is no issue with the LUKS header itself. According to dmesg, the ...
How do I rescue an encrypted LUKS partition after failed shrink
1,593,865,025,000
After a recent update (not sure if that was the first including a new kernel 6.1) my ubuntu linux laptop cannot boot anymore the error is Volume group “ubuntu-vg” not found Cannot process volume group ubuntu vg IO error while decrypting keyslot. Keyslot open failed. Device /dev/nvme0n1p3 does not exist or access is de...
Unfortunately adding nve and lvm to /etc/initramfs-tools/modules , updating initramfs and rebooting was not effective. Thus I reverted that change and then I tried adding blacklist rtsx_pci blacklist rtsx_pci_sdmmc to (a new) file /etc/modprobe.d/blacklist_rtsx.conf and rebooting and the problem was solved (then I ha...
volume group not found on linux laptop after update
1,680,028,621,000
As I'm new to UNIX this might be a stupid question but here we go. I want to install manjaro next to my win11 which I have bitlocker encrypted. I need to keep the Win11 installation as is. I reduced the win partition to free up space for my manjaro and I now want to have my linux to be in two partitions, /root and /ho...
As I'm new to UNIX In that case you should probably pick a distribution with a GUI installer that can do the partitioning with encryption automatically. But if you want Manjaro, go ahead, but it will be more complicated. Edit: Actually, Calamares supports LUKS encryption so if you don't have another reason to do thi...
Luks encrypted Manjaro with Bitlocker encrypted Win11 dualboot
1,680,028,621,000
Before: SATA internal SSD with a LUKS encrypted ext4 partition (Debian installation) + a small unencrypted boot partition with kernel, initrd and GRUB configuration files After: that same disk is now externally attached with a USB-to-SATA adapter Now GRUB fails to boot it, but both GRUB and the Debian kernel recognize...
I see that it correctly sets up the encrypted volume sdb2_crypt, so I tried this and it worked: linux /vmlinuz-4.9.0-11-amd64 root=/dev/mapper/sdb2_crypt ro initrd /initrd.img-4.9.0-11-amd64 It booted into a recovery environment as it was not recognizing some filesystems in /etc/fstab, after commenting them out...
Booting LUKS Linux installation from external USB disk
1,680,028,621,000
I can't login anymore into my encrypted disk. After writing the password: error: no such cryptodisk found. error: disk ‘cryptouuid/HEXstring’ not found. Entering rescue mode… intuitively that string is the identifier of the disk that I'm trying to decrypt and log into. So I live boot from USB and go into file manager...
I tried to do something alone (yes, I'm the answerer to my own question. I was panicking) and I did this in order to re-access my account: after I ran the live USB, I mounted my linux partition so that I could access to its files. I personally did it from the file manager but you can use the mount function. with the ...
Can't boot from encrypted disk after deleting swap-memory partition [issue]
1,680,028,621,000
The other day I tried to setup a Full disk encryption on a test system (ArchLinux) within virtualbox. (I want to use this kind of a setup on my main machine so I wanted to test it out first) I created two harddisks (sda, sdb2) sda has an efi, boot, root and home partition with the root and home partition encrypted. Th...
After some digging through the bootlog I found an error mentioning that the cryptprocess was out of memory. After increasing the system memory of the virtual machine now everything works as expected. Maybe this helps someone encountering a similar problem, since I did not read anything about minimum memory requirement...
Encrypt multiple partitions with luks cryptsetup
1,680,028,621,000
Can somebody with more LUKS LVM experience than me tell me what the correct device name is to use in this context. I'm trying to follow some instructions about using clevis and tang in CentOS. The instructions are pretty simple, yet after installing the tang server, I run into problems right away on the clevis portion...
From RedHat blog link you posted, it appears clevis wants the encrypted block device (not the decrypted one). In your lsblk output, that is /dev/mapper/vg_root-lv_root. This sort of makes sense; the decrypted one doesn't exist until after the keys are supplied. You can confirm that's indeed the right device a few ways...
Device name to use in luks commands for LVM LUKS
1,680,028,621,000
Is it possible to encrypt a LMV partition after having installed an OS? I just finally managed to get LVM but I couldn't figure out how to get it encrypted. The installer didn't seem to provide for that to happen. To be more specific, I installed Lubuntu 18.10 which utilizes the Calamares installer. I've installed Lub...
@ThatRandomGuy, You have already done with installation so / file encryption is not possible. During installation you need to tick the check box "Encrypt the new Lubuntu installation for security" as shown in below figure. In case if you need to to encrypt home it possible by following below article. Creating Encryp...
How to encrypt LVM partition with LUKS after installation?
1,535,994,138,000
I have the second half of my hard drive encrypted. Now I want to encrypt the first half as well. Being the second partition I can't extend the LUKS partition. Can I add the first partition to the existing LUKS or do I have to set another LUKS for this one partition?
You'll need to create another LUKS container. Your LVM volume group can span both LUKS containers. You'd simply create an LVM physical volume in the LUKS container and add it to the LVM volume group. However, that means both LUKS containers would need to be unlocked before you can bring up the LVM volume group.
Add new partition to LUKS+LVM
1,535,994,138,000
I have the following (lsblk output): And I want to increase the size of the boot partition (sdb2) but I'm not able to put unallocated space before the LVM partition (sb3), is there a way to do this? I found ways to increase the size of the LVM partition itself but nothing regarding putting that unallocated space befo...
Nope you can't move unallocated space around because the partition table reflects the location of sectors on the disk. Each sector has an ID from 1 to {a lot} and they are allocated in continuous blocks to partitions. Once allocated you can't easily move them around. Is you sdb4 in use or not? If not one thing you ca...
How to increase the size of a partition that sits before an encrypted one?
1,535,994,138,000
If I am shrinking a partition containing a LUKS device+, can I verify that I didn't over-shrink the partition without opening the device and verifying the data at a higher layer in the stack? Or, in other words, is there a way to verify / check a LUKS container's size, and whether it is intact? I'm after something lik...
This is not possible as the LUKS / dm-crypt / cryptsetup FAQ page says: 2.15 Can I resize a dm-crypt or LUKS partition? Yes, you can, as neither dm-crypt nor LUKS stores partition size. If no size information is stored, then it's not possible to check if the entirety is accessible. I've asked what gets resized if n...
Check LUKS container has not been truncated
1,535,994,138,000
I suspect there's a bug in Ubuntu's default whole disk encryption setup. Here's what happens, repeatably: I make a fresh install, Ubuntu 15.10 with whole disk encryption, overwriting the whole disk It boots and seems to work just fine A few reboots later, programs start crashing. "Ubuntu has experienced an internal e...
There have been constant reports of corruption bugs with ext4 file systems, with varying setups. Lots of people complaining in forums. The bug seems to affect more people with RAID configurations. However, they are supposedly fixed in 4.0.3. "4.0.3 includes a fix for a critical ext4 bug that can result in major data l...
Massive disk corruption on Ubuntu 15.10 with dm-crypt + LUKS full disk encryption?
1,535,994,138,000
I have a dual-boot(xubuntu/#!) setup LVM with dm-crypt+luks as follows /dev/sda1 = /boot (xubuntu) /dev/sda2 = /boot (#!) /dev/sda3 = encrypted LVM /dev/mapper/volgroup-xroot = / (xubuntu) /dev/mapper/volgroup-yroot = / (#!) /dev/mapper/volgroup-home = /home (/home/xubuntu & /home/crunchbang) /dev/mapper/volg...
You make this message disappear by setting your GRUB_CMDLINE_LINUX_DEFAULT variable in /etc/default/grub with crypt_opts=<whatever#1>,lvm=<whatever#2> The script in /usr/share you mention set the variable cryptlvm with . For further reference, my own GRUB_CMDLINE_LINUX_DEFAULT contains: crypt_opts=target=system,source...
boot fails with "cryptsetup: lvm fs found but no lvm configured" [dual boot(2xlinux LVM, dm-crypt+luks)]
1,535,994,138,000
I have FC18 on a LUKS/dm-crypt encrypted hard disk. I'd like to upgrade the system via a FC20 dvd. I looked around a bit and it seems that upgrading the system via the installation procedure from the DVD would require some specific steps to ensure the correct recognition of the disk's contents. The alternative would b...
Starting with Fedora upgrade process has moved from the installer to FedUp, which you run from the system to be upgraded. (You can use the RPMs on the DVD media you have, although fetching them from the network is the recommended route.) Further instructions on the FedUp page. Make sure you check a few F18→F20 gotchas...
Upgrading Linux (Fedora) with LUKS encrypted volume
1,535,994,138,000
Currently I use rsnapshot to backup data from one encrypted ext4 drive to another. My system opens a LUKS container on each drive and runs rsnapshot according to an hourly schedule. I'm intrigued by btrfs's built in snapshot feature, and I'm curious if it can be used in place of my current setup (assuming of course I...
btrfs is a copy-on-write filesystem with many features (like error detection and correction, transparent compression, snapshots, sub-volumes, etc) that make it slower than a traditional filesystem. However, btrfs snapshots are very light-weight and take almost no time to make. And using btrfs send ... | btrfs receiv...
What are the advantages of using btrfs snapshots over rsnapshot in a backup scenario [closed]
1,535,994,138,000
I have a USB stick encrypted with LUKS + Ext4. I have forgotten the password... However, I know which words will be included in the password and have a list of all permutations of those words. About 10,000 permutations. Instead of me trying each and every permutation 1 by 1 manually (which will be a long, slow, and ...
Well, in the most naive case you can roughly do something like for a in 'fo' 'foo' 'fooo' do for b in 'ba' 'bar' 'baar' do for c in 'bz' 'baz' 'bazz' do echo -n "$a$b$c" | cryptsetup open /dev/luks luks \ && echo "'$a$b$c' is the winner!" \ && break 3 ...
Automate multiple password enties to decrypted LUKS + Ext4 USB stick
1,535,994,138,000
I've got a full drive image 2022-06-11_fedora.iso that I'm trying to manipulate its partitions on another computer. (e.g. resize LVM logical volumes, move ESP, and expand /boot partition). I cannot seem to mount the LVM volumes after decrypting the LUKS partition. How can I mount the LVM volumes after decrypting the L...
First of all, this sudo cryptsetup plainOpen --offset=808960 2022-06-11_fedora.iso cryptdisk is wrong. If the third partition is really a LUKS partition you didn't open it correctly, the plain mode in cryptsetup uses hash of the provided passphrase to decrypt the data which won't work for LUKS. Second: The /dev/mappe...
Cannot mount LVM volumes after manually decrypting LUKS partition
1,535,994,138,000
I have a laptop with Arch on it, and I sized the root partition too small. Now I want to expand the partition by taking some from the home partition. I will put the details of the specifics below. My question(s) to you is 1) Am I just expanding the root? Or shrinking the home? Or is it both? If both then does order ma...
clarify terminology Firstly, your rootfs, home, and swap are on logical volumes not partitions. I'm bringing this up because logical volumes and partitions are different animals. The instructions for one do no necessarily apply to the other. In addition, your volume group is inside a LUKS container. This is an advance...
Resize LUKS Volume(s)
1,526,978,710,000
There's an scenario that I'm worried about, and I'm not sure if it's possible to archieve. I got a machine with this setup: A LUKS-ciphered main system partition. An user with sudo access (added to sudoers list). The sudoer canno't log in as root (since he doesn't know the password), also - canno't do "sudo su". I go...
You are drawing a false dichotomy between "logging in as root" and "having sudo access". These shouldn't be thought of as such different things. If you don't trust your users with root access then don't let them use sudo! Blocking just the command sudo su is nonsense anyway, there is a sudo -s to get a root shell or...
How can I prevent a sudoer to change the LUKS master key?
1,526,978,710,000
Unfortunately my drive unlocks automatically. This makes the whole encryption useless. How do I turn off this annoying feature on a specified drive (e.g. /dev/x) ? The cryptsetup command I've found is not documented. I'm afraid this could erase the whole drive! cryptsetup luksRemoveKey /dev/x
LUKS doesn't “auto-unlock” a volume. The volume becomes accessible when you open it, which requires the key. The volume remains inaccessible when you close it; you can only close it when it is not in use, so you must close any open file and unmount the filesystem. cryptsetup luksRemoveKey would remove the key from the...
How to remove LUKS auto-unlock?