Boot rpi 4 from USB flash drive

Laurentiu-Cristian Duca laurentiu.duca at gmail.com
Fri May 7 10:40:33 BST 2021


Hello rpi-kernel community,

  I have successfully booted raspbian from USB on rpi4
and now I am trying to boot my custom kernel (5.9) and rootfs from USB.
The kernel is loaded successfully, but the boot process stops with:
[    2.780285] 003: Waiting for root device /dev/sda2...

  With raspbian I successfully get and it loads rootfs
(but on my kernel it does not found any sda device):
[    3.684114] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[    3.691279] scsi host0: usb-storage 1-1.3:1.0
[    4.716380] scsi 0:0:0:0: Direct-Access              USB DISK 2.0
  PMAP PQ: 0 ANSI: 6
[    4.725663] sd 0:0:0:0: [sda] 120963072 512-byte logical blocks:
(61.9 GB/57.7 GiB)
[    4.733890] sd 0:0:0:0: [sda] Write Protect is off
[    4.739386] sd 0:0:0:0: [sda] Write cache: disabled, read cache:
enabled, doesn't support DPO or FUA
[    4.751665]  sda: sda1 sda2
[    4.757882] sd 0:0:0:0: [sda] Attached SCSI removable disk
[    4.788580] EXT4-fs (sda2): mounted filesystem with ordered data
mode. Opts: (null)
[    4.796524] VFS: Mounted root (ext4 filesystem) readonly on device 8:2.
[    4.814421] devtmpfs: mounted

  My question is what to enable in the kernel configuration
in order to automatically mount and load /dev/sda2 which contains rootfs.
I have compared raspbian .config with my .config and did not found
relevant differences
(maybe I am missing something).

  In the custom kernel I first did
make ARCH=arm64 defconfig

Thank you
Laurentiu



More information about the linux-rpi-kernel mailing list