smowalker
Posts: 1
Joined: Tue Jun 25, 2019 12:11 pm

PI4 USB Boot

Tue Jun 25, 2019 12:21 pm

For well over a year now, we have used nothing but flash drives in out pii3b+, and the failure rate has been zero %

So when our Pi4's arrived today, I was very surprised that using the new lite image on a USB drive did not get us out of the starting gate.

The Red led comes on solid followed by the green flashing 4 times then staying solid for a little wile before repeating the flashing 4 times quickly.

Anyone else seen this??

BTW this USB and image will boot in a Pi3b +, we have just checked.

Just off to try and find a micro SD card not an ideal solution.

Rgd

Stuart

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23709
Joined: Sat Jul 30, 2011 7:41 pm

Re: PI4 USB Boot

Tue Jun 25, 2019 12:55 pm

It's been fairly well publicised that USB and PXE boot are still under development. In the meantime, use an SD card for the first stage.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

BlueFyre
Posts: 5
Joined: Tue Jun 25, 2019 9:28 pm

Re: PI4 USB Boot

Tue Jun 25, 2019 9:30 pm

jamesh wrote:
Tue Jun 25, 2019 12:55 pm
It's been fairly well publicised that USB and PXE boot are still under development. In the meantime, use an SD card for the first stage.
Thanks for the update, do you happen to have some kind of timeline or maybe issue we can follow to know when we would be able to use USB boot?
I was planning on moving from my Pi 3b+ which is using a USB drive and directly swapping over to the new hardware when possible

torn
Posts: 1
Joined: Wed Mar 05, 2014 3:43 pm

Re: PI4 USB Boot

Mon Jul 15, 2019 1:32 pm

I'm very surprised that this hasn't been included on Pi 4 - USB boot is a critical feature because SD Cards are so stupidly fragile - a single power supply interrupt can completely destroy a card.

"Just" adding an 8 GB micro SD Card for a 5 kb file seems a bit obscene.

Andyroo

Re: PI4 USB Boot

Mon Jul 15, 2019 5:34 pm

BlueFyre wrote:
Tue Jun 25, 2019 9:30 pm
jamesh wrote:
Tue Jun 25, 2019 12:55 pm
It's been fairly well publicised that USB and PXE boot are still under development. In the meantime, use an SD card for the first stage.
Thanks for the update, do you happen to have some kind of timeline or maybe issue we can follow to know when we would be able to use USB boot?
I was planning on moving from my Pi 3b+ which is using a USB drive and directly swapping over to the new hardware when possible
The engineers are planning on network (PXE) boot first for education / corporate use and then USB boot - guesstimates are up to four months but to be honest I would not hold them to that as they deserve a holiday first :lol:

I would just put the boot directory onto SD and the rest onto the USB drive. When done its a simple merge task to close the SD card down.

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

Re: PI4 USB Boot

Mon Jul 15, 2019 6:06 pm

BlueFyre wrote:
Tue Jun 25, 2019 9:30 pm
I was planning on moving from my Pi 3b+ which is using a USB drive and directly swapping over to the new hardware when possible
That's not going to work anyway. New models always require new firmware and a new kernel, and in this case, since Raspbian Buster was in development, they just released the new version of Raspbian for the Pi4. So you'll need to start over with a clean install (upgrading from one major release to the next is not recommended, since it often causes more problems than it solves).

You can do the old-school style hybrid SD-USB boot by placing /boot on an SD card and running the root filesystem from USB (that's what I'm currently doing). See this post for a quick tutorial on how to do it: https://www.raspberrypi.org/forums/view ... 0#p1498774

Or see this post for RonR's script, which might be a simpler solution: https://www.raspberrypi.org/forums/view ... =made+easy
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?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23709
Joined: Sat Jul 30, 2011 7:41 pm

Re: PI4 USB Boot

Mon Jul 15, 2019 9:32 pm

