5333 private links
Raspi-config is a shell script in /usr/bin on Raspbian. In the version I'm looking at from a 2015-01-31 image, the "Advanced Option":
Enable/Disable automatic loading of I2C kernel module
Does a couple of things:
- It checks /boot/config.txt for an uncommented line beginning w/ device_tree_param= or dtparam=. If it does not find one, it asks,
Would you like the ARM I2C interface to be enabled?
If you do, it adds dtparam=i2c_arm=on to the end of /boot/config.txt.
- It then looks for an /etc/modprobe.d/raspi-blacklist.conf, which does not exist by default. If it doesn't exist, it creates it, but leaves it empty. Then it asks,
Would you like the I2C kernel module to be loaded by default?
If you do, it runs modprobe i2c-bcm2708 (i.e., loads the module) and deletes any line in that raspi-blacklist.conf file beginning with blacklist and i2c-bcm2708 or i2c_bcm2708.
If you don't, it adds blacklist i2c-bcm2708 to the end of that file if such a line doesn't exist.
Up until now, all installs of Raspberry Pi OS have had a default user called “pi”. This isn’t that much of a weakness – just knowing a valid user name doesn’t really help much if someone wants to hack into your system; they would also need to know your password, and you’d need to have enabled some form of remote access in the first place. But nonetheless, it could potentially make a brute-force attack slightly easier, and in response to this, some countries are now introducing legislation to forbid any Internet-connected device from having default login credentials.
So with this latest release, the default “pi” user is being removed, and instead you will create a user the first time you boot a newly-flashed Raspberry Pi OS image. This is in line with the way most operating systems work nowadays, and, while it may cause a few issues where software (and documentation) assumes the existence of the “pi” user, it feels like a sensible change to make at this point.
Since its launch, the Raspberry Pi OS (and most operating systems based on it) has shipped with a default "pi" user account, making it simpler to boot up a Pi and start working without needing to hook up the device to a monitor or go through a multi-step setup process. But as of today, that's changing—new installs of the Raspberry Pi OS are shedding that default user account for both security and regulatory reasons.
As a standard feature of the Linux kernel, device tree overlays (DTOs) allow for easy enabling and configuration of features and drivers, such as those contained within the standard firmware of a Raspberry Pi system. Using these DTOs it’s trivial to set up features like as a soft power-off button, triggering an external power supply and enable drivers for everything from an external real-time clock (RTC) to various displays, sensors and audio devices, all without modifying the operating system or using custom scripts.
Boot Config To Force HDMI Output for Raspberry Pi OS
Raw
config.txt
With Haiti's seismic network down, Raspberry Shakes came through in a quake.
Use OSMC to turn your Raspberry Pi into a media center! Watch your videos, listen to your music, view your photos, and take advantage of Kodi’s huge library of add-ons!
This guide was completed using a Raspberry Pi 3 Model B+ with OSMC Release 2019.04-1.
The OSMC (Open Source Media Center) is a free and open source operating system based on Debian Linux and The Kodi Project. It’s a very cool, feature-rich OS with great community support. It’s also easy to use! This guide will show you step-by-step how to get going with your own Raspberry Pi powered media center.
The Raspberry Pi’s small size and broad range of applications means it can be ideal for use in situations where power can be unreliable or not accessible. While most microcontrollers are capable of recovering in the event of a sudden power loss the Raspberry Pi is more like a desktop computer and so can suffer from data corruption if not properly shut down. It can also sometimes not be practical to power the Raspberry Pi from a standard power source and so batteries must be used instead.
The Raspberry Pi UPS Hat by Buyapi.ca is ideal for these circumstances.
In the event of a power failure the UPS Hat can notify the Raspberry Pi that power has been lost and using shell scripting the Pi can be instructed to shut down gracefully. The UPS HAT can also be used to provide a continuous 5 volt 3 amps to the Raspberry Pi from a battery source.
The battery included with the UPS hat is capable of powering the Raspberry Pi for about 30 minutes, more than enough to ensure the Pi shuts down gracefully and no data is lost.
If you’ve just got your Raspberry Pi, you probably noticed it lacks a power button. This might leave you wondering how to turn the miniature computer on and off. Let’s walk through it all, step by step.
Commercial KVM over IP solutions are usually expensive, and one of the reasons PiKVM v3 has been so popular so far is its comparatively low price of just $145 including a steel case. Shipping adds $20 to the US, and $30 to the rest of the world, and backers will not have to wait for too long, as shipping is expected to start in October, a few weeks after the Kickstarter campaign ends. More details may also be found on the official website.
If I power on both the TV (both at source and display through remote) and Raspbmc at the same time then it all works fine.
If I power on the Raspbmc and TV, but the TV display is not turned on. Sometime later I use the TV remote to power on the TV display, then I get a blank display on TV through HDMI. This is not the screensaver because using a XBMC remote does not change anything. The Raspbmc is active though, because I can ping it and connect to it using SSH.
Is there a setting in Raspbmc I can change so that it always turns on HDMI, no matter if the TV display is on or off?
Add these two lines to /boot/config.txt and reboot Raspbmc:
hdmi_force_hotplug=1
hdmi_drive=2
hdmi_force_hotplug=1 sets the Raspbmc to use HDMI mode even if no HDMI monitor is detected.
hdmi_drive=2 sets the Raspbmc to normal HDMI mode (Sound will be sent if supported and enabled). Without this line, the Raspbmc would switch to DVI (with no audio) mode by default.
Linux services can be started, stopped and reloaded with the use of scripts stocked in /etc/init.d/.
However, during start up or when changing runlevel, those scripts are searched in /etc/rcX.d/ where X is the runlevel number.
The advantage of using update-rc.d is that it will take care of removing/adding any required links to /etc/init.d automatically.
Taking apache2 as an example, let’s examine how /etc/rcX.d is looking like:
ls -l /etc/rc?.d/*apache2
As you can see, for runlevels 0, 1 and 6 there is a K at the beginning of the link, for runlevels 2, 3, 4 and 5, there is a S. Those two letters stands for Kill and Start.
On Debian and Ubuntu, runlevels 2, 3, 4 and 5 are multi-users runlevels.
-
Runlevel 0 is Halt.
-
Runlevel 1 is single user mode
-
Runlevel 6 is reboot
#Removing a Service
update-rc.d -f apache2 remove
The use of -f is to force the removal of the symlinks even if there is still /etc/init.d/apache2.
Now, if you want to re-add this service to be started on boot up, you can simply use:
update-rc.d apache2 defaults
Add a switch to your Raspberry Pi to safely shut it down without pulling the power
This is an GPS expansion board designed specifically for the both the version 1,2 and 3 Raspberry Pi+ Models.
This board is designed for applications that use a GPS connected via the serial ports to the Raspberry Pi such as timing applications or general applications that require GPS information. To facilitate PPS the time pulse output is connected to a GPIO so you can utilise this board to give NTP PPS discipline. PPS does not work without an antenna.
In this guide, I'll teach you how to build your own Raspberry Pi UPS using some simple hardware. You can use this method to power a Raspberry Pi 3, Raspberry Pi Zero, or any other Pi.