Discussion:
Questions/problems about distro integrating
(too old to reply)
Ozan Çağlayan
2010-10-17 10:39:53 UTC
Permalink
Hi,

I'm experimenting systemd on Pardus. Pardus isn't a derivative of any distribution available so currently I'm patching various parts of the code following the DISTRO-PORTING guide. No problem in here.

But I'm having some glitches that I'd like to share and fix on the distro part.

systemd version: 11
kernel version: 2.6.36_rc6

1. swap.target always fails during boot. But once triggered after boot with systemctl restart, it succesfully enables the /.swap file. .swap file is on the rootfs which is an ext4 filesystem. I'm not too powerful with systemd but can this be caused by a read-only rootfs (so before remount-rootfs.target) while trying to enable swap.target?

2. I've written down a /etc/vconsole.conf and /etc/locale.conf. While plymouth is disabled, there's no problem about setting the fonts on tty's, their keymaps, etc. but once plymouthd is launched in initramfs, systemd-setup-vconsole somehow doesn't setup the tty's correctly. Running the helper manually after boot seems to fix the issue. I think the font doesn't seem to set correctly. What are the things that should be done for a smoother plymouth/systemd integration?

3. Is there a distro-independent package/database which keeps what font/keymap/consolemap/ should be set for a specific language? Actually where does the data in vconsole.conf should come from? How does Fedora sets up those data?

Thanks,
Ozan Caglayan
Lennart Poettering
2010-10-25 22:15:50 UTC
Permalink
On Sun, 17.10.10 13:39, Ozan Çağlayan (***@pardus.org.tr) wrote:

Heya,
Post by Ozan Çağlayan
1. swap.target always fails during boot. But once triggered after boot
with systemctl restart, it succesfully enables the /.swap file. .swap
file is on the rootfs which is an ext4 filesystem. I'm not too
powerful with systemd but can this be caused by a read-only rootfs (so
before remount-rootfs.target) while trying to enable swap.target?
Unlikely.

Could you boot with systemd.log_target=kmsg systemd.log_level=debug on
the kernel cmdline please? Then, try to reproduce this and submit the
output of "dmesg" here!
Post by Ozan Çağlayan
2. I've written down a /etc/vconsole.conf and /etc/locale.conf. While
plymouth is disabled, there's no problem about setting the fonts on
tty's, their keymaps, etc. but once plymouthd is launched in
initramfs, systemd-setup-vconsole somehow doesn't setup the tty's
correctly. Running the helper manually after boot seems to fix the
issue. I think the font doesn't seem to set correctly. What are the
things that should be done for a smoother plymouth/systemd
integration?
Hmm, interesting. Works fine here, even though we have plymouth.

Can you elaborate on what exactly doesn't work? Do they tools exit
cleanly? Do you get any kind of error?
Post by Ozan Çağlayan
3. Is there a distro-independent package/database which keeps what
font/keymap/consolemap/ should be set for a specific language?
Actually where does the data in vconsole.conf should come from? How
does Fedora sets up those data?
vconsole.conf is something new, which however follows how this has been
done previously in the various distributions.

Most of the information is still stored in /etc/sysconfig/i18n
resp. /etc/sysconfig/keyboard. Both those files are read as fallback on
Fedora, to enable an easy upgrade path to the unified configuration
file.

The console fonts/keymaps/... are usually installed by the kbd or
kbd-misc package, that's where you can look for the available choices.

Lennart
--
Lennart Poettering - Red Hat, Inc.
Ozan Çağlayan
2010-11-22 09:33:53 UTC
Permalink
Post by Lennart Poettering
Heya,
Post by Ozan Çağlayan
1. swap.target always fails during boot. But once triggered after boot
with systemctl restart, it succesfully enables the /.swap file. .swap
file is on the rootfs which is an ext4 filesystem. I'm not too
powerful with systemd but can this be caused by a read-only rootfs (so
before remount-rootfs.target) while trying to enable swap.target?
Unlikely.
Could you boot with systemd.log_target=kmsg systemd.log_level=debug on
the kernel cmdline please? Then, try to reproduce this and submit the
output of "dmesg" here!
I now tried with v13 and still the issue persists. BTW, running systemctl
start .swap.swap or systemctl start swap.target correctly works after the
system is booted. Here's the dmesg output:

Installed new job swap.target/start as 22
Installed new job .swap.swap/start as 23
About to execute: /sbin/swapon -p 0 /.swap
Forked /sbin/swapon as 143
.swap.swap changed dead -> activating
Got SIGCHLD for process 143 (swapon)
Child 143 belongs to .swap.swap
.swap.swap swap process exited, code=exited status=255
.swap.swap changed activating -> failed
Job .swap.swap/start finished, success=no
Unit .swap.swap entered failed state.
swap.target changed dead -> active
Job swap.target/start finished, success=yes

# systemctl | grep swap
.swap.swap loaded failed failed /.swap
swap.target loaded active active Swap


---
Ozan Çağlayan
TUBITAK/UEKAE - Pardus Linux
http://www.pardus.org.tr/eng
Andrey Borzenkov
2010-11-22 10:42:07 UTC
Permalink
Post by Ozan Çağlayan
Post by Lennart Poettering
Heya,
Post by Ozan Çağlayan
1. swap.target always fails during boot. But once triggered after boot
with systemctl restart, it succesfully enables the /.swap file. .swap
file is on the rootfs which is an ext4 filesystem. I'm not too
powerful with systemd but can this be caused by a read-only rootfs (so
before remount-rootfs.target) while trying to enable swap.target?
Unlikely.
{pts/0}% sudo mount -o remount,ro /datastore
{pts/0}% LC_ALL=C sudo swapon -p 0 /datastore/nsr/test
swapon: /datastore/nsr/test: swapon failed: Read-only file system
{pts/0}% echo $?
255
Post by Ozan Çağlayan
Post by Lennart Poettering
Could you boot with systemd.log_target=kmsg systemd.log_level=debug on
the kernel cmdline please? Then, try to reproduce this and submit the
output of "dmesg" here!
I now tried with v13 and still the issue persists. BTW, running systemctl
start .swap.swap or systemctl start swap.target correctly works after the
Installed new job swap.target/start as 22
Installed new job .swap.swap/start as 23
About to execute: /sbin/swapon -p 0 /.swap
Forked /sbin/swapon as 143
.swap.swap changed dead -> activating
Got SIGCHLD for process 143 (swapon)
Child 143 belongs to .swap.swap
.swap.swap swap process exited, code=exited status=255
It would be interesting to see output of swapon in this case. I wonder
if we can set StandardOutput=kmsg for swap units (it is not listed in
manual for v11 that I currently have)
Post by Ozan Çağlayan
.swap.swap changed activating -> failed
Job .swap.swap/start finished, success=no
Unit .swap.swap entered failed state.
swap.target changed dead -> active
Job swap.target/start finished, success=yes
# systemctl | grep swap
.swap.swap loaded failed failed /.swap
swap.target loaded active active Swap
---
Ozan Çağlayan
TUBITAK/UEKAE - Pardus Linux
http://www.pardus.org.tr/eng
_______________________________________________
systemd-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Ozan Çağlayan
2010-11-22 12:03:55 UTC
Permalink
Pazartesi 22 Kasım 2010 günü (saat 12:42:07) Andrey Borzenkov şunları
Post by Andrey Borzenkov
{pts/0}% sudo mount -o remount,ro /datastore
{pts/0}% LC_ALL=C sudo swapon -p 0 /datastore/nsr/test
swapon: /datastore/nsr/test: swapon failed: Read-only file system
{pts/0}% echo $?
255
Hm yes it seems there's an ordering issue as swap.target doesn't explicitly
depend on remount-rootfs.service. I now tried your example and swapon returned
255 as well.

