3

Similar question was asked here, but the answer is out of date and I don't have enough reputation to ask in a comment. I know it's possible to boot a Raspberry Pi 4 from USB with the latest firmware update, but does it still need to be on an MBR disk?

Logan G.
  • 33
  • 1
  • 4

4 Answers4

5

Yes, it is possible, I just did it a few hours ago, all with the latest Raspberry Pi OS Lite image.

I just created a GPT on the external disk, a 256MB partition formatted with vfat and labeled boot, and an 64GB one formatted with ext4 and labeled rootfs, just like the SD card. Then I copied all the files from the SD card boot partition into the disk boot partition, and did the same thing with the rootfs partitions. I choose 64GB as a personal choice. I wanted to have a root partition and a data one. You can probably fill the disk with the root partition.

By the way, you will have to update your /boot/cmdline.txt and /etc/fstab files, as your partitions will have different PARTUUID values. Also you have to change the boot order with raspi-config.

I recommend you set up /dev/sdX values in those files and then boot the raspberry and update the values with the right PARTUUID values. I tried to use the PARTUUID values I got when the disk was attached to my laptop, but they are different, for some reason.

sildur
  • 66
  • 1
  • 3
0

No the Pi will only boot from a FAT partition on a MBR partition table.

I believe it may be possible with a modified image with GPT support in an initramfs.

Milliways
  • 62,573
  • 32
  • 113
  • 225
0

The awnser of @sildur is correct. Here is an a little bit more in detail what I had to do to get debian on a pi cm4 to boot on a fully usable 4TB m.2 ssd.

  1. Have an MBR Drive where the os is flashed and ran at least one time.
  2. Copy all data while preserving attribute to your local machine
    1. cp -rp ...dist/bootfs/* ./bootfs
    2. cp -rp ...dist/rootfs/* ./rootfs
  3. Use GParted to create an gpt partition table.
  4. Use GParted to create 3 partitions:
    1. bootfs (fat32 with 4MiB storage free before that and 512MiB in size)
    2. rootfs (ext4 with all the space that os and programms need)
    3. (optional) nameAsYouWant (ext4 the rest of the space available)
  5. Copy all the data back to the disk
    1. cp -rp ./bootfs/* ...dist/bootfs
    2. cp -rp ./rootfs/* ...dist/rootfs
  6. Change ...dist/rootfs/etc/fstab and ...dist/bootfs/cmdline.txt PARTUUIDs matching to the PARTUUIDs from blkid (Use PARTUUID not UUID!) You should need to adjust 3 variables in total.

Please adjust the mounting points to your needs: ...dist/bootfs and ...dist/rootfs.

0

I tried it with a pi 2, it is possible but it was a hassle to got it working.

After almost booting it said that the root account was blocked and access was denied.

How I got it working (using windows tools):

  • I took a snapshot from an SD card with working Raspbian with Macrium Reflect
  • after hooking up the HDD with USB i opened diskpart (windows cmdline utility)

In diskpart, use the following commands:

  • see which disk you want to use; type list disk
  • select the disk select disk x (where x is your disk)
  • type clean to clear the whole disk (ALL EXISTING DATA IS LOST)
  • create a partition with create partition primary
  • type GPT ATTRIBUTES=0x8000000000000000 to set the right access (if you don't do this, you'll end op with the root access denied message)

Now the disk is finished; open up "Macrium Reflect" select restore select the USB disk and remove partition 2 which diskpart created.

(Leave the 15MB partition on the disk otherwise Macrium reflect converts the disk back to MBR).

After this, edit the boot/firmware/cmdline.txt file and change the UUID with the rootfs partition UUID.

  • in windows you can use mountvol to see all partitions UUID's
  • on the Raspberry Pi you can use ls /dev/disk/by-partuuid to show the UUIDs

Save the file and reboot.

MatsK
  • 2,882
  • 3
  • 17
  • 22