Is anybody using the "special" bootcode.bin for booting from
a usb mass storage device? It's described at https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#special-bootcode-bin-only-boot-mod
I've used it on a Pi2, where it works perfectly. On a Pi3, with
the usb boot OTP set, its behavior is more complicated and I'm
looking for any advice available.
This particular Pi3/disk combo didn't seem to detect
the USB hard drive reliably, so I tried merely changing the
version of bootcode.bin on the (bootable) microSD, saving the
original bootcode.bin to bootcode.bin.microsd to keep it handy
in case I needed to boot the microSD as a recovery device.
That didn't work, so I moved all the msdos files into a subdirectory
named "unused", leaving only the "special" bootcode.bin and timeout
files visible. That didn't work either, so I pulled out the microSD
and cycled power. Boot was successful, this time. I'd like it to
work reliably 8-) The usual failure mode was an immediate attempt
to netboot.
If anybody's got tips on how to detect and boot a USB hard
drive on a Pi 2 or 3 please post! I'm aware the instructions
say to have only the special bootcode.bin and a timeout file
on the microSD, but I hoped hiding the un-needed files would
be sufficient.
As it happens I'm booting FreeBSD, but I think the present magic
is entirely within the realm of the RasPiOS gods.
Thanks for reading,
bob prohaska
lsblk -o +PARTUUIDNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS PARTUUID
On Wednesday, 27 July 2022 at 02:38:45 UTC+1, bob prohaska wrote:
Is anybody using the "special" bootcode.bin for booting from
a usb mass storage device? It's described at
https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#special-bootcode-bin-only-boot-mod
I've used it on a Pi2, where it works perfectly. On a Pi3, with
the usb boot OTP set, its behavior is more complicated and I'm
looking for any advice available.
This particular Pi3/disk combo didn't seem to detect
the USB hard drive reliably, so I tried merely changing the
version of bootcode.bin on the (bootable) microSD, saving the
original bootcode.bin to bootcode.bin.microsd to keep it handy
in case I needed to boot the microSD as a recovery device.
That didn't work, so I moved all the msdos files into a subdirectory
named "unused", leaving only the "special" bootcode.bin and timeout
files visible. That didn't work either, so I pulled out the microSD
and cycled power. Boot was successful, this time. I'd like it to
work reliably 8-) The usual failure mode was an immediate attempt
to netboot.
If anybody's got tips on how to detect and boot a USB hard
drive on a Pi 2 or 3 please post! I'm aware the instructions
say to have only the special bootcode.bin and a timeout file
on the microSD, but I hoped hiding the un-needed files would
be sufficient.
As it happens I'm booting FreeBSD, but I think the present magic
is entirely within the realm of the RasPiOS gods.
Thanks for reading,
bob prohaska
Hi Bob,
I had this issue on a Pi3 with a cheap USB/SATA M.2 USB adaptor. Nothing worked, not even the "special" bootcode.bin.
So I tinkered and the only thing that worked for me was to boot normally from the SDCard and switch the root to the USB drive.
Format the SDCard as MS-DOS, copy the whole of /boot from USB drive to the SDCard under /boot.
On the SDCard edit cmdline.txt so that "root=PARTUUID=<uuid of USB drive>".
For the PARTUUID use lsblk. For me:
lsblk -o +PARTUUIDNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS PARTUUID
sda 8:0 0 223.6G 0 disk
├─sda1 8:1 0 43.9M 0 part 7ee80803-01
└─sda2 8:2 0 223.5G 0 part / 7ee80803-02
mmcblk0 179:0 0 14.8G 0 disk
├─mmcblk0p1 179:1 0 41.5M 0 part /boot 665a62ed-01 └─mmcblk0p2 179:2 0 14.8G 0 part 665a62ed-02
My cmdline.txt:
dwc_otg.lpm_enable=0 dwc_otg.fiq_fix_enable=1 console=serial0,115200 console=tty1 root=PARTUUID=7ee80803-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
Hope this helps, it's worked reliably for me for years now ;)
Regards,
Andrew
On Wednesday, 27 July 2022 at 02:38:45 UTC+1, bob prohaska wrote:
Is anybody using the "special" bootcode.bin for booting from
a usb mass storage device? It's described at
https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#special-bootcode-bin-only-boot-mod
I've used it on a Pi2, where it works perfectly. On a Pi3, with
the usb boot OTP set, its behavior is more complicated and I'm
looking for any advice available.
This particular Pi3/disk combo didn't seem to detect
the USB hard drive reliably, so I tried merely changing the
version of bootcode.bin on the (bootable) microSD, saving the
original bootcode.bin to bootcode.bin.microsd to keep it handy
in case I needed to boot the microSD as a recovery device.
That didn't work, so I moved all the msdos files into a subdirectory
named "unused", leaving only the "special" bootcode.bin and timeout
files visible. That didn't work either, so I pulled out the microSD
and cycled power. Boot was successful, this time. I'd like it to
work reliably 8-) The usual failure mode was an immediate attempt
to netboot.
If anybody's got tips on how to detect and boot a USB hard
drive on a Pi 2 or 3 please post! I'm aware the instructions
say to have only the special bootcode.bin and a timeout file
on the microSD, but I hoped hiding the un-needed files would
be sufficient.
As it happens I'm booting FreeBSD, but I think the present magic
is entirely within the realm of the RasPiOS gods.
Thanks for reading,
bob prohaska
Hi Bob,
I had this issue on a Pi3 with a cheap USB/SATA M.2 USB adaptor. Nothing worked, not even the "special" bootcode.bin.
So I tinkered and the only thing that worked for me was to boot normally from the SDCard and switch the root to the USB drive.
Format the SDCard as MS-DOS, copy the whole of /boot from USB drive to the SDCard under /boot.
On the SDCard edit cmdline.txt so that "root=PARTUUID=<uuid of USB drive>".
For the PARTUUID use lsblk. For me:
lsblk -o +PARTUUIDNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS PARTUUID
sda 8:0 0 223.6G 0 disk
??sda1 8:1 0 43.9M 0 part 7ee80803-01
??sda2 8:2 0 223.5G 0 part / 7ee80803-02
mmcblk0 179:0 0 14.8G 0 disk
??mmcblk0p1 179:1 0 41.5M 0 part /boot 665a62ed-01
??mmcblk0p2 179:2 0 14.8G 0 part 665a62ed-02
My cmdline.txt:
dwc_otg.lpm_enable=0 dwc_otg.fiq_fix_enable=1 console=serial0,115200 console=tty1 root=PARTUUID=7ee80803-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
Andrew Rolfe <wol...@gmail.com> wrote:
On Wednesday, 27 July 2022 at 02:38:45 UTC+1, bob prohaska wrote:
Is anybody using the "special" bootcode.bin for booting from
a usb mass storage device? It's described at
https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#special-bootcode-bin-only-boot-mod
I've used it on a Pi2, where it works perfectly. On a Pi3, with
the usb boot OTP set, its behavior is more complicated and I'm
looking for any advice available.
This particular Pi3/disk combo didn't seem to detect
the USB hard drive reliably, so I tried merely changing the
version of bootcode.bin on the (bootable) microSD, saving the
original bootcode.bin to bootcode.bin.microsd to keep it handy
in case I needed to boot the microSD as a recovery device.
That didn't work, so I moved all the msdos files into a subdirectory
named "unused", leaving only the "special" bootcode.bin and timeout
files visible. That didn't work either, so I pulled out the microSD
and cycled power. Boot was successful, this time. I'd like it to
work reliably 8-) The usual failure mode was an immediate attempt
to netboot.
If anybody's got tips on how to detect and boot a USB hard
drive on a Pi 2 or 3 please post! I'm aware the instructions
say to have only the special bootcode.bin and a timeout file
on the microSD, but I hoped hiding the un-needed files would
be sufficient.
As it happens I'm booting FreeBSD, but I think the present magic
is entirely within the realm of the RasPiOS gods.
Thanks for reading,
bob prohaska
Hi Bob,
I had this issue on a Pi3 with a cheap USB/SATA M.2 USB adaptor. Nothing worked, not even the "special" bootcode.bin.
Did it _never_ work, or did it work intermittently? One of my puzzles
has been that the disk always shows up within a dozen tries. Sometimes
the first, usually by the fifth. Power-cycling the disk between attempts seems to help, but not in a deterministic way.
So I tinkered and the only thing that worked for me was to boot normally from the SDCard and switch the root to the USB drive.
Format the SDCard as MS-DOS, copy the whole of /boot from USB drive to the SDCard under /boot.
On the SDCard edit cmdline.txt so that "root=PARTUUID=<uuid of USB drive>".
For the PARTUUID use lsblk. For me:
lsblk -o +PARTUUIDNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS PARTUUID
sda 8:0 0 223.6G 0 disk
??sda1 8:1 0 43.9M 0 part 7ee80803-01
??sda2 8:2 0 223.5G 0 part / 7ee80803-02
mmcblk0 179:0 0 14.8G 0 disk
??mmcblk0p1 179:1 0 41.5M 0 part /boot 665a62ed-01
??mmcblk0p2 179:2 0 14.8G 0 part 665a62ed-02
My cmdline.txt:
dwc_otg.lpm_enable=0 dwc_otg.fiq_fix_enable=1 console=serial0,115200 console=tty1 root=PARTUUID=7ee80803-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwaitI believe that's a Linux-specific technique. AIUI, the kernel is loaded from the microSD and then cmdline.txt tells the kernel where to find the root filesystem. Something similar is possible with FreeBSD, but it's cumbersome to keep the kernel on microSD in sync with world on USB.
Another technique is to let the Pi boot from microSD and then mount
/usr and enable swap from USB. That's actually pretty easy and worked
well. Root is a read-mostly filesystem. If the "scribble" directories
are on /usr flash wear and random write speed isn't a huge issue.
You've given me some food for thought....
Thanks for writing!
bob prohaska
Andrew Rolfe <wolfmud@gmail.com> wrote:
On Wednesday, 27 July 2022 at 02:38:45 UTC+1, bob prohaska wrote:
Is anybody using the "special" bootcode.bin for booting from
a usb mass storage device? It's described at
https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#special-bootcode-bin-only-boot-mod
I've used it on a Pi2, where it works perfectly. On a Pi3, with
the usb boot OTP set, its behavior is more complicated and I'm
looking for any advice available.
This particular Pi3/disk combo didn't seem to detect
the USB hard drive reliably, so I tried merely changing the
version of bootcode.bin on the (bootable) microSD, saving the
original bootcode.bin to bootcode.bin.microsd to keep it handy
in case I needed to boot the microSD as a recovery device.
That didn't work, so I moved all the msdos files into a subdirectory
named "unused", leaving only the "special" bootcode.bin and timeout
files visible. That didn't work either, so I pulled out the microSD
and cycled power. Boot was successful, this time. I'd like it to
work reliably 8-) The usual failure mode was an immediate attempt
to netboot.
If anybody's got tips on how to detect and boot a USB hard
drive on a Pi 2 or 3 please post! I'm aware the instructions
say to have only the special bootcode.bin and a timeout file
on the microSD, but I hoped hiding the un-needed files would
be sufficient.
As it happens I'm booting FreeBSD, but I think the present magic
is entirely within the realm of the RasPiOS gods.
Thanks for reading,
bob prohaska
Hi Bob,
I had this issue on a Pi3 with a cheap USB/SATA M.2 USB adaptor. Nothing worked, not even the "special" bootcode.bin.
Did it _never_ work, or did it work intermittently? One of my puzzles
has been that the disk always shows up within a dozen tries. Sometimes
the first, usually by the fifth. Power-cycling the disk between attempts seems to help, but not in a deterministic way.
So I tinkered and the only thing that worked for me was to boot normally from the SDCard and switch the root to the USB drive.
Format the SDCard as MS-DOS, copy the whole of /boot from USB drive to the SDCard under /boot.
On the SDCard edit cmdline.txt so that "root=PARTUUID=<uuid of USB drive>". >>
For the PARTUUID use lsblk. For me:
lsblk -o +PARTUUIDNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS PARTUUID
sda 8:0 0 223.6G 0 disk
??sda1 8:1 0 43.9M 0 part 7ee80803-01
??sda2 8:2 0 223.5G 0 part / 7ee80803-02
mmcblk0 179:0 0 14.8G 0 disk
??mmcblk0p1 179:1 0 41.5M 0 part /boot 665a62ed-01
??mmcblk0p2 179:2 0 14.8G 0 part 665a62ed-02
My cmdline.txt:
dwc_otg.lpm_enable=0 dwc_otg.fiq_fix_enable=1 console=serial0,115200 console=tty1 root=PARTUUID=7ee80803-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
I believe that's a Linux-specific technique. AIUI, the kernel is loaded from the microSD and then cmdline.txt tells the kernel where to find the root filesystem. Something similar is possible with FreeBSD, but it's cumbersome to keep the kernel on microSD in sync with world on USB.
Another technique is to let the Pi boot from microSD and then mount
/usr and enable swap from USB. That's actually pretty easy and worked
well. Root is a read-mostly filesystem. If the "scribble" directories
are on /usr flash wear and random write speed isn't a huge issue.
You've given me some food for thought....
Thanks for writing!
bob prohaska
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 371 |
Nodes: | 16 (2 / 14) |
Uptime: | 37:02:35 |
Calls: | 7,932 |
Calls today: | 2 |
Files: | 12,998 |
Messages: | 5,805,619 |