Episode-018

Play

Ep-018Kwisher

SSD Trim for Linux
enabled email notifications on my Pi AP and received the following notification:
/etc/cron.daily/fstrim:
fstrim: /: FITRIM ioctl failed: Operation not supported
run-parts: /etc/cron.daily/fstrim exited with return code 1

Googled for fstrim and found:
http://man7.org/linux/man-pages/man8/fstrim.8.html
http://blog.neutrino.es/2013/howto-properly-activate-trim-for-your-ssd-on-linux-fstrim-lvm-and-dmcrypt/

copied the script to /usr/sbin/trim.sh:

#!/bin/sh
#
# To find which FS support trim, we check that DISC-MAX (discard max bytes)
# is great than zero. Check discard_max_bytes documentation at
# https://www.kernel.org/doc/Documentation/block/queue-sysfs.txt
#
for fs in $(lsblk -o MOUNTPOINT,DISC-MAX,FSTYPE | grep -E ‘^/.* [1-9]+.* ‘ | awk ‘{print $1}’); do fstrim “$fs”

done

Made the script executable:
chmod u+x /usr/sbin/trim.sh

Added it crontab for weekly execution:
0 1 * * 1 /usr/sbin/trim.sh

Honkeymagoo

Using Qemu to emulate the Raspberry Pi *SUCCESS*

http://www.raspberrypi.org/forums/viewtopic.php?f=29&t=37386

How to use qemu to expand the size of your .img = qemu-img resize 2013-10-13-wheezy-minibian.img +4G

Then to expand you’re rootfs you can use = fdisk /dev/sda
then type p to show the partition table
then type d to delete a partition
then 2 for the linux partition
then n to create a new partition
then p for primary
then you should just be able to hit enter to use both the default start sector, and the default last sector
then w to write the changes to the drive on the next reboot

Example: qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append “root=/dev/sda2 panic=1” -hda ~/qemu_vms/2013-10-13-wheezy-minibian.img -redir tcp:5022::22 -redir tcp:5080::80

how to ssh into your new emulated machine = ssh -p5022 root@localhost

If you install a webservice on your .img how to navigate to it = http://localhost:5080

FiftyOneFifty

Goodbye Linux Outlaws

Future project – Hacking a first gen Xbox

Amazon Echo – can we do this on a Pi with https://github.com/benoitfragit/pocketVox ?