torn wrote:
Mon Jul 15, 2019 1:32 pm
I'm very surprised that this hasn't been included on Pi 4 - USB boot is a critical feature because SD Cards are so stupidly fragile - a single power supply interrupt can completely destroy a card.

"Just" adding an 8 GB micro SD Card for a 5 kb file seems a bit obscene.
Given the fact we cannot make the Pi4 fast enough to satisfy demand, it's seems that USB boot isn't quite as critical as you think.

I've been using Pi's for 6 years. In that time I have corrupted one SD card, because I was using a JTAG debugger on the firmware which can badly affect the SD card clocks. Rest of the time? Not once that I remember. So stupidly fragile seems rather an over exaggeration.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

User avatar
thagrol
Posts: 1851
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: PI4 USB Boot

Mon Jul 15, 2019 9:40 pm

torn wrote:
Mon Jul 15, 2019 1:32 pm
I'm very surprised that this hasn't been included on Pi 4 - USB boot is a critical feature because SD Cards are so stupidly fragile - a single power supply interrupt can completely destroy a card.
Not this again :roll:

HDD, SSD, USB flash storage, etc are also "stupidly fragile". A "single power supply interrupt" can destroy any of those too. HDDs are also much more susceptable to vibration and shock. And require more power to operate than SD cards.

USB boot may be a critical feature for you but it is by no means so for most Pi users..
"Just" adding an 8 GB micro SD Card for a 5 kb file seems a bit obscene.
Which 5KB file are you thinking of? bootcode.bin?

The 4B doesn't use bootcode.bin, it has onboard flash storage that holds its equivalent so even if you used an 8GB card with just boorcode.bin as in previous models it would do you no good.

Find yourself a second hand small uSD card and do what HawaiianPi suggests. Which isn't old school at all. It's how every linux system with seperate /boot and / partions does it.
This space unintentionally left blank.

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

Re: PI4 USB Boot

Mon Jul 15, 2019 10:04 pm

thagrol wrote:
Mon Jul 15, 2019 9:40 pm
... Which isn't old school at all. It's how every linux system with separate /boot and / partitions does it.
Good point!

I was referring to the way people used to boot older models from USB before the Pi3 and bootcode.bin method were available. However, yes, that's how Raspbian does it, even when booting from SD card (separate /boot partition). One of the nice things about Linux is that storage mount points are usually not device dependant, and for most things the system doesn't know or care if they are separate partitions or separate drives. It's actually common practice to have /home on a separate partition or drive as well (although many Linux installations don't do that by default).

Due to another thread I'm participating in, I'm now hybrid SD-USB booting my Pi4 with TWO USB 3.0 SSDs connected (and both USB 2.0 ports in use as well), and that's using nothing more than the older 2.5A official PSU with a USB-C adapter. Currently the 2nd drive is just storage, but since this subject has come up, I might try putting /home on the 2nd SSD... (https://www.raspberrypi.org/forums/view ... 7#p1500893
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
thagrol
Posts: 1851
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: PI4 USB Boot

Mon Jul 15, 2019 10:55 pm

HawaiianPi wrote:
Mon Jul 15, 2019 10:04 pm
thagrol wrote:
Mon Jul 15, 2019 9:40 pm
... Which isn't old school at all. It's how every linux system with separate /boot and / partitions does it.
Good point!

I was referring to the way people used to boot older models from USB before the Pi3 and bootcode.bin method were available...
Sorry. Didn't mean to imply that you were old school or out of date. Just wanted to make the point that the hybrid approach is actually incredibly mainstream in the linux world with the hope that once folks realise this they'll stop flogging the USB boot dead horse.
Due to another thread I'm participating in, I'm now hybrid SD-USB booting my Pi4 with TWO USB 3.0 SSDs connected (and both USB 2.0 ports in use as well), and that's using nothing more than the older 2.5A official PSU with a USB-C adapter. Currently the 2nd drive is just storage, but since this subject has come up, I might try putting /home on the 2nd SSD... (https://www.raspberrypi.org/forums/view ... 7#p1500893
Mine's doing duty as a NAS, DNS server, DHCP server, PXE server, router, and out going VPN server (I don't agree with the UK's "ISP must record every web site you vist" stance). Most of the NAS stuff is on a USB 3 connected HDD but the OS and the rest are on SD.

