Bug 707418 - Using systemd at boot, system starts in runlevel 3 (no X) instead of runlevel 5
Summary: Using systemd at boot, system starts in runlevel 3 (no X) instead of runlevel 5
Status: RESOLVED FIXED
Alias: None
Product: openSUSE 12.1
Classification: openSUSE
Component: Installation (show other bugs)
Version: Milestone 3
Hardware: All SUSE Other
: P2 - High : Major (vote)
Target Milestone: ---
Assignee: Ladislav Slezák
QA Contact: Jiri Srain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 696902
  Show dependency treegraph
 
Reported: 2011-07-21 15:18 UTC by Atri Bhattacharya
Modified: 2011-09-15 11:37 UTC (History)
6 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
yast2 logs (409.04 KB, application/x-bzip)
2011-09-14 17:53 UTC, Bernhard Wiedemann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Atri Bhattacharya 2011-07-21 15:18:55 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0

I am using a vanilla GNOME system (12.1, M3) installed on virtualbox. I am using systemd at startup using the grub-menu (F5), however that leads to my installed system starting up in text mode (runlevel 3) instead of runlevel 5. While using the traditional bootup it happens correctly to run level 5. I am not sure what logs to attache for this report.

Thanks

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Comment 1 Atri Bhattacharya 2011-07-21 15:25:28 UTC
I should add that, once the system has booted into runlevel 3, it is possible thereafter to log in as root and start X (using init 5 as usual) and the system then functions correctly, i.e. X starts up, so does Gdm, etc.
Comment 2 Bernhard Wiedemann 2011-07-26 13:35:33 UTC
I also saw this effect 100% reproducible on Factory and openQA tests with all desktop environments.
I found that /etc/init.d/xdm is not started at boot at all.
Calling it later manually makes gdm/kdm/lxdm start up normally.

example failure:
http://openqa.opensuse.org/results/openSUSE-NET-i586-Build0167-lxde
remains on console after reboot_lxde
Comment 3 Frederic Crozat 2011-08-04 13:55:54 UTC
This is because systemd package is now installed during the install phase, but /etc/inittab is modified by installer after systemd package is installed and default runlevel change is not reflected to /etc/systemd/system/default.target (it should be a symlink to /lib/systemd/system/runlevel5.target and not /lib/systemd/system/runlevel3.target, for graphical login).

installer should update the link itself.
Comment 4 Bruno Friedmann 2011-08-20 18:35:39 UTC
I think yast2 runlevel should be aware of systemd 

changing the link manually resolve my trouble for X
Comment 5 Frederic Crozat 2011-08-24 16:51:43 UTC
until Yast installer is fixed, I've implemented a workaround : systemd will now automatically create a default.target symlink at startup, based on /etc/inittab default runlevel value, if /etc/systemd/system/default.target doesn't exist.

Keeping this bug opened, so we don't forget Yast need to be fixed.
Comment 6 Bernhard Wiedemann 2011-08-24 17:00:15 UTC
This is an autogenerated message for OBS integration:
This bug (707418) was mentioned in
https://build.opensuse.org/request/show/79689 Factory / systemd
Comment 7 Ladislav Slezák 2011-09-02 08:56:08 UTC
I'll fix the Yast part.
Comment 8 Ladislav Slezák 2011-09-05 18:31:49 UTC
Fixed in yast2-runlevel-2.21.0.

Frederic, you can remove the workaround (comment #5).
Comment 9 Bernhard Wiedemann 2011-09-05 19:00:09 UTC
This is an autogenerated message for OBS integration:
This bug (707418) was mentioned in
https://build.opensuse.org/request/show/81015 Factory / yast2
https://build.opensuse.org/request/show/81016 Factory / yast2-runlevel
Comment 10 Frederic Crozat 2011-09-08 12:33:23 UTC
Thanks Ladislav, I'll remove the workaround in systemd (also we might still keep it, your change will take precedence over my workaround ;)
Comment 11 Bernhard Wiedemann 2011-09-14 10:35:30 UTC
Found that recent DVD/NET installs had a wrong /etc/systemd/system/default.target symlink to runlevel3.target for both KDE and GNOME installs.
When changing it manually to runlevel5.target, KDE started properly.
Comment 12 Ladislav Slezák 2011-09-14 12:48:43 UTC
Bernhard, could you attach y2log from the installation?
Comment 13 Bernhard Wiedemann 2011-09-14 17:53:20 UTC
Created attachment 450817 [details]
yast2 logs
Comment 14 Ladislav Slezák 2011-09-15 07:29:39 UTC
According to the log it seems that there was used some older yast2-runvel package (the line numbers in the log do match the latest code).

The bug has been fixed in 2.21.0 version.

Bernhard, could check the package version?
Comment 15 Bernhard Wiedemann 2011-09-15 07:39:31 UTC
you are right, the /.packages.root contains
yast2-runlevel 2.20.1-5.3.noarch

instsys timestamp is 20110831

so instsys needs to be updated/rebuilt for things to work
Comment 16 Ladislav Slezák 2011-09-15 11:37:54 UTC
OK, so I'm resolving it as FIXED, reopen if you can still reproduce it using updated instsys.