Hot answers tagged

25

━━━ Setting up an access point ━━━ We are talking about an access point together with an ethernet port eth0. If you want an access point together with a wlan0 client connection to another wifi network (wlan repeater) then look at Access point as WiFi router/repeater, optional with bridge. It is possible to configure Raspbian Stretch as a wifi access point ...


22

Enter the command sudo raspi-config. Scroll down to Boot Options and select Console Autologin. Then exit the configuration menu and reboot.


9

Raspbian Jessie no longer has a file called /etc/sysctl.d -- it's now a folder of the same name. According to the read-me file in the same folder, README.sysctl, it basically says that any .conf file will be read in at boot time and processed. Any legal file name will work, but they suggested local.conf, so that's what I used. I created /etc/sysctl.d/local....


9

The kernel expects two things: a root filesystem, and an init daemon that resides on it. The init included with raspbian is a sysV style system. You are not tied to that -- other init systems commonly used with linux (remember: the kernel is linux) are systemd and upstart -- but you do need an init system of some sort. You can also put init in an ...


7

For just getting started, I think you have the wrong concept of using embedded computers (especially at the Raspberry Pi level). If you really want to build a custom OS I suggest you start at Linux from Scratch, LFS, http://www.linuxfromscratch.org/ but if you want to understand embedded computing start by Googling "embedded systems", Wikipedia, or Embedded ...


6

Yes, the Lite version of Raspbain 9 "Stretch" uses systemd just like 8 "Jessie". Also I highly recomend using systemd over other options.


6

Edit /etc/systemd/timesyncd.conf , especially the second line [Time] NTP=your.servername.goes.here FallbackNTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org #RootDistanceMaxSec=5 #PollIntervalMinSec=32 #PollIntervalMaxSec=2048


6

First to shine a light on this mish/mash of different commands. On Raspbian there are three concurrent network environments installed: old style debian networking with ifupdown is configured in etc/network/interfaces but it is deprecated. The default networking environment of Raspbian is managed by dhcpcd and configured in /etc/dhcpcd.conf. Old style ...


6

To syncronize with the time service there is a special time-sync.target. In man systemd.special you will find: time-sync.target Services responsible for synchronizing the system clock from a remote source (such as NTP client implementations) should pull in this target and order themselves before it. All services where correct time is essential should be ...


6

First we need to change over completely to systemd (which might be the future anyway), as Ingo has explained here: apt update && apt -y full-upgrade systemctl mask networking.service dhcpcd.service sudo mv /etc/network/interfaces /etc/network/interfaces~ sed -i '1i resolvconf=NO' /etc/resolvconf.conf systemctl enable systemd-networkd.service ...


5

What do I need to sucessfully boot my Raspberry Pi 2 until the init system is loaded? I think I need only the files on the boot partition, because /sbin/init is a symlink to e.g. systemd. /sbin/init and systemd are not on the boot partition. They could be. I notice there's no cmdline.txt in that github repo; normally the root= parameter in that indicates ...


5

These are for SysV compatibility, which traditionally has been the most widespread init system used on GNU/Linux since its inception. I believe SysV scripts also have a degree of compatibility with BSD init, used on other contemporary POSIX operating systems. While none of that is actually part of the POSIX specification, some commonplace cross-platform ...


5

Yes, It Is Possible While the current version of systemd in Raspbian Stable (Jessie) is 215-17+deb8u7, there are ways to get newer versions. Testing Repository (Stretch), Unstable Repository (Sid) A later version might be available in either the repository for Raspbian Testing (Stretch) or Raspbian Unstable (Sid). Be aware that the newer software is more ...


5

It's still systemd that handles the old-style init scripts, using systemd-sysv-generator: systemd-sysv-generator is a generator that creates wrapper .service units for SysV init[1] scripts in /etc/init.d/* at boot and when configuration of the system manager is reloaded. This will allow systemd(1) to support them similarly to native units. LSB ...


5

As previously mentioned, systemd services are ran by the root user instead of the pi user. However, you can configure your .service file to run the script as a different user. Under the [Service] area in your .service file, add the following line: User=pi Your .service file should look like this: [Unit] Description=The bulb server After=network-online....


5

There are mainly three setups to have a peer to peer network: unprotected ad-hoc interface by configuring the WiFi device unprotected ad-hoc interface using wpa_supplicant Only with suitable (RSN-IBSS capable) USB dongle: protected ad-hoc interface using wpa_supplicant and WPA encryption Tested with Raspbian Stretch Lite 2019-04-08 updated on 2019-04-14. ...


4

Init services run as root. Do not include sudo in service files run by init, regardless of whether it is SysV or systemd. I would try [but please see comments, this is a bit personal preference]: [Unit] Requires=local-fs.target After=local-fs.target [Service] Type=forking ExecStart=/home/pi/bin/hue.sh [Install] WantedBy=default.target Then in /home/pi/...


4

It sounds like you must be using Debian Wheezy, which is not based on systemd. If possible, upgrading the OS to Debian Jessie is recommended, which is based on systemd.


4

If you do not want to take the risk of corrupting your SD Card by disabling fsck on startup you can use your first suggestion: "lengthening the timeout" on starting services. With systemd you can easily change DefaultTimeoutStartSec in /etc/systemd/system.conf In man systemd.service you will find: TimeoutStartSec= Configures the time to wait for start-...


4

I don't know what you want to achieve but as you can read in man systemd: systemd is a system and service manager for Linux operating systems. When run as first process on boot (as PID 1), it acts as init system that brings up and maintains userspace services. [..] When run as a system instance, systemd interprets the configuration file system.conf ...


4

The actual feature was added to systemd in https://github.com/systemd/systemd/pull/8494 which is included in version 239 See docs in [1]: systemd-time-wait-sync is a system service that delays the start of units that depend on time-sync.target until the system time has been synchronized with an accurate time source by systemd-timesyncd.service. This means ...


4

There a different ways you could achieve what you want. Method 1 – use systemd-networkd If you want to use systemd just follow step 1 and step 3 of this tutorial. Just omit this command systemctl enable wpa_supplicant@wlan0, so wpa_supplicant won't bring your interface up at boot. If you want to start it manually run sudo systemctl start wpa_supplicant@...


3

I solved it. It turned out what was blocking OpenVPN from starting at boot was the local IP. The steps I took to make this work were: Commenting out the local IP address in /etc/openvpn/server.conf Switching to root with sudo -s Adding @reboot systemctl start openvpn@server.service to root's crontab


3

I did it with these instructions and it worked without problems. http://www.modmypi.com/blog/how-to-mount-an-external-hard-drive-on-the-raspberry-pi-raspian I hope this helps.


3

It is there for compatibility. While the OS has switched to systemd, not all packages have been adapted for systemd, so some amount of backwards compatibility is available to run the older package scripts. The service command is also helpful for backwards compatible with humans who expect the command to exist and work, even if it ends up restarting a ...


3

Lets approach this problem another way : systemd allows starting units in parallel. You actually don't care when every unit is finished. What you care about is when your unit starts , and how much time all other units your unit depends on take to become ready. Check which dependencies your unit/program has and make your unit dependent on them instead of ...


3

Use gphoto2 to trigger continuous periodic capture This solution uses gphoto2 to remote control the DSLR and converts a Raspberry Pi to an intervalometer. It sets up the continuous capture as a systemd service so that your camera will start shooting as soon as the Raspberry Pi is ready. Download Raspbian lite and write it to an SD card, e.g. with Etcher. ...


3

You'll need to add a working directory to your unit file as the Pi user won't have write access to put cmdfile.txt into the root of the volume (or whereever systemd roots itself). in your Unit file add... [Service] WorkingDirectory=/home/pi ...and reload the daemon. You can change this to where you want but it must be somewhere pi can write to.


3

Please note a previous version of this answer recommended installing version 18.06.1 of docker-ce however this version does not include the patch for the runc CVE that allowed for container escape as pointed out in the thread. Versions 18.06.2 and 18.06.3 both reportedly work and are not vulnerable to CVE-2019-5736. Commands below have been updated ...


3

You should analyse the exit code wget is returning: this will allow you to tell if it's a file IO problem, a network problem, etc. You should also use --timeout=seconds to make sure wget won't sit there indefinitely waiting for a connection. Having two processes is quite normal, as you use system() which executes a command using /bin/sh, and your script ...


Only top voted, non community-wiki answers of a minimum length are eligible