to recover the data: how to mount luks2 encrypted volume

also check out alternative:

GNU Linux – create new encrypted partition harddisk – how to open encrypted harddisk partition

possibility: remove harddisk, attach to sata2usb adapter, then mount on different machine like this:

# unlock encrypted harddisk
udisksctl unlock -b /dev/sdb5
# if no lvm2 is used, than
udisksctl mount -b /dev/mapper/ubuntu--vg-root

Mounted /dev/dm-1 at /media/dpm/e8cf82c0-f0a3-41b3-ab28-1f9d23fcfa72

# if lvm2 is used
apt install lvm2 cryptsetup

# activate volume groups and their logical volumes
vgchange -ay
  2 logical volume(s) in volume group "old-top-lap" now active

  ACTIVE            '/dev/old-top-lap/root' [<475.49 GiB] inherit <- this is what user wants to mount
  ACTIVE            '/dev/old-top-lap/swap_1' [980.00 MiB] inherit

# make mount point
mkdir /media/user/old-top-lap/root
# mount
mount /dev/old-top-lap/root /media/user/old-top-lap/root

# when done, locking the partition again
udisksctl unmount -b /dev/mapper/ubuntu--vg-root

what could be the problem?

With Debian9 everything was fine… since Debian10 there seems to be problems with LUKS2 and LibreBoot (won’t find the partitions) beyond the cmos clock having the wrong date and time

the otherwise flawless booting LibreBoot software install on x60s (love it)

ok one knew that correct time and time are critical, but “won’t boot” kind of critial? holy lvm cow.

this error returns when laptop battery runs completely empty and the CMOS clock resets, so LVM encrypted volumes needs a correctly set CMOS clock to boot? crazy.

(so guess the CMOS batt is also empty/defunc needs replacement)

so what one does is:

  • use another linux machine to make a bootable usb stick

  • boot linux from that stick by selecting “Search for GRUB2 configuration on external media” in LibreBoot boot screen

  • then what one does is sync with internet time (should happen automatically after a few seconds online)
  • and sync that “os time” to cmos clock like this:

sync time and set hardware cmos clock: manual mode – with internet

ntpd is the ntp service running in the background using UDP port 123.

manually syncing with given time-server:

# debian8 install the software needed
apt install ntpdate;
# centos7
yum install ntpdate;
# suse12 has it preinstalled
# debian8 stop ntp service if installed
service ntp stop;
# centos7, suse12 stop ntp service if installed
service ntpd stop;
# manually synchronise with the given timeserver
12 Jun 15:12:20 ntpdate[5510]: adjust time server offset -0.003300 sec
# or

(you could also use or see this list of european timeservers)

update cmos-clock to internet time:

# on old debian
# get time from servers and update hardware clock
ntpdate && hwclock -w;

# on new debian (very confusing for me as well)
# update time from server
ntpd -q -g;
# sync system-time to cmos-hardware-realtime-clock (BIOS)
hwclock --systohc;

one should now have an accurate clock set.

how to check if “time is right”:

you can fiddle around with aliases and refresh output time on your terminal every second… then compare it to:

# set an bash-alias, you can put it at the end of /etc/bash.bashrc
alias datum="date '+DATE: %Y-%m-%d TIME: %H:%M:%S'";
# should give you:

# display the current date and time every second, run this to compare time between two systems"
alias loopdatum="while true ; do datum ; sleep 1 ; clear; done"

# clock on the terminal, will show current date and time and update every second

Linux – set timezone and sync time and date with internet timeserver configure ntp

now finally can boot again and play some very interesting music from 🙂

-> is actually ? (or at least using this infrastructure)

“Jamendo is a Luxembourg-based music website and an open community of independent artists and music lovers. A subsidiary of Belgian company Audio Valley,[1] and Independent Management Entity (IME) since 2019.” (src)

directly to web player (hit the play button)


liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!