You are not logged in.

#751 2011-06-18 18:51:27

bwat47
Member
Registered: 2009-10-07
Posts: 638

Re: systemd: Yet Another Init Replacement

You could try using only systemd for initializing your daemons (systemd enable unit) and then you should be able to disable the arch-daemons.target unit which should speed things up a bit. Using systemd for your daemons/modules is covered on the wiki page.

You can see a list of systemd units by using the systemctl list-units command.

Last edited by bwat47 (2011-06-18 18:54:25)

Offline

#752 2011-06-18 20:11:01

Lothium
Member
Registered: 2009-10-10
Posts: 192

Re: systemd: Yet Another Init Replacement

Yes, I already tried this, but when I e.g. enter systemd enable networkmanager.service or crond.service, I get the message excess arguments.

Offline

#753 2011-06-18 20:15:22

bwat47
Member
Registered: 2009-10-07
Posts: 638

Re: systemd: Yet Another Init Replacement

I had the same issue, the problem is the unit names are a bit different.

For network manager you need to do: systemctl enable NetworkManager.service (note the caps)
For cron you need to do: systemctl enable cronie.service

Offline

#754 2011-06-18 20:33:38

Zom
Member
From: Sweden
Registered: 2007-10-27
Posts: 430

Re: systemd: Yet Another Init Replacement

bwat47 wrote:

I had the same issue, the problem is the unit names are a bit different.

For network manager you need to do: systemctl enable NetworkManager.service (note the caps)
For cron you need to do: systemctl enable cronie.service

This depends on what cron daemon you have installed. I think the arch default is dcron, which would be dcron.service.

Offline

#755 2011-06-18 20:34:10

Lothium
Member
Registered: 2009-10-10
Posts: 192

Re: systemd: Yet Another Init Replacement

Ok this works and alsa also works. Now I need dbus, cpufreq, netfs, cups, usblp and preload. I tried these and searched the unit files, but don't realy understand, what units I have to load for these...

Best regards!
Lothium

Offline

#756 2011-06-18 20:47:41

bwat47
Member
Registered: 2009-10-07
Posts: 638

Re: systemd: Yet Another Init Replacement

Zom wrote:
bwat47 wrote:

I had the same issue, the problem is the unit names are a bit different.

For network manager you need to do: systemctl enable NetworkManager.service (note the caps)
For cron you need to do: systemctl enable cronie.service

This depends on what cron daemon you have installed. I think the arch default is dcron, which would be dcron.service.

afiak dcron isn't default anymore.

from the wiki:
"Until May 2011, the default cron implementation for Arch Linux was dcron (Dillon's Cron), which anyway is still supported and available in [extra]:"

I haven't manually installed any different cron implementations and I had to use the cronie unit.

Last edited by bwat47 (2011-06-18 20:55:05)

Offline

#757 2011-06-18 20:53:25

bwat47
Member
Registered: 2009-10-07
Posts: 638

Re: systemd: Yet Another Init Replacement

Lothium wrote:

Ok this works and alsa also works. Now I need dbus, cpufreq, netfs, cups, usblp and preload. I tried these and searched the unit files, but don't realy understand, what units I have to load for these...

Best regards!
Lothium

dbus will probably be started automatically anyway as a lot of stuff depends on it, but afiak its just dbus.service. I believe cups is cups.service, netfs is netfs.service. Not sure about usblp and preload, but you can try looking in /etc/systemd where al the units are located.

cpufreq is a module so all you have to do is create a cpufreq file in /etc/modules-load.d

Create a file called "acpi-cpufreq.conf" and just put "acpi-cpufreq" (no quotes) in it and save it.

Last edited by bwat47 (2011-06-18 20:55:32)

Offline

#758 2011-06-18 21:08:20

Zom
Member
From: Sweden
Registered: 2007-10-27
Posts: 430

Re: systemd: Yet Another Init Replacement

bwat47 wrote:

afiak dcron isn't default anymore.

from the wiki:
"Until May 2011, the default cron implementation for Arch Linux was dcron (Dillon's Cron), which anyway is still supported and available in [extra]:"

I haven't manually installed any different cron implementations and I had to use the cronie unit.

Oh, I see!

That's what I get for not keeping up to date with the mail list I suppose big_smile

Offline

#759 2011-06-18 21:36:42

doomguard88
Member
Registered: 2011-06-04
Posts: 12

Re: systemd: Yet Another Init Replacement

Lothium wrote:

Also my systemtime is +2 hours after every restart.

