#312 Boot a Raspberry Pi4 with an SSD to make it reliable and fast

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
enough is enough I waited for more than half a year to put my new Raspberry Pi 4 from SSD to increase its speed and reduce the chance of losing my valuable data today we will change that without the help of the Raspberry Pi project team all we need is know-how a little bit of time and an old SD card great see you tubers here is the guy with the Swiss accent with a new episode and fresh ideas around sensors and microcontrollers remember if you subscribe you will always sit in the first row fortunately it is quite easy to use an SSD as a boot medium and takes less than one hour of work if you stick to the commands shown in this video when I did my review about the new Raspberry Pi for in video number 275 the software was not ready at all I suggested waiting till Christmas for a purchase for most of the missing parts I was right they are all here and I love my pie for because it is faster and has more memory one part still is lacking the PI 4 cannot put directly from an SSD as it was possible for the Raspberry Pi 3 for example why would we want this feature SD cards never were made for usage as storage mediums for computers they were made for cameras where big files are stored and stay there for a long time computers tend to store small chunks of data and change it all the time two completely different usage patterns SSDs are much better in these disciplines as we will later see and the chance you lose your data on a modern SSD is very very low they use their leveling to avoid fast aging after some research I found the process which is proposed by James a chambers most useful he names his block legendary technology block not a nomenclature a switch would use we like the understatement anyway James did excellent work already in the past by performing speed tests for SD cards on raspberries he extended this work also to the module four as we will later see but first we have to make this bloody pie for boot from an SST I use two SSDs for my tests this small 128 gigabyte SSD purchased exactly for that purpose and this unused 500 gigabyte Samsung SSD in an Oracle case both provide USB 3 with a blue connector what are the steps we have to perform as a first step we have to check our chance of success James provides a list of problematic adapters unfortunately my or eco adapter is on this list but it is also on the list of working devices so we have to see if it will work or not and what we can do about it the King spec SSD is not on the list the next steps are copy raspbian to an SD card using ballina hhor-- copy the same raspbian on an SSD in the exact same manner we now have digital twins change the part UUID of our SSD like that the two storage devices are no more digital twins now they are brother and sister so to speak change the boot disk definition on the SD card change the root location on the SSD and resize the partition on the SSD to use all available space on this disk as a last step we will check the performance of our enhanced raspberry and we'll compare it with the one of SD card james suggests that we use a virgin raspbian for this adventure others proposed you can also copy an existing SD card to your SSD I am cautious with such things because I lost too much of my life time searching for on defined errors so I will go the safe way let's start with the first two steps and copy raspbian Buster on an SD card and on one of the SSDs I use an old 8 gigabyte card because it's beats does not matter in this setup and it is big enough also for the desktop version of raspbian for my various raspberries i usually install the desktop version here I use a Logitech mouse and keyboard combo a monitor and an HDMI switch if I want to use one raspberry with desktop I insert this small USB dongle for the keyboard and mouse and switch the HDMI to the respective cable by the way you can copy both images in parallel by starting villena Eicher twice and you can ignore this message which is displayed for large disks if you copy in parallel you will already discover the speed difference the SSD will be much faster do not forget to add a file with the name SSH on the SD card if you want to connect from your PC and the WPA supplicant conf file if you want to use Wi-Fi please do not forget to do the same on the SSD otherwise you will not be able to login from remote now we have our digital twins and can insert the SD card in a Raspberry Pi 4 and boot if you want to compare the speed of this SD card with the SSD you have to set the benchmark with the SD card now later this will not easily be possible you can use James performance evaluation script and start it now it runs some well-known speed tests and evaluates a speed score for your SD card if you want you can compare this score with the various scores on James website you find a link in the description because I use a cheap 8 gigabyte cart it is slower than the slowest cards on the James List its score is 400 because in the future this cart will only be used during the boot process I do not care about it by the way my fastest SD card is this SanDisk Extreme Pro its score is one thousand seven hundred and seventy four times faster than the cheap and small one now we can insert the SSD and change its part UUID to differentiate the two disks if you want to get fast speed of course you have to insert it into the blue USB 3 connector of the pi/4 we use fdisk to change part UUID and james suggests to use this number as the new identifier that is what i will do - first we print the partition table with a command p and c the usual two partitions of raspbian called SD a one and sta two by pressing X we can change into the expert mode and with AI we can enter the new partition number in hexadecimal this is why we have to add 0x in front of the code with our we exit the expert mode and with W will write a petition table to the disk done if we check all partitions with BLK ID we see that the part UUID of the SD card and the SSD are now different as planned next we have to change command line dot text in the boot directory to point to our SSD instead of the SD card if you want you can create a backup of the file by using this command with sudo nano we can change the part UUID after saving the file with ctrl X and s we can reboot during the boot process we can already see if we were successful the SSD should blink because it is used during boot thumbs-up it blinks maybe also thumbs up for this video and if you like videos like that one it is probably time to subscribe to this channel if we included the SSH file also in the boot partition of the SSD we now can login to the pimped raspberry from remote if you need additional confirmation that everything is ok you can issue this command it shows our SDA - as the boot partition next we have to change also the root directory from the SD card to the SSD otherwise all our files would still be stored on the slow SD card for that we have to change the part UUID of the root directory in EFS tab from the SD card to the SSD partition save the file and reboot as the last step we have to expand the partition to use the full disk size F disk shows our two partitions the second partition has only a size of 3.3 gigabyte we have to delete it with the command T and the number 2 then we have to create a new partition with the same number and the same start address the end address is selected by default we do not want to remove the signature and write the new configuration to the disk now the disk should be ok we reboot the last time to check if everything went well TF minus H shows us that unfortunately nothing went well our disk still has the size of 3.3 gigabyte fortunately this is easy to solve just key in this command and wait for a while then TF minus H shows what we always wanted a huge disk but is it all so fast how is the speed score with a new configuration remember the slow SD card had a score of 400 and my fastest horse in the SD card stable one of 17 hundred and 70 again we use James command to perform the exact same tests as before and the result is six thousand nine hundred and eighty six a staggering 17 times faster than the small cart and still four times faster than the SanDisk Extreme Pro cool now I can match the fast pie for CPU with a fast SSD besides that I will never have to think about losing data because this SSD will last forever the amount of data moved by my small Raspberry Pi is not comparable with my PC where I move a few gigabytes just for one youtube video because this is a new raspbian install as usual we have to update it to the latest version frequent viewers know that I use docker for my home server with Graham's IOT stack project the new installation of all my goodies like node-red orc Ravana just takes a few minutes and if I copy all volumes directories to my new SSD all my data is available very fast if you also want such a cool installation maybe you watch video number 2 95 if not done already so the King spec SSD by the way has a score of 7,000 238 faster than the Samsung astonish and a good deal for $25 the SSD by the way is most probably throttled by this Oracle controller the fastest configurations in James comparison go up to a score of around 10,000 summarized we created digital twins consisting of an the cart and an SSD drive we changed the part UUID of the SSD to have brother and sister instead we change the boot disk definition on the SD card and the root location on the SSD as a last step we resized the partition of the SSD to use all available space we tested the procedure with two different configurations a small and cheap USB SSD and an old Samsung SSD inserted in a case with an Oracle USB controller both worked speed tests show that the SSDs are at least four times faster than my fastest SanDisk Extreme Pro SD card SSDs should last very long because they use sophisticated we're leveling we achieved all without the help of the raspberry development team I still hope one day they will add the native boot possibility then this video will become obsolete because I now have plenty of fast storage I adjusted the swap file and made sure it is on the SSD and not on the slow SD card I hope this video was useful or at least interesting for you if true please consider supporting the channel to secure its future existence you find the links in the description thank you bye
Info
Channel: Andreas Spiess
Views: 590,864
Rating: undefined out of 5
Keywords: arduino, arduino project, beginners, diy, do-it-yourself, eevblog, electronics, esp32, esp32 datasheet, esp32 project, esp32 tutorial, esp32 weather station, esp8266, esp8266 datasheet, esp8266 project, greatscott, guide, hack, hobby, how to, iot, lorawan, nodemcu, project, simple, smart home, ttgo, wemos, wifi, raspberry pi 4, raspberry pi, usb 3.0, Raspberry pi 4 SSD boot, raspberry Pi project, samsung, kingspec, kingspec ssd, kingspec SSD 120GB, Orico, orico usb 3.0
Id: gp6XW-fGVjo
Channel Id: undefined
Length: 14min 34sec (874 seconds)
Published: Sat Feb 15 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.