encrypted mint 17.2 xfce 64-bit: after pw at start-up for cryptsetup system start-up stops

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
i_h_g_a_w

encrypted mint 17.2 xfce 64-bit: after pw at start-up for cryptsetup system start-up stops

Post by i_h_g_a_w »

hi!
This is where I'm at, please help or hint. thx

preface: running on live usb, so I can't easily quote the exact error-messages or past wrong-doings (maybe someone lets me know how to do this anyhow).
tell me if you need more details.
I don't know if my problem is located at the "sda1 boot"-level or inside the "sda5 crypt-luks"
If there is a solved problem-topic (i couldn't find one) point me to it, please.

systemconfigs: see below
partitioning:
/dev/sda1 ext2 boot
/dev/sda2 extended
/dev/sda5 crypt-luks


introduction: i couldn't run any updates or fix broken packages for some time (virtualbox not running was an error i have been getting for some time) apt-get told me the directory was full (which it was)
every apt-get operation terminated along the line of

Code: Select all

"kernel 4.4.0-127 post-removal-scrip error on line 1"

I tried to rid my system of old kernels or packages manually, since any apt-get functions (i.e. autoclean, autoremove) didn't do a thing. once i had removed some (can't remember how...), i was able to update everything (no error about post removal script) - system seemed to be running just fine.

after reboot i was not able to start the OS up again, getting these messages (
i copied these error messages by hand, so they are aproximations):

Code: Select all

/script/local-top/scriptroot error on line 1 cannot open /dev/mapper/mint--vg-root no such file

Code: Select all

waiting for /dev/mapper/mint--vg-swap_1

Code: Select all

cryptsetup sda5 successfull (someweher alonge the line): "wait or press 'S' to skip or press 'M' for manual start-up

pressing either 'S' or 'M' doesn't prompt any reaction at all

also starting in recovery mode didn't do a thing as every option i choose just halted.


I've tried to come up with a solution (halfway I did in my first step removing stuff) by searching the web and the forums, but now I've conceded to not knowing what I was doing, hoping to get my data inside my encrypted volume back and the system running again.

Can I just do a new install trough the live-usb without destroying the encrypted volume?

thanks a lot
georg


System (not applicable, because its the live-usb i'm running on right now): Host: mint Kernel: 4.8.0-53-generic i686 (32 bit gcc: 5.4.0)
Desktop: Cinnamon 3.4.3 (Gtk 3.18.9-1ubuntu3.3)
Distro: Linux Mint 18.2 Sonya

Machine: System: LENOVO product: 423345G v: Lenovo 3000 N500
Mobo: LENOVO model: KIWDX v: REFERENCE
Bios: LENOVO v: 6GET12WW(V1.03) date: 10/20/2008
CPU: Dual core Intel Pentium Dual T3200 (-MCP-) cache: 1024 KB
flags: (lm nx pae sse sse2 sse3 ssse3) bmips: 7979
clock speeds: max: 2000 MHz 1: 2000 MHz 2: 1333 MHz
Graphics: Card: Intel Mobile 4 Series Integrated Graphics Controller
bus-ID: 00:02.0
Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa)
Resolution: 1280x800@60.00hz
GLX Renderer: Mesa DRI Mobile Intel GM45 Express x86/MMX/SSE2
GLX Version: 2.1 Mesa 12.0.6 Direct Rendering: Yes
Audio: Card Intel 82801I (ICH9 Family) HD Audio Controller
driver: snd_hda_intel bus-ID: 00:1b.0
Sound: Advanced Linux Sound Architecture v: k4.8.0-53-generic
Network: Card-1: Intel PRO/Wireless 5100 AGN [Shiloh] Network Connection
driver: iwlwifi bus-ID: 04:00.0
IF: wlp4s0 state: down mac: <filter>
Card-2: Broadcom NetLink BCM5906M Fast Ethernet PCI Express
driver: tg3 v: 3.137 bus-ID: 07:00.0
IF: enp7s0 state: up speed: 100 Mbps duplex: full mac: <filter>
Drives: HDD Total Size: 330.0GB (59.0% used)
ID-1: /dev/sda model: Hitachi_HTS72503 size: 320.1GB temp: 44C
ID-2: USB /dev/sdb model: USB_Flash_Drive size: 2.1GB temp: 0C
ID-3: /dev/sdc model: Name n/a size: 7.8GB temp: 0C
Partition: ID-1: swap-1 size: 0.81GB used: 0.00GB (0%) fs: swap dev: /dev/dm-0
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 71.0C mobo: N/A
Fan Speeds (in rpm): cpu: N/A
Info: Processes: 227 Uptime: 2:44 Memory: 1878.8/4001.6MB
Init: systemd runlevel: 5 Gcc sys: 5.4.0
Client: Shell (bash 4.3.481) inxi: 2.2.35
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Mute Ant

