I am new to raspberry Pi, but I will try to help if I can.
Method 1 - (very little code changing but has one time option - read carefully) https://www.raspberrypi.org/documentati ... des/msd.md
Method 2 - (no code changing but longer to implement)
This method still requires the SD card to be present in the RPI every time you boot up - but all data is Read and written /stored on to the external USB drive - this means that the 32GB Sd card will still have approximately (25+GB disk space-after Berry Boot installation) because every time you use you RPi your external USB hard disk will fill up and not your SD card.
you can have any size SD card per RPI minimum requirements, I just use 32GB because each RPi I get has 32GB SD Card that comes with it)
First see how a standard BerryBoot install works...
https://www.youtube.com/watch?v=cZBNpxp ... e=youtu.be
I will explain how I boot to use my external USB hard disk in the hope that it may help.
First of all I install BerryBoot (https://sourceforge.net/projects/berryboot/
), which provides a mechanism to boot Berryboot compatible operating systems (images) from a list at boot time.
Using a Windows or Mac laptop/desktop computer...
https://www.raspberrypi.org/documentati ... matting.md
If I want to boot from an external hard disk...Berryboot is first installed onto a blank formatted SD CARD - using RPIs recommended "SD CARD Formatter". Then we copy the BerryBoot files on to the SD Card (first Unzip the download and copy the files listed inside the folder on to the SDK- (Not the folder just the files inside the unzipped folder)
Installing on to the Raspberry Pi
Insert the SD Card into the Raspberry Pi 3 B+ in my case and attach the external USB hard disk.
Turn on the RPI and the Berry Boot menu will show... You will now be installing a BerryBoot Boot Loader
onto the external USB hard disk! - (Not any operating system like Raspbian, Ubuntu etc, that comes later.)
Look again at the standard video installation video... around 4:13 in this video
Note: https://www.youtube.com/watch?v=cZBNpxp ... e=youtu.be
(around 4:13 in this video - this person selects the SD card - HOWEVER YOU SHOULD instead select SDA(number) which should be your external hard drive i.e SDA1)
It will ask for a Disk to install the BerryBoot loader system - It's usually the second in the list (NOT
mmcblk0: xxx which is the 32GB SD card - which you don't want
You wan't to select something like SDA1
the next option in his list)
Its definitely not the Network Storage Option.
It will then format the external hard disk and install the Boot loader onto the hard disk from which it will boot from in the future. Note Formatting can take a long time - many minutes depending on the disk size, just be patient)
Follow his remaining steps and that 's it, remember to reboot the Pi.
Now you can install any operating system like Raspbian from the menu after rebooting.
As you use the Raspberry Pi as a desktop computer , i.e Libre Office - All the work you do from this point will be read and written to your external hard disk.
****** NB: Remember though, you must leave the SD card you used to format this particular external hard disk, in the Raspberry Pi, the SD card is still required by the RPI to boot up this specific external USB hard disk
Note: If anyone has any ideas that may improve this post or corrections to any mistakes I have written please free to add a comment...
Hope this helps