New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian-8 /home not mounted resulting in no display :0 #3398

Closed
niccokunzmann opened this Issue Dec 14, 2017 · 5 comments

Comments

Projects
None yet
3 participants
@niccokunzmann
Contributor

niccokunzmann commented Dec 14, 2017

Qubes OS version: R3.2

Affected TemplateVMs:

debian-8 but this only affects my app VM and not the corresponding template.


Steps to reproduce the behavior:

I start a debian-8 app vm "personal-3" .
Then, I try to open a program.

qvm-run --pass personal-3 xterm

Resulting in

xterm: Xt error: Can't open display: :0

Also,

qvm-run --pass-personal 'ls /home'

shows an empty home directory

Expected behavior:

  • I would like to see the xterm console open as a separate window.
  • No error in the vm start log, see below

Actual behavior:

When I type

sudo xl console personal-3

I can see

[FAILED] Failed to start Initialize and mount /rw and /home

I log in as user without password. And run:

systemctl status qubes-mount-dirs.service

This is the service producing the failure message.

I note that:

  1. /rw has successfully been mounted. Among other folders, it contains the /home folder.
  2. /home has not been mounted. It is empty.

General notes:

To fix this problem, I can do two things:

  1. Mount /home using sudo mount /home - it was prepared before and the command works to populate /home
  2. Restart the gui agent sudo systemctl restart qubes-gui-agent.service

Now, /home is mounted and I can open programs like firefox and xterm.


Related issues:

  • #1095 - this issue helped me find the bug

@niccokunzmann niccokunzmann changed the title from Debian-8 /home mount issue to Debian-8 /home not mounted resulting in no display :0 Dec 14, 2017

@unman

This comment has been minimized.

Show comment
Hide comment
@unman

unman Dec 14, 2017

Member

Interesting, I've not seen this.
Have you made any changes to the template? If so, if you change back to the vanilla debian-8 template, does the appVM start with mounted /home then?
If you create a new appVM based on the same template does it show the same behaviour?

Is there anything relevant in the logs? Particularly relating to mount-dirs.sh?

Member

unman commented Dec 14, 2017

Interesting, I've not seen this.
Have you made any changes to the template? If so, if you change back to the vanilla debian-8 template, does the appVM start with mounted /home then?
If you create a new appVM based on the same template does it show the same behaviour?

Is there anything relevant in the logs? Particularly relating to mount-dirs.sh?

@niccokunzmann

This comment has been minimized.

Show comment
Hide comment
@niccokunzmann

niccokunzmann Dec 14, 2017

Contributor
Contributor

niccokunzmann commented Dec 14, 2017

@unman

This comment has been minimized.

Show comment
Hide comment
@unman

unman Dec 14, 2017

Member

If so, if you change back to the vanilla debian-8 template, does the
appVM start with mounted /home then?

Yes, it should.

Yes, but does it?

Where can I see the logs?

journalctl -b

Member

unman commented Dec 14, 2017

If so, if you change back to the vanilla debian-8 template, does the
appVM start with mounted /home then?

Yes, it should.

Yes, but does it?

Where can I see the logs?

journalctl -b

@niccokunzmann

This comment has been minimized.

Show comment
Hide comment
@niccokunzmann

niccokunzmann Dec 23, 2017

Contributor

The solution for me is to put these commands in /etc/rc.local, since this is executed after mount:

mount /home
systemctl restart qubes-gui-agent.service

So, we can close the issue from my side.

Contributor

niccokunzmann commented Dec 23, 2017

The solution for me is to put these commands in /etc/rc.local, since this is executed after mount:

mount /home
systemctl restart qubes-gui-agent.service

So, we can close the issue from my side.

@niccokunzmann

This comment has been minimized.

Show comment
Hide comment
@niccokunzmann

niccokunzmann Dec 23, 2017

Contributor

Here are logs:

user@my-new-vm-test:~$ sudo journalctl -b | grep mount
Dec 23 09:44:56 localhost kernel: EXT4-fs (dm-0): couldn't mount as ext3 due to feature incompatibilities
Dec 23 09:44:56 localhost kernel: EXT4-fs (dm-0): couldn't mount as ext2 due to feature incompatibilities
Dec 23 09:44:56 localhost kernel: EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null)
Dec 23 09:44:56 localhost kernel: EXT4-fs (xvdd): mounting ext3 file system using the ext4 subsystem
Dec 23 09:44:56 localhost kernel: EXT4-fs (xvdd): mounted filesystem with ordered data mode. Opts: (null)
Dec 23 09:44:56 localhost systemd[1]: Starting Initialize and mount /rw and /home...
Dec 23 09:44:56 localhost mount-dirs.sh[321]: Private device management: checking /dev/xvdb
Dec 23 09:44:56 localhost systemd[1]: Starting Remount Root and Kernel File Systems...
Dec 23 09:44:58 localhost kernel: EXT4-fs (dm-0): re-mounted. Opts: (null)
Dec 23 09:44:58 localhost systemd[1]: Started Remount Root and Kernel File Systems.
Dec 23 09:44:59 localhost mount-dirs.sh[321]: Private device management: fsck.ext4 of /dev/xvdb succeeded
Dec 23 09:44:59 localhost kernel: EXT4-fs (xvdb): mounted filesystem with ordered data mode. Opts: discard
Dec 23 09:44:59 localhost mount-dirs.sh[321]: Checking /rw
Dec 23 09:44:59 localhost mount-dirs.sh[321]: Private device size management: enlarging /dev/xvdb
Dec 23 09:44:59 localhost mount-dirs.sh[321]: Private device size management: resize2fs of /dev/xvdb succeeded
Dec 23 09:44:59 localhost mount-dirs.sh[321]: Finished checking /rw
Dec 23 09:44:59 localhost mount-dirs.sh[321]: Mounting /rw/home onto /home
Dec 23 09:44:59 localhost mount-dirs.sh[321]: Initializing /rw/bind-dirs with files from /var/spool/cron
Dec 23 09:45:00 localhost mount-dirs.sh[321]: Bind mounting /rw/bind-dirs/var/spool/cron onto /var/spool/cron
Dec 23 09:45:00 localhost systemd[1]: Started Initialize and mount /rw and /home.
user@personal-3:~$ sudo journalctl -b | grep mount
Dec 23 09:41:19 localhost kernel: EXT4-fs (dm-0): couldn't mount as ext3 due to feature incompatibilities
Dec 23 09:41:19 localhost kernel: EXT4-fs (dm-0): couldn't mount as ext2 due to feature incompatibilities
Dec 23 09:41:19 localhost kernel: EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null)
Dec 23 09:41:19 localhost kernel: EXT4-fs (xvdd): mounting ext3 file system using the ext4 subsystem
Dec 23 09:41:19 localhost kernel: EXT4-fs (xvdd): mounted filesystem with ordered data mode. Opts: (null)
Dec 23 09:41:21 localhost systemd[1]: Starting Initialize and mount /rw and /home...
Dec 23 09:41:21 localhost mount-dirs.sh[335]: Private device management: checking /dev/xvdb
Dec 23 09:41:21 localhost mount-dirs.sh[335]: Private device management: fsck.ext4 of /dev/xvdb succeeded
Dec 23 09:41:21 localhost systemd[1]: Starting Remount Root and Kernel File Systems...
Dec 23 09:41:21 localhost kernel: EXT4-fs (dm-0): re-mounted. Opts: (null)
Dec 23 09:41:21 localhost systemd[1]: Started Remount Root and Kernel File Systems.
Dec 23 09:41:21 localhost kernel: EXT4-fs (xvdb): mounted filesystem with ordered data mode. Opts: discard
Dec 23 09:41:22 localhost mount-dirs.sh[335]: Checking /rw
Dec 23 09:41:22 localhost mount-dirs.sh[335]: Private device size management: enlarging /dev/xvdb
Dec 23 09:41:22 localhost mount-dirs.sh[335]: Private device size management: resize2fs of /dev/xvdb succeeded
Dec 23 09:41:22 localhost mount-dirs.sh[335]: Finished checking /rw
Dec 23 09:41:22 localhost mount-dirs.sh[335]: initialize_home: adjusting groupship on /rw/home/firefox to 1001
Dec 23 09:41:30 localhost mount-dirs.sh[335]: chgrp: cannot dereference ‘/rw/home/firefox/Desktop/Link to Downloads’: No such file or directory
Dec 23 09:41:30 localhost mount-dirs.sh[335]: chgrp: cannot dereference ‘/rw/home/firefox/.config/pulse/ee823d6681314a808e7249a5de64fdc9-runtime’: No such file or directory
Dec 23 09:41:30 localhost systemd[1]: qubes-mount-dirs.service: main process exited, code=exited, status=123/n/a
Dec 23 09:41:30 localhost systemd[1]: Failed to start Initialize and mount /rw and /home.
Dec 23 09:41:30 localhost systemd[1]: Unit qubes-mount-dirs.service entered failed state.

I created new users within the vm and gave them a home directory.
It seems that caused a problem. We can now assume that this error will not occur for other people except they create an other user with a new home directory.

Thus, I conclude: We can close the issue from my side. I am satisfied and found a solution.
If you think, it should be kept open, please re-open it or comment.

Should it only do chgrp to /home/user?

Contributor

niccokunzmann commented Dec 23, 2017

Here are logs:

