#164
HTML-код
- Опубликовано: 5 сен 2024
- It is quite clear that SD cards do not live forever, especially not in database or logging applications. Today we will try to solve this issue without spending a lot of money. And maybe we even will gain some speed. Recycling of old hard disks is the name of the game. Will we succeed and what is the speed of these old disks on our Raspberry Pi 3?
This video answers the following questions:
- What do you have to do to boot your Raspberry from a hard disk instead of an SD card?
- Which hard disks are usable for this purpose?
- Which interface cables are needed for which hard disk types?
- How do these disks perform?
We will test
- A 2.5” Hitachi mechanical disk. Age: 8 years
- A 2.5” OCZ SSD. Age 4 years
- A Western Digital 3.5” mechanical disk. Age: 10 years
- A KingDian 1.8” SSD. Age: New
ADDITION: If you add this line to config.txt: "using max_usb_current=1" the OCZ SSD and even the small mechanical disks boot also with the simple cable and no additional power supply. I did not do long tests if the Raspi power supply likes this... And I had no other things connected to the USB connectors.
ERROR CORRECTION: The big WD disk is 3.5", not 5.25" !!!
Links:
How to boot from USB drive: bit.ly/2la2Oi7
Kingdian Drives Aliexpress: s.click.aliexpr...
Kingdian Drives Banggood: bit.ly/2vNZ3iU
USB-SATA cable: bit.ly/2eyL1uu
Male USB connector: bit.ly/2yH3ZKW
Female USB connector: bit.ly/2yHOnXr
USB Y cable: s.click.aliexpr...
Supporting Material and Blog Page: www.sensorsiot.org
Github: www.github.com...
If you want to support the channel and buy from Banggood use this link to start your shopping: bit.ly/2jAQEf4 (no additional charges for you)
Official Wemos Store: s.click.aliexpr...
www.facebook.c...
/ spiessa
www.instructab...
Please do not try to Email me or invite me on LinkedIn. These communication channels are reserved for my main job
If you want to buy me a coffee: www.paypal.me/...
You really deserve way more subscribers man, constant quallity educational videos on a lot of different subjects. Hats off to you, Andreas!
Thank you for your nice words!
Hello, your old Western Digital 5.25” mechanical disk aged 10 years is actually a 3.5".
But the video is quite useful anyway, as usual.
Thanks a lot!!
+Denis Pacquier After a little thinking I discovered my mistake. I am getting old. Thanks for the correction!
You got to get the 5.25" out of your head - the last models in the 90s were about 40 GB - they're about as uncommon as 8" or "full height" drives nowadays.. I think you meant 3,5" :)
You are right! Guys like me who still worked with 8" disks get old and mix-up things sometimes :-)
Hi Salat, the last time I looked 1 TB on xBay cost UK$45 if not less for a 2.5" drive and apology for the missing sterling sign though its time we adopted the EU since we cannot survive without it.. once the US$ Beef and other subsidised food hits the UK market we will lose our farms, who cannot compete, then the land will be sold for development (what a surprise!) and we will never again be able to grow enough food to support ourselves. We will become slaves to the US$ like so many other countries who are threatened by loss of subsidised and affordable food. I think this is called supremacy, as opposed to the original topic of affordable data security for which I still think we each have a right to pursue for ourselves regardless of what some political person may think we should all do to further their own cause. Education like what we get from Mr Spiess puts us all at the same level because Mr Spiess is accurate and conscientious to provide good insight for us to provide for ourselves. He is a decent educator. My thanks to Salat for the opportunity to reply.
Wow, get out your tinfoil hats folks.
:21 sec's I dont see a 5.25 pata in this pic so a 3.5 desktop pata/sata drive is about 4" wide by 5 inch length, that is probably what he was referring to as you can see?????? But I could be WRONG!!!???....He mentions a dock that can accommodate 2.5" up to 5.25"., got to check that!???.....
Damn want one of those just to say I have one!!!!!.
Modern sata desktop drives should by all rights be a bit smaller.......but remember form-factor wont change much until it does!!!, I.E. that is why you have to install rails on modern hd's to make them fit older atx like form-factor cases..
@@alexandracrawford800 Just to help out Alexandra the ISO standards for the currencies are as follows USD = US Dollars, GBP = Sterling, EUR = Euro.
In the face of Brexit you could always escape to Europe like I did. Good luck - you might need it.
Add this line to the config.txt file:
program_usb_boot_timeout=1
This increases the timeout, so mechanical drives have more time to response.
Probably this line is also needed to increase the current supplied by usb ports:
max_usb_current=1
It worked for me!
Thank you for your tip!
I have done this project. I added an SSD to my PI 3B, it works fine and much faster once it boots up. It could now be a daily driver.
Thank you for sharing your experience.
I did it with my 3B+ and overclocked it as well just playing around. It's usable, but it makes the Pi4 seem like a speed demon. USB3, the extra RAM and a 2ghz clock gives the Pi 4 core2duo speeds.
Andreas, there *is* a reset button on the RPi devices. There is just no pin header soldered in. On your RPi3 search on the PCB for a two pin connector labeled "run". It should be close to the GPIO port.
Connect on the run-header a normally open push button and you should have a reset switch. But bear in mind, depending on file system a hard reset may cause lots of trouble for your data on the storage device.
Thanks for the tip. Maybe the possible devastating effect this is why they did not solder a 2 cents switch on the board ;-)
Using a externally powered USB HUB usually solved all the power issues I had. I like your solution for cases when a HUB isn't around or needed. Also better than a powered hub since they can be quite expensive too.
I also think, that this simple cable is cheaper than a hub. And usually, my USB power supplies have a spare plug to connect it. Then it is really cheap.
Western Digital used to sell a cable that plugged in to a usb power source and powered both a usb hard drive and a raspberry pi, but it appears that they're not made any more.
Hooking up the drive and the pi to separate ports on a powered usb hub would probably solve the power issue, provided you can boot through a hub.
Remember, just because you're hooking up a usb device to a raspberry pi does not mean that the pi has to power the device!
Thanks for the video!
You are right. And WD stopped it may be because the volume was quite small.
The KingDian drive (pronounced King dee-ann) has the form factor of CF cards and is being used as a drop-in replacement for cases with CF card slots (converted to SATA and such)
Thanks. Did not know that.
Sorry, I do not understand. Can you explain this more? Does it mean, that there is an SD Card inside the SSD drive?
As far as I know, SD Cards, USB Sticks and eMMC are similar, but SSD different. But I have to admit, that I do not have any unsider know how and more precise infos are rare.
klassich D
The form factor is the same as CF cards, but it has SSD inside.
Some old embedded computers used to have CF cards as a booting medium as they were easy to interface with just common IDE interface (they have exactly same pin layout!)
Some Chinese manufacturers figured that making new mold for those computers is hard and wasteful when the shells were already made, so they made a really tiny SSD you could fit into the same slot but do not need any tooling and just replacement of the connector.
I know this because computers we use here use CF card sized drives :)
Thanks, Now I read some articles about CF Cards. They are still in use and there even exists the CF Fast Standard. Amazing.
Great Video again. I like the structure of your Videos Very much. Introduction slides, then explanation, and at the end the summary. Great! (good voice speed and good Position and size of the watermark as well).
Thank you for your detailed feedback!
Like Peter EIER above, I also use an mSATA drive on a shield. Sadly it has to connect through the Pi's USB2. I have formatted it with the F2FS filesystem (AKA "Flash Friendly File System" I believe originally developed by Samsung.) This has been fast and faultless in operation and provides a more integrated solution than a flash drive dangling out of a socket, although it is not as easily removed/swapped of course. Apart from the expense (it can be twice the price of the Pi!) it is the best solution I have found.
Thank you for your feedback. I am sure it will help others.
Interesting. Now that cleared up my misunderstandings very well. thank you!.
:-)
You can run 5.25 disks on a pi3. you need to run the pi3 and hdd from same supply. I use an old small form factor atx dell power supply. 10amp/5volt 5amp/+12volt 1.5amp/-12volt w/sata connector. Cut a usb 2.0 male cable's red or 5v+. So as to prevent back feed. This lets the pi3's built in regulator control voltage input. Tie the red wire of usb cable to a 5v output on power supply. Tie the 12v input of hdd to ps 12v. If you have higher current peripherals, use a 2.0 m/f extension cable cutting the 5v+ like the hdd cable. less stress on the pi. Done.. with enough juice leftover to power fans [12v and 5v], a 50w audio amp [+12v-0--12v], led's, monitor, 4 port 5v usb high capacity charging bays and more. I also run an old lcd display controller with 3v input. By using common power supply there are no issues with individual components. ATX is 3.5x3.5x3 inch.
Also many usb 3.0 devices still require proper drivers not available in pi3. Make sure it's backwards compatible. Even if it is, it will only operate at 2.0 speeds. The licensing fees would not allow for a $35.00 pi. Alternative single board units with usb 3.0 are available... starting at around $100.00. So the alternative to bitching about the pi's short comings is cash.
Thank you for your tips. I think these old PC power supplies are a very valuable source for DC current (often overseen)
nice video! even though it over 3 years old its still good! at least i now have a use for my old 250GB WD Black
Glad it was helpful!
With the reboot command you do not need "now" as an option as that is the default. The shutdown command would require "now" to make the Pi shutdown now.
Thanks for the info
I have 2 170MB 5.25" Full Height SCSI drives from my Amiga days. They still work too, but they sound like a dump truck driving down a gravel road. I need to find a good USB to SCSI adapter so I can hook them to my Raspberry Pi.
SCSI is quite old stuff... Probably difficult.
Happy Sunday Morning Andreas 😀😀😀😀😀
Good morning, Dean!
Cool! I have an old external drive case that came with a 12 volt power supply in the form of a wall wart. I think I may well give that a try, she takes the SATA 3 1/2 inch drives, and I have a ton of those laying around. Sadly my Raspberry pi died on me, but I have several Orange Pi's in different iterations that I picked up a year or so ago, and some Beaglebone Blacks, that may well work with those as well. I had never given any thought to using these as boot disks, it does look like a wonderful way to go though. Thanks a million!
I am not sure if the Orange Pi or the Beaglebones work the same with this bit change to enable USB boot. You might have to research.
Hi Andreas! Are you using max_usb_current=1 in config.txt to increase usb voltage from 600ma to 1.2amps or is that still a thing? Might be something to look into, just remember that is 1.2 amps across all usb ports so don't blow a fuse plugging in the toaster :) Maybe this is a culprit. Pretty sure its still not enough juice to run the 5" drive those are pretty beafy well at least not on my pc with a cable, but I think pc usb is limited to 500ma so might be worth a shot. Maybe try a shorter and thicker cable to for the dc resistance. Love the content.
No, I did not use this parmeter because I was not aware that it exists. But now I tried and it worked for both, the SSD and even the small mechanical HD. This one got well over the 500 mA during the boot process. Thanks for the tip!
That's really good news - hope you'll do an updated video with the new info!
btw, if you install mdadm, you can make a RAID array using as many sd cards or drives you can connect, and at least double transfer rates.
@Andy Lee Robinson: I fear your suggested doubling of the rates is just theory. The RPIs use the USB bus for everything, capped at approx 30MB/s (i.e. both your raid drives would use the same "channel", and would therefore experience half the speed - or less, due to overhead).
Don't get me wrong - I have a PI2 myself, and use it everyday - but they are not good designs for I/O and/or network storage. Even a 12Euro Orange PI Zero is much better at this - and there are ARM newcomers like the Rock64 that cost similarly to a PI but give you USB3. These blow any RPI to bits, speed-wise - in pretty much everything.
Andreas, try a Rock64! :-)
I also discovered this option when going through a similar process to Andreas testing out different SATA drives on my RPi 3. The best drive I found for my RPi 3 was a 120GB SSD drive. It worked very well.
Concur. I was using a USB stick mounted over /, booting from the SD card (only) in a critical application here, using the pi camera to take video of a 4ch scope screen. It was dropping frames even with an expensive SD stick (which was USB3, hoping that would be a lower latency drive). The 120gb SSD drive ended all problems there, no more dropped frames, even though it was one of the infamous Samsung 840s. Now I gotta try being completely SD card free! Only using the /boot partition works pretty well for some here that have > 1 year uptime, but then it's a risk, heat, and current waste.
It's sunday 6 o clock 😃👍🏼👍🏼👍🏼👍🏼 (Ich hätte doch glatt gedacht die HD hat 3,5" und nicht 5,25 😉)
You are right concerning the disk size! I hope, the younger viewers do not discover my mistake as they maybe do not remember 5.25" disks ;-)
I think so! ... Maybe you like to try a 5MB 8" HD with you Pi? There is one in my basement.
This is probably already precious as not many were manufactured... My oldest device is a TRS80 from 1979 or so. My first computer. I was not able to throw it away.
Damn, i am already old... I think the 5.25" disks with SATA are really rare. Nevertheless an interesting video, thank you Andreas ;-)
LoL
Do you always wear anti-static gloves when handling components? That's a great idea.
I found an interesting edge-case bug with USB sticks used as shown here (I've been doing this a long time in my lab too). One thing I use pies for is web servers to show things like weather and homestead systems status, and allow remote control via CGIs on the web server. When using gnuplot on the pi to produce plot files to serve via a cgi, the gnuplot instance reports it is done before the USB write has actually occurred. When the page fetches the .png files...bad things happen indeed, including random text on the served page. This *only* happens with an external USB stick, not a spinning drive or SSD. Simply changing that directory to be mounted on a tmpfs fixes the problem with no changes to other code. My lemp stack is raspian, nginx,mysql, perl, using fastcgi on a pi-3 (usually, this happens on pi2 also). Just a heads-up. I've not seen this in other situations where I'm using a USB stick mounted over root (yet). Again, it's not a bug in my code, or at least simply moving the place gnuplot is writing to and the server is reading from to another storage makes the bug go away. It seems gnuplot is still writing when the webserver is fetching the .png files, and those writes actually show up in the served text, incorrectly, so instead of showing plots, it shows random binary junk (the clue is that some of the characters are ascii and include PNG). As if STDIN/OUT are still busy and misdirected in this case.
Thanks for this info. I might help somebody else in a situation where he does not know why his stuff does not work...
That's the hope. You're doing a very good thing here, and it attracts and helps a lot of good people working with the things you present on your channel. This was a very snakey bug, took awhile to chase down (I'd been using the same code in other storage configs with no issues, so a real head scratcher), so I hope it helps some one who is, like you, pushing the pi to do more than just be a toy.
Nice video... Switzerland is AWESOME.
Thank you!
You could also set up a RAID 0 (mirroring) so you can boot even if/when the disk crashes.
And you could also use LVM2 to make logical disk partition and easy expand them when they need. LVM2 are a great.
I think I read that the USB booting doesn't work with a USB switch, so it might be that the harddisk bay have a USB hub in it. I don't have the link available though.
You might be able to use the disk after the RPi booted up.
That with the switch can be. But for the moment I have a few possibilities to go on.
Very good presentation !! Thank you.
You are welcome!
For the past several months I have been running a pi with a 1 TB hard drive. Instead of a y cable I power it through a cheap powered usb hub. I am running nextCloud on the pi. I restored the data from my pc to nextCloud. It took many hours but there was over 50 gb o data. I think the bottle neck is USB 2.0 . Maybe the new pi's will have a usb 3 port :)
USB2 with many GB is a pain in the a**. I once had 64GB USB sticks which only had USB2 interface. I was never able to use the full capacity...
Hi, Andreas! You make awesome job. Thank you for the channel.
KingDian SSD has Toshiba TH58TEG8DDJBA8C as flash chip and Silicon Motion SM2244LT as controller.
Thanks for your information
An excellent exploration on reuse. Wondering if you might consider a further comparison with a dedicated USB flash drive and the WD PiDrive HDD?
I assume good flash drives will behave like the OCZ drive. But you can do this test easily by using the script from video #141. And the WD PiDrive is discontinued. However, it should be very similar to the mechanical 2.5" disk plus the 3 connector cable.
Thank you
Sound is good again. Nice!
Thanks for the feedback. I still hear a small noise in my headphone, but had no time to investigate so far...
Nice video to start my Sunday morning (as usual ;-) )
Have you tried the same with USB sticks ? They are not that power hungry, everybody has lots of them and they should (can) be faster and have a longer life time than SD cards.
No, I did not test with them. But it might be a good idea.
Gert Dewit but USB flash-based thumb drives are the same tech as SD cards, are they not? Or do you mean SSD thumb drives?
I use my Raspberry Pi B model to run Weewx weather program for my weather station - that is all it does. When I first got it working it would lockup often. I replaced SD card with good quality Samsung SD card and all those lockups went away - until now about a year later. Not sure if it is because of SD card but guess I will have to put in a new one and find out. Or maybe try an old laptop hard drive in it like you have shown is possible. Thanks for the info !
I think, the Raspberry always writes some small data to the harddisk, even if we think, it is not necessary. And this can wear-out a SD card which is not made for such usage. I am interested in the result of your investigation...
About the lifespan of ssd's on any linux distro. I did not check your particular Weewx (I would guess it is raspbian based ... ) but one has to check the Type of filesystem that is used on the sdd. That can have a deep impact on ssd lifespan. Some journaling filesystem do make a Lot of disk writes simply as a maintenance/dis check feature of Linux fileystems and are not suited for any type ssd drive, be it usb or sata. So that should be worth considering.
since I am novice at Linux it all sinks in slowly. I just did some research on SD card longevity with Weewx and found there is discussion about it. This post seems to have some positive results though I don't even fully comprehend it yet ! groups.google.com/forum/#!topic/weewx-user/atRpRzKrlyk
This is very interesting on some detailed analysis and hacking of SD cards groups.google.com/forum/#!msg/weewx-user/JxWgTEAikbA/HupwjHcYTqEJ
2021 here, it appears you no longer need to issue a specific command to tell the Raspberry Pi to boot from USB. Just attach a USB drive, run your favorite imager to install a Raspbian OS on the USB drive, shut down, remove SD card, boot with USB drive attached.
This is true for the Pi4.
Hi, thanks for the excellent vid. Can i copy an image from a fully configured microsd card to a SSD device and boot from that (after modify the config file with the =1 bit set) rather than copying a new raspbian stretch image?
You should be able to use Etcher to copy an image to an SSD.
My experience with hard drives on a raspberry is actually quite bad, Bootdrive or just storage. Even with separate powersupply rather unreliable. Seem rather picky about what's plugged in first at boot up. Sometimes a disk that worked fine before would suddenly even prevent the raspi from booting up at all
I had this issue before I solved the "backpowering" problem.
Andreas Spiess thanks that might be it, though at the time I thought I had it solved. Will need to look into that again. Couldn't open the USB plug, maybe I best make an adapter cable without the +5volt
Watch the red LED on the Raspi. It was red even w/o powering it through the normal plug. I had to destroy the plug and add a new one. You find a link in the description. Not an expensive part...
Andreas Spiess great thanks
I never throw any technology away, but I can't find anything, so I go and buy more, somebody please help me stop this insanity!
Unfortunately, I am an engineer, not a psychologist. Maybe in my next life?
Another interesting video Andreas. Wish you had of gotten another drive to work.
Thanks!
Hi Andreas!
Sidenote, I don't know if the raspberry pi supports UAS, but you might want to look into that if you're gonna use an USB HDD.
Thanks for the video, I always enjoy them a lot.
The guy with the french-canadian accent ;)
Also
#define LIKE true
Thanks for your comment. I am no Linux guy (at least not yet...). This is why I usually just stay at the surface of things to survive. And the "price - performance" for my projects of UAS (from what I saw in 5 minutes research) is probably quite high. But I might be completely wrong.
No worries! I'm not sure the Pi kernel has support for UAS/UASP anyway. Assuming it has, only thing needed is a USB-SATA adapter supporting it, some of those controller chip are supporting it now, mostly USB3 adapters (not all of them). But yeah, I have to agree, the performance difference is not massive, as you said, not worth it if you need to buy more hardware.
Can't wait for the next video! :)
Thanks. Next video most probably will be a mailbag (still secret ;-)
Great video. Please go over witch touch screen is best for raspberry pie. 15" 🙂
Thanks. I put it on the (long) list of video ideas...
The KingDian appears to use Toshiba E-MMC nand flash memory, using an SM2246EN SATA 6Gb controller.
Thanks for the info.
5.25" drives? can we expect a Raspberry Pi to boot from paper tape?
ETA: That would actually be super impressive. I last saw a paper tape being used as a bootloader on a DEC PDP/8 in the 1980's and that was already massively obsolete. Of course when you switched such a system on with no ROM you had to punch in the "RIM loader" as machine code using the front panel switches - all in octal, not binary or hex, but octal. lol. This procedure would enable the paper tape drive and read in the bits that would enable the magnetic tape to load the operating system which would then enable the massive (by physical volume) hard drive and the dumb TTY RS232 terminals.
Actually, it was only a 3.5" drive. I mixed the formats. I did not start on the PDP,8 but on the PDP11 and worked for a few years for Digital Equipment Corp...
Thank you for making this video
You are welcome!
IMHO the way to go is to modify raspbian so that it uses tmpfs for all of your logs etc so that the only writes you do are package updates and your user files or convert to a completely read only environment. Having all the extra wiring and added load to run an external drive will probably make it more unreliable in the long term.
Sounds like a good idea. Where do I find a tutorial to do that?
Andreas Spiess
Should just be an entry in your fstab. However someone did write a guide:
www.zdnet.com/article/raspberry-pi-extending-the-life-of-the-sd-card/
Thanks for the link!
best have 1 -4 tb SSD and use whitout SD card ,simple easy if have x820 or 825 board.
It's a shame that RPi cannot handle enough power for USB devices. I was able to connect 4 USB 3.0 2.5" external HDDs to Orange Pi PC and all of them were visible and worked ok. Another plus is Allwinner H3 has hw support for 4xUSBs and there is no HUB on PCB so all disks use full USB2.0 speed (30-35MB/s) which is very convenient in NAS applications.
Thanks for the info. Do you know by chance how you can boot from USB with the Orange Pi PC or Zero?
AFAIR it is not that easy and requires SD card for booting. I believe it was mentioned at OPi official forum.
Thanks. I asked because another viewer wanted also to try a Orange Pi.
I'd like to see this redone with a Raspberry Pi with a USB 3.0 port. I'm guessing that the speed of USB 2.0 is the limiting factor.
I still wait for the boot from USB function
Thank you for this!
How do you mount a SEAGATE SATA 3.5inch 8tb 5400rpm hard drive in a sabrent single drive case with power for drive to USB3? (12VOLT, 2AMP) FROM CASE TO HARD DRIVE.
I DO NOT want to boot from this, but store data. I realize SSD TYPE drives easily auto mount as (SDA1).
Also once mounted, from desk top, how do I access storage drive to add folders and store data?
THAT WOULD BE VERY HELPFUL TO NEW LINUX USERS LIKE ME.
GOD BLESS.
You should get adapter cables for these drives which have 12 volt connectors.
Thanks for sharing 😀👍
:-)
i want run homeassistant in HDD can it be done as video?
So far I have no experience with home assistant
i test Raspbian and it's work but nothing when using Homeassistant
but thanks for many projects especially ESP8266
It's a pretty good disk, it's been running for more than a year. 120 GB runs faster than 60 GB
Which disk you mean in particular?
Andreas Spiess KingDian
Thanks for publishing your exprerience
just installed Diet-pi and tried raspbian on WD500AAKX and it boots up, I used a raspberry pi 3b+ but should be the same on raspberry pi 3b it you set to boot from HDD.
had to use the HDD as internal drive in my PC, installed the OS onto the HDD with Ubuntu disk image writer.
Took the drive out the PC and plugged it into a UGREEN External Hard Drive Enclosure with 12V 2A Power Adapter for 3.5/2.5” SATA SSD HDD
Thank you for sharing your experience!
thanks, for this info, herr Andreas Spiess, this boot from an usb hard drive for pi3, what about pi4 ???
I made a video for the Pi4
I may be well out of my depth here or misunderstood but can you power the 3.5" WD drive with an external computer power supply? Many years ago I add too many items to my computer and it became unreliable so I stuck an addition power supply in and powered the 2 DVD drives and 2 of the 4 hard drives from that supply. My procedure was turn on the external power supply first then the main one. It worked well for years until larger drives came along and I stopped using as many.
I think this should be possible. At least I do it on my PC where I use the Orico bay showed in the video. As you say, powering the disk before you power the Raspberry is essential.
i has test usb 2.0 cable,external HDD usb 3.0 and doccing station usb, whit raspberry 3 start whitout SD shit card, NO newer any working ,all same parts i test what you have video,newer no work. but i buy subtronic x820 HDD board and install at raspi and work sametime easy.good and true working whitout SD card too.
Home automation server will be a good subject
Thanks for the proposal. Because there are already many channeld dealing with this issue, so far I concentrated on more technical aspects of the topic. But we will see where it goes...
About that transparent case, and the split USB adapters... you could try something like the Ewent EW7051 case, or any other brand case that comes with its own power plug.
I've set up a cousin's Raspberry with one of those Ewent cases that he had for an old PC to use with a 2.5" SSD, and it ran properly with the Raspberry.
(EDIT: the "explainingcomputers" channel has a similar video about plugging an old SSD into a raspberry Pi, at ruclips.net/video/ubnwvxF3Klc/видео.html and he's using a simple sata-to-USB adapter, which seems to be working well for him. Looks like a cheaper option than the powered case suggestion that I made. Unfortunately I didn't get what brand it is or if it's a specific type of adapter, but I know I've seen similar-looking adapters at a price of less than €3 on some Chinese webshop and Amazon before. And that actually makes me think that you might indeed have hit a snag between a USB 3 connector and the Raspberry's USB 2 port.)
About the KingDian, I'm not sure what's inside the one you used in this video, but I've once found a small KingDian M.2 SSD in a discarded PC and (after also putting it in a case with its own power plug) connected it to a Raspberry and got even faster speeds; I think that M.2 was NVMe but I can't remember for sure.
(sadly that M.2 and that case didn't survive me accidentally stepping on it... the Raspberry (an early 3B+) is still fine, still hosting some basic sites that I like to mess with on my home network... though lately it's been getting hotter than normally at random times, couldn't figure out what caused it.)
Thank you for your input. Currently I use small and cheap SSD drives. They do not need a lot of current and are pretty fast. Especially on the USB3 of the RPi4
I think you also need a RPi 3 if you want to get rid of the SD card. I could be wrong...
Actually, I do not know that, and I do not have a RPi2. Maybe somebody else knows
On older RPi devices you still need a small SD card to host /boot - but you can switch during boot to an attached USB HDD to load the system. There are lots of tutorials out there on how to do it.
I'm a little late to the party but....how is best to clone SDCARD to SSD?
e.g. 16GB SDCARD to 128GB SSD (preserving all data)
I usually read the SSD image with Win32DiskImager and then write it back to wherever I want.
I tried doing this several months ago and gave up because of the power problems - though I did not try your USB connector modification. Although I tried max_usb_current=1 it did not help for me - and at www.raspberrypi.org/forums/viewtopic.php?p=930695#p930695 it says that for the RPi3 1.2A is the default and the config.txt change has no effect. Low resistance cables are also important I believe.
I was using a 250GB SATA3 SSD with a USB3 adapter and came to the conclusion that the Pi USB2 throughput made using SSD drives a waste of money.
I think it might just be simpler to move everything except /boot (or some similar change) to the hard drive.
Thank you for your other videos. I saw your post about the Geiger counter - I now have my own but discovered that the tubes are fragile before fitting the cover. I am now using nylon spacers. Some TIG electrodes are 2% Thorium Oxide and though Thorium is an alpha emitter the decay products emit beta particles so that may be an alternative to using uranium glass. Dismantling a smoke detector might be hazardous.
1. I think, cables are quite important if you power a disk from the RPi. This is why I like the version with the 3 connector cable more. There you separate the HDD current from the RPi current.
2. SSDs for sure are a waste on USB2. This is why I mentioned "recycling". Only if your SSD is too small for other purposes it makes sense to use it here.
3. So far I did not experiment with radioctive sources. Thank you for the tip.
As opposed to cutting the 5v leg on the "pi end" of the multi feed cable, how about a diode biased "exit only"? Then no power goes TO the pi, but that 200ma can come FROM it, giving a little higher electron count to excite your giant dinosaur drive, lol. No backfeed starvation, it should work at least as well, and could possibly give small speed boost to mechanical drives with power saving tech (SMALL, lol). Of course, one could also use a powered enclosure for the drive, if such a beast still exists in the post IDE interface universe, lol
How will any power come from the raspberry pi? With your diode inline there will be a drop and the voltage from the raspberry pi will be lower than the 5v coming from elsewhere.
I think, donpalmera is right.
donpalmera I kind of suspected that might be so, but risking the shame of being corrected as to the unworkability of my half baked ideas often proves far less costly than experimentation, lol. Thanks for the reply
intersting add hdd because i need make raspi car pc whit more hdd. or can i use big 64gb or 124 gb or 32gb usb stick store all software etc,programs ?
I assume you can use a usb stick. I do not know the capacity limit
How about testing USB thumb drives next.
What is a USB thumb drive?
Has anyone tried the Kingdian S100 SSD 2,5 inch (not the S100+ that Andreas uses)? I am using an Orico usb adapter with it. I can access the S100 as a disk, but I am not able to boot from it with a raspi3, and the one time write switch set for usb boot.
Hello Mr. Thorud ! I've successfully setup a Kingdian S100 (the model without the +) 16 GBs SSD as my USB external boot drive and removed my SD card. In addition to add this line in my /boot/config.txt: program_usb_boot_mode=1, I also had to add this part in my /boot/cmdline.txt: root=PARTUUID=ab99c99d-02 (where ab99c99d is the bootable partition UUID of this SSD). I'm currently running Raspbian GNU/Linux 9 (stretch). HTH. And thanks Mr. Spiess for your great videos !!
Nice
Thanks
Great video tnx! how many comments about 5.25 you have :)
So far I only counted one. The other viewer probably did not want to comment :-)
3.5 drives needs 12v + 5v ... 2.5 needs only 5v ... again tnx for great videos
At least I mentioned this fact in the video (including picture) :-)
sorry yes ... looking video and commenting in same time
What happens if you have two hard-drives connected on boot, if only one is bootable will it boot?
+Patrik Kron I do not know.
If anybody can identify a USB SWITCH, as opposed to a USB HUB, then the possibility of a Raspbian implemented RAID 10 with the obvious speed benefit of parallel writing to multiple eg. 8 drives with one, two, four, or eight bits to each drive simultaneously giving seriously fast data access via inexpensive and mirrored or secured storage. Any takers? I think we could help Andreas here...... I have a hub with 7 ports and 3.5A power supply but as yet I cannot locate a USB SWITCH? With a much more substantial regulated power supply to each port to support a hard drive and SATA interface_ I certainly do think an open design published under CC Creative Commons copyright would pave the way to realising a serious data management pathway for many to collaborate, provide proof of concept, prototype and commercialise? I believe in makerspaces and I am convinced such projects will establish the need for a distributed manufacturing base through makerspaces in many cities in many countries. Distributed manufacturing using CNC technology and 3D printing and automated reflow ovens all built within the makerspaces to build a network of compatible technology and to bridge the financial gap between small scale and 100,000 unit production facilities of world class production that requires filled order books and substantial budgets to include shipping and distribution. Makerspaces will need to adapt to realise a steady income to secure their own survival while they demonstrate how their technology functions to realise the initial dreams of individual makers.
What would a "USB Switch" do? Even if such a thing existed the idea is ridiculous.
Get a board that has SATA on board or has a PCIe/mini PCIe connector.
I think this is probably an overkill for a 30$ computer.
I have encountered similar issues before and I found I had to power the drive before booting. There might be too much power drawn at boot and on initializing the drive, but I can't say for sure. SSDs draw less power than spinning disks so I usually have no problems with them. Both need to have the primary partition boot bit set, but I am assuming you already knew that.
It might be a useful project to create a power circuit that powers up the drive first and then powers the device. Old bios systems used to have a boot disk wait time settings for this very reason.
I've worked in labs testing NAND for about 8 years and I can tell you what I believe to be true from our experiments.
NAND flash is inherently bad for reliability and long term storage without grooming(NAND bit monitoring and rewriting to maintain data integrity) iron oxide magnetic storage lasts 10 to 15 years whereas ungroomed data will only last reliability at about 6 months at room temperature. The higher the temperature the less reliable the data will be.
Most NAND drive manufacturers are terrible with maintaining integrity. The best company I found to maintain data was fusion-io, but the drives were quite expensive. Now they are owned by SanDisk and Western Digital. I don't know if you can get the same quality with the m.2 and so in disks since they aren't using the sophisticated driver software. For sure the SSDs are better than a USB stick but not by much.
1. You are right. The modification of the cable does exacly that: It powers the USB drive way before the RPi (at least in my setup where the USB power supply is always on). So, the RPi does not need to care.
2. Thanks for your info about the NAND technology. It is a little scary because I change now more and more to SSD disks. But good to know that longime storage should be done on magnetic devices.
Thank you for the video. I spent a week in trying error methodes to make it boot from my HDD WD 512 GB. The point is that, I made a y cable and pluged it in an Ipad`s charger 2.1 A... The charger feed the HDD and the raspberry at the same time. But the system initializes only if I disconnect the raspberry cable and connect it again while the HDd cable is unchanged, then the system boots from the USB HDD. Thank you for the hints, but I also wonder why I need to unplug and plug my raspberry pi to make it boot from my HDD. The system in this way can not be rebooted because once turned off it is unable to automatically turn on again, if I don`t manually unplug and plug the raspberry pi supply cable. I tryed add rootdelay=10 in cmdline.txt but the same occurs.
here there are some photos of my results ... drive.google.com/drive/folders/0B-AYwbaKxg7CREYtR0s3ZzRhTG8?usp=sharing
I think this is the behavior of the Raspberry also with SD cards: It does not boot without removing the power. At least, mine. Unless you use the command Sudo reboot now.
For me sudo reboot works fine with the SD and USB flash drive. Even usina a dedicated power supply 2 A for the hdd and 3A for the raspbery it dont reboot
Raspberry Pi SD interface is too slow to take advantage of the faster SD cards. ODroid C1/C1+/C0 is much faster and cheaper than Raspberry Pi. ODroid C2 is extremely fast. I like the 32 GB Samsung Evo Select card for $13. On a USB 3 reader I get a crazy fast 94.74 / 70.51 MB/sec sequential read/write. 7.46 / 3.24 MB/sec random 4KB read/write I/O performance. It will be capped to 40 MB/sec on a USB2 interface but the random performance still helps a lot as a boot drive.
Of course you are right concerning USB2/3 and about the slow SD interface of Raspberry Pi. The first was also quite visible in video #141 where I got similar numbers as you describe and the second is visible now.
However, I still like the Raspberry because of its supporting community. As a newbie to Linix I feel more save ;-)
Andreas Spiess The ODroid community is good too. Most of the instructions and code samples for Raspberry Pi run unmodified on ODroid. It is just Linux on ARM. Orange Pi Zero is even cheaper at $9 and it is as fast as Raspberry Pi 3. There is much support for Linux in general. There is nothing unique about RPi Linux. Worst case the IO pins are mapped a little differently.
Thanks for the feedback. Maybe I will try once an ODroid board. A Orange Pi is already in my drawer and I used it sometimes ago.
IMHO avoid the Orange Pi stuff unless you have a lot of time to mess around. The Odroid stuff isn't as cheap as the Allwinner something something pi stuff but the quality of their hardware is far higher and their software isn't just a horrid vendor supplied kernel dump mixed with some other junk.
i think 5,25" or 3,5" hdd and some old 2,3" no work because old hdd eat lot more current what you can take out usb connections, usb connect have max 500mA cuurrent what no have lot if use old hdd, need external power.
You are right.
I use an mSATA SSD drive connected to an mSATA shield. Speeds are comparable to a standard 2.5inch
SSD. Very happy with this setup.
Shield I use (on a Pi3):
www.banggood.com/nl/X850-mSATA-SSD-Storage-Expansion-Board-for-Raspberry-Pi-3-Model-B-2B-B-p-1170358.html
Example of mSATA drives
www.banggood.com/KingDian-mSATA-M100-8G16G32G-SSD-Internal-Solid-State-Drive-Disk-p-1053514.html?rmmds=buy
Thank you for your feedback. Another interesting possibility...
Do u live in buchs sg
No, near Basel
About the lifespan of ssd's on any linux distro.I did not check but one has to assume the filesystem that is made on the sdd can have a deep impact on ssd lifespan. Some journaling filesystem do make a Lot of disk writes simply as a maintenance feature of Linux fileystems and are not suited for any type ssd drive, be it usb or sata. So that should be worth considering.
I think you are absolutely right.
I'm sorry to be of no more help since I truly only have limited time for embedded applications. but for certain many Linux FS were made to work on hdd, where the number of writes on disk was not a problem in terms of hard drive longevity. So they rely heavily on disk maintenance, and are therefore very very reliable on any HDD.
Sadly flash memory always have a limited number of write cycles. So in principle ssd's should not be trusted for long term applications, specially not on those that require continuous disk writes.
is it also possible to use more than 1 partition on the HDD?
I think so. Western Digital sold an HD for the RPi where they used more than one partition
3,5 ich hdd working.
The HDD case is a Sweex ST032 [sata II] with external power.
Connect the usb upper port next to the lan, when I connect on the outside the disk will not seen by the Raspberry
How: first make an image of your raspbian expanded system, I use a 32Gb SD. write this to your HDD.
Now you can make also partitions to the HDD.
I came up with something on ebay that will fix the current check this out
UNITEK USB 3.0 to SATA Adapter Converter for 2.5" / 3.5" External Hard Drive HDD with External 12V/2A Power Supply
This should work for the bigger drives. I have one here but did not try it out so far.
Will raspberry pi b+ boot from HDD without SD card?
I do not own a RPi1 or 2, but read, that it is more complicated to use a USB disk to boot from. And you cannot avoid the SD card.
When SD cards die after too many writes, can they still be read?
I do not think.
Andreas Spiess But you mention SD card death, has this not happened to you? It has not happened to me, so I'm asking. SSDs become read-only after dying of natural causes, so maybe SD is the same.
out of my 35 years of life (I'm 35) , I've never seen an SD card die or fail..
Is it possible to boot from a USB thumb drive?
I do not know what a thumb drive is. But I used a USB drive
Thumb drives are the small storage devices that can be plugged into a usb drive. As opposed to a larger drive that can be plugged in to a usb drive.
It's 3,5" disk, not 5,25"
5,25" is the size of DVD reader :)
You are of course right :-) I already corrected the comments
There were 5,25" hard disks made in the 90, obviously they needed a lot of power to get it running, but they could store more than regular 3,5" drives of the same age. I think they were called Quantum Bigfoot or something.
Reuse the same adapter, just throw in ATX power lead!
How would you connect the PS and to which adapter?
Andreas Spiess
You just need 4 pin Molex/ATX connector used on the bigger hard disk :)
Aliexpress and eBay sell those power supplies for your project!
Now I understand. Thanks!
Have you checked out Berryboot? It's ideal once you go to a HD system for multibooting OS's
www.berryterminal.com/doku.php/berryboot
It's ilke having GRUB on a RaspPi.
Thanks for the tip! No, I never used it. Might be interesting for development systems.
so, use an usb dirvered disk
For some Raspberries, yes
Usb hub do work great
Thanks for the tip. Has the same effect as the 3 plug cable, I assume.
KINDIAN is a China company ,and the ssd used NAND in side .If anyone need their products,could contact me...thank u.
Would use a X820 Expansion Board
Maybe overkill for many projects. But possible
thanks, for this info, herr Andreas Spiess, this boot from an usb hard drive for pi3, what about pi4 ???
Maybe you watch my video for the Pi4?