I'm considering adding another USB connected HDD (coz I have spare HDDs sitting around) and moving /var, /tmp, and the remaining NAS stuff to that so I can make the SD card read only. Power ain't a problem as it (and two, soon to be three, other Pi) are mounted in an old mini-itx cube case hooked up to its ATX PSU.
This space unintentionally left blank.

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

Re: PI4 USB Boot

Tue Jul 16, 2019 1:38 am

thagrol wrote:
Mon Jul 15, 2019 10:55 pm
Sorry. Didn't mean to imply that you were old school or out of date.
No worries, didn't take it that way (even though I am).
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?

Nylan
Posts: 7
Joined: Wed Jul 17, 2019 7:35 am

Re: PI4 USB Boot

Wed Jul 17, 2019 7:53 am

HawaiianPi wrote:
Mon Jul 15, 2019 6:06 pm
You can do the old-school style hybrid SD-USB boot by placing /boot on an SD card and running the root filesystem from USB (that's what I'm currently doing). See this post for a quick tutorial on how to do it: https://www.raspberrypi.org/forums/view ... 0#p1498774

Hi HawaiianPi
Once the system is up and running, edit /etc/fstab to mount the card as /boot (so that kernel and firmware updates are correctly applied) and reboot.
Could you please detail a little bit more ? I've followed your steps, it works fine and I'm happy to use a usb3 drive as system. Just this /boot stuff I'm not sure.

Thank you very much in advance

Nylan
Posts: 7
Joined: Wed Jul 17, 2019 7:35 am

Re: PI4 USB Boot

Wed Jul 17, 2019 9:32 am

Tried to follow your stepds to get an hybdrid usb boot. It's been working until I tried to delete the unused boot partition from my usb drive and resize the root partition
Not I'm getting stuck while booting :(

I've seen a lot of threads talking about usb boot for the Pi4, all responses the same, wait for 3-4 months to get it done. :cry:

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

Re: PI4 USB Boot

Wed Jul 17, 2019 10:59 am

