Second install of Leap...no X display

I’m building a backup server using Leap 42.1 . It will live “in a dark and lonely corner” (meaning that it will be headless with no keyboard or monitor) but it is connected to the local network. so when I need to administer something, I want to use VNC or rdesktop or something along those lines.

(a little history) I previously installed Leap 42.1 with the KDE desktop, but I had all sorts of problems getting the remote display to work. I was advised not to use KDE, because something is missing in the X stack. I switched to ICEwm but I wasn’t happy because the switch was not clean. I pondered long and hard before deciding to reinstall 42.1, which I did today.

The install warned me not to partition the disk myself, but to let LEAP do it for me, so I used LEAP’s partition setup. I selected xfce as my desktop environment. I also did the rest of the installation configuration, and then the installer did its thing.

On first boot, there was no display manager presented, just a text login screen. (strange, I muttered to myself) I investigated and found that in
“/etc/sysconfig/displaymanager”
displaymanager='lightdm"

So, I don’t know why I didn’t get a graphical display manager. Can anyone help here?

More info:
At this point, I decided to try to start the X environment manually, so I logged into my account and the following happened.
(I have to key this in because I couldn’t capture it from the other PC)

mark@bu>startx
xauth: file /home/mark.serverauth.1637 does not exist
(EE)
Fatal server error:
(EE) Could not create lockfile in /tmp/.tx0-lock
(EE)
(EE)
Please consult the X.OrgFoundation support
       at http://wiki.x.org
 for help
(EE)
xinit: giving up
xinit: unalbe to connect to X server: Connection refused
xinit: server error
----------------------------------------------------------
xinit failed. /usr/bin Xorg is not setuid, maybe that is the reason?
If so, either use a display manager or adjust /etc/permissions.local and run ........

So, why am I not able to get a graphical display, and how, at this point, do I fix it? I will gladly provide more information if needed.

Many thanks,
Mark

That’s not true, nothing is missing in the X stack that would prevent Plasma5 from working via VNC.

Only SDDM (which is the default display manager in a KDE installation) does not support VNC, you’d need to use a different one (kdm, gdm, or lightdm, even xdm should do).

If you use proprietary drivers (nvidia, fglrx), this won’t work though, as they break Mesa and its software OpenGL renderer. Plasma5 (and also GNOME btw) does need working OpenGL support.

So, I don’t know why I didn’t get a graphical display manager. Can anyone help here?

Please post /var/log/Xorg.0.log.

At this point, I decided to try to start the X environment manually, so I logged into my account and the following happened.
(I have to key this in because I couldn’t capture it from the other PC)

mark@bu>startx
xauth: file /home/mark.serverauth.1637 does not exist
(EE)
Fatal server error:
(EE) Could not create lockfile in /tmp/.tx0-lock
(EE)
(EE)
Please consult the X.OrgFoundation support
       at http://wiki.x.org
 for help
(EE)
xinit: giving up
xinit: unalbe to connect to X server: Connection refused
xinit: server error
----------------------------------------------------------
xinit failed. /usr/bin Xorg is not setuid, maybe that is the reason?
If so, either use a display manager or adjust /etc/permissions.local and run ........

As the message tries to say, startx only works as root.
So try it as root, or make /usr/bin/Xorg suid root like the message instructs you.

Try changing from sddm to kdm. . First instance ie KDE install

startx is depreciated use init 5 as root

Could be that you are set to boot to terminal ie init 3

could be a video issue. What card?

Thank you for the help.
I do not use any porprietary drivers.
The file /var/log/Xorg.0.log does not exist.
I su’d to root, and tried startx, but it did not work.
I got this error (and several others having to do with read only file systems):
tee: /root/.xsession-errors readonly file system.

Mark

Then the display manager/Xorg is not even trying to start.

What does “systemctl get-default” say?

I su’d to root

Well, why didn’t you just login as root in the first place? :wink:
But ok, su should work as well.

and tried startx, but it did not work.
I got this error (and several others having to do with read only file systems):
tee: /root/.xsession-errors readonly file system.

Well, here’s your problem.
The root file system is read-only (this of course also explains that there is no Xorg.0.log…), which normally only happens if the filesystem is corrupted (or the hard disk is dying).

Please post the output of “systemctl status /” and “dmesg | tail” (after trying to run startx).

OK. I “su -” to gain root access. I ran init 5 and did not get a graphical display.

I’m using the on-board video. There is no separate card, so I’m using the kernel drivers.

Thanks again,
Mark

Output oif: #systemctl getdefault

graphical.target

Here is systemctl status /


-.mount - /
    Loaded:  loaded (/proc/self/mountinfo)
    Active: active (mounted) since
       Tues 2016-08-09 12:23:13 EDT
        1 hr 52 min ago

Here is dmesg | tail:


    6.645060] input: HDA Intel PCH Rear Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input11
    6.645096] input: HDA Intel PCH Line as /devices/pci0000:00/0000:00:1f.3/sound/card0/input12
    6.645130] input: HDA Intel PCH Line Out as /devices/pci0000:00/0000:00:1f.3/sound/card0/input13
    6.645160] input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1f.3/sound/card0/input14
    6.645190] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input15
    6.645219] input: HDA Intel PCH HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input16
    6.645248] input: HDA Intel PCH HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input17
    7.143616] EXT4-fs (sda6): mounted filesystem with ordered data mode. Opts: (null)                             
    9.460219] No iBFT detected.                                                                                   
  124.263688] systemd-readahead[461]: Failed to open pack file: Read-only file system       

Thanks again,
Mark

Ok, so this part is fine.
The system is set to boot into graphical mode (which fails because of the read-only root filesystem).

Unfortunately the rest of the output doesn’t tell much.
I forgot to say that you should run “systemctl status /” as root to get all output.

What does “dmesg|grep sda6” say? (sda6 seems to be your root, if not substitute it accordingly)

Also, does “mount / -o remount,rw” fix the problem, i.e. can you run startx (as root) afterwards?

Yes. After remounting / as rw, I can run startx as root and get a graphical desktop. I tried it as a regular user, but that didn’t work.
Then, genius time, I SUID /usr/bin/Xorg and I can now start a graphical display as a regular user. Progress.
In doing these steps, my terminal got messed up, and I had to reboot. Then I had to “remount / rw” again. That leaves me one small question left. From experience, I know that (usually) file systems are set rw during boot. I’m guessing that something is wrong in the bootup sequence, so what do I fix, or how do I get “#mount / -o remount,rw” to somehow run at boot?

Thanks,
Mark

This should happen automatically, unless something is wrong with the filesystem as mentioned.

So we need to find out why.

Do you maybe have “ro” as boot option?
Try to remove it. (YaST->System->Boot Loader->Kernel Parameters)

And please post /etc/fstab.

PS: Your root filesystem is actually on /dev/sda5, as the followup messages in your previous post show (which are inside your quote so I didn’t notice them immediately… :wink: ).
So please post “dmesg|grep sda5” instead.

OK. Here we go…

Here is the Kernel Parameters line from YAST:
resume=/dev/disk/by-uuid/532b4d9a-4643-4a4e-9148-9bfa3c96df97 splash=silent quiet showopts

Here is fstab:

UUID=13B3-0DD2 /boot/efi vfat umask=0002,utf8=true 0 0
UUID=e21c03f6-040f-4ef8-acad-7f1a00dbf542 /home ext4 defaults 1 2

and here is dmesg for /dev/sda5:

1.355414]  sda: sda1 sda2 sda3 sda4 sda5 sda6
2.550544] BTRFS: device fsid 91c54a84-57c7-4d08-b90f-159111275cb7 devid 1 transid 168 /dev/sda5
2.585136] BTRFS info (device sda5): disk space caching is enabled

For what it is worth, I had to reboot the LEAP machine, and sda5 came up as read only again.

Mark

Is that all?

The installer should add an entry for / too, and with btrfs quite a few subvolumes are created by default and also added to the fstab.
Mine looks like this e.g. (default installation of Leap 42.1 beta1, no manual changes to the proposal except disabling a separate /home):

