1

My Linux Mint boots into command interface instead of GUI and asked for login. I typed it and it popped into a terminal thing and wait for input. GUI used to be present untill I try to resolve the problem of update/packages cannot be installed before, which details could be found here. The command I typed attempting to solve the issue of unable to install packages are the following:

sudo rm /var/lib/dpkg/available 
sudo touch /var/lib/dpkg/available
sudo sh -c 'for i in /var/lib/apt/lists/*_Packages; do dpkg --merge-avail "$i"; done'
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get clean
sudo apt-get update && sudo apt-get upgrade

It worked fine a few hours ago and just did this after that. I also tried the live usb that i installed mint with and it is fine. Could anyone help?

My computer is a laptop: Fujitsu-AH544, with intergrated graphics:

VGA compatible controller : intel corporation 4th gen core proccessor intergrated graphics controller (rev 06)

startx had popped a lot of (EE)

(EE) 
Fatal server error :
(EE) Could not create lock file in /tmp/.tX0-lock
(EE) 
(EE)
Please consult the x.org foundation support at http://wiki.x.org for help 
(EE)
xinit: giving up 
xinit: unable to connect to x server: connection refused
xinit: server error
xauth: error in locking authority file /home/kevin/.Xauthority

and ask me contact https://wiki.x.org for support of a fatal server error and it give up. And sudo systemctl enable gdm gives unit file gdm.service does not exist

And now sudo timeshift --restore or sudo timeshift --list failed:read only file system

Kusalananda
  • 320,670
  • 36
  • 633
  • 936
  • Humm i dont want to type all of that by hand but it is a fujitsu ah544laptop with i3 cpu and intergrated graphic – SodaWithoutSparkles Feb 19 '20 at 12:56
  • Without that (one) line you're not going to get any help. We need that information. – roaima Feb 19 '20 at 12:58
  • Could it be that your root-fs was mounted readonly for re-checking purposes? – gerhard d. Feb 19 '20 at 13:18
  • I basically is a noob on linux and dont really know what that means – SodaWithoutSparkles Feb 19 '20 at 13:20
  • driver manager on live usb reported a wireless card error, which present from the start and i dont use wireless anyway – SodaWithoutSparkles Feb 19 '20 at 13:26
  • Does this answer your question? [How to boot Kali Linux in GUI mode](https://unix.stackexchange.com/questions/538615/how-to-boot-kali-linux-in-gui-mode) – Ned64 Feb 19 '20 at 13:27
  • Startx wont work and theres another symptom , it takes longer to boot than usual – SodaWithoutSparkles Feb 19 '20 at 13:28
  • And the recovery mode gives many error and i dont have time to read all of those before it popped into the recovery menu. Then resume normal boot brings me to the terminal again. After restart and boot normally nothing changed. – SodaWithoutSparkles Feb 19 '20 at 13:56
  • Looks like the graphics [_should_ work](https://www.linux-hardware.org/index.php?id=pci:8086-0416-10cf-17a9). Given that your Live USB works I'd suggest that maybe there's a fault with the disk drive. – roaima Feb 19 '20 at 14:20
  • It worked a few hours ago – SodaWithoutSparkles Feb 19 '20 at 14:22
  • Maybe it is caused by the command i typed when i tried to fix another issue : unable to install vlc and other packages(which that does nothing, still cannot install vlc and same error) – SodaWithoutSparkles Feb 19 '20 at 14:26
  • @roaima how do i solve that ? I remember i had a timeshift of some point. – SodaWithoutSparkles Feb 19 '20 at 15:13
  • Oh I see. The graphics used to work? That wasn't clear. – roaima Feb 19 '20 at 15:15
  • @SodaWithoutSparkles: Thanks, so the X server has problems. Please try my answer and let us know. If it works it will be faster than error analysis. – Ned64 Feb 19 '20 at 15:41
  • @gerhardd. You got it right the problem was the read only file system. solved by remounting the file system to read and write but i have to do this every single time i boot. Can i set it to read and write by default ? – SodaWithoutSparkles Feb 20 '20 at 06:03
  • @SodaWithoutSparkles i have created an answer below, so you may accept it... – gerhard d. Feb 20 '20 at 08:19
  • 1
    Good that you've got a solution Please accept the answer that works best for you. Your "solved" statement in your question has been rolled back because that's not how we do things here. – roaima Feb 20 '20 at 16:56
  • @roaima I cannot accept my own answers in 19 hours so I wanted to indicate that its solved and help others if someone have the same issue in 19 hours – SodaWithoutSparkles Feb 20 '20 at 16:59

4 Answers4

0

Perhaps important packages or files were deleted in the past. This could be found in the package manager's logs but that is complicated.

As a workaround, please try force-reinstalling the mint-meta-xfce package:

sudo aptitude purge mint-meta-cinnamon x11-common

(say "yes" if asked whether to proceed, ignore the error "not installed" here), then:

sudo apt install mint-meta-cinnamon x11-common

If you prefer a different desktop environment (you didn't specify) or this does not work please replace mint-meta-cinnamon with one of mint-meta-mate, mint-meta-xfce, mint-meta-gnome or mint-meta-kde until it works OK.

Ned64
  • 8,486
  • 9
  • 48
  • 86
0

In the terminal after boot , I login and typed the following to solve the drive read only issue:

sudo mount -o remount,rw /

And a few seconds later it turned into gui and ask my password again.

Then I need to go to the fstab config and edit something. To go there I typed the following into the terminal of the GUI:

sudo nano /etc/fstab

Then find the one without "noauto" which means finding the one auto mount. Of course not the /boot/efi one thats for boot up. Hilight all of them and paste them behind all things and add a # to comment it. For example, copy this:

/dev/disk/by-uuid/<something_1> /mnt/<something_1> auto nosuid,nodev,nofail 0 1

And paste this to the end and add the # like this:

#/dev/disk/by-uuid/<something_1> /mnt/<something_1> auto nosuid,nodev,nofail 0 1

This way I can make a quick reverse. Then edit the second slot (the string after the first space) to be /:

/dev/disk/by-uuid/<something_1> / auto nosuid,nodev,nofail 0 1

Finally change all nosuid into suid or no sudo <command> can be used.

/dev/disk/by-uuid/<something_1> / auto suid,nodev,nofail 0 1

Or just use default

/dev/disk/by-uuid/<something_1> / auto defaults 0 1

If you messed things up, go to the recovery mode and enable command line. Remount the drive using the first command. Go to fstab using the second command. Delete the things you messed up and replace that with with the one begines with #. Delete the # like this:

/dev/disk/by-uuid/<something_1> /mnt/<something_1> auto IMessedUpHere 0 1

Delete that and replace with

# /dev/disk/by-uuid/<something_1> /mnt/<something_1> auto nosuid,nodev,nofail 0 1

Then delete the #

/dev/disk/by-uuid/<something_1> /mnt/<something_1> auto nosuid,nodev,nofail 0 1

Try again until you wont mess up. Remember to renew your backup if things worked.

0
@gerhardd. You got it right the problem was the read only file system. solved 
by remounting the file system to read and write but i have to do this every
single time i boot. Can i set it to read and write by default ? 

Check your filesystem-table (/etc/fstab, see below) for that.

First, you should check the filesystem, as it seems to be in trouble.

At first, make a backup of all important data when the system is up. Then check the filesystem by rebooting into the read-only mode, open a commandprompt, and do

$> e2fsck -ny /dev/<rootpartition>

This would simulate a check, so you can see the status. If there are few errors, run

$> e2fsck -p /dev/<rootpartition>

This will check and repair the filesystem. Afterwards check the file

/etc/fstab

and verify, that your partition does not get mounted read-only. To change settings here, you would need to remount r/w. If correct, reboot.

Afterwards, you may want to tune some settings regarding your drives re-check intervals (how often and/or in which intervals should the drive be checked automatically?).

Use the tool

$> tune2fs

here. Have a look at the "-c" and "-i" options.

Best regards, gerhard

gerhard d.
  • 2,168
  • 12
  • 21
0

Apparently your root file system / is mounted read-only.

Please try the following:

sudo grep -w / /etc/fstab

Do you see something with the string "ro" in it? For example

/dev/sda2   /     ext4  acl,user_xattr,ro  0  1

If you do, please remove the ",ro" by editing the file as root (e.g. sudo nano /etc/fstab) and reboot for it to take effect.

Ned64
  • 8,486
  • 9
  • 48
  • 86