This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.
by hydro » Thu Nov 08, 2012 3:57 pm
I'm beginning to switch to systemd on my DockStar (kernel 3.1.10-13-ARCH, U-Boot 2010.09). By now rc.conf only contains the DAEMONS array and it boots fine with sysvinit, so I tried to boot with systemd using U-Boot's usb_custom_params variable:
$this->bbcode_second_pass_code('', '
fw_setenv usb_custom_params 'init=/usr/lib/systemd/systemd'
')
After reboot the system goes to emergency mode. Serial console shows
$this->bbcode_second_pass_code('', '
[ OK ] Found device TransMemory.
[ OK ] Found device TransMemory.
[ OK ] Found device WDC_WD20EADS-00W4B0.
[ OK ] Started Remount Root and Kernel File Systems.
[ OK ] Reached target Local File Systems (Pre).
Mounting /video...
Mounting /elements...
[ 23.399999] aufs opt_add:716:mount[140]: lookup failed /elements/video (-2)
Mounting /home...
Mounting /boot...
Mounting /tmp...
Starting Load Random Seed...
[FAILED] Failed to mount /video.
See 'systemctl status video.mount' for details.
[DEPEND] Dependency failed for Local File Systems.
[DEPEND] Dependency failed for D-Bus System Message Bus Socket.
[DEPEND] Dependency failed for D-Bus System Message Bus.
[DEPEND] Dependency failed for Login Service.
[DEPEND] Dependency failed for Basic System.
[DEPEND] Dependency failed for Multi-User.
[DEPEND] Dependency failed for Graphical Interface.
Welcome to emergency mode! Type "systemctl default" or ^D to enter default mode.
Type "journalctl -b" to view system logs. Type "systemctl reboot" to reboot.
Give root password for maintenance
(or type Control-D to continue):
')
So it fails to mount the overlay "aufs" filesystem in my /etc/fstab.
$this->bbcode_second_pass_code('', '
LABEL=root / ext4 noatime 0 0
LABEL=boot /boot ext2 noatime 0 0
LABEL=home /home ext4 noatime,usrquota 0 0
LABEL=Elements /elements ext4 defaults 0 0
/elements/share /exports/share none bind 0 0
/elements/video /exports/video none bind 0 0
/home/vdr /exports/vdr none bind 0 0
...
none /video aufs br:/elements/video=rw:/home/vdr=rw 0 0
')
When I run mount /video inside emergency mode it works, so does systemctl start video.mount
From the serial output I can see that /video is mounted in the first place, even before /elements and /home, which of course must fail. Is this due to systemd's attempt to do things in parallel, so it tries to mount directories on drives that have not even started to be mounted? At least the "bind mounts" above, which in that case would also fail, seem to be executed later. Why not the aufs mount? Any ideas? Do I need linux-kirkwood?
-
hydro
-
- Posts: 210
- Joined: Wed Jun 15, 2011 2:03 pm
- Location: Germany
-
by sambul13 » Thu Nov 08, 2012 4:19 pm
Did you update rootfs from
these links?
I updated Uboot on my Dockstar to the latest on Jeff's site, then update OS to current release - now at 3.6.4-1-ARCH. It uses
systemd, and runs well.
$this->bbcode_second_pass_code('', 'grep -a --null-data U-Boot /dev/mtd0ro
U-Boot 2011.12 (Feb 12 2012 - 21:33:07)
Seagate FreeAgent DockStarU-Boot')
-
sambul13
-
- Posts: 258
- Joined: Sat Aug 18, 2012 10:32 pm
by pepedog » Thu Nov 08, 2012 4:39 pm
kernel 3.1.10-13-ARCH runs systemd just fine
Did you systemctl enable <service> for each item in DAEMONS line?
You don't have to touch uboot, just install systemd-sysvcompat and comment out DAEMONS line (if services added)
You might need this for network
$this->bbcode_second_pass_code('', 'systemctl enable dhcpcd@eth0.service')
If not dhcpcd mess with netcfg
If that reboots ok remove initscripts
-
pepedog
- Developer
-
- Posts: 2431
- Joined: Mon Jun 07, 2010 3:30 pm
- Location: London UK
-
by WarheadsSE » Thu Nov 08, 2012 4:41 pm
@Sambul13: wrong.
@hydro:
There is a way to make things dependent on each other in system, which is where your problem lies, as you pointed to with the parallelization.
I do however, have to look into the order of operations for mounting. You may want to look into the systemd auto-mounting that mounts on first access.
-
WarheadsSE
- Developer
-
- Posts: 6807
- Joined: Mon Oct 18, 2010 2:12 pm
by sambul13 » Thu Nov 08, 2012 4:52 pm
$this->bbcode_second_pass_quote('WarheadsSE', '@')Sambul13: wrong.
Just because you control the website, you can post such smart statements in each thread?
Do it as a regular user to find out their real value.
-
sambul13
-
- Posts: 258
- Joined: Sat Aug 18, 2012 10:32 pm
by hydro » Thu Nov 08, 2012 6:04 pm
$this->bbcode_second_pass_quote('pepedog', 'k')ernel 3.1.10-13-ARCH runs systemd just fine
Good to know, thank you
$this->bbcode_second_pass_quote('pepedog', '
')Did you systemctl enable <service> for each item in DAEMONS line?
You don't have to touch uboot, just install systemd-sysvcompat and comment out DAEMONS line (if services added)
I wanted to start with a
mixed systemd/sysvinit/initscripts installation and use the legacy support for DAEMONS in rc.conf. I have now enabled services, but the issue remains. I still have to type
mount /video and Ctrl+D in emergency mode, then booting proceeds and all services succeed. I use netcfg with a static IP and it works fine.
$this->bbcode_second_pass_quote('WarheadsSE', '
')Have a look at
these systemd mounting details Thanks, that did help, I changed the last entry in fstab to
$this->bbcode_second_pass_code('', '
none /video aufs noauto,x-systemd.automount,br:/elements/video=rw:/home/vdr=rw 0 0
')
and booting does succeed, because of the noauto option. Unfortunately VDR, which uses /video for recordings, fails to start. If I try to start it manually it says
$this->bbcode_second_pass_code('', '
Nov 08 18:49:24 dock systemd[1]: Started Video Disk Recorder.
Nov 08 18:49:24 dock vdr[425]: [425] ERROR: can't access /video
Nov 08 18:49:24 dock runvdr[423]: vdr: can't access video directory /video
')
It fails due to "wrong" permissions of the mount point. I have set the right permissions on the aufs branches /elements/video and /home/vdr, but they are not yet mounted on /video. I expected /video to be mounted when VDR starts, but that seems too late. Only when I access /video manually it gets mounted and subsequently VDR can be started...
Edit:
In addition to the modification of fstab I have now added
$this->bbcode_second_pass_code('', '
Requires=video.mount
After=video.mount
')
to the Unit section of the vdr service file - and it works! The
x-systemd.automount option is not needed in this approach, only
noauto.
Edit 2:
Modification of vdr.service seems no longer sufficient. I have now removed the entry in /etc/fstab and created a file /etc/systemd/system/video.mount
$this->bbcode_second_pass_code('', '
[Unit]
Description=VDR recording directory
After=elements.mount home.mount
[Mount]
What=none
Where=/video
Type=aufs
Options=br:/elements/video=rw:/home/vdr=rw
')