User Tools

Site Tools


raspberry-pi:raspbian

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
raspberry-pi:raspbian [2015/08/02 18:51]
josep created
raspberry-pi:raspbian [2019/01/14 21:18] (current)
josep
Line 1: Line 1:
 ====== Raspbian ====== ====== Raspbian ======
 +
 +===== Apt sources =====
 +==== Wheezy ====
 +
 +**/​etc/​apt/​sources.list**
 +<​code>​
 +deb http://​mirrordirector.raspbian.org/​raspbian/​ wheezy main contrib non-free rpi
 +</​code>​
 +
 +**/​etc/​apt/​sources.list.d/​raspi.list **
 +<​code>​
 +deb http://​archive.raspberrypi.org/​debian/​ wheezy main
 +</​code>​
 +
 +==== Jessie ====
 +
 +**/​etc/​apt/​sources.list**
 +<​code>​
 +deb http://​mirrordirector.raspbian.org/​raspbian/​ jessie main contrib non-free rpi
 +</​code>​
 +
 +**/​etc/​apt/​sources.list.d/​raspi.list **
 +<​code>​
 +deb http://​archive.raspberrypi.org/​debian/​ jessie main
 +
 +</​code>​
 +
 +
 +===== Hardware random number generator =====
 +Install the package **rng-tools** and add to **/​etc/​modules**:​
 +<​code>​
 +bcm2708-rng
 +</​code>​
  
 ===== Increase USB power ===== ===== Increase USB power =====
Line 6: Line 39:
 max_usb_current=1 max_usb_current=1
 </​code>​ </​code>​
 +
 +===== Force always HDMI output =====
 +Add this to **/​boot/​config.txt**
 +<​code>​
 +hdmi_force_hotplug=1
 +hdmi_drive=2
 +</​code>​
 +
 +https://​raspberrypi.stackexchange.com/​questions/​2169/​how-do-i-force-the-raspberry-pi-to-turn-on-hdmi
 +
 +===== Force specific HDMI resolution =====
 +Add this to **/​boot/​config.txt**
 +<​code>​
 +hdmi_group=1
 +hdmi_mode=16
 +</​code>​
 +
 +Tip: you can check the current state with **tvservice -s**
 +
 +List of resolutions:​ https://​www.raspberrypi.org/​documentation/​configuration/​config-txt/​video.md
 +
 +===== Missing man pages =====
 +  * https://​unix.stackexchange.com/​questions/​79028/​debian-install-missing-man-pages
 +  * https://​raspberrypi.stackexchange.com/​questions/​7918/​raspbmc-install-missing-man-pages
 +
 +===== Kernel =====
 +There are 2 kernels available, one distributed by the Raspberry Foundation (package **raspberrypi-bootloader**) and another by Debian/​Raspbian (packages **raspberrypi-bootloader-nokernel** and **linux-image-rpi2-rpfv**). If the last packages don't appear, add **firmware** as a component of the raspbian repository.
 +
 +https://​www.raspberrypi.org/​forums/​viewtopic.php?​t=50310&​f=66
 +
 +===== Partitions =====
 +The **PARTUUID** identifier is autogenerated from the MBR's partition table identifier, it can be shown with:
 +<​code>​
 +$ sudo fdisk /dev/sdb
 +
 +Welcome to fdisk (util-linux 2.29.2).
 +Changes will remain in memory only, until you decide to write them.
 +Be careful before using the write command.
 +
 +
 +Command (m for help): p
 +Disk /dev/sdb: 7.4 GiB, 7948206080 bytes, 15523840 sectors
 +Units: sectors of 1 * 512 = 512 bytes
 +Sector size (logical/​physical):​ 512 bytes / 512 bytes
 +I/O size (minimum/​optimal):​ 512 bytes / 512 bytes
 +Disklabel type: dos
 +Disk identifier: 0x7ee80803
 +</​code>​
 +
 +This matches the identifier of the partitions:
 +
 +<​code>​
 +$ sudo blkid
 +/dev/sdb1: LABEL="​boot"​ UUID="​9304-D9FD"​ TYPE="​vfat"​ PARTUUID="​7ee80803-01"​
 +/dev/sdb2: LABEL="​rootfs"​ UUID="​29075e46-f0d4-44e2-a9e7-55ac02d6e6cc"​ TYPE="​ext4"​ PARTUUID="​7ee80803-02"​
 +</​code>​
 +
 +<​code>​
 +sudo lsblk -o name,​mountpoint,​label,​size,​uuid
 +sudo blkid
 +</​code>​
 +
 +It can be changed using fdisk:
 +<​code>​
 +fdisk /dev/sdb
 +p
 +x
 +i
 +0x${PTUUID}
 +r
 +p
 +w
 +</​code>​
 +
 +Also, the **UUID** of the partition (different from the previous one) can be modified with:
 +<​code>​
 +sudo tune2fs /dev/sde5 -U <​UUID>​
 +</​code>​
 +
 +===== Automount USB drived =====
 +<​code>​
 +sudo aptitude install usbmount
 +</​code>​
 +
 +Create an override for **systemd-udevd**:​
 +<​code>​
 +sudo systemctl edit systemd-udevd
 +</​code>​
 +
 +And add the following in the editor that opens:
 +<​code>​
 +[Service]
 +MountFlags=shared
 +</​code>​
 +
 +===== Increase systemd service timeout =====
 +
 +Set this in the file **/​etc/​systemd/​system.conf**:​
 +
 +<​code>​
 +DefaultTimeoutStartSec=infinity
 +</​code>​
 +
 +This will avoid timing out the fsck filesystem check on boot.
 +
 +  * https://​serverfault.com/​questions/​927982/​fsck-on-boot-leads-to-systemd-dependency-failure-and-subsequent-boot-failure
 +  * https://​raspberrypi.stackexchange.com/​questions/​88721/​how-to-avoid-fsck-at-boot-timing-out
 +
 +===== References =====
 +  * https://​jmeosbn.github.io/​blog/​minimal-raspbian-pi/​
 +  * http://​angryelectron.com/​udisks-glue-initscript/​
 +  * https://​www.raspberrypi.org/​forums/​viewtopic.php?​f=29&​t=44177
 +  * https://​elinux.org/​RPi_Resize_Flash_Partitions
 +
raspberry-pi/raspbian.1438534305.txt.gz · Last modified: 2016/10/16 18:40 (external edit)