I tried writing After=remount-rootfs.service into swap.target but this doesn't
seem to work too.



---
Ozan Çağlayan
TUBITAK/UEKAE - Pardus Linux
http://www.pardus.org.tr/eng
Lennart Poettering
2010-11-22 19:32:54 UTC
Permalink
Post by Ozan Çağlayan
Pazartesi 22 Kasım 2010 günü (saat 12:42:07) Andrey Borzenkov şunları
Post by Andrey Borzenkov
{pts/0}% sudo mount -o remount,ro /datastore
{pts/0}% LC_ALL=C sudo swapon -p 0 /datastore/nsr/test
swapon: /datastore/nsr/test: swapon failed: Read-only file system
{pts/0}% echo $?
255
Hm yes it seems there's an ordering issue as swap.target doesn't explicitly
depend on remount-rootfs.service. I now tried your example and swapon returned
255 as well.
I tried writing After=remount-rootfs.service into swap.target but this doesn't
seem to work too.
Hmm, yepp, systemd starts things as early as possible, and you'd have to
order the .swap unit here properly, not swap.target.

Since the .swap unit is automatically created from fstab I guess I have
to change systemd itself to implicitly create an order dep between
file-based .swap units in remount-rootfs.service.

Lennart
--
Lennart Poettering - Red Hat, Inc.
Lennart Poettering
2010-11-22 20:12:04 UTC
Permalink
Post by Lennart Poettering
Post by Ozan Çağlayan
Pazartesi 22 Kasım 2010 günü (saat 12:42:07) Andrey Borzenkov şunları
Post by Andrey Borzenkov
{pts/0}% sudo mount -o remount,ro /datastore
{pts/0}% LC_ALL=C sudo swapon -p 0 /datastore/nsr/test
swapon: /datastore/nsr/test: swapon failed: Read-only file system
{pts/0}% echo $?
255
Hm yes it seems there's an ordering issue as swap.target doesn't explicitly
depend on remount-rootfs.service. I now tried your example and swapon returned
255 as well.
I tried writing After=remount-rootfs.service into swap.target but this doesn't
seem to work too.
Hmm, yepp, systemd starts things as early as possible, and you'd have to
order the .swap unit here properly, not swap.target.
Since the .swap unit is automatically created from fstab I guess I have
to change systemd itself to implicitly create an order dep between
file-based .swap units in remount-rootfs.service.
systemd git does this now. Please check if that fixes your problem!

Lennart
--
Lennart Poettering - Red Hat, Inc.
Ozan Çağlayan
2010-11-23 07:25:58 UTC
Permalink
Pazartesi 22 Kasım 2010 günü (saat 22:12:04) Lennart Poettering şunları
Post by Lennart Poettering
systemd git does this now. Please check if that fixes your problem!
Yes this is now fixed, thanks!

---
Ozan Çağlayan
TUBITAK/UEKAE - Pardus Linux
http://www.pardus.org.tr/eng
Lennart Poettering
2010-11-22 19:29:33 UTC
Permalink
Post by Ozan Çağlayan
Post by Lennart Poettering
Heya,
Post by Ozan Çağlayan
1. swap.target always fails during boot. But once triggered after boot
with systemctl restart, it succesfully enables the /.swap file. .swap
file is on the rootfs which is an ext4 filesystem. I'm not too
powerful with systemd but can this be caused by a read-only rootfs (so
before remount-rootfs.target) while trying to enable swap.target?
Unlikely.
Could you boot with systemd.log_target=kmsg systemd.log_level=debug on
the kernel cmdline please? Then, try to reproduce this and submit the
output of "dmesg" here!
I now tried with v13 and still the issue persists. BTW, running systemctl
start .swap.swap or systemctl start swap.target correctly works after the
Hmm, I actually didn't read your original mail properly. Sorry. Yes,
this indeed looks as if the r/o root dir could be the problem. To check
if this is really he case, could you try dropping the "ro" from the
kernel cmdline and see if it works then?

If this is really the isue a fix should be releaively easy to do.

Lennart
--
Lennart Poettering - Red Hat, Inc.
Lennart Poettering
2010-11-22 19:34:00 UTC
Permalink
Post by Lennart Poettering
Post by Ozan Çağlayan
Post by Lennart Poettering
Could you boot with systemd.log_target=kmsg systemd.log_level=debug on
the kernel cmdline please? Then, try to reproduce this and submit the
output of "dmesg" here!
I now tried with v13 and still the issue persists. BTW, running systemctl
start .swap.swap or systemctl start swap.target correctly works after the
Hmm, I actually didn't read your original mail properly. Sorry. Yes,
this indeed looks as if the r/o root dir could be the problem. To check
if this is really he case, could you try dropping the "ro" from the
kernel cmdline and see if it works then?
Or as Kay just pointed out you might actually need to pass "rw"
explicitly, just dropping "ro" will not suffice.

Lennart
--
Lennart Poettering - Red Hat, Inc.
Ozan Çağlayan
2010-11-26 12:11:30 UTC
Permalink
Post by Lennart Poettering
Hmm, interesting. Works fine here, even though we have plymouth.
Can you elaborate on what exactly doesn't work? Do they tools exit
cleanly? Do you get any kind of error?
Well plymouthd is spawned during initramfs and no console setup is done there.
Then systemd fires up while plymouth is still showing the splash screen.

(plymouth is built with --with-boot-tty=/dev/tty7.)

systemd-vconsole-setup is launched. I've added -v parameter to both loadkeys
and setfont calls and here's the what setfont says:

systemd-vconsole-setup[160]: setfont: graphics console /dev/tty0 skipped

As initramfs switches root and inits systemd on tty7, setfont skips setting
the font as plymouthd is running because it thinks this is a graphics console.

Maybe systemd-vconsole-setup should be started after plymouthd quits, I don't
know.

Ideas?

---
Ozan Çağlayan
TUBITAK/UEKAE - Pardus Linux
http://www.pardus.org.tr/eng
Bill Nottingham
2010-11-29 17:22:51 UTC
Permalink
Post by Ozan Çağlayan
Maybe systemd-vconsole-setup should be started after plymouthd quits, I don't
know.
Ideas?
vconsole setup needs done before plymouth grabs the tty.

Billl
Lennart Poettering
2010-12-24 12:18:43 UTC
Permalink
Post by Ozan Çağlayan
systemd-vconsole-setup[160]: setfont: graphics console /dev/tty0 skipped
As initramfs switches root and inits systemd on tty7, setfont skips setting
the font as plymouthd is running because it thinks this is a graphics console.
Maybe systemd-vconsole-setup should be started after plymouthd quits, I don't
know.
Ideas?
Nope, have you found out anything? I am no really sure what should be
different in your setup and the Fedora setup.

Lennart
--
Lennart Poettering - Red Hat, Inc.
Ozan Çağlayan
2010-12-24 12:17:05 UTC
Permalink
Post by Lennart Poettering
Post by Ozan Çağlayan
systemd-vconsole-setup[160]: setfont: graphics console /dev/tty0 skipped
As initramfs switches root and inits systemd on tty7, setfont skips setting
the font as plymouthd is running because it thinks this is a graphics console.
Maybe systemd-vconsole-setup should be started after plymouthd quits, I don't
know.
Ideas?
Nope, have you found out anything? I am no really sure what should be
different in your setup and the Fedora setup.
Nope. I didn't have much time to dig the issue but Bill Nottingham replied that the
vconsole-setup should be done before plymouth grabs the tty. If that's true, it's normal
that the issue arises on my setup as there's no console initialization stuff in my
initramfs.


---
Ozan Çağlayan
TUBITAK/UEKAE - Pardus Linux
http://www.pardus.org.tr/eng

Continue reading on narkive:
Loading...