You must have your hardware clock set on localtime instead of UTC on your rc.conf.

With regular init the sysinit scripts read rc.conf and set the clock accordingly.

With systemd you must create the file "/etc/adjtime" and on the THIRD line write "LOCAL"

This will change the hwclock on boot and you should have the correct time back.

Edit: Added this to the systemd wiki page

Last edited by doomguard88 (2011-06-18 22:08:54)

Offline

#760 2011-06-18 23:07:20

Zom
Member
From: Sweden
Registered: 2007-10-27
Posts: 430

Re: systemd: Yet Another Init Replacement

doomguard88 wrote:
Lothium wrote:

Also my systemtime is +2 hours after every restart.

You must have your hardware clock set on localtime instead of UTC on your rc.conf.

With regular init the sysinit scripts read rc.conf and set the clock accordingly.

With systemd you must create the file "/etc/adjtime" and on the THIRD line write "LOCAL"

This will change the hwclock on boot and you should have the correct time back.

Edit: Added this to the systemd wiki page

https://wiki.archlinux.org/index.php/Sy … caltime.3F

Offline

#761 2011-06-19 08:15:46

Lothium
Member
Registered: 2009-10-10
Posts: 192

Re: systemd: Yet Another Init Replacement

bwat47 wrote:
Lothium wrote:

Ok this works and alsa also works. Now I need dbus, cpufreq, netfs, cups, usblp and preload. I tried these and searched the unit files, but don't realy understand, what units I have to load for these...

Best regards!
Lothium

dbus will probably be started automatically anyway as a lot of stuff depends on it, but afiak its just dbus.service. I believe cups is cups.service, netfs is netfs.service. Not sure about usblp and preload, but you can try looking in /etc/systemd where al the units are located.

cpufreq is a module so all you have to do is create a cpufreq file in /etc/modules-load.d

Create a file called "acpi-cpufreq.conf" and just put "acpi-cpufreq" (no quotes) in it and save it.


I already tried this, before I wrote my question. There is no netfs.service. There is just a nfs-common.service and nfs-server.service. What do I have to use or are these the wrong units? When I try to use the dbus.service I get: "Unit files contain no applicable installation information. Ignoring." For usblp I couldn't find anything and also for preload.

Edit: Ok now I have hangs at restart or shutdown too. I tried to use rsyslog instead of syslog-ng, but this doesn't change anything. Also the problem with the time persists, but I created the file /etc/adjtime and wrote in the third line LOCALE...

I have absolutly no idea why I get so much problems with systemd. I realy want to use it, but it makes a lot of problems here. Also the boot time increases with every reboot. Maybe readahead doesn't work here very well.

Best regards!
A desperate Lothium

Last edited by Lothium (2011-06-19 08:24:18)

Offline

#762 2011-06-19 09:18:39

Gigaplex
Member
Registered: 2010-04-02
Posts: 2

Re: systemd: Yet Another Init Replacement

m45t3r wrote:
falconindy wrote:

systemd 28 is out. hwclock-{load,save}.service is now extinct:

http://lists.freedesktop.org/archives/s … 02526.html

Reading the announce, now it just use the /etc/adjtime to set the localtime offset.

Shouldn't this information included on the Wiki? Yeah, I know nobody wants to deal with localtime on RTC, but some user may need (or are just too lazy to fix that on Windows).

It's not really a matter of laziness (well, Microsoft is lazy regarding the implementation). The "fix" on Windows doesn't really work. On older versions of Windows (XP and pre-service pack Vista) it generally doesn't work with suspend/hibernate, and even on 7 where that bug is fixed it still breaks the ability to change the current time.

Offline

#763 2011-06-19 09:48:55

Agamemnon
Member
From: France
Registered: 2011-05-05
Posts: 42

Re: systemd: Yet Another Init Replacement

Hi all!

These days, I have worked on the boot time of my computer.
The output of systemd-analyse is:

Startup finished in 4050ms (kernel) + 15676ms (userspace) = 19726ms

And systemd-analyze blame is:

8459ms systemd-tmpfiles-setup.service
  2966ms udev-trigger.service
  2940ms udev.service
  2860ms media.mount
  2823ms var-run.mount
  2803ms var-lock.mount
  1793ms systemd-remount-api-vfs.service
  1359ms systemd-vconsole-setup.service
  1223ms systemd-readahead-collect.service
  1203ms systemd-readahead-replay.service
   583ms rsyslog.service
   370ms NetworkManager.service
   369ms remount-rootfs.service
   243ms systemd-modules-load.service
   229ms console-kit-log-system-start.service
   226ms cups.service
   196ms systemd-sysctl.service
   163ms dbus.service
    99ms systemd-user-sessions.service
    59ms dev-sda3.swap
    44ms console-kit-daemon.service
    26ms home.mount
     3ms accounts-daemon.service
     2ms rtkit-daemon.service