user@my-new-vm-test:~$ sudo journalctl -b | grep mount
Dec 23 09:44:56 localhost kernel: EXT4-fs (dm-0): couldn't mount as ext3 due to feature incompatibilities
Dec 23 09:44:56 localhost kernel: EXT4-fs (dm-0): couldn't mount as ext2 due to feature incompatibilities
Dec 23 09:44:56 localhost kernel: EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null)
Dec 23 09:44:56 localhost kernel: EXT4-fs (xvdd): mounting ext3 file system using the ext4 subsystem
Dec 23 09:44:56 localhost kernel: EXT4-fs (xvdd): mounted filesystem with ordered data mode. Opts: (null)
Dec 23 09:44:56 localhost systemd[1]: Starting Initialize and mount /rw and /home...
Dec 23 09:44:56 localhost mount-dirs.sh[321]: Private device management: checking /dev/xvdb
Dec 23 09:44:56 localhost systemd[1]: Starting Remount Root and Kernel File Systems...
Dec 23 09:44:58 localhost kernel: EXT4-fs (dm-0): re-mounted. Opts: (null)
Dec 23 09:44:58 localhost systemd[1]: Started Remount Root and Kernel File Systems.
Dec 23 09:44:59 localhost mount-dirs.sh[321]: Private device management: fsck.ext4 of /dev/xvdb succeeded
Dec 23 09:44:59 localhost kernel: EXT4-fs (xvdb): mounted filesystem with ordered data mode. Opts: discard
Dec 23 09:44:59 localhost mount-dirs.sh[321]: Checking /rw
Dec 23 09:44:59 localhost mount-dirs.sh[321]: Private device size management: enlarging /dev/xvdb
Dec 23 09:44:59 localhost mount-dirs.sh[321]: Private device size management: resize2fs of /dev/xvdb succeeded
Dec 23 09:44:59 localhost mount-dirs.sh[321]: Finished checking /rw
Dec 23 09:44:59 localhost mount-dirs.sh[321]: Mounting /rw/home onto /home
Dec 23 09:44:59 localhost mount-dirs.sh[321]: Initializing /rw/bind-dirs with files from /var/spool/cron
Dec 23 09:45:00 localhost mount-dirs.sh[321]: Bind mounting /rw/bind-dirs/var/spool/cron onto /var/spool/cron
Dec 23 09:45:00 localhost systemd[1]: Started Initialize and mount /rw and /home.
user@personal-3:~$ sudo journalctl -b | grep mount
Dec 23 09:41:19 localhost kernel: EXT4-fs (dm-0): couldn't mount as ext3 due to feature incompatibilities
Dec 23 09:41:19 localhost kernel: EXT4-fs (dm-0): couldn't mount as ext2 due to feature incompatibilities
Dec 23 09:41:19 localhost kernel: EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null)
Dec 23 09:41:19 localhost kernel: EXT4-fs (xvdd): mounting ext3 file system using the ext4 subsystem
Dec 23 09:41:19 localhost kernel: EXT4-fs (xvdd): mounted filesystem with ordered data mode. Opts: (null)
Dec 23 09:41:21 localhost systemd[1]: Starting Initialize and mount /rw and /home...
Dec 23 09:41:21 localhost mount-dirs.sh[335]: Private device management: checking /dev/xvdb
Dec 23 09:41:21 localhost mount-dirs.sh[335]: Private device management: fsck.ext4 of /dev/xvdb succeeded
Dec 23 09:41:21 localhost systemd[1]: Starting Remount Root and Kernel File Systems...
Dec 23 09:41:21 localhost kernel: EXT4-fs (dm-0): re-mounted. Opts: (null)
Dec 23 09:41:21 localhost systemd[1]: Started Remount Root and Kernel File Systems.
Dec 23 09:41:21 localhost kernel: EXT4-fs (xvdb): mounted filesystem with ordered data mode. Opts: discard
Dec 23 09:41:22 localhost mount-dirs.sh[335]: Checking /rw
Dec 23 09:41:22 localhost mount-dirs.sh[335]: Private device size management: enlarging /dev/xvdb
Dec 23 09:41:22 localhost mount-dirs.sh[335]: Private device size management: resize2fs of /dev/xvdb succeeded
Dec 23 09:41:22 localhost mount-dirs.sh[335]: Finished checking /rw
Dec 23 09:41:22 localhost mount-dirs.sh[335]: initialize_home: adjusting groupship on /rw/home/firefox to 1001
Dec 23 09:41:30 localhost mount-dirs.sh[335]: chgrp: cannot dereference ‘/rw/home/firefox/Desktop/Link to Downloads’: No such file or directory
Dec 23 09:41:30 localhost mount-dirs.sh[335]: chgrp: cannot dereference ‘/rw/home/firefox/.config/pulse/ee823d6681314a808e7249a5de64fdc9-runtime’: No such file or directory
Dec 23 09:41:30 localhost systemd[1]: qubes-mount-dirs.service: main process exited, code=exited, status=123/n/a
Dec 23 09:41:30 localhost systemd[1]: Failed to start Initialize and mount /rw and /home.
Dec 23 09:41:30 localhost systemd[1]: Unit qubes-mount-dirs.service entered failed state.

I created new users within the vm and gave them a home directory.
It seems that caused a problem. We can now assume that this error will not occur for other people except they create an other user with a new home directory.

Thus, I conclude: We can close the issue from my side. I am satisfied and found a solution.
If you think, it should be kept open, please re-open it or comment.

Should it only do chgrp to /home/user?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment