I’m sure there was a discussion on the forum about moving the file system onto an external drive but I can’t find it again.
I’ve got the Olimex Lime2 server with an SSD attached using the Pioneer image. I’d like to move the file system onto the SSD to hopefully make it run faster and prevent the SD card from being written to as often.
Is it possible? Is it a good idea? How do I do it?
Do you want to simultaneously use the SSD and microSD card or use only the SSD?
I did the former once and wrote about this on my wiki. In this approach, you expand the filesystem to use the SSD as an additional Btrfs volume. If the SSD’s capacity is much larger than that of the microSD, then more writes will happen to the SSD. The overall performance will be better, but not as good as using the SSD alone. Failure of either volume will be a problem. Take backups regularly. FreedomBox/Tips and Tricks - Wiki
If you want to use the SSD alone, then simply create a disk image of the existing microSD card using the dd utility and write it to the SSD.
microSD → file → SSD
microSD → SSD
Well, there’s also a third option. Install a FreedomBox disk image on the SSD. Backup your data from the old installation and restore it on new installation.
The dd command looks correct. Hope you shut down the FreedomBox, took both the disks out of the box and ran the command on a separate computer. You can mount the SSD on another computer to check if it has the correct partitions and files.
I assume that the capacity of the SSD is larger than the microSD card. It might try to expand the root partition automatically, or you can expand it from Settings → Storage manually.
Being able to ping the FreedomBox is still good news. You can attach a keyboard and monitor to the device to debug further. You should see a login prompt where you can use your FreedomBox username and password.
Then try to check if a few essential services are running using the following command: sudo systemctl status <service-name>
I would check these services: NetworkManager, firewalld, apache2 and plinth
If you find that a service has errors while starting, you can see its detailed log using sudo journalctl -u <service-name>.
Hmm, no and I know I shouldn’t have tried to copy a running system - think I’m to tired to think at the minute! I’ll have to buy a SATA to USB connector and try again. It’s probably easier to reinstall than try to salvage it since I was still only just setting it up.
Thanks a lot for the help. Just to check before I do anything else silly: assuming I’m starting from scratch, is the best method just to connect the SSD to my computer and dd the original downloaded image straight onto it? For some reason I thought it needed the boot partition to be on the SD card.
I think this is applicable to arm64 images only. Also, I didn’t try running the system from an SSD myself yet.
If you’re going to install a fresh FreedomBox image, you can just run the dd command from the Lime2 device itself (might be slow). The following wiki page has detailed instructions. https://wiki.debian.org/FreedomBox/Download
I reinstalled the image to the SD card then used the Lime2 to dd it to the SSD. I shut the box down and removed the SD card. After powering it back up I can’t access it at all. Ping says “Destination Host Unreachable”. Perhaps I should give up trying to do this! Thanks a lot for trying to help me
I was merely describing a hack to avoid getting a SATA to USB adapter. Since your FreedomBox is also a general purpose Debian machine, you can install a new image to the SSD from the FreedomBox as well. Just run the commands shown in the wiki page from the FreedomBox with the SSD as the installation target.
If you aren’t comfortable doing that, get the adapter and use a tool like Balena Etcher to burn a fresh FreedomBox disk image to the SSD. You don’t need to write the image to the SD card first. The images you download from the website are already disk images.
I think it’s time for me to try setting up a FreedomBox Pioneer with an SSD/HDD and write a proper wiki page about the process. I remember successfully booting up an old Lime 2 device (maybe rev. G) from a HDD over SATA a few years ago.
I know thanks, I just did that because I couldn’t access the Lime2 so I tried reinstalling it. Here’s exactly what I did this time:
dd’ed the image to microSD from PC.
Pluged microSD into Lime2 and turned it on. After a while it was still inaccessible.
Realised the problem might be having the SSD connected.
Powered it off and disconnected the SSD.
Powered it back on and was able to complete the initial FreedomBox setup on the microSD.
Copied the image file to the Lime2 via scp.
Reconnected the SSD and dd’ed the image to it.
Powered off and removed the microSD.
Powered back on and couldn’t access the Lime2 at all.
I’ve just tried removing the SSD and putting the microSD back in. Now I still can’t access the Lime2 from the browser but can ping it again. SSH works but tells me the password is wrong (it’s definitely not).
That could be very useful! Think I might buy an adapter anyway and try copying the image to the SSD from the PC. Every time I’ve copied it to the microSD from the PC it’s worked fine. Just for reference, my board is a revision L.
I flashed the Pioneer Edition image on a new SSD using Balena Etcher and connected it to the FreedomBox device using the SATA interface.
I can see that the router has assigned a new IPv4 address to this device. I can ping it, but cannot access the web interface (Connection timed out). I connected a monitor over HDMI and got “No Signal”.
I also tried connecting two power supplies just in case there wasn’t enough power, but this made no difference.
I removed the disk and mounted it on a laptop. I can see no modifications under /var/log. It has either not booted at all or mounted the root partition as a read-only filesystem.
I know @sunil was able to boot from an external HDD earlier. What am I missing?
to move the filesystem to a 64gb partition on the SSD and everything seemed to be fine. Then I used
sudo btrfs filesystem resize max /
and the filesystem expanded as expected. Unfortunately a while later and I can no longer access the box via the browser, SSH says No route to host and ping says Destination Host Unreachable. I’ve no idea what happened. Is there any way to recover? Everytime I try something I seem to mess the box up!
I’ve never set a static IP address but it’s never changed before. The lease time for the IP address ran out sometime last night and the box is no longer listed in the router admin panel. There is a new IP address listed (lease runs out in a couple of hours) but there’s no info about it and I can’t access it at all.
I’ve got a harddrive bay attached to the case so I don’t think I can access the buttons without unplugging the SSD. What happens if you leave the battery to run out? Does it shutdown safely?
I have drawn a red box around the buttons. It is easiest to depress them with a paperclip or a ballpoint pen or something.
Before I knew about these buttons, I had done a few restarts by unplugging the box, taking out the cover screw, disconnecting the battery, then putting it all back together. Boy did I feel silly after I read about the buttons!