User avatar
HawaiianPi
Posts: 2764
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Pi3 - USB boot

Sat Apr 28, 2018 5:41 pm

Gavinmc42 wrote:
Sat Apr 28, 2018 12:28 pm
We have some now and a new one is being built locally, now have excuse to check it out ;)
Never would have gone to Costco for electronics.
While Costco's selection of Electronics is limited, sometimes you can find awesome deals there. We buy a lot of our cell phones there because they are cheaper than anywhere else (plus they throw in some accessories), and I recently got a ridiculously great deal on a gaming laptop. The SanDisk 2x64GB card price is good, but not a super deal.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

User avatar
ab1jx
Posts: 668
Joined: Thu Sep 26, 2013 1:54 pm
Location: Heath, MA USA
Contact: Website

Re: Pi3 - USB boot

Sun Apr 29, 2018 2:58 am

I buy most stuff by starting at http://www.froogle.com

I have a hard drive with USB adapter but basically gave up on it as a boot device. It will boot OK and work fine in the short term. I think what happens is that when the drive spins down to a sleep mode from lack of activity the Pi doesn't realize that. If there's swap on the drive the Pi tries to access it and can't when the drive's asleep so it crashes. If a drive is connected the old fashioned way with IDE/ATA or SCSI the computer knows to wake the drive up when it needs it for something. That seems to not happen connecting via USB.

So I boot from a high-endurance SD and then manually mount the USB hard drive. If I reboot or halt it gets unmounted first. If the Pi crashes then the hard drive will need an fsck, but that's not usually very often, once every couple weeks or so. If I'm doing something with a high risk of crashing I unmount the drive first. It's been pretty stable using it this way for several months, as a boot drive it would crash once a day or more.

User avatar
Gavinmc42
Posts: 2107
Joined: Wed Aug 28, 2013 3:31 am

Re: Pi3 - USB boot

Sun Apr 29, 2018 4:36 am

Thanks guys, all input welcome.

When running Raspbian even Lite, my ratio of good to bad 16GB SD's is quite high, about 50%.
I even tried 16GB USB and had issues and I really need at least 32GB now.

Most older 8GB SD's worked fine for quite some time,95%, but that was years ago ;)
With Linux OS's getting bigger a reliable solution is need.
Especially if I want to move to Pi3B+ Aarch64 as a development tool.

How fast will a Pi3B+ boot from network?
Will it boot from a POE switch?
But that really is another post.
I have a lot of fun with Zero's booting from USB, time to try Netboot 3B+'s?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Remus66
Posts: 10
Joined: Wed May 23, 2018 8:08 am

Re: Pi3 - USB boot

Wed May 23, 2018 11:41 pm

Here is a question for you.

I am trying to have my Pi3 to boot from the mSATA SSD. I have gone through all the partitioning, etc, but how do I copy an image to the SSD?

All the sites say to use Etcher, but does Etcher work on Pi's? or do I have to utilise another PC?, or do is there another way.

User avatar
Gavinmc42
Posts: 2107
Joined: Wed Aug 28, 2013 3:31 am

Re: Pi3 - USB boot

Thu May 24, 2018 1:07 am

Yep, Etcher does not like USB SSD drives, I had to use Win32DiskImager on a Windows PC.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
ab1jx
Posts: 668
Joined: Thu Sep 26, 2013 1:54 pm
Location: Heath, MA USA
Contact: Website

Re: Pi3 - USB boot

Thu May 24, 2018 1:13 am

Assuming there's nothing else on the SSD you care about, I'd just use dd. The image contains 2 partitions, doing a dd to the drive will just overwrite what's there (almost) and give you 2 partitions on it.

See the dd man page but something like:

Code: Select all

dd if=myfile.img of=/dev/sdc
should work. Your drive may not be called /dev/sdc, that's just an example. Plug it in then look at the end of the dmesg output to see what it's called. Or look at sfdisk -l. Devices are assigned letters sequentially as they're found, it won't always be called exactly the same thing. That's why there are DUIDs and UUIDs.

