Thank you all for helping out with Octopi/Octoprint.
I'm all new to both Linux and Octoprint and just manged to install Octopi/Octoprint on a RPI 4B with a 32 GB micro SD card. I can not manage to SSH into the RPI from windows(as I've never used SSH before), but I can start my Octoprint from my iPhone and iPad. So I'm all set up.
I then cloned my micro SD card with Balena Etcher to my 120 GB Kinston hard drive and it all started up fine, but I can not get into the Linux system from Octoprint, and I understand I have to SSH into Octopi to do that. I want to see how Balena Etcher cloned my hard drive, is it 32 GB now or 120 GB and do I have to expand any of my partitions? I also want to start to learn some Linux so I need aksess to the operating system.
Please push me in the right direction.
A Raspberry Pi 4B has a microSD card on which you put the operating system. The preferred program for flashing the microSD card is the Raspberry Pi Imager.
The operating system of choice in this forum is OctoPi 1.0.0 and there are currently two flavors, one with the old camera stack and one with the new camera-streamer. This image has SSH enabled and the hostname, username, password, WiFi credentials, etc. can all be set in the RPi Imager so that the first boot of the RPi with this image is just about ready to go.
From Windows 10 or 11, open a Command Prompt or PowerShell and type
"ssh @" and you should get a password prompt and then some text and a Linux command prompt. Alternatively, you can install the PuTTY application which gives you a little more flexibility. I also install WinSCP which is useful for moving files around between the RPi and Windows.
Now please give us some details about your "120 GB Kinston hard drive". What is it connected to and how is it connected? If you are connecting it to your RPi 4B, a pointer to any documentation you used to get it to boot might be useful.
The 32 GB microSD card has plenty of space on it after installing OctoPi. You can even install a desktop and still have plenty of space (20+ GB). More than enough to learn Linux, store 3D printer files, etc.
So I manage to ssh into Octopi, and this is what I get when I list the storage on the Kingston 120 GB, What can I do to reclame the storage, can I install Gparted on Octopi
Also, would it be useful to update the firmware on the Pi, I see that current version is two years old?
CURRENT: Thu 3 Sep 12:11:43 UTC 2020 (1599135103)
LATEST: Tue 26 Apr 10:24:28 UTC 2022 (1650968668)
Sorry, forgot to answer about the harddrive, as I said, I just cloned the sd card with Balena Etcher to my 120 GB Kinston hard drive and it all started up fine, noting to it really. Its connected via an sata to usb cable.
I wonder if I insted just should have copied the files to the hard drive, that would probably have kept the size intakt, or maybe just used the rpi image writer to write the image to the hard drive in the first place
Maybe I should start over
So started from scratch and got my full disk back:
sorry I'm late to the party, but you can expand the filesystem from within
Oh thanks I'll look into that, I see there are one option with a desktop version and one with command line. Is it more safe with the desktop version or is just a simple command?
I guess it would be
sudo raspi-config nonint do_expand_rootfs
Also I wounder should I run this
sudo systemctl stop octoprint
sudo apt update
sudo apt upgrade -y
Disconnect from power wait a few seconds and repower.
sudo rpi-eeprom-update -a
So I ran the sudo raspi-config and it worked just fine. I now have use of all the space on the SSD, but now I start to wonder, how can I now backup the image on the SSD, 120GB is just to much. I see there is a program called PiShrink, but can I run this from within Octopi to an USB stick, or do I have to make a SYSTEMRESCUE ON A USB MEMORY STICK first and run it from there?
You might take a look at https://raspibackup.linux-tips-and-tricks.de/en/home/. This should run directly on your RPi and you can backup to a USB stick.
I use a USB SD adapter and have two microSD cards of the same size. I use rpi-clone to make my backup. I also use the USB SD adapter for writing the initial image on my Windows system. I believe rpi-clone should also work USB to USB but I haven't tested it personally.
Are you concerned with backing up system stuff or just OctoPrint? If the later, just install my backup scheduler plugin and one of the cloud based backup plugins and that will allow you to generate backups on a schedule and have them uploaded to the cloud provider of choice (or local with webdav).
Thank you both.
I was merely thinking of if I get a corrupt image on the SSD, and have to reinstall, but I guess the SSD is more reliable then the micro sd/sd cards. I might do it all from start again on a 4GB card, then do every customizing and update to that card, save it as a image and copy that to the hard drive. Then I can just copy the 4 GB card again if the SSD get corrupt. Then finally run sudo raspi-config to expand.
Hi there, the SSD should be more reliable than a micro-SD owing to the interfaces between the device and the operating system - even with an SSD over USB. micro-SD card interfaces to the hardware via SPi [serial peripheral interface] and this interface is slow, see https://lastminuteengineers.com/arduino-micro-sd-card-module-tutorial/, with no error correction. In theory an SSD will be more tolerant of a power interruption during a write cycle - and Rasbian / RaspOS will run fsck on boot, which is more likely to recover a disk trashed by a power interruption.
BUT there is NO substitute for an effective and reliable backup and system recovery plan.
Performing a regular backup, especially if you ignore video files and uploaded gcode files won't be especially large [and therefore fast] is well worth while.
I run my own DAVFS service in the cloud and I'm going to follow @jneilliii 's recommendations - a backup of Octoprint is only 250kB so there's no excuse not to, and it includes plugins/configs the lot.