As you can see, systemd-tmpfiles-setup.service take a long time. How can I speed up this?
I use readahead which works perfectly and here is my fstab:

#
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
devpts                 /dev/pts      devpts    defaults            0      0
shm                    /dev/shm      tmpfs     nodev,nosuid        0      0
/dev/sda2 / ext4 defaults,noatime 0 1
/dev/sda3 swap swap defaults 0 0
/dev/sdb1 /home ext4 defaults,noauto,noatime,comment=systemd.automount 0 1

I use a core2duo E6600 with 4Gb of RAM, and two old good rotative hdd.

See you!


Pc: Intel core i7, 8Gb RAM, Archlinux 64bits, Gnome 3
Laptop 1: Intel Core2Duo, 4Gb RAM, Archlinux 64bits, Gnome 3
Laptop 2: Intel P4 HT, 512Mb RAM, Archlinux 32 bits, Gnome 3 too

Offline

#764 2011-06-19 09:58:05

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 816

Re: systemd: Yet Another Init Replacement

Hi, I'm curious about systemd so I'm trying to make it work on my x86_64 system. I first installed systemd, initscripts-systemd and systemd-arch-units, then added init=/bin/systemd to my kernel configuration line in grub.cfg and rebooted. At first shot it worked perfectly, booting to console. But at successive reboots it got stucked at "Started Recreate Volatile Files and Directories". It does nothing for about a minute, then it outputs some error message that, if I correctly understand, is related to some problems in mounting the swap partition. Other targets like gettys then complain about missing dependency or timeout, so I'm left with no console.
I tried to uninstall and reinstall, delete /etc/systemd, using rsyslog instead of syslog-ng but nothing helps.
I can still login with sysvinit using the fallback grub entry.
Can anyone give me some hint or good idea about what to do to fix this? Thanks.

Edit: this is the error message at boot:

systemd[1]: job dev-sda3.device/start timed out
Starting /dev/sda3 aborted because a dependency failed
systemd[1]: job dev-sda3.swap/start failed with result 'dependency'
systemd[1]: job dev-sda3.device/start failed with result 'timeout'

/dev/sda3 is my swap partition.

Last edited by snack (2011-06-19 12:21:49)

Offline

#765 2011-06-19 11:38:52

doomguard88
Member
Registered: 2011-06-04
Posts: 12

Re: systemd: Yet Another Init Replacement

Lothium wrote:

Edit: Ok now I have hangs at restart or shutdown too. I tried to use rsyslog instead of syslog-ng, but this doesn't change anything. Also the problem with the time persists, but I created the file /etc/adjtime and wrote in the third line LOCALE...

I have absolutly no idea why I get so much problems with systemd. I realy want to use it, but it makes a lot of problems here. Also the boot time increases with every reboot. Maybe readahead doesn't work here very well.

Best regards!
A desperate Lothium

It is LOCAL not LOCALE.

I use it and it works

Offline

#766 2011-06-19 12:21:29

Zom
Member
From: Sweden
Registered: 2007-10-27
Posts: 430

Re: systemd: Yet Another Init Replacement

doomguard88 wrote:

It is LOCAL not LOCALE.

I use it and it works

Again, it's not recommended in a systemd environment. It's better to set windows (or whatever other OS that messes with the clock)  to use UTC.

https://wiki.archlinux.org/index.php/Sy … caltime.3F

Sure, you can still use localtime, but there are better ways to fix the issue.

Last edited by Zom (2011-06-19 12:21:59)

Offline

#767 2011-06-19 13:02:18

bwat47
Member
Registered: 2009-10-07
Posts: 638

Re: systemd: Yet Another Init Replacement

Lothium wrote:
bwat47 wrote:
Lothium wrote:

Ok this works and alsa also works. Now I need dbus, cpufreq, netfs, cups, usblp and preload. I tried these and searched the unit files, but don't realy understand, what units I have to load for these...

Best regards!
Lothium

dbus will probably be started automatically anyway as a lot of stuff depends on it, but afiak its just dbus.service. I believe cups is cups.service, netfs is netfs.service. Not sure about usblp and preload, but you can try looking in /etc/systemd where al the units are located.

cpufreq is a module so all you have to do is create a cpufreq file in /etc/modules-load.d

Create a file called "acpi-cpufreq.conf" and just put "acpi-cpufreq" (no quotes) in it and save it.


I already tried this, before I wrote my question. There is no netfs.service. There is just a nfs-common.service and nfs-server.service. What do I have to use or are these the wrong units? When I try to use the dbus.service I get: "Unit files contain no applicable installation information. Ignoring." For usblp I couldn't find anything and also for preload.

Edit: Ok now I have hangs at restart or shutdown too. I tried to use rsyslog instead of syslog-ng, but this doesn't change anything. Also the problem with the time persists, but I created the file /etc/adjtime and wrote in the third line LOCALE...

I have absolutly no idea why I get so much problems with systemd. I realy want to use it, but it makes a lot of problems here. Also the boot time increases with every reboot. Maybe readahead doesn't work here very well.

Best regards!
A desperate Lothium

I'd imagine one of those nfs services is the correct one.

I have a feeling dbus is already getting started. Try running "systemctl status dbus.service" mine says active (running). Stuff like gdm won't even run unless dbus is already running.

Last edited by bwat47 (2011-06-19 13:15:02)

Offline

#768 2011-06-19 14:31:01

bwat47
Member
Registered: 2009-10-07
Posts: 638

Re: systemd: Yet Another Init Replacement

falconindy wrote:

The wants/after is correct. Reload should be changed to Restart.

Still seem to be having an issue after changing "ExecReload" to "ExecRestart"
[    5.063513] systemd[1]: [/etc/systemd/system/laptop-mode-tools.service:13] Unknown lvalue 'ExecRestart' in section 'Service'. Ignoring.

Offline

#769 2011-06-19 14:51:05

Zom
Member
From: Sweden
Registered: 2007-10-27
Posts: 430

Re: systemd: Yet Another Init Replacement

bwat47 wrote:
falconindy wrote:

The wants/after is correct. Reload should be changed to Restart.

Still seem to be having an issue after changing "ExecReload" to "ExecRestart"
[    5.063513] systemd[1]: [/etc/systemd/system/laptop-mode-tools.service:13] Unknown lvalue 'ExecRestart' in section 'Service'. Ignoring.

I just removed the section completely. I figure one-shot just mean it's ran and then quits, no daemon, so a reload wouldn't actually have anything to kill to be able to restart.

Could be wrong though.

Offline

#770 2011-06-19 18:11:22

christopher72
Member
Registered: 2010-09-07
Posts: 24

Re: systemd: Yet Another Init Replacement

Shutdown problem here.

I have, among others, two remote cifs filesystems in fstab:
//storage/Backups/ /mnt/remote/Backups cifs rw,username=chris,password=****,noauto,suid,users 0 0 comment=systemd.automount
//storage/Arch/       /mnt/remote/Arch       cifs rw,username=chris,password=****,noauto,suid,users 0 0 comment=systemd.automount

these get mounted correctly once I manually mount the shares as a user, with:
mount /mnt/remote/Arch
mount /mnt/remote/Backups

This - of course - is only possible once my wifi network is up.

[root@laptop-xfce etc]# systemctl | grep mnt-remote
mnt-remote-Arch.mount     loaded active mounted       /mnt/remote/Arch
mnt-remote-Backups.mount  loaded active mounted       /mnt/remote/Backups

Shutdown takes about 2 minutes, probably because of these errors:
mnt-remote-Backups.mount unmounting timed out. Stopping.
Unit mnt-remote-Backups.mount entered failed state.
mnt-remote-Arch.mount unmounting timed out. Stopping.
Unit mnt-remote-Arch.mount entered failed state.

Any ideas about what's going on here, and how to fix it? :-)
Thanks in advance!

Offline

#771 2011-06-20 13:25:41

Viper_Scull
Member
From: London, UK
Registered: 2011-01-15
Posts: 153

Re: systemd: Yet Another Init Replacement

Console System Startup Loggin status is failed:

console-kit-log-system-start.service - Console System Startup Logging
      Loaded: loaded (/lib/systemd/system/console-kit-log-system-start.service)
      Active: failed since Mon, 20 Jun 2011 15:19:11 +0200; 7min ago
     Process: 302 ExecStart=/usr/sbin/ck-log-system-start (code=exited, status=1/FAILURE)
      CGroup: name=systemd:/system/console-kit-log-system-start.service

