Raspberry Pi
From Holyheads Wiki
(Difference between revisions)
(→Mounting USB drives) |
m |
||
Line 31: | Line 31: | ||
* Q: Why does my Pi restart when hotplugging a USB drive? | * Q: Why does my Pi restart when hotplugging a USB drive? | ||
− | ** | + | ** http://thestuffsido.blogspot.de/2013/05/fixing-raspberry-pi-hotplugging.html |
− | ** | + | ** http://therandomlab.blogspot.de/2013/01/raspberry-pi-mod-to-avoid-shutdown-on.html |
* Q: Does Raspberry support WOL? | * Q: Does Raspberry support WOL? | ||
− | : A: No: the Ethernet chip is connected via USB ( | + | : A: No: the Ethernet chip is connected via USB (http://www.raspberrypi.org/forum/viewtopic.php?f=53&t=39714) |
* Q: The new password is to short, or too simple | * Q: The new password is to short, or too simple | ||
Line 63: | Line 63: | ||
hd-idle -a sda -i 600 | hd-idle -a sda -i 600 | ||
− | :: for details, see | + | :: for details, see for example http://blog.is-a-geek.org/festplatten-in-den-standby-modus-versetzen-unter-ubuntu-desktopserver-mit-hd-idle (German) |
===Things I want to (or might) try sometime=== | ===Things I want to (or might) try sometime=== | ||
Line 85: | Line 85: | ||
* Temperature Sensor DS1820 | * Temperature Sensor DS1820 | ||
− | ** | + | ** http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/temperature/ |
− | ** | + | ** https://www.raspiprojekt.de/anleitungen/schaltungen/9-1wire-mit-temperatursensor-ds18b20.html?showall=&start=1 (German) |
− | ** | + | ** http://kopfkino.irosaurus.com/tutorial-ds18s20-temperatur-sensor-an-einem-raspberry-pi/ (German) |
− | * Adjust swap file (size, location -> (ext4) HDD): | + | * Adjust swap file (size, location -> (ext4) HDD): http://manpages.ubuntu.com/manpages/hardy/man8/dphys-swapfile.8.html |
==Some links== | ==Some links== | ||
Line 99: | Line 99: | ||
Blogs, forums, etc | Blogs, forums, etc | ||
− | * | + | * http://www.raspberrypi.org/phpBB3/ |
* [http://forum.stmlabs.com/forumdisplay.php?fid=6| Stm Labs Forum / Raspbmc] | * [http://forum.stmlabs.com/forumdisplay.php?fid=6| Stm Labs Forum / Raspbmc] | ||
* [http://www.welzels.de/blog/projekte/raspberry-pi/| Wel!s Blog] (German) | * [http://www.welzels.de/blog/projekte/raspberry-pi/| Wel!s Blog] (German) |
Revision as of 21:46, 30 December 2013
Contents |
Cockbook
My collection of hints, tips and tricks (supporting my memory and maybe also helping others).
Mounting USB drives
- Automount USB-Drives in Raspbian
- One may use USBmount and autofs
- I prefer udevil as used by OpenElec to get a
/media/<device_label>
mounting location - I downloaded the 0.4.3/udevil_0.4.3-1_all.deb from https://github.com/IgnorantGuru/udevil/tree/pkg
- TODO: describe build process + udev rules from open elec
- Slow USB drive performance?
- Mount with option 'noatime' or 'relatime'
- Mount without option sync (e.g. keep default async)
- Auto mount done by OpenElec:
/dev/sda1 on /var/media/Holyhead type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
Samba server / NAS
- How to install?
- Raspberry Pi: Samba Server installieren (German)
- Low Budget NAS mit einem Raspberry PI (German)
- Slow performance?
- see 'Slow USB drives' above
- use Raspbian, etc without GUI to get as much CPU power for file-transfer as possible (OpenELEC or RaspBMC constantly result in about 10-20% CPU load when idle, use top to check!)
Misc Q&A
- Q: Why does my Pi restart when hotplugging a USB drive?
- Q: Does Raspberry support WOL?
- A: No: the Ethernet chip is connected via USB (http://www.raspberrypi.org/forum/viewtopic.php?f=53&t=39714)
- Q: The new password is to short, or too simple
- A: Try adjusting the PAM settings in
/etc/pam.d/common-password
:- remove the 'obscure' setting for pam_unix.so, and add your desired minimum length (e.g. minlen=2)
password [success=1 default=ignore] pam_unix.so sha512 minlen=2
- !! This is not recommended if your box is connected to the internet or if it contains private data noone should know!!
- But it's nice for testing (if you cannot or do not want to use auto-login.)
- !! This is not recommended if your box is connected to the internet or if it contains private data noone should know!!
- Q: How to configure static IP?
- A: In /etc/network/interfaces:
iface eth0 inet static address 192.168.0.31 netmask 255.255.255.0 gateway 192.168.0.1
- Q: How to read core temperature, etc?
- A: vcgencmd: $vcgencmd measure_temp
- External USB HDD spin down
- hdparm does not work with my WD Elements (SG_IO: bad host status: 0x7)
- hd-idle works:
hd-idle -a sda -i 600
- for details, see for example http://blog.is-a-geek.org/festplatten-in-den-standby-modus-versetzen-unter-ubuntu-desktopserver-mit-hd-idle (German)
Things I want to (or might) try sometime
- bfq IO scheduler BFQ to increase throughput
- Explore overclocking limits of my RaspBerry - currently I'm using medium set via
raspi-config
- NAS/Samba
- try adjusting 'socket options' in (/etc/samba/smb.conf) to increase NAS performance: some websites recommend to disable the 'socket options', some recommend to set:
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
- adjust memory split - smaller GPU memory for server
- ext4 vs ntfs for storage drive
- Temperature Sensor DS1820
- Adjust swap file (size, location -> (ext4) HDD): http://manpages.ubuntu.com/manpages/hardy/man8/dphys-swapfile.8.html
Some links
Project sites
Blogs, forums, etc
- http://www.raspberrypi.org/phpBB3/
- Stm Labs Forum / Raspbmc
- Wel!s Blog (German)
- Raspberry Pi Blog of Jan Karres (German)
Misc
Manuals