mirror of
https://github.com/cimryan/teslausb.git
synced 2026-02-28 20:20:32 +00:00
Fix references to file locations, and simplify llinux/macos instructions.
This commit is contained in:
10
README.md
10
README.md
@@ -78,9 +78,9 @@ There are three phases to setting up the Pi:
|
|||||||
> Note: you don't need to uncompress the zip file you downloaded.
|
> Note: you don't need to uncompress the zip file you downloaded.
|
||||||
|
|
||||||
### Get a shell on the Pi
|
### Get a shell on the Pi
|
||||||
If you used a Windows computer to flash the OS onto the MicroSD card, follow these [Instructions](GetShellWithoutMonitorOnWindows.md).
|
If you used a Windows computer to flash the OS onto the MicroSD card, follow these [Instructions](doc/GetShellWithoutMonitorOnWindows.md).
|
||||||
|
|
||||||
If you used a Mac or a Linux computer, follow these [Instructions](GetShellWithoutMonitorOnLinux.md).
|
If you used a Mac or a Linux computer, follow these [Instructions](doc/GetShellWithoutMonitorOnLinux.md).
|
||||||
|
|
||||||
### Set up the USB storage functionality
|
### Set up the USB storage functionality
|
||||||
|
|
||||||
@@ -104,7 +104,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](SetupRSync.md) and skip step 7. Otherwise, skip this step.
|
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. 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
|
||||||
@@ -112,10 +112,10 @@ Now that you have Wifi up and running, it's time to set up the USB storage and s
|
|||||||
export shareuser=sailfish
|
export shareuser=sailfish
|
||||||
export sharepassword=pa$$w0rd
|
export sharepassword=pa$$w0rd
|
||||||
```
|
```
|
||||||
1. If you'd like to receive a text message when your Pi finishes archiving clips follow these [Instructions](ConfigureNotificationsForArchive.md).
|
1. If you'd like to receive a text message when your Pi finishes archiving clips follow these [Instructions](doc/ConfigureNotificationsForArchive.md).
|
||||||
1. Run these commands:
|
1. Run these commands:
|
||||||
```
|
```
|
||||||
wget https://raw.githubusercontent.com/cimryan/teslausb/master/setup-teslausb
|
wget https://raw.githubusercontent.com/cimryan/teslausb/master/setup/pi/setup-teslausb
|
||||||
chmod +x setup-teslausb
|
chmod +x setup-teslausb
|
||||||
./setup-teslausb
|
./setup-teslausb
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,43 +1,35 @@
|
|||||||
# Setting up the Pi without a monitor using a Mac or Linux
|
# Getting a shell on the Pi without a monitor using a Mac or Linux
|
||||||
|
|
||||||
You can setup the Pi to connect to your Wifi network, and also provide the option to connect over USB networking (Rasberry Pi Zero W or other recent Pi's).
|
These instructions will configure a Raspberry Pi so that you can proceed with the next step of setting it up as a smart USB drive for your Tesla. Specifically, these intructions will configure your Pi to join your wireless network and also enable you to ssh to the Pi, either over your wireless network or through a USB connection.
|
||||||
|
|
||||||
|
**Important:** Do these steps before you boot the Pi for the first time.
|
||||||
**What is USB networking?**
|
|
||||||
Basically what you're doing is using the Pi's capability to emulate a network connection over USB. So you need to get the Pi (the guest) set up to load the proper modules to do so, and then connect from your machine (the host) using a shell (like iTerm+SSH on macOS). It's an alternative to Wifi if needed.
|
|
||||||
|
|
||||||
## Use the update script to setup Wifi and USB networking
|
|
||||||
|
|
||||||
A [script](https://raw.githubusercontent.com/cimryan/teslausb/master/mac_linux_archive/setup-piForHeadlessConfig.sh is provided to automatically update your SD card so the first time you boot it on your Pi, USB networking and Wifi will automatically be configured.
|
|
||||||
|
|
||||||
If you prefer not to run the script, it's also a useful reference for the steps you'll need to take.
|
|
||||||
|
|
||||||
> It's important you do these steps **before you boot the Pi the first time with the SD card inserted**.
|
|
||||||
|
|
||||||
1. Ensure you've flashed your Raspbian image to your SD card.
|
1. Ensure you've flashed your Raspbian image to your SD card.
|
||||||
1. If the `boot` folder isn't showing on your computer, eject and re-insert the SD card into your computer, **not the Raspberry Pi**.
|
1. If the `boot` folder isn't showing on your computer, eject and re-insert the SD card into your computer, **not the Raspberry Pi**.
|
||||||
1. Change to the directory where the SD card's `boot` folder (containing `cmdline.txt`) is located. On a Mac, this will be `/Volumes/boot`. On Linux the location may vary.
|
1. Change to the directory where the SD card's `boot` folder (containing `cmdline.txt`) is located. On a Mac, this will be `/Volumes/boot`. On Linux the location may vary; on recent Ubuntu installations it will be /media/$USER/boot
|
||||||
1. Run the following commands:
|
1. Run the following commands:
|
||||||
```
|
```
|
||||||
wget https://raw.githubusercontent.com/cimryan/teslausb/master/mac_linux_archive/setup-piForHeadlessConfig.sh
|
wget https://raw.githubusercontent.com/cimryan/teslausb/master/setup/macos_linux/setup-piForHeadlessConfig.sh
|
||||||
chmod +x setup-piForHeadlessConfig.sh
|
chmod +x setup-piForHeadlessConfig.sh
|
||||||
```
|
```
|
||||||
1. Set your SSID (Wifi network name) and WIFIPASS environment variables. The script will insert them into the `wpa_supplicant.conf` when creating it:
|
1. Set your SSID (Wifi network name) and WIFIPASS environment variables. The script will insert them into the `wpa_supplicant.conf` when creating it:
|
||||||
|
|
||||||
```
|
```
|
||||||
export SSID=your_ssid_here
|
export SSID=your_ssid_here
|
||||||
export WIFIPASS=your_wifi_password_here
|
export WIFIPASS=your_wifi_password_here
|
||||||
```
|
```
|
||||||
1. Run the script:
|
1. If you're using a Mac, run this command
|
||||||
`./setup-piForHeadlessConfig.sh`
|
```
|
||||||
|
./setup-piForHeadlessConfig.sh /Volumes/boot
|
||||||
|
```
|
||||||
|
1. If you're using Ubuntu, run this command:
|
||||||
|
```
|
||||||
|
./setup-piForHeadlessConfig.sh /media/$USER/boot
|
||||||
|
```
|
||||||
|
> If you're using another Linux distribution figure out the path to where the boot partitio of the SD card is mounted and specify that path, instead.
|
||||||
1. If all goes well, the script will report:
|
1. If all goes well, the script will report:
|
||||||
`-- Files updated and ready for Wifi and SSH over USB --`
|
```
|
||||||
|
-- Files updated and ready for Wifi and SSH over USB --
|
||||||
|
```
|
||||||
1. Eject the SD card safely, insert into your Pi, and reboot. If the Pi is connected over USB to your host, and/or if the Wifi setup went correctly, you should be able to `ssh pi@raspberrypi.local`. The default password is `raspberry`.
|
1. Eject the SD card safely, insert into your Pi, and reboot. If the Pi is connected over USB to your host, and/or if the Wifi setup went correctly, you should be able to `ssh pi@raspberrypi.local`. The default password is `raspberry`.
|
||||||
|
|
||||||
> Note: If you receive an error indicating that the host id has changed, edit your computer's `~/.ssh/known_hosts` file. Find the line with the IP address of your Pi, or labeled "raspberrypi.local" and delete the entire line. You're especially likely to encounter this error if you're following these instructions for a second time.
|
> Note: If you receive an error indicating that the host id has changed, edit your computer's `~/.ssh/known_hosts` file. Find the line with the IP address of your Pi, or labeled "raspberrypi.local" and delete the entire line. You're especially likely to encounter this error if you're following these instructions for a second time.
|
||||||
|
|
||||||
## Manual/other resources
|
|
||||||
|
|
||||||
* [Gist (text file) showing example steps to setup USB networking](https://gist.github.com/gbaman/975e2db164b3ca2b51ae11e45e8fd40a)
|
|
||||||
|
|
||||||
If manually configuring the Pi vs using the update script, be sure to delete the `init=/usr/lib/raspi-config/init_resize.sh` parameter from cmdline.txt to prevent the os partition from being expanded to fill the drive.
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
1. Run the following commands:
|
1. Run the following commands:
|
||||||
```
|
```
|
||||||
cd ~
|
cd ~
|
||||||
wget https://raw.githubusercontent.com/cimryan/teslausb/master/setup-piForHeadlessConfig.ps1 -OutFile setup-piForHeadlessConfig.ps1
|
wget https://raw.githubusercontent.com/cimryan/teslausb/master/setup/windows/setup-piForHeadlessConfig.ps1 -OutFile setup-piForHeadlessConfig.ps1
|
||||||
./setup-piForHeadlessConfig.ps1 -Verbose
|
./setup-piForHeadlessConfig.ps1 -Verbose
|
||||||
```
|
```
|
||||||
1. Enter the single letter of the "boot" drive and press Enter.
|
1. Enter the single letter of the "boot" drive and press Enter.
|
||||||
|
|||||||
@@ -68,9 +68,9 @@ function get_script () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_ancillary_setup_scripts () {
|
function get_ancillary_setup_scripts () {
|
||||||
get_script /tmp create-backingfiles-partition.sh
|
get_script /tmp create-backingfiles-partition.sh setup/pi
|
||||||
get_script /tmp create-backingfiles.sh
|
get_script /tmp create-backingfiles.sh setup/pi
|
||||||
get_script /tmp make-root-fs-readonly.sh
|
get_script /tmp make-root-fs-readonly.sh setup/pi
|
||||||
}
|
}
|
||||||
|
|
||||||
function fix_cmdline_txt_modules_load ()
|
function fix_cmdline_txt_modules_load ()
|
||||||
@@ -111,27 +111,27 @@ function create_usb_drive_backing_files () {
|
|||||||
function configure_archive_scripts () {
|
function configure_archive_scripts () {
|
||||||
echo "Configuring the archive scripts..."
|
echo "Configuring the archive scripts..."
|
||||||
|
|
||||||
get_script /root/bin archiveloop
|
get_script /root/bin archiveloop run
|
||||||
get_script /root/bin archive-teslacam-clips
|
get_script /root/bin archive-teslacam-clips run
|
||||||
|
|
||||||
if [ $RSYNC_ENABLE = true ]
|
if [ $RSYNC_ENABLE = true ]
|
||||||
then
|
then
|
||||||
get_script /root/bin archive-clips.sh rsync_archive
|
get_script /root/bin archive-clips.sh run/rsync_archive
|
||||||
get_script /root/bin connect-archive.sh rsync_archive
|
get_script /root/bin connect-archive.sh run/rsync_archive
|
||||||
get_script /root/bin disconnect-archive.sh rsync_archive
|
get_script /root/bin disconnect-archive.sh run/rsync_archive
|
||||||
else
|
else
|
||||||
get_script /root/bin archive-clips.sh cifs_archive
|
get_script /root/bin archive-clips.sh run/cifs_archive
|
||||||
get_script /root/bin connect-archive.sh cifs_archive
|
get_script /root/bin connect-archive.sh run/cifs_archive
|
||||||
get_script /root/bin disconnect-archive.sh cifs_archive
|
get_script /root/bin disconnect-archive.sh run/cifs_archive
|
||||||
fi
|
fi
|
||||||
|
|
||||||
get_script /root/bin remountfs_rw
|
get_script /root/bin remountfs_rw run
|
||||||
|
|
||||||
echo "Configured the archive scripts."
|
echo "Configured the archive scripts."
|
||||||
}
|
}
|
||||||
|
|
||||||
function configure_pushover_scripts() {
|
function configure_pushover_scripts() {
|
||||||
get_script /root/bin send-pushover
|
get_script /root/bin send-pushover run
|
||||||
}
|
}
|
||||||
|
|
||||||
function configure_rc_local () {
|
function configure_rc_local () {
|
||||||
@@ -208,15 +208,15 @@ fi
|
|||||||
|
|
||||||
if [ "$RSYNC_ENABLE" = true ]
|
if [ "$RSYNC_ENABLE" = true ]
|
||||||
then
|
then
|
||||||
get_script /root/bin verify-archive-configuration.sh rsync_archive
|
get_script /root/bin verify-archive-configuration.sh run/rsync_archive
|
||||||
get_script /root/bin configure-archive.sh rsync_archive
|
get_script /root/bin configure-archive.sh run/rsync_archive
|
||||||
else
|
else
|
||||||
get_script /root/bin verify-archive-configuration.sh cifs_archive
|
get_script /root/bin verify-archive-configuration.sh run/cifs_archive
|
||||||
get_script /root/bin configure-archive.sh cifs_archive
|
get_script /root/bin configure-archive.sh run/cifs_archive
|
||||||
get_script /root/bin write-archive-credentials-to.sh cifs_archive
|
get_script /root/bin write-archive-credentials-to.sh run/cifs_archive
|
||||||
fi
|
fi
|
||||||
|
|
||||||
get_script /root/bin get-archiveserver-ip-address.sh
|
get_script /root/bin get-archiveserver-ip-address.sh run
|
||||||
|
|
||||||
/root/bin/verify-archive-configuration.sh
|
/root/bin/verify-archive-configuration.sh
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user