Jump to content

NanoPi Neo3 not booting from SSD


Go to solution Solved by mundofer,

Recommended Posts

Posted

I'm trying to make boot a NanoPi Neo3 from SSD connected through USB.

-  I installed armbian Buster 5.8.6 downloaded from armbian.com

- Next, I tried with and without apt update

- connected an external SSD through the USB port and and a USB 3.0->SATA box

- Executed nand-sata-install and selected the option to boot from external SSD

- The system prepared the SSD, copied filesystem, modified boot (and I verified that in armbianExt.txt it set the UUID of the external disk)

- rebooted

...

And nothing

 

I've observed that the system not always detects the external SSD. I must unplug and plug it to be recognized (as /dev/sda btw). Perhaps this is part of the problem.

 

Does anyone have any idea on what happens and how can I solve it?

 

Posted

After many investigations, tests, etc. I have a solution (kind of...).

I read that in some cases, slow USB devices don't answer enough fast to the host and are not recognized. In my case (this is important, you'll see later) is a SATA SSD disk with a USB-SATA adapter.

The solution for this is to change the kernel paramenter usb_storage.use_delay from 1 to 5.

The only method to change it that worked for me is (I'm sure there must be a better one) create a custom image and before starting to compile (but after setting the other parameters y the GUI) , edit ~/armbian/cache/sources/linux-mainline/linux-5.8.y/drivers/usb/storage/usb.c

and change the line:

static unsigned int delay_use = 1;

to:

static unsigned int delay_use = 5;

No other method worked, neither adding a file /etc/modprobe.d/custom.conf with "usb_storage.use_delay=5", neither configuring armbianEnv.txt with:

root@nanopineo3:/boot# cat armbianEnv.txt
verbosity=1
bootlogo=false
overlay_prefix=rockchip
fdtfile=rockchip/rk3328-nanopi-r2-rev00.dtb
rootdev=UUID=7ea7a792-8bff-4c9a-be74-934d4ebfcce0
rootfstype=ext4
console=serial
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u
extraargs="usb_storage.use_delay=5"

BUT (and this is a very important BUT), with this parameter I was able to made it work with one specifica USB-SATA adapter, a external cable with USB in one side and SATA in the other (https://es.aliexpress.com/item/33024624761.html?spm=a2g0s.9042311.0.0.274263c0wxlBDr), but with other adapters i.e. external SATA to USB boxes it doesn't. They're recognized by lsusb:

/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000MB|__ Port 1: Dev 6, If 0, Class=Mass Storage, Driver=uas, 5000M

But don't appear as a block device (no /dev/sda)

I'm investigating this last issue.

Posted

More info, if I remove and add the driver like extjo does in Nanopi R2S - USB Serial Gadget not working after boot (

)

Then it appears:

root@nanopineo3:~# sudo modprobe -r sg
root@nanopineo3:~# sudo modprobe sg
root@nanopineo3:~# blkid
/dev/mmcblk0p1: UUID="0b49c899-8b75-4758-a116-02e416062b17" TYPE="ext4" PARTUUID="ba27dcaa-01"
/dev/zram0: LABEL="log2ram" UUID="60d7aa7b-9465-4623-95af-8f9fde5869ee" TYPE="ext4"
/dev/zram1: UUID="f9aece1a-6156-4406-ac9c-0b36d0659837" TYPE="swap"
/dev/sda1: LABEL_FATBOOT="EFI" LABEL="EFI" UUID="67E3-17ED" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="d3e7b876-3a28-4d8b-8e25-5ee0f3850c9f"
/dev/sda2: UUID="bf33c765-4131-3616-a47c-2023bd0eb20f" LABEL="Sin tiM-LM-^Atulo" TYPE="hfsplus" PARTUUID="bdda2e57-f175-45ca-91d9-94484e52ba62"

So it seems a general problem with some drivers and not specific of this one.

 

  • Solution
Posted

Finally I tried with other disk (in this case a western digital HD, not SSD) and it worked correctly. It seems that the SSD that I'm using (a Intel SSD 520 repurposed from an old dismantled storage server) has some issues with some USB to SATA controllers.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines