Stuck at boot after "cryptsetup: set up successfully"

8 Antworten [Letzter Beitrag]
Avron

I am a translator!

Offline
Beigetreten: 08/18/2020

On my X200 with Libreboot (whole disk is ciphered, uses LVM, there is a root partition and swap), after entering the password in GRUB to decipher the disk, I have the Trisquel screen asking for the password (the same like when there in an unencrypted boot partition), then I see "cryptsetup (sdb1_crypt): set up successfully" (note: the sdb first appeared after I booted on Trisquel installed external USB disk, but when I later booted on the internal disk, it continued to show that for some reason).

At that point, I have the usual clouds over sea background and the white Triskquel getting whiter and diming repeatedly, and this continues forever. The disk led on the lapto is flashing briefly more or less regularly. I finally stopped it, booted on a USB for install, used gnome disks to un cipher and check the root file system, gnome disk said it was ok, so I tried to boot again, but same result.

This happened after I (stupidly?) entered "sudo systemctl restart lightdm.service" during a session, which got me in console mode, then I just did "sudo reboot now". I could also just reinstall Trisquel (I have no backup but I have no data on this laptop, just configuration and maybe I could copy my home dir since apparently the disk works) but maybe there is an easier solution?

Avron

I am a translator!

Offline
Beigetreten: 08/18/2020

After leaving it running for a while, I tried to press the power button. If I press very briefly, nothing happens. If I press slightly longer (half a second approximately), there is some disk activity for more than a second and then the computer shuts down. That does not look like a forced shutdown.

damidu
Offline
Beigetreten: 03/30/2021

Hi,

I have the same thing with my laptop, but it's because I have disabled lightdm. I need to do ctrl+alt+F2 to get the tty login.

What does it does with systemcl enable lightdm ?

Avron

I am a translator!

Offline
Beigetreten: 08/18/2020

I can't get a login prompt in any console. I tried ctrl+alt+F2 (and F3, until F7), I just get a blinking cursor, nothing else.

andyprough
Offline
Beigetreten: 02/12/2015

Do you know how to chroot into it from a live USB stick with Trisquel on it?

I'll put the steps here in case they help. Also it will be something I can find here later for myself:

1. Download Trisquel and make a live USB stick using your favorite method
2. Boot up with the live USB stick on the broken computer, boot into the live environment, become root:
sudo -i
3. Determine your disk layout (do these steps logged in as root unless otherwise specified):
fdisk -l
You should get some output showing what the partitions are on your laptop hard drive, like /dev/sdb1 being your boot partition, /dev/sdb2 being your root partition, etc. You should also get some output showing what partition your live USB is on, such as /dev/sda1. For purposes of this walk-through, I'll say that /dev/sdb1 is the laptop's boot partition, /dev/sdb2 is the laptop's root partition, and /dev/sda1 is the USB stick's root partition.

4. Make a directory on the Live USB stick to mount the laptop hard drive onto:
mkdir /mnt/laptop

5. Mount the laptop partitions onto the Live USB stick:
mount /dev/sdb2 /mnt/laptop
mount /dev/sdb1 /mnt/laptop/boot

Note - if you don't have a separate /boot/ partition on your laptop hard drive, then you would skip the step of mounting the /boot/ partition.

6. Now mount some folders from the USB stick that contain device files we will need when we chroot into the laptop:
mount -t proc /proc /mnt/laptop/proc
mount -o bind /sys /mnt/laptop/sys
mount -o bind /dev /mnt/laptop/dev
mount --make-rslave /mnt/laptop/sys
mount --make-rslave /mnt/laptop/dev

7. mount the pseudo terminals so you can use apt to update or install software in the chroot environment:

mount -o bind /dev/pts /mnt/laptop/dev/pts

8. Normally Trisquel is probably running on /dev/sda when your laptop is working, but here we are mounting the laptop hard drive (as seen from the USB stick) as /dev/sdb. Now let's redirect it so that when we are in the chroot, we see the laptop hard drive as /dev/sda like it wants to see it:
mount -o bind /dev/sdb /mnt/laptop/dev/sda

NOTE - the above may be reverse for you, since you mentioned in your post that the hard drive seemed to be booting as /dev/sdb1. If that's the case, you may just want to tell the chroot that the /dev/sdb is really /dev/sdb. I tried this on my Trisquel install and it did not hurt:
mount -o bind /dev/sdb /mnt/laptop/dev/sdbOnly do that if your laptop hard drive is NOT showing up as /dev/sda when it's running itself in the laptop.

9. chroot into the laptop now:
chroot /mnt/laptop
You may get a warning message about bin/bash. Keep going.

10. You'll be logged into the chroot environment as root. Now, get the source right for your path environment variables:
source /etc/environment

11. Check to see that from within the chroot that you really are looking at the laptop hard drive as /dev/sda:
fdisk -l /dev/sda
Hopefully you'll get some output saying that /dev/sda1 is the boot sector, /dev/sda2 is the linux root filesystem, and so forth.

Note - in your case you might be checking to see if the laptop hard drive is listed as /dev/sdb:
fdiskk -l /dev/sdb

12. Try to update the system on the laptop hard drive:
apt update
apt upgrade

Let us know any trouble you have inside the chroot, such as lack of network access.

While inside the chroot you can look for other things to fix, besides just updating your software.

13. When finished, exit out of the chroot back to the USB stick, make yourself root again, and unmount everything:
exit
sudo -i
umount -f /mnt/laptop

14. Shut down, remove the USB stick, and see if you can boot your laptop now:
halt

Edit: my unmount command from step 13 was incorrect - fixed it

Avron

I am a translator!

Offline
Beigetreten: 08/18/2020

Thanks for the detailed procedure. I'd suggest enhancing it to cover the cases of encrypted disk and LVM which the Trisquel graphical installer proposes by default. I managed to do it thanks to https://www.cyberciti.biz/faq/howto-centos-rhel-fedora-debian-fsck-ext3-on-luks-volume/ (but some things have changed a little since this was written). As soon as as I have a bit of time, I can propose the enhancements.

Actually, I solved my problem without using this procedure. I just booted on an installation USB, mounted my disk and removed /etc/lightdm.conf which I had just created before and then it works.

So this /etc/lightdm.conf was the problem. Why did I create it? Because I am still trying to solve another problem: run graphical apps on my desktop but without running Xorg on my desktop as it has general protection faults regularly (3 times yesterday).

I tried to ssh -Y from my laptop to my desktop and then run abrower, but the ssh process on my laptop then takes 100% CPU whenever I scroll in a window and I even lose control of it rather quickly. Then I found https://unix.stackexchange.com/questions/44818/how-can-i-connect-to-a-remote-x-server-without-ssh that says:

You have to ensure that your X Server accepts connection via TCP, nowadays this is typically disabled as it is a security problem. You basically have to run your Xorg server without the -nolisten tcp option. For gdm3 you can add DisallowTCP=false to /etc/gdm3/daemon.conf under the security context. Afterwards you have to restart gdm3. Now ps axuf | grep Xorg should show your X-Server without the -nolisten tcp option.

Now your XServer should listen on port 6000, you can check with netstat
-anp | grep 600.

I can confirm that Xorg runs with -nolisten tcp on my laptop and was started by lightdm. So I tried to get lightdm run Xorg without this option, looked at the man page, saw it was referring to /etc/lightdm.conf but could not find this on my laptop, so I just tried to create one with "DisallowTCP=false".

I guess I'll have to find some better documentation of lightdm than the man page.

As an old (I started in 1994) UNIX user, I always expected "man" to provide complete and readable information but I must say I am nowadays often disappointed by them. man lightdm gives nearly zero information and man lightdm.conf does not exist.

I found https://wiki.debian.org/LightDM that says to use "lightdm --show-config" to see the effective lightdm configuration and in there, I see the files are actually in /usr/share/lightdm/lightdm.conf.d/, so the man page even gives wrong information (and the Debian wiki points to /etc/lightdm.conf and /etc/lightdm.d/ which are in fact not used). This is terrible. Still, the Debian wiki links to https://github.com/canonical/lightdm and there it points to https://github.com/Canonical/lightdm/blob/master/data/lightdm.conf supposed to be "a configuration file showing all the possible keys". So I am going to work on that.

Also, since I am expressing my frustations on current man pages, I remember that whenever a command had something like 150 options, I used to go to the "EXAMPLE" section that contained the most interesting things for the novice user a bit lost in the 150 options, but this section seems to have fully disappeared now.

andyprough
Offline
Beigetreten: 02/12/2015

>"I can confirm that Xorg runs with -nolisten tcp on my laptop and was started by lightdm. So I tried to get lightdm run Xorg without this option, looked at the man page, saw it was referring to /etc/lightdm.conf but could not find this on my laptop, so I just tried to create one with "DisallowTCP=false"."

Is it acceptable to just get rid of lightdm altogether? I often use tbsm as a cli login manager replacement when I don't want to run any of the typical gui login managers: https://github.com/loh-tar/tbsm

tbsm has XserverArg="@Xdisplay@ -nolisten tcp" as an option you can enable/disable in tbsm.conf: https://github.com/loh-tar/tbsm/blob/master/src/tbsm.conf

Avron

I am a translator!

Offline
Beigetreten: 08/18/2020

If I do "sudo systemctl set-default multi-user.target", I am in text mode after boot. I can login but Xorg won't be started. How does it work with tbsm? Will tbsm lauch Xorg and the Mate session? Or do I have to configure that?

I use the console login with Parabola on board with a low end ARM CPU, then I use xinit to start twm with Xorg, and I on purpose stick with that because the processing power of that machine is really low (but still, it handles a 2560x1440 screen resolution fine). But I don't have the slighest clue how that could be used to launch a Mate session properly, with all the things that programmes on Trisquel normally expect to see.

andyprough
Offline
Beigetreten: 02/12/2015

>"How does it work with tbsm? Will tbsm lauch Xorg and the Mate session? Or do I have to configure that?"

Yes, as long as there is a .desktop file at /usr/share/xsessions/, then tbsm will launch it. In my experience. Anything from DWM to JWM to CWM to LXQT to Mate and XFCE and KDE. Hasn't given me a problem with anything. I just tried it again with Mate on Trisquel 10 beta - works like a charm.

Super easy to install too.
git clone https://github.com/loh-tar/tbsm
cd tbsm/
sudo make install

Then you can bring it up with
tbsm
from any tty. Don't need to uninstall lightdm I don't think - as long as you don't log in with lightdm and you switch to a tty, you can bring up tbsm and start a Mate session on that tty. I just started Mate with tbsm from tty1, and tty7 still has lightdm waiting for my input. I don't know if that will suit your needs though - possibly to do your X11 forwarding you might need to uninstall lightdm.