making change to leverage the new /mutable directory

updating docs for clarification
This commit is contained in:
Ray Tanaka
2018-10-28 10:15:54 -07:00
parent 0a13dc934e
commit b43e4d709d
3 changed files with 36 additions and 5 deletions

View File

@@ -63,7 +63,7 @@ Get the IP address of the archive machine. You'll need this later, so write it d
Since sftp/rsync is accessing a computer through SSH, the only requirement for hosting an SFTP/rsync server is to have a box running Linux. An example can be another Raspberry Pi connected to your local network with a USB storage drive plugged in. The official Raspberry Pi site has a good example on [how to mount an external drive](https://www.raspberrypi.org/documentation/configuration/external-storage.md). You will need the username and host/IP of the storage server, as well as the path for the files to go in, and the storage server will need to allow SSH. Since sftp/rsync is accessing a computer through SSH, the only requirement for hosting an SFTP/rsync server is to have a box running Linux. An example can be another Raspberry Pi connected to your local network with a USB storage drive plugged in. The official Raspberry Pi site has a good example on [how to mount an external drive](https://www.raspberrypi.org/documentation/configuration/external-storage.md). You will need the username and host/IP of the storage server, as well as the path for the files to go in, and the storage server will need to allow SSH.
### Hosting via rclone (for Google Drive, S3, DropBox, etc) ### Hosting via rclone (for Google Drive, S3, DropBox, etc)
**EXPERIMENTAL** - This hasn't been thoroughly tested yet but you can follow these [instructions](/doc/SetupRClone.md) and give it a spin. **EXPERIMENTAL** - This hasn't been thoroughly tested yet but you can follow these [instructions](/doc/SetupRClone.md) to setup up and configure rclone to work with teslausb.
### ***TODO: Other hosting solutions*** ### ***TODO: Other hosting solutions***
@@ -107,7 +107,7 @@ Now that you have Wifi up and running, it's time to set up the USB storage and s
export campercent=<number> export campercent=<number>
``` ```
For example, using `export campercent=100` would allocate 100% of the space to recording footage from your car, and would not create a separate music partition. `export campercent=50` would be only allocate half of the space for a dashcam footage drive, and allocates the other half to be a music storage drive. For example, using `export campercent=100` would allocate 100% of the space to recording footage from your car, and would not create a separate music partition. `export campercent=50` would be only allocate half of the space for a dashcam footage drive, and allocates the other half to be a music storage drive.
1. If you are trying to archive on an SFTP/rsync server, then follow these [instructions](doc/SetupRSync.md) and skip step 7. Otherwise, skip this step. 1. **Only for SFTP/rsync or rclone archives**: If you are trying to archive on an SFTP/rsync server, then follow these [instructions](doc/SetupRSync.md) and skip step 7. If you set up rclone you can also skip step 7 and go to step 8.
1. If you are trying to archive on a shared drive, run these commands, subsituting your values for your shared drive: 1. If you are trying to archive on a shared drive, run these commands, subsituting your values for your shared drive:
``` ```
export archiveserver=Nautilus export archiveserver=Nautilus

View File

@@ -16,7 +16,7 @@ curl -L https://raw.github.com/pageauc/rclone4pi/master/rclone-install.sh | bash
You can also install the script manually by following these [instructions](https://github.com/pageauc/rclone4pi/wiki#manual-install). You can also install the script manually by following these [instructions](https://github.com/pageauc/rclone4pi/wiki#manual-install).
Once installed, the script will install rclone-install.sh, rclone-sync.sh and create a subfolder rpi-sync in users home eg. /home/pi Once installed, the script will install rclone-install.sh, rclone-sync.sh and create a subfolder rpi-sync in users home eg. /root
# Step 2: Configure rclone storage system # Step 2: Configure rclone storage system
@@ -26,7 +26,7 @@ Next, run this command as root to configure a storage system.
rclone config rclone config
``` ```
**Important:** Run this as root since archiveloop runs as root and the rclone config is bound to the user running the config. **Important:** Make sure to run this as root since archiveloop runs as root and the rclone config is bound to the user running the config. The config file is also moved with the assumption that the root user ran config.
This will launch an interactive setup with a series of questions. I highly recommend you look at the documents for your storage system by going to [rclone](https://rclone.org/) and selecting your storage system from the pull down menu at the stop. This will launch an interactive setup with a series of questions. I highly recommend you look at the documents for your storage system by going to [rclone](https://rclone.org/) and selecting your storage system from the pull down menu at the stop.

View File

@@ -10,7 +10,7 @@ function append_cmdline_txt_param() {
echo "Updating package index files..." echo "Updating package index files..."
apt-get update apt-get update
echo "Removing unwanted packages..." echo "Removing unwanted packages..."
apt-get remove -y --force-yes --purge triggerhappy logrotate dphys-swapfile fake-hwclock apt-get remove -y --force-yes --purge triggerhappy logrotate dphys-swapfile
apt-get -y --force-yes autoremove --purge apt-get -y --force-yes autoremove --purge
# Replace log management with busybox (use logread if needed) # Replace log management with busybox (use logread if needed)
echo "Installing ntp and busybox-syslogd..." echo "Installing ntp and busybox-syslogd..."
@@ -22,6 +22,37 @@ append_cmdline_txt_param fastboot
append_cmdline_txt_param noswap append_cmdline_txt_param noswap
append_cmdline_txt_param ro append_cmdline_txt_param ro
# Move fake-hwclock.data to /mutable directory so it can be updated
if ! findmnt --mountpoint /mutable
then
echo "Mounting the multable partition..."
mount /mutable
echo "Mounted."
fi
if [ ! -e "/mutable/etc" ]
then
mkdir -p /mutable/etc
fi
if [ -e "/etc/fake-hwclock.data" ]
then
echo "Moving fake-hwclock data"
cp /etc/fake-hwclock.data /mutable/etc/fake-hwclock.data
rm /etc/fake-hwclock.data
ln -s /mutable/etc/fake-hwclock.data /etc/fake-hwclock.data
fi
# Move rclone configs if it exists so we can write to it
if [ ! -e "/mutable/configs" ]
then
mkdir -p /mutable/configs
fi
if [ -e "/root/.config/rclone/rclone.conf" ]
then
echo "Moving rclone configs"
mv /root/.config/rclone /mutable/configs
ln -s /mutable/configs/rclone /root/.config/rclone
fi
# Move /var/spool to /tmp # Move /var/spool to /tmp
rm -rf /var/spool rm -rf /var/spool
ln -s /tmp /var/spool ln -s /tmp /var/spool