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

18
  • Humm i dont want to type all of that by hand but it is a fujitsu ah544laptop with i3 cpu and intergrated graphic 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 Feb 19 '20 at 13:20
  • 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
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.

17
  • Very great ,i just shutdown it a few seconds ago... Feb 19 '20 at 15:41
  • I will try cinnamon.first cuz that what i was using before Feb 19 '20 at 15:42
  • @SodaWithoutSparkles Try whenever you have time and let us know. No rush.
    – Ned64
    Feb 19 '20 at 15:42
  • Already the newest version Feb 19 '20 at 15:43
  • If it does not work we can add x11-common to the packages to purge and install.
    – Ned64
    Feb 19 '20 at 15:43
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

15
  • cause it is like a different case, could you post this again at unix.stackexchange.com/q/568629/396191so that more people could see it ? Feb 20 '20 at 8:35
  • Only one of the option -p /-a , -n or -y may be specified Feb 20 '20 at 8:41
  • And how to check the file ? Feb 20 '20 at 8:41
  • And i typed in sudo nano /etc/fstab and i see the file but it says it is unwritable Feb 20 '20 at 8:44
  • remount r/w first. there should be something in like '/dev/disk/by-uuid/<something> / ext4 defaults 0 1'. if there is no 'readonly', then it's okay.
    – gerhard d.
    Feb 20 '20 at 9:00
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.

1
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.