USB boot

Oct 18, 2023 Last reply: 2 years ago 5 Replies

I am trying to get a 4B to SSD USB boot



I cloned a working SD card using DD, but that does not work ..the boot partition is run OK from the USB but then it insists on mounting the SD card as the rootfs.



If the SD card is not installed it wont boot


Of course the PARTUUID of the SSD and the USB are the same. but it wont mount the USB.



I cant find a tool to modify PARTUUID : otherwise cmdline.txt and fstab are trivial to change.


I believe you don't need the microSD at all.

What happens if you dd the image onto the ssd and leave the microSD out of the picture entirely? That works for me using a mechanical disk.

hth,

bob prohaska

- and for me, using SSD only. But do I remember a one-time non-reversable fix on the RPi3 that needed to be agreed-to initially?

That's what I did but it still wouldn't boot.

But I have stumbled on an arrangement that now actually works that way.

Can you describe what you did?

Thanks for writing,

bob prohaska

I am not sure. Because the fact is that I was looking at the green LED and noting that it didn't behave when I took the SD card out.

At one point I was booting from the USB but then loading the SD card as root.

I ended up doing several things - I relabelled the USB rootfs UUID, and used THAT in cmdline.txt and /etc/fstab together with a 'rootdelay=4' or somesuch. At which point I thought it hadn't booted because the green light was still going frantic, but then I noticed I had an SSD connection!

cmdline.txt ========

console=serial0,115200 console=tty1 root=UUID=606f7030-0f67-489c-b83b-06166a3ddc2e rootfstype=ex t4 fsck.repair=yes rootwait=4

It turns out that the green light behaviour is tied to SD card access and there is a magic spell (dtparam) that stops the pi looking forlornly for its missing SD card, forever..

dtparam=sd_poll_once

in config.txt stops THAT.

Then i patched /etc/fstab

proc /proc proc defaults 0 0 PARTUUID=5f594add-01 /boot/firmware vfat defaults 0 2 UUID=606f7030-0f67-489c-b83b-06166a3ddc2e / ext4 defaults,noatime 0 1 # a swapfile is not a swap partition, no line here # use dphys-swapfile swap[on|off] for that

I did all that because I have had trouble cloning disks before with non unique disk ids.

Having dome all that the 'resize partition on boot' worked and my 16GB cloned SD card image expanded to the 120GB ssd that I half-inched out of a laptop whose plastic had gone all 'organic' me and disintegrated.

Which one of these steps was the critical one, I do not know.

If you are bringing up a headless bookworm (and who wouldn't!) to boot off an USB SSD these may be helpful

Also the connectors - USB to SATA - featured the ASmedia chipset

$lsusb

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 174c:55aa ASMedia Technology Inc. ASM1051E SATA

6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge, ASM1153E SATA 6Gb/s bridge Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I got these from the Pi Hut (UK) and they have been flawless.

Now expecting one cheapo 2TB SSD.

formatting link
It turns out that cheaper slower disks use less power and I MAY be able to simply put in 3SSDS. The 120GB one is really low power.

And still stay under 1.2A peak USB current. I will report back on that.

Otherwise I should be able to work with two 2TB drives in a partially mirrored config.

The ultimate thing is going to be a cigar box sized server, running on less than 6W of power with gigabit Ethernet capability.

Nothing about the speed of the Pi4B on 1GB RAM is any cause for concern at the moment.

In fact although documentations is sporadic, the hardware quality on the Raspberry Pis and their price-performance is outstanding

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required