However if i restart the service:

console-kit-log-system-start.service - Console System Startup Logging
      Loaded: loaded (/lib/systemd/system/console-kit-log-system-start.service)
      Active: active (exited) since Mon, 20 Jun 2011 15:27:57 +0200; 1s ago
     Process: 1173 ExecStart=/usr/sbin/ck-log-system-start (code=exited, status=0/SUCCESS)
      CGroup: name=systemd:/system/console-kit-log-system-start.service

Could it be anything related to the dependencies?

[Unit]
Description=Console System Startup Logging
DefaultDependencies=no
After=sysinit.target
Before=shutdown.target

[Service]
Type=oneshot
ExecStart=/usr/sbin/ck-log-system-start
RemainAfterExit=yes

Last edited by Viper_Scull (2011-06-20 18:05:56)


Athlon II X4 620 + Gigabyte 785GPM-UD2H + 4GB DDR3 + SSD OCZ Vertex2 60GB

Archlinux x86_64 + Openbox

Offline

#772 2011-06-20 14:33:03

sidneyk
Member
From: Bonner Springs, KS. USA
Registered: 2011-04-22
Posts: 129

Re: systemd: Yet Another Init Replacement

jnguyen wrote:

I noticed that "initscripts" are now an optional dependency.

Users please bear in mind that mkinitcpio still relies on /etc/rc.conf for the "keymap" and "consolefont" HOOKS, which read LOCALE, KEYMAP and CONSOLEFONT variables.

So don't be too eager to uninstall initscripts if you use those hooks (e.g. you'll need keymap HOOK for typing in your encryption password). See bug report.

I currently am running systemd without an /etc/rc.conf file (or rather with a file which has every line commented out) and everything is fine. You have to create native systemd /etc/locale.conf, /etc/hostname, /etc/vconsole.conf and maybe some others according to the wiki. You also have to enable some *.service files to replace the daemons you were loading before, if they are not already enabled and starting up as expected. You also have to create any /etc/modules_load.d/*.conf files for any special modules you need loaded or blacklisted, again according to the wiki and other info from this forum and help files that were generated during various updates to systemd and the init files. Now I am not using encryption so that may make a difference, but I have no problems with mkinitcpio. It apparently, at least in my case, does not need /etc/rc.conf. It does, of course, need /etc/mkinitcpio.conf. I could be wrong, but I'm humming along just fine without an /etc/rc.conf file.

Offline

#773 2011-06-20 15:32:56

bwat47
Member
Registered: 2009-10-07
Posts: 638

Re: systemd: Yet Another Init Replacement

I am also running it with an rc.conf almost totally commented out and it works fine. Only reason I still need initscripts is because I need to run a shutdown script due to a poweroff bug in the kernel (had to out rmmod ehci_hcd in rc.local.shutdown)

Is there no way to due this natively with systemd?

Offline

#774 2011-06-20 18:18:43

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: systemd: Yet Another Init Replacement

bwat47 wrote:

I am also running it with an rc.conf almost totally commented out and it works fine. Only reason I still need initscripts is because I need to run a shutdown script due to a poweroff bug in the kernel (had to out rmmod ehci_hcd in rc.local.shutdown)

Is there no way to due this natively with systemd?

scripts in /lib/systemd/system-shutdown/ will be run during shutdown. I don't recall exactly when this happens.

Offline

#775 2011-06-20 18:19:19

bwat47
Member
Registered: 2009-10-07
Posts: 638

Re: systemd: Yet Another Init Replacement

falconindy wrote:
bwat47 wrote:

I am also running it with an rc.conf almost totally commented out and it works fine. Only reason I still need initscripts is because I need to run a shutdown script due to a poweroff bug in the kernel (had to out rmmod ehci_hcd in rc.local.shutdown)

Is there no way to due this natively with systemd?

scripts in /lib/systemd/system-shutdown/ will be run during shutdown. I don't recall exactly when this happens.

Thanks, I'll give that a shot.

EDIT: worked perfectly, thanks smile Now the only thing I seem to need the initscripts package for is the timezone setting. If I remove initscripts there seems to be no way to set the time zone, setting it in gnome 3 date and time resets immediately. I guess its not a big deal though, as the only unit from the initscripts package I have enabled is persistent settings and it only runs on shutdown.

Last edited by bwat47 (2011-06-20 18:59:37)

Offline

Board footer

Powered by FluxBB