Re: encrypted mint 17.2 xfce 64-bit: after pw at start-up for cryptsetup system start-up stops

Post by Mute Ant »

"...just do a new install trough the live-usb without destroying the encrypted volume..." No, the installer will not re-use an old encrypted-OS, it will write over the LUKS header and your data will be gone for ever.

The 'Press S to skip' message is linux trying to mend a damaged file system. It usually manages that without help, or at least with minimum yes-no answers if something has to be deleted. You might leave it doing that for an hour, or overnight.

From a Live Session you can unlock the installed Mint, then duplicate what's intact before trying to repair it. If you need to do that, (-1) for not having a backup plan in action and look here... viewtopic.php?t=236864#p1261047 ...where an encrypted Mint is being accessed from outside.
i_h_g_a_w

Re: encrypted mint 17.2 xfce 64-bit: after pw at start-up for cryptsetup system start-up stops

Post by i_h_g_a_w »

Thanks a lot Mute Ant!
Leaving it run all night didn't help, so I'll go by unlocking the system manually from outside.
Will report about the outcome.
i_h_g_a_w

Re: encrypted mint 17.2 xfce 64-bit: after pw at start-up for cryptsetup system start-up stops

Post by i_h_g_a_w »

so, I was able to unlock the installed system.
questions remain:
1.- I found out I did have sort of a backup-plan, I had timeshift installed and running (which I forgot). Can it be of any use to me?
1.a - I tried running it but I got an error message: "Failed to mount devices"
2.- now, what?

thanks a lot
WharfRat

Re: encrypted mint 17.2 xfce 64-bit: after pw at start-up for cryptsetup system start-up stops

Post by WharfRat »

It seems like you might have an erroneous entry in fstab,

Boot the live media and enter

Code: Select all

sudo -i
/sbin/cryptsetup luksOpen /dev/sda5  sda5_crypt 
mount /dev/mapper/mint--vg-root /mnt
mount /dev/sda1 /mnt/boot
and paste back the results of these

Code: Select all

grep -v ^# /mnt/etc/fstab
blkid
df /mnt/boot
i_h_g_a_w

Re: encrypted mint 17.2 xfce 64-bit: after pw at start-up for cryptsetup system start-up stops

Post by i_h_g_a_w »

that's what I got:

Code: Select all

mint ~ # grep -v ^# /mnt/etc/fstab
->

Code: Select all

/dev/mapper/mint--vg-root /               ext4    errors=remount-ro 0       1
UUID=9ab35ba4-8531-4e99-bec0-81c23090446b /boot           ext2    defaults        0       2
/dev/mapper/mint--vg-swap_1 none            swap    sw              0       0
/dev/mapper/cryptswap1 none swap sw 0 0

Code: Select all

mint ~ # blkid
->

Code: Select all

/dev/sda1: UUID="9ab35ba4-8531-4e99-bec0-81c23090446b" TYPE="ext2" PARTUUID="00027622-01"
/dev/loop0: TYPE="squashfs"
/dev/sda5: UUID="338e9907-95ee-4c01-90f1-864b75dc46f4" TYPE="crypto_LUKS" PARTUUID="00027622-05"
/dev/sdb1: UUID="2017-06-28-16-58-21-00" LABEL="Linux Mint 18.2 Cinnamon 32-bit" TYPE="iso9660" PTUUID="05f109df" PTTYPE="dos" PARTUUID="05f109df-01"
/dev/mapper/sda5_crypt: UUID="9cEVOQ-EnZ6-F64Z-WY3A-ccuZ-vXVd-eFjCD4" TYPE="LVM2_member"
/dev/mapper/mint--vg-root: UUID="0cdbd6d7-caab-446b-bd07-b6d206ab97e1" TYPE="ext4"

Code: Select all

mint ~ # df /mnt/boot
->

Code: Select all

Filesystem     1K-blocks   Used Available Use% Mounted on
/dev/sda1         240972 131297     97234  58% /mnt/boot
mint ~ # 
any chance?
WharfRat

Re: encrypted mint 17.2 xfce 64-bit: after pw at start-up for cryptsetup system start-up stops

Post by WharfRat »

Nothing is glaringly wrong with your results.

With /dev/mapper/mint--vg-root mounted to /mnt what does df -h return.
i_h_g_a_w

Re: encrypted mint 17.2 xfce 64-bit: after pw at start-up for cryptsetup system start-up stops

Post by i_h_g_a_w »

Code: Select all

Filesystem                 Size  Used Avail Use% Mounted on
udev                       2.0G     0  2.0G   0% /dev
tmpfs                      401M   12M  389M   3% /run
/dev/sdb                   1.6G  1.6G     0 100% /cdrom
/dev/loop0                 1.6G  1.6G     0 100% /rofs
aufs                       2.0G  305M  1.7G  16% /
tmpfs                      2.0G   32M  2.0G   2% /dev/shm
tmpfs                      5.0M  4.0K  5.0M   1% /run/lock
tmpfs                      2.0G     0  2.0G   0% /sys/fs/cgroup
tmpfs                      2.0G   52K  2.0G   1% /tmp
cgmfs                      100K     0  100K   0% /run/cgmanager/fs
tmpfs                      401M   48K  401M   1% /run/user/999
/dev/mapper/mint--vg-root  290G  176G  100G  64% /mnt
/dev/sda1                  236M  129M   95M  58% /mnt/boot
WharfRat

Re: encrypted mint 17.2 xfce 64-bit: after pw at start-up for cryptsetup system start-up stops

Post by WharfRat »

Well, you're certainly not short of space so the only thing I can suggest is to try rebuilding the initram after doing an fsck on mint--vg-root and /boot

Reboot the live media and run sudo e2fsck -f -y -v -C 0 /dev/sda1

Then open the LUKS container with sudo /sbin/cryptsetup luksOpen /dev/sda5 sda5_crypt followed with sudo e2fsck -f -y -v -C 0 /dev/mapper/mint--vg-root

Then follow-up with

Code: Select all

sudo -i
mount /dev/mapper/mint--vg-root /mnt
mount /dev/sda1 /mnt/boot
mount -t proc none /mnt/proc
mount --rbind /sys /mnt/sys
mount --rbind /dev /mnt/dev
/usr/sbin/chroot /mnt /bin/bash
source /etc/profile
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
export PS1="\[\033[1;33m\]chroot to ->\[\033[1;31m\](system) #\[\e[0m\] "
update-initramfs -u -k all
exit
Then reboot from the menu.
i_h_g_a_w

Re: encrypted mint 17.2 xfce 64-bit: after pw at start-up for cryptsetup system start-up stops

Post by i_h_g_a_w »

seemed to be working all fine until

Code: Select all

mint / # export PS1="\[\033[1;33m\]chroot to ->\[\033[1;31m\](system) #\[\e[0m\] "
chroot to ->(system) # update-initramfs -u -k all
which resulted in

Code: Select all

update-initramfs: Generating /boot/initrd.img-4.4.0-127-generic
Warning: No support for locale: de_AT.utf8
update-initramfs: Generating /boot/initrd.img-4.4.0-124-generic
Warning: No support for locale: de_AT.utf8
update-initramfs: Generating /boot/initrd.img-4.4.0-121-generic
grep: /boot/config-4.4.0-121-generic: No such file or directory
WARNING: missing /lib/modules/4.4.0-121-generic
Device driver support needs thus be built-in linux image!
depmod: ERROR: could not open directory /lib/modules/4.4.0-121-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
Warning: No support for locale: de_AT.utf8
depmod: WARNING: could not open /tmp/mkinitramfs_uQ7aTS/lib/modules/4.4.0-121-generic/modules.order: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_uQ7aTS/lib/modules/4.4.0-121-generic/modules.builtin: No such file or directory
update-initramfs: Generating /boot/initrd.img-4.4.0-119-generic
Warning: No support for locale: de_AT.utf8
update-initramfs: Generating /boot/initrd.img-4.4.0-109-generic
Warning: No support for locale: de_AT.utf8
WharfRat

Re: encrypted mint 17.2 xfce 64-bit: after pw at start-up for cryptsetup system start-up stops

Post by WharfRat »

In your initial post you wrote
I tried to rid my system of old kernels or packages manually, since any apt-get functions (i.e. autoclean, autoremove) didn't do a thing.
so I'm guessing that you removed the /lib/modules/4.4.0-121-generic folder which is now causing the error attempting to rebuild the initrd for 4.4.0-121.

However it appears that the initrd.img-4.4.0-119-generic and initrd.img-4.4.0-109-generic completed OK.

Did you try booting to one of those :?:
Locked

Return to “Installation & Boot”