Don't use a partition number like sda2 or sdb1, you want to write to the whole device. And if it's a blank device there's room to screw up, you can just do it again a different way. Writing it will take a few minutes at least, dd doesn't give any progress indication.

Remus66
Posts: 10
Joined: Wed May 23, 2018 8:08 am

Re: Pi3 - USB boot

Thu May 24, 2018 1:35 am

Check out my last post on this thread. It works now and I am unsure of what i did.

I suppose that is the beauty of the Pi, you learn by trying things.

viewtopic.php?f=91&t=214237&p=1319374#p1319374

daturach
Posts: 1
Joined: Sat May 26, 2018 12:07 pm

Re: Pi3 - USB boot

Sat May 26, 2018 12:55 pm

Hello

This is my experience booting from an external HDD, with a Pi3, model B, ver. 1.2, running latest raspbian stretch.
HDD is quite old, model PyroGate 50 GB, Hi-speed Business Drive, manufactured in 2008.

I went through all these intrications, enabling USB boot mode in config.txt, etc. So far so good.
I managed to boot from that HDD, but yesterday, when I tried to boot again, it did not work.

I spent "some" time figuring out the process to make it work again. I was about to give up, but luckily this process works for me.
It's a bit cumbersome, but as I intend to use that system as a server for recording data, I expect to let it run as long as it can...

The process is quite detailed, kind of for dummies but it's in case I need to do it in 3 or 4 years time...
The SD card is bootable, the one I used to configure "USB boot".
HDD has a separate power supply, something like 5V, 4A.

Anyway, here it is:

- Insert SD card and switch on Raspberry. Do not connect the HDD to the USB port of the Raspberry.
- Raspberry will boot.
- Switch on the HDD and connect the USB cable to the Raspberry.
- After about 3-4 secs, the HDD will be recognized by the Raspberry.
- Shutdown Raspberry but let HDD connected to Raspberry.
- Remove power from Raspberry and remove SD card.
- Switch on Raspberry (without SD card).
- Raspberry will boot from HDD.

Et voilà.

I don't know why it's that complicated. Maybe someone else has a similar HD.
In any case, I am not going to buy a new device for that application. Hey, it's a 50 GB HD with plenty of space for such a system.

Thanks

Walter

nes_pi
Posts: 20
Joined: Mon Jun 25, 2018 1:35 am

Re: Pi3 - USB boot

Thu Jun 28, 2018 7:31 am

Wow. Just cloned my 64gb SD card to a cheap Sandisk X110 64gb SSD in a USB enclosure. Even though the sd card i was using was the fastest rated Evo+ for random reads and writes, i am finding the pi is wildly faster than when running off the microSD card!

Maybe now i will clone my ssd to the microSD card for backups :lol: And the microsd will be saved for when i want to boot RISC OS!

If i leave a sd card in there for storage with no OS installed, will it still boot from the usb drive?

