Booting from USB-MSD

October 11, 2024, 19:06

dj_tomato

Pi4

dj_tomato

/dev/sda1: LABEL_FATBOOT="boot" LABEL="boot" UUID="5CD7-5CC0" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="2cda6000-01"
/dev/sda2: LABEL="rootfs" UUID="b73b1dc9-6e12-4e68-9d06-1a1892663226" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="2cda6000-02"
/dev/sda3: LABEL="ssd" UUID="fbefa7b8-4801-da01-c0ed-87b84801da01" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="2cda6000-03"

dj_tomato

cmdline usb-storage.quirks=0bda:9210:u console=serial0,115200 console=tty1 root=PARTUUID=2cda6000-02 rootfstype=ext4 fsck.repair=yes rootwait

dj_tomato

fstab
proc            /proc           proc    defaults          0       0
PARTUUID=2cda6000-01  /boot           vfat    defaults,flush    0       2
PARTUUID=2cda6000-02  /               ext4    defaults,noatime  0       1
PARTUUID=2cda6000-03  /mnt/hdd        ext4    defaults  0       0

dj_tomato

config.txt
BOOT_UART=0
WAKE_ON_GPIO=1
POWER_OFF_ON_HALT=0

[all]
BOOT_ORDER=0xf14

dj_tomato

epprom
BOOTLOADER: up to date
   CURRENT: Fri 17 May 11:26:58 UTC 2024 (1715945218)
    LATEST: Fri 17 May 11:26:58 UTC 2024 (1715945218)
   RELEASE: latest (/lib/firmware/raspberrypi/bootloader-2711/latest)
            Use raspi-config to change the release.

  VL805_FW: Dedicated VL805 EEPROM
     VL805: up to date
   CURRENT: 000138c0
    LATEST: 000138c0

dj_tomato

lsblk
NAME          SIZE TYPE MOUNTPOINT     UUID                                 PARTUUID
sda         238.5G disk
├─sda1        256M part /mnt/1         5CD7-5CC0                            2cda6000-01
├─sda2       29.2G part /mnt/2         b73b1dc9-6e12-4e68-9d06-1a1892663226 2cda6000-02
└─sda3        209G part                fbefa7b8-4801-da01-c0ed-87b84801da01 2cda6000-03
mmcblk0      29.3G disk
├─mmcblk0p1   512M part /boot/firmware 91FE-7499                            b950380f-01
└─mmcblk0p2  28.8G part /              56f80fa2-e005-4cca-86e6-19da1069914d b950380f-02

thunder07337

I don't know how you installed the OS, but for me, installed via the Raspberry Pi Imager, the boot file system is formatted as fat32, not vfat.

dj_tomato

Would be a good idea to reformet it as fat32 and copy what's in the sd card into it?

thunder07337

What exactly are you planning to do? Do you already have a running OS and want to copy it?

dj_tomato

Just trying to boot from the SSD

dj_tomato

But it refuses to

dj_tomato

It was working before but my sd card died and had to reinstall it, but now I can't get usb booting to work

dj_tomato

so since i am at this point I rather to have sd completely off the scheme and just boot from usb

dj_tomato

Back then I remember doing some magic with cmdline.txt to boot from sd but actually use ssd but I can't remember how

dj_tomato

here's my boot sequence

dj_tomato

it just loops

dj_tomato

So that error at 0:29 is because it's attempting to boot to a sd-card which is actually not even connected

dj_tomato

that's because boot mode is 0xf14

dj_tomato

if i leave it at BOOT_ORDER=0xf4

dj_tomato

(usb only)

dj_tomato

(i wish i could remove that red/white screen, can't see anything)

dj_tomato

STILL ATTEMPTS to boot a sd card

dj_tomato

why

thunder07337

If the Pi is still booting from the SD card, I would switch to USB boot in the console via raspi-config.

dj_tomato

but i've removed the sd card, i cannot access raspi-config

dj_tomato

ssd config.txt
[all]
BOOT_UART=0
WAKE_ON_GPIO=1
POWER_OFF_ON_HALT=0
BOOT_ORDER=0xf4
disable_splash=1
program_usb_boot_mode=1

dj_tomato


dj_tomato


dj_tomato

>BOOT_ORDER=0xf4 >order f14

dj_tomato

it refuses to load ssd yet still attempts to load sd card (which is not even plugged in)

thunder07337

What is preventing you from reinserting the SD card? Do you only have the broken SD card?

dj_tomato

If I insert the SD card it will boot the new rpi i've installed there

dj_tomato

I want to boot from the SSD

thunder07337

Yes, but first you have to change the boot order and for that you have to go to the console and call raspi-config!

dj_tomato

Updating bootloader EEPROM
 image: /lib/firmware/raspberrypi/bootloader-2711//latest/pieeprom-2024-05-17.bin
config_src: /tmp/tmp.QroKc9nTAV
config: /tmp/tmp.QroKc9nTAV
################################################################################
[all]
BOOT_UART=0
WAKE_ON_GPIO=1
POWER_OFF_ON_HALT=0

[all]
BOOT_ORDER=0xf14

################################################################################

 To cancel this update run 'sudo rpi-eeprom-update -r' 

 CREATED UPDATE /tmp/tmp054e1e3s/pieeprom.upd  

   CURRENT: Fri 17 May 11:26:58 UTC 2024 (1715945218)
    UPDATE: Fri 17 May 11:26:58 UTC 2024 (1715945218)
    BOOTFS: /boot/firmware
'/tmp/tmp.ktVSQJsA1Y' -> '/boot/firmware/pieeprom.upd'
Copying recovery.bin to /boot/firmware for EEPROM update

EEPROM updates pending. Please reboot to apply the update.
To cancel a pending update run "sudo rpi-eeprom-update -r".

Broadcast message from root@raspberrypi on pts/1 (Fri 2024-10-11 20:25:01 BST):

The system will reboot now!

thunder07337

Can you even access the console and enter something? If not, I would leave this tinkered with and use what raspberry Pi gives you and that is raspi-config here.

dj_tomato

pi@raspberrypi:~ $ sudo rpi-eeprom-update
BOOTLOADER: up to date
   CURRENT: Fri 17 May 11:26:58 UTC 2024 (1715945218)
    LATEST: Fri 17 May 11:26:58 UTC 2024 (1715945218)
   RELEASE: latest (/lib/firmware/raspberrypi/bootloader-2711/latest)
            Use raspi-config to change the release.

  VL805_FW: Dedicated VL805 EEPROM
     VL805: up to date
   CURRENT: 000138c0
    LATEST: 000138c0

dj_tomato

seems epprom is updated to 2711

dj_tomato

yes, i am logged in via ssh after the reboot

dj_tomato

I can access the console now (booted as SD card, not SSD)

dj_tomato

pi@raspberrypi:~ $ sudo rpi-eeprom-update
BOOTLOADER: up to date
   CURRENT: Fri 17 May 11:26:58 UTC 2024 (1715945218)
    LATEST: Fri 17 May 11:26:58 UTC 2024 (1715945218)
   RELEASE: latest (/lib/firmware/raspberrypi/bootloader-2711/latest)
            Use raspi-config to change the release.

  VL805_FW: Dedicated VL805 EEPROM
     VL805: up to date
   CURRENT: 000138c0
    LATEST: 000138c0
pi@raspberrypi:~ $ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 238.5G  0 disk
├─sda1        8:1    0   256M  0 part
├─sda2        8:2    0  29.2G  0 part
└─sda3        8:3    0   209G  0 part
mmcblk0     179:0    0  29.3G  0 disk
├─mmcblk0p1 179:1    0   512M  0 part /boot/firmware
└─mmcblk0p2 179:2    0  28.8G  0 part /
pi@raspberrypi:~ $

thunder07337

raspi-config Advanced options Boot order

dj_tomato

pi@raspberrypi:~ $ sudo raspi-config
Updating bootloader EEPROM
 image: /lib/firmware/raspberrypi/bootloader-2711//latest/pieeprom-2024-05-17.bin
config_src: /tmp/tmp.G8yNTIrqbx
config: /tmp/tmp.G8yNTIrqbx
################################################################################
[all]
BOOT_UART=0
WAKE_ON_GPIO=1
POWER_OFF_ON_HALT=0

[all]
BOOT_ORDER=0xf14

################################################################################

 To cancel this update run 'sudo rpi-eeprom-update -r' 

 CREATED UPDATE /tmp/tmpcwzx7fqa/pieeprom.upd  

   CURRENT: Fri 17 May 11:26:58 UTC 2024 (1715945218)
    UPDATE: Fri 17 May 11:26:58 UTC 2024 (1715945218)
    BOOTFS: /boot/firmware
'/tmp/tmp.LJXzzNAEum' -> '/boot/firmware/pieeprom.upd'
Copying recovery.bin to /boot/firmware for EEPROM update

EEPROM updates pending. Please reboot to apply the update.
To cancel a pending update run "sudo rpi-eeprom-update -r".

dj_tomato

after 3 reboots, still boots as SD CARD, not USB

dj_tomato


dj_tomato

it certainly attempts to boot as MSD/USB but with this silly white/red screen I can't manage to read anything

dj_tomato

and yeah disable_splash=1 is in config.txt

thunder07337

Is the boot partition on the SSD formatted as vfat? If so, you should reformat it, preferably with the imager, and then try again.

dj_tomato

won't this delete my other partitions?

dj_tomato

sda2 and sda3?

dj_tomato


thunder07337

Yes, you should only create them once the system has been installed anyway. If you need them, you'll have to do it differently, but I can't help you there.

dj_tomato

So using the imager to recreate sda1 (/boot) will also delete sda2 (/) which already has a system and sda3 (my server data)

dj_tomato

That's kinda ... silly

dj_tomato

I don't want to reinstall my whole SSD/Server

dj_tomato

I just want to fix the booting issue.

dj_tomato

This doesn't make much sense

thunder07337

But this is again because the OS on the Pi is not installed like a normal Linux. What was the OS on the SSD or SD card before?

dj_tomato

A normal rpi installation

dj_tomato

SDA1 => Boot SDA2 => / (RPI OS) SDA3 => Data

dj_tomato

the issue is not in the ssd, the issue is in the RPI that's not wanting to boot into the SSD and that I cannot see anything on boot beacuse there's this silly red/white screen that blocks me the info

thunder07337

Normal installation would be SD card... Is this the SSD on which the OS was installed?

dj_tomato

Yes, this is the SSD that contains my whole PI OS instance and that was working fine as yesterday My sd card died and got a new one, which i've installed a new RPI OS instance Since then as I lost the data on that SD card, I cannot manage to boot from USB again

dj_tomato

I can confirm the SSD is fine and the data is there properly, I can mount it on the new SD card and I can see all the files

thunder07337

Why an SD card if the OS is on the SSD? I don't understand the point...

dj_tomato

Because the RPI insists on booting from the SD Card and not from the SSD.

thunder07337

How did you install the OS on the SSD? With the imager? With balena etcher? With Rufus? Because then you used the OS from the SD card all the time, but put data on sdb3 and the OS on the SSD never ran, probably because the boot is formatted wrong... So no, I can't help how to straighten it out without reinstalling completely...

thunder07337

The only idea I can think of is: grab a USB stick, install the raspberry Pi OS on it, remove the SSD and SD, insert the stick and see if the Pi boots. If it boots, look at how the file system is set up. But don't ask me how you can then transfer it to the SSD, I have no idea about that.

dj_tomato

tried moving the files from the pi installation /boot mountpoint into my ssd boot but it's still the same

dj_tomato

there has to be a method but i am still looking into how to do it

dj_tomato

What i've tried is grab a 2nd ssd and reinstall PI OS. That one works and boots fine

dj_tomato

I could backup / and /data partitions from my old ssd and move into the new ssd but i don't have a second ssd adapter for that

dj_tomato

🤔

dj_tomato

fuck it

dj_tomato

all i had to do was set sda1 LBA flag ON via parted

dj_tomato

it's solved