Boot Zynthian from USB SSD

Hi Guys,

Thanks for all the positive feedback :slight_smile:

My custom housing is a repurposed fancy/slylish mini settop box from my cable provider that became obsolete. I will post a couple off pics tonight. Although the current status is not to my standards yet… i messed up a bit milling the opening for the display. Due to the lack of a device blowing away the plastic waste, the plastic melted a bit and ended up on the cutter… and i have to rotate the display because of the orientation of the viewing angle, currently its hard to read when flat on the desk (need to make a V2). Once i have finalized which connections to add on the back,I still need to 3d print a back plate.

The housing is black but see through… im still debating what additional fancy lights (or lcd dot/text display) i can add to make it look even cooler :slight_smile: if you guys have any ideas for something “usefull” to indicate…

With regards to performance, I have not done any comparison. I’m awaiting a usb3 m.2 case and m.2 120GB SSD to come in. I can perform a boot up time with that setup.
I can check how quickly a synth loads … any specific wishes what to test where we could really notice a difference ?

br,

SoulMan

So my m.2 SSD came in :star_struck:
I tried to measure boot time.
sd card takes about 31 seconds… but because i have set boot order to usb - sd, the system waits for an usb device first before starting from sd… my guesstimation is that this takes about 6 seconds… so it leaves about 25 seconds of real start up time.
ssd starts right through and takes 21 seconds.

Adding a new synth layer (ZynAddSubFx) loading time is comparable.

I my setup i have wifi active, ssh, vnc. Audio set to [HifiBerry DAC+ light], Display: [WaveShare 5 HDMI+USB],Wiring: [MCP23017_EXTRA]
Both configurations run the same SW

I can confirm that you can “repair” your internal sd card while starting from usb by mounting it (accidently made the cmdline.txt changes on the sd card) …

1 Like

I got it working, but be warned! https://github.com/zynthian/zynthian-issue-tracking/issues/218

I followed these steps

https://www.raspberrypi.org/forums/viewtopic.php?f=56&t=279470&p=1692544&hilit=pi4+boot#p1692544

but where the poster goes “Also note that you must have already updated the eeprom on the raspberry pi 4” the relevent part is https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md

It’s not enough to update the firmware, you need to update the boot config as well.

I did it with this line

sudo rpi-eeprom-update -d -f /lib/firmware/raspberrypi/bootloader/stable/pieeprom-2020-06-15.bin

the output of vcgencmd bootloader_config needs to show BOOT_ORDER=0xf41

Also https://github.com/zynthian/zynthian-issue-tracking/issues/219

:face_with_monocle:

3 Likes

Which zynthian base image did you use, please? Also, did you have to use the blank formatted card for first boot?

I used the one in the KXStudio thread. I still copied all the elf and bin files, I might give it a go without as I’d like to know if it worked. I didn’t need the blank sd card boot in the linked thread.

Ok, I now know where I went wrong…

Step 4 says to change cmdline.txt but it says filesystem is ext3… Probably fine for the Kali example, but zynthian needs it to be set to ext4.

Thanks baggy… I also had to redo after config as per your bug.

1 Like

I didn’t notice the ext3/4 difference. Also you don’t need to change fstab as it uses partid.

To temporarily solve the cmdline.txt device name it’s simply copied from $ZYNTHIAN_SYS_DIR/boot/cmdline.txt so you can probably edit that and it will update and reboot fine.

1 Like

I changed this file… next update changed it back.

1 Like

I was seeing a lot of these…

[17541.887261] mmc0: Timeout waiting for hardware cmd interrupt.
[17541.887266] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[17541.887272] mmc0: sdhci: Sys addr: 0x00000000 | Version: 0x00001002
[17541.887276] mmc0: sdhci: Blk size: 0x00000000 | Blk cnt: 0x00000000
[17541.887279] mmc0: sdhci: Argument: 0x00000000 | Trn mode: 0x00000000
[17541.887283] mmc0: sdhci: Present: 0x1fff0001 | Host ctl: 0x00000001
[17541.887287] mmc0: sdhci: Power: 0x0000000f | Blk gap: 0x00000080
[17541.887291] mmc0: sdhci: Wake-up: 0x00000000 | Clock: 0x0000f447
[17541.887294] mmc0: sdhci: Timeout: 0x00000000 | Int stat: 0x00000000
[17541.887298] mmc0: sdhci: Int enab: 0x00ff1003 | Sig enab: 0x00ff1003
[17541.887302] mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
[17541.887305] mmc0: sdhci: Caps: 0x45ee6432 | Caps_1: 0x0000a525
[17541.887309] mmc0: sdhci: Cmd: 0x00000502 | Max curr: 0x00080008
[17541.887313] mmc0: sdhci: Resp[0]: 0x00000000 | Resp[1]: 0x00000000
[17541.887317] mmc0: sdhci: Resp[2]: 0x00000000 | Resp[3]: 0x00000000
[17541.887320] mmc0: sdhci: Host ctl2: 0x00000000
[17541.887324] mmc0: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x00000000
[17541.887327] mmc0: sdhci: ============================================

Until I found this

That said “Without an SD card it’s best to put dtparam=sd_poll_once in config.txt - that will prevent (or minimise) the errors”

and it does!

2 Likes

Hi,

I have some questions about booting/using a SSD:

  1. Does this work stable for someone?
  2. Do we have a kind of recipe/manual how to do this? Wiki says “no”.
  3. Do I need only a normal USB-3-SSD?

Thanks!!!

Regards, Holger

It’s not really stable as updates still clobber the command.txt.

Not just updates, but also any changes to config can revert it too. That said, if you do get it working and don’t change stuff often, it feels pretty good.

root@zynthian:~# uptime
00:41:18 up 24 days, 15:26, 1 user, load average: 1.46, 1.36, 1.29

1 Like

Some nice open source info here about a case that can house an m.2 sata drive and a way to re-route a usb 3 port back inside the case.

If I could re-route a usb3 to m.2 cable inside an official zynthian pi 4 case my dream sequence would be reaching the closing credits.

2 Likes

Hi,
That one is nice and ready made with m2 SSD for 45$:

Another one with SATA drive, for 55$, but provides PSU and an excellent pwm fan:

1 Like

I use the argon 1 case and these new features address a couple of issues rather nicely.

1 Like

I’m looking carefully on these announcement because I’ve got some “spare parts” liké 2.5 inch SSD and M2 SATA SSD in my definitively dead computers (PC and notebook). :face_with_thermometer:

1 Like

Thanks. I tried this, and made the changes.
However, as soon as I make any changes in the webconf and try to save them, I permanently lose the ability to use webconf over browser. Any ideas?

1 Like

I found that webconf changes reverts the settings.

In a connected issue, I talked about an SD card extension ribbon I bought recently on the zynth club meetings. It turns out that pi 4s use a low power mode for SD cards and as such, they don’t work very well unless you update the cmdline.txt on the boot partition, which has similar results if you webconf.

I will raise a request tonight to add “special cmdline.txt and config” parameters to webconf to rectify.