I notice my pi runs about 5 degrees hotter celsius when running over USB than off the microSD. Perhaps i need to run it off a powered hub to take the strain off the pi. Hopefully my fans get here soon from china (I bought a lot on ebay because i had a lot of pi's to put fans on. I also bought a 10 pack of transistors off ebay, $1.55)


Walter, maybe you dont have the usb boot line in your config.txt.

jerrm
Posts: 59
Joined: Wed May 02, 2018 7:35 pm

Re: Pi3 - USB boot

Thu Jun 28, 2018 1:52 pm

nes_pi wrote: I notice my pi runs about 5 degrees hotter celsius when running over USB than off the microSD. Perhaps i need to run it off a powered hub to take the strain off the pi.
Temp may be due to the fact the Pi is constantly at 10% CPU utilization when there is no SD card. A rather important detail none of the docs bother to mention.

There is a fix now. See viewtopic.php?f=28&t=211912.

User avatar
HawaiianPi
Posts: 2764
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Pi3 - USB boot

Thu Jun 28, 2018 11:37 pm

nes_pi wrote:
Thu Jun 28, 2018 7:31 am
Wow. Just cloned my 64gb SD card to a cheap Sandisk X110 64gb SSD in a USB enclosure. Even though the sd card i was using was the fastest rated Evo+ for random reads and writes, i am finding the pi is wildly faster than when running off the microSD card!

Maybe now i will clone my ssd to the microSD card for backups :lol: And the microsd will be saved for when i want to boot RISC OS!

If i leave a sd card in there for storage with no OS installed, will it still boot from the usb drive?
Yes, as long as the SD card itself is not bootable (no OS). That will even reduce the boot time, and reduce the additional CPU load from polling an empty SD card slot (which could account for some of the extra heat you are observing).

I notice my pi runs about 5 degrees hotter celsius when running over USB than off the microSD. Perhaps i need to run it off a powered hub to take the strain off the pi. Hopefully my fans get here soon from china (I bought a lot on ebay because i had a lot of pi's to put fans on. I also bought a 10 pack of transistors off ebay, $1.55).
Depends on how hot your Pi is getting? Remember the Pi can run at temperatures hot enough to hurt your skin and still be within design specs. The Pi3B won't start thermal throttling until it hits 80C/176F, which is painfully hot!

Personally I'm not a fan of fans. They consume additional power, add noise, and over time they will fill your system with dust.

I keep my Pi3B(+) computers cool in Flirc Gen2 cases. They not only look very cool (picture is link),
Image
the case itself acts as a huge heatsink to keep the Pi running cool, without the nose, power requirements or dust of fans.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

LTolledo
Posts: 637
Joined: Sat Mar 17, 2018 7:29 am

Re: Pi3 - USB boot

Fri Jun 29, 2018 9:19 am

I've converted all of my RPi3B to boot purely (no microSD card in the slot) on USB Flash Memory. Installed the fix to prevent high CPU usage.

I've even able to have my RPi3B to boot purely on a 1TB 2.5" HDD...

Havent tried booting from a self powered 3.5" HDD though....might try it for testing... but in the end I think is a bit impractical for me.
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

User avatar
ab1jx
Posts: 668
Joined: Thu Sep 26, 2013 1:54 pm
Location: Heath, MA USA
Contact: Website

Re: Pi3 - USB boot

Fri Jun 29, 2018 11:24 am

My next leap might be an external RAID like
https://www.startech.com/HDD/Enclosures ... S352BU313R
or
https://www.startech.com/HDD/Enclosures ... S3540BU33E

I'd like the redundancy of external battery-backed drives. A hardware RAID working through the USB bottleneck couldn't be any slower than a single drive.

User avatar
ab1jx
Posts: 668
Joined: Thu Sep 26, 2013 1:54 pm
Location: Heath, MA USA
Contact: Website

Re: Pi3 - USB boot

Tue Jul 10, 2018 9:12 pm

I discovered (months too late) the rootdelay=10 option you can put in your /boot/cmdline.txt. This tells the system to expect up to a 10 second delay for the root filesystem (the one set with the root= earlier in the line). I've had maybe a dozen crashes over 6 months because when I'd walk away from the Pi (it's always on) something would time out and go to sleep, meanwhile the Pi had swapped something out to it. When the Pi tried to read it back the device was asleep, so crash. I have probably a perfectly good 1 TB laptop drive in a USB adapter that I gave up on booting from. I keep stuff on it, but manually mount partitions and boot from SD.

Oh well, it gives me more flexibility. I can stick in a Raspbian SD, right now I'm booted into arm64 Debian, I've tried arm64 Gentoo. I'm building http://www.linuxfromscratch.org at the moment in a partition on the USB drive. It has been done before: http://intestinate.com/pilfs/guide.html

I think the ultimate heat sinking method would involve machining a block of aluminum thick enough so you could mount the Pi circuit board upside down on a big heat sink and not have any of the components hit the heat sink. You could make one for the GPU at the same time, slightly thicker. Use heat sink compound, that white stuff. But I've never overclocked anything, I don't think it's worthwhile.

Return to “General discussion”

Who is online

Users browsing this forum: Heater, umardastgir and 73 guests