You are most welcome to contribute, by commenting and editing this (wiki).
Difficulty Level: easy
Why would you want to boot from a USB drive? It is faster and a SSD has a far longer life expectancy as the microSD. So as a home user who wants to have a working system over several years I highly suggest doing this. You could of course also use an HDD, but it would spin 24/7.
Warning:You will not be able to keep the data on your USB drive as you have to flash the .img to it. A backup is therefore required to restore settings and data.
Warning:You will not be able to format any USB device any more using the NCP web panel and will have to do it manually by using the terminal.
Warning:You will not be able to use nc-snapshot because your USB drive will be an ext4 filesystem and not BTRFS.
What we have:
No setup yet
or
NCP on Raspberry Pi 4 booting from microSD with external USB drive for data. (If you are still using a armhf image (32bit) you will have updatet to arm64 after following this guide.)
What we want
NCP runs from a USB 3 drive (preferably a SSD drive) without the need for a microSD.
What we need:
Raspberry Pi 4B
USB drive (you should use a SSD with USB 3.0)
microSD card (only if you donât run the latest bootloader already)
Secondary backup drive with a nextcloud_bkp of all your ncp data, (nc-backup) & a ncp-config backup of our configurations (export-ncp) on a separate drive
If your bootloader is not up-to-date, or you are not sure about it, update it to the latest version. (A more complete how to you find here or, if you set up a new Pi follow this documentation.)
login into your Pi using SSH
type sudo apt update & sudo apt upgrade
type: sudo rpi-eeprom-update to see if an update is available.
if there is type sudo rpi-eeprom-update -a to update
Power off the pi (sudo shutdown now)
Disconnect all of your attached data drives and remove the SD card from the Pi.
Flash the latest Image âNextCloudPi_Rpi_xx-xx-xx.imgâ to the USB media.
Connect the Pi to Ethernet, plug in the drive and boot. Give it a few minutes and then go to https://nextcloudpi.local (or use the IP address of the Pi) and activate NCP (donât forget to note the passwords)
Restore your Backup
1. Restoring NCP Settings
Login to the NextcloudPi web panel (at nextcloudpi.local)
On the left in the section âSystemâ choose ânc-automountâ and activate it.
login to your pi via SSH (ssh pi@IP-ADDRESS | pswd: raspberry)
update the pi with sudo apt update & sudo apt upgrade
update ncp by typing sudo ncp-config
Type df -h to list attached drives.
Look for your backup drive and type: ls /media/BACKUP-DRIVE/
You should see a list of your backups.
Look for the config-backup and note its name: ncp-config_XXXXXXXX.tar
@JimmyKater , @rakekniven or any other authorized person, could you turn the post above into a wiki? Thanks!
The second half of the post above is basically a copy of the NCP docs page with some minor editing from me.
__
And here are some of the points I donât understand yet: (whenever I get an Answer Iâll add clarification/explanation to the wiki above)
I understand the first part about updating the bootloader. But what I donât understand is why, after updating it I still need to boot from a microSD and can not use the USB media with the flashed NCP image right away.
Under point 3. in Setting-up the USB as boot media => ROOT_PATH & BOOT_PATH
is written in capital letters, does that mean that I need to fill in my root and my boot path, or do I type that command 1:1 into the terminal?
After I have set up NCP this way, do I need to do something about the datadir?
The ncp wizard that shows up whenever we set up a new instance gives the option to move the datadir to a usb media and format it as BTRFS.
I will have the whole NCP instance on my 1TB SSD. Do I need to make partitions and format them or do I just leave it as it is?
Right now I have flashed NextCloudPi_RPi_11-27-20 onto a microSD and a SSD.
I want to use this SSD for /boot /root and for the datadir. Can I do that without any further set up or do I need to format a partition for the datadir or something else?
On the bottom you see 235.47 GB unallocated space.
If I boot from this drive and use the wizard it will ask to move the data to a USB drive.
Obviously, I will choose No as Iâm already having everything on the USB drive.
BUT,
I assume NCP will be using the unallocated space for my data, is that correct?
Is it correct that I do not need to make any manual partitioning?
(will it allocate disk space to data, NC-Apps, other software i.e. PiVPN, PiHole automatically from the unallocated space?
No ncp can not use unallocated space
No it is not correct, manual resizing of the partition sdb2 is required.
You need to use a program like gparted (Linux) to resize sdb2, to be able to use the space.
Once you boot from sdb, as you said obviously, there is no need to move the datadir.
Using the latest bootloader I can simply flash the current NCP image to the SSD, plug it into the Pi and boot from it, no need for a microSD at any time.
After booting and activating ncp it will automatically allocate the empty space to rootfs.
After updating eeprom and flashing latest image to an USB-SSD, I get some errors during boot:
âTimeout waiting for device dev/disk/by-partitionidâŚâ
âDependency failed for File system checkâ
âDependency failed for /bootâ
âDependency failed for unattended upgrades shutdownâ
âDependency failed for Local File Systemâ
The SSD has a boot partition and a rootfs partition.
What am I missing?
Yeah, I solved it finally but ran into other issues. First, the error while booting was related to a poor quality or unsupported USB3toSATA-Converter. I changed it and it worked then.
After sucessfull deployment I did all necessary configurations and nextcloud ran for approx. 1 week.
Currently I am running into ext4-fs errors. Havenât had the time looking into this, iâm a bit annoyed by nowâŚ
Hello. I am having problems to boot NCP from a SSD in a Raspberry Pi 4. I followed the step of the guide. So, I updated the bootloader using those commands. Also, I formatted the SSD to ext4 and I used Etcher to install the latest image of NCP. However, when I turn the Pi on, it doesnât detect the SSD, so it asks me for an SD card.
Are you using the correct .img for your SBC from own your bits? (I once made the mistake to donwload berryboot⌠that did not work)
Re-download the .img, it could be that something went wrong when downloading it. (check md5sum)
Try to flash again
Use another USB media to eliminate a faulty SSD (cable, case or drive itself)
run in a circle and cry out loud⌠(not sure it will work, but it will solve some of the frustration)
btw
No need to do that, if you flash using etcher it will format the drive and once it boots from it, it will put all in place automatically. Just flash and plug in⌠actually
I crashed a San Disk 128 gb card 6 months ago on my Raspberry Pi 4. I have used San Disk memory cards for 20 years and never had a problem with them (I think this was a bootleg one I bought on Amazon that wasnât really a San Disk card).
These cards werenât intended to be used to boot a computer and it is a good idea to clone it in case of failure.
" * Warning:You will not be able to format any USB device any more using the NCP web panel and will have to do it manually by using the terminal."
Can you help a newbie out with some lines to use in the SSH window to format the external USB 3.0 drive that I want to put the data on, a new Toshiba Canvio 4TB HDD?
Iâm using an Argon One case with an SSD in the basement. I had no troubles at all booting from that drive with no SD. But as you point out, now I canât use the NC web interface to format the data drive.