Nylan wrote:
Wed Jul 17, 2019 9:32 am
Tried to follow your stepds to get an hybdrid usb boot. It's been working until I tried to delete the unused boot partition from my usb drive and resize the root partition. Now I'm getting stuck while booting :(
You shouldn't have done that. When the USB boot enabled firmware becomes available you'd need that boot partition to easily transition to full USB boot. But, since you've done it already...

The problem is your PARTUUID changed when you edited the partitions. You'll need to find the new one and edit both cmdline.txt and fstab to correct it. Easiest way to do that would be to make a new Raspbian SD card and use that to edit the /boot card and USB drive..
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?

Nylan
Posts: 7
Joined: Wed Jul 17, 2019 7:35 am

Re: PI4 USB Boot

Wed Jul 17, 2019 5:23 pm

OK I tried a second time from scratch ( just reimaged the usb drive) and kept the boot partition on the usb drive.

Edited the fstab file, changed the uuid from the USB one to the SD one.
It worked, confirmed by changing the splash setting using the raspberry configuration tool.

But

then I wanted to resize the partition... Just opened gparted, resized my root partition to use the empty space after the current partition, rebooted, and PAF I'm now getting stuck on boot.

Resizing the partition break something for some reason and I've no idea what it is.

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

Re: PI4 USB Boot

Wed Jul 17, 2019 7:47 pm

Nylan wrote:
Wed Jul 17, 2019 5:23 pm
OK I tried a second time from scratch ( just reimaged the usb drive) and kept the boot partition on the usb drive.

Edited the fstab file, changed the uuid from the USB one to the SD one.
It worked, confirmed by changing the splash setting using the raspberry configuration tool.

But

then I wanted to resize the partition... Just opened gparted, resized my root partition to use the empty space after the current partition, rebooted, and PAF I'm now getting stuck on boot.

Resizing the partition break something for some reason and I've no idea what it is.
The resize probably changed the PTUUID. I noticed it with parted (not gparted) in buster. I swear that didn't happen under stretch, but I haven't gone back and re-tested under stretch. Could well be my aging memory.

Determine the correct ptuuid and edit cmdline.txt and fstab appropriately (again).

Nylan
Posts: 7
Joined: Wed Jul 17, 2019 7:35 am

Re: PI4 USB Boot

Thu Jul 18, 2019 11:12 am

You are right, I checked with blkid and seen that when I resize the partition, the PUUID changes... I updated cmdline.txt but I'm now getting bunch or error on reboot. Previously it was just stuck when booting now it goes into emergency mode but it's locked due to root account locked.

I think I will give up using the PI4 until the usb boot is ready.

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

Re: PI4 USB Boot

Thu Jul 18, 2019 3:35 pm

Nylan wrote:
Thu Jul 18, 2019 11:12 am
You are right, I checked with blkid and seen that when I resize the partition, the PUUID changes... I updated cmdline.txt but I'm now getting bunch or error on reboot. Previously it was just stuck when booting now it goes into emergency mode but it's locked due to root account locked.

I think I will give up using the PI4 until the usb boot is ready.
Did you correct /etc/fstab as well?

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

Re: PI4 USB Boot

Thu Jul 18, 2019 3:38 pm

Nylan wrote:
Thu Jul 18, 2019 11:12 am
You are right, I checked with blkid and seen that when I resize the partition, the PUUID changes... I updated cmdline.txt but I'm now getting bunch or error on reboot. Previously it was just stuck when booting now it goes into emergency mode but it's locked due to root account locked.

I think I will give up using the PI4 until the usb boot is ready.
You have to edit /etc/fstab as well (after messing with partitions). Did you miss my post above?
HawaiianPi wrote:
Wed Jul 17, 2019 10:59 am
The problem is your PARTUUID changed when you edited the partitions. You'll need to find the new one and edit both cmdline.txt and fstab to correct it. Easiest way to do that would be to make a new Raspbian SD card and use that to edit the /boot card and USB drive.

How to SD-USB boot a Pi 4B (root OS filesystem on USB):
  1. Write a Raspbian Buster image to your USB drive with Etcher.
  2. Edit cmdline.txt on "boot" partition to remove the resize script launch (leave only a single space).
  3. Copy all files from USB drive "boot" partition to FAT32 micro SD card.
  4. Plug USB drive and card into Pi4 and boot it up.
  5. Edit /etc/fstab to mount the micro SD card as /boot, followed by a restart.
  6. Do basic configuration (change password, location, network, update, etc.).
  7. If you are using the Desktop version of Buster, install GParted and resize / partition to fill unallocated space on USB drive.
  8. BEFORE YOU REBOOT, edit /boot/cmdline.txt and /etc/fstab with updated PARTUUID.
  • For Buster Lite you can use another Raspbian card to resize the partition and edit the files.

EDIT:
Forgot a step (fixed) and corrected a few typos (and other omissions).
Last edited by HawaiianPi on Sat Jul 20, 2019 8:01 am, edited 6 times in total.
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?

Nylan
Posts: 7
Joined: Wed Jul 17, 2019 7:35 am

Re: PI4 USB Boot

Thu Jul 18, 2019 9:14 pm

You were absolutely right :oops:

so after resizing the partition I changed the fstab and the cmdline and it works fine now. 8-)

Thanks everyone for the help

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

Re: PI4 USB Boot

Thu Jul 18, 2019 10:17 pm

Glad you got it working. Thanks for the update.
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?

Return to “Troubleshooting”