Boot from my SD card (Debian), with USB Drive connected.
Start up X windows as root (sudo startx)
Run gparted, and create partition on USB drive (use ext4 format, I will assume it is called /dev/sda1)
(you may need to install gparted (apt-get install gparted)
mount the USB drive partition
sudo mkdir /mnt/newroot
sudo mount /dev/sda1 /mnt/newroot
Copy contents of / (root partition to USB /dev/sda1)
(You may need to install rsync, (apt-get install rsync)
sudo rsync -avxS / /mnt/newroot
Change /boot/cmdline.txt
root=/dev/sda1
Reboot RPi.
Confirm you're rootfs is now on /dev/sda1 (The size of the partition will be a big give away here.)
You can now delete the old partition on the SD Card if you want to. I have kept mine as an emergency rootfs if I need it.
ref: https://www.raspberrypi.org/forums/viewtopic.php?t=9117pi@rpi3-b2:~ $ vcgencmd get_camera
supported=1 detected=1
Install AWS IOT, CLI etc.
sudo apt-get install --reinstall libraspberrypi0 libraspberrypi-{bin,dev,doc} raspberrypi-bootloader
sudo apt-get install python3-picamera
sudo apt-get install python3-pip
pip install boto3
sudo apt-get install cmake
sudo apt-get install libssl-dev
sudo apt-get install git
sudo apt install python3
sudo apt install python3-pip
python3 -m pip install awsiotsdk
git clone https://github.com/aws/aws-iot-device-sdk-python-v2.git
pip3 install awscli --upgrade --user
pip install AWSIoTPythonSDK
pip install python-decouple
SUN rset time in python for camera to adjust exposure
ref: https://stackoverflow.com/questions/38986527/sunrise-and-sunset-time-in-python
import datetime from suntime
import Sun, SunTimeException
latitude = 51.21
longitude = 21.01
sun = Sun(latitude, longitude)
# Get today's sunrise and sunset in UTC
today_sr = sun.get_sunrise_time()
today_ss = sun.get_sunset_time()
print('Today at Warsaw the sun raised at {} and get down at {} UTC'. format(today_sr.strftime('%H:%M'), today_ss.strftime('%H:%M')))
# On a special date in your machine's local time zone
abd = datetime.date(2014, 10, 3)
abd_sr = sun.get_local_sunrise_time(abd)
abd_ss = sun.get_local_sunset_time(abd)
print('On {} the sun at Warsaw raised at {} and get down at {}.'. format(abd, abd_sr.strftime('%H:%M'), abd_ss.strftime('%H:%M')))
wget http://www.linux-projects.org/listing/uv4l_repo/lrkey.asc && sudo apt-key add ./lrkey.asc
add to /etc/apt/sources.list sudo nano /etc/apt/sources.list
deb http://www.linux-projects.org/listing/uv4l_repo/raspbian/ wheezy main
sudo apt-get install uv4l
sudo apt-get install uv4l uv4l-raspicam
Add passwords , ports etc
sudo nano /etc/uv4l/uv4l-raspicam.conf
Streaming Server – (advanced) Projects (linux-projects.org)
Installation for ARM (Raspberry Pi) – (advanced) Projects (linux-projects.org)
uv4l-server – (advanced) Projects (linux-projects.org)
$> python -n http.server
this will start HTTP server that will give dir listing so files can be downloaded from rpi
we will also need to set port forwarding on router to be able to access from public IP of the router