UUID=457fca7a-8052-433c-9ed9-fec832c2fb3f swap                 swap       defaults              0 0                                                                                UUID=e8bf04b6-e779-431e-8659-1204446f75df /                    btrfs      defaults              0 0                                                                                 
UUID=e8bf04b6-e779-431e-8659-1204446f75df /boot/grub2/i386-pc  btrfs      subvol=boot/grub2/i386-pc 0 0                                                                             
UUID=e8bf04b6-e779-431e-8659-1204446f75df /boot/grub2/x86_64-efi btrfs      subvol=boot/grub2/x86_64-efi 0 0                                                                        
UUID=e8bf04b6-e779-431e-8659-1204446f75df /home                btrfs      subvol=home           0 0                                                                                 
UUID=e8bf04b6-e779-431e-8659-1204446f75df /opt                 btrfs      subvol=opt            0 0                                                                                 
UUID=e8bf04b6-e779-431e-8659-1204446f75df /srv                 btrfs      subvol=srv            0 0                                                                                 
UUID=e8bf04b6-e779-431e-8659-1204446f75df /tmp                 btrfs      subvol=tmp            0 0                                                                                 
UUID=e8bf04b6-e779-431e-8659-1204446f75df /usr/local           btrfs      subvol=usr/local      0 0                                                                                 
UUID=e8bf04b6-e779-431e-8659-1204446f75df /var/crash           btrfs      subvol=var/crash      0 0                                                                                 
UUID=e8bf04b6-e779-431e-8659-1204446f75df /var/lib/libvirt/images btrfs      subvol=var/lib/libvirt/images 0 0                                                                      
UUID=e8bf04b6-e779-431e-8659-1204446f75df /var/lib/mailman     btrfs      subvol=var/lib/mailman 0 0                                                                                
UUID=e8bf04b6-e779-431e-8659-1204446f75df /var/lib/mariadb     btrfs      subvol=var/lib/mariadb 0 0                                                                                
UUID=e8bf04b6-e779-431e-8659-1204446f75df /var/lib/named       btrfs      subvol=var/lib/named  0 0                                                                                 
UUID=e8bf04b6-e779-431e-8659-1204446f75df /var/lib/pgsql       btrfs      subvol=var/lib/pgsql  0 0                                                                                 
UUID=e8bf04b6-e779-431e-8659-1204446f75df /var/log             btrfs      subvol=var/log        0 0                                                                                 
UUID=e8bf04b6-e779-431e-8659-1204446f75df /var/opt             btrfs      subvol=var/opt        0 0                                                                                 
UUID=e8bf04b6-e779-431e-8659-1204446f75df /var/spool           btrfs      subvol=var/spool      0 0                                                                                 
UUID=e8bf04b6-e779-431e-8659-1204446f75df /var/tmp             btrfs      subvol=var/tmp        0 0                                                                                 

I would suggest to add a line for /, something like this:

/dev/sda5 /                    btrfs      defaults              0 0    

(you can also use the UUID instead, if you prefer)

Then run mkinitrd (the fstab has to be accessible before / is mounted, obviously) and see if it works after a reboot.

It may be that / is not remounted read-write if there is no entry in the fstab (that specifies that it should be mounted rw in the first place…)

I was surprised about fstab also. Looks to me like it is not showing sub-volumes. The mtab file, as I understand it, is an after the mount file, but it does show the sub-volumes; and fstab is a configuration file (is it still???).

Continued thanks,
Mark

Woo hoo!!! Adding it to fstab fixed the problem. How do I know? I rebooted and the system started a graphical display.

Wow! That was a lot to track down.

I really, REALLY appreciate all of your help.

Could this be a general bug in LEAP that needs to be reported or is my system just blessed with crazyness.

Again, many thanks,

Mark

It doesn’t have to.
The subvolumes are registered in the filesystem itself as I understand it.
But having them in the fstab allows easier changes to the mount options I suppose.

To see what subvolumes really are there, use:

btrfs subvolume list /

The mtab file, as I understand it, is an after the mount file, but it does show the sub-volumes;

The mtab “file” is no real file, it is a link into the kernel’s internal mount table.
It shows what is currently mounted.

and fstab is a configuration file (is it still???).

Of course.
fstab specifies which partitions should be mounted how.
If a partition is not specified in there, it won’t get mounted on boot either.

Though with systemd there’s a different way to mount partitions/devices too, via systemd units.
systemd reads the entries in fstab and converts them to such units internally on the fly, so one can use both intermixed.

I don’t think there’s a general bug.
This is the first time I hear about such a problem.

Could it be that you manually changed the proposed partitioning and by mistake removed those entries?
The (expert) installer/partitioner does let you shoot in your own foot.
That’s not a bug though… :wink:

Having them in fstab is mandatory if you want to rollback snapshots. I could not find proper English words to describe it, so as example

btrfs subvolume create /sub1
btrfs subvolume snapshot / /snapshot

you cannot access content of subvolume “sub1” as /snapshot/sub1 - you will see empty directory. So if you “rollback” to /snapshot (by setting default subvolume to /snapshot), you must mount subvolume “sub1” onto /sub1 (which will be actually /snapshot/sub1) to access it.

Ah.
Thank you for the clarification!