I’ve installed Dietpi on a 128GB USB (Kingspec brand) and running in to issue booting from it. It appears that it times out while waiting for the drive to resize and just fails. I’ve tested with raspberry pi OS and it images, boots and appears to resize without any problems.

Could it be connected to the issue outlined here? https://dietpi.com/forum/t/ssd-error-on-dietpi-but-working-with-raspbian/4156/6
Rebooting doesn’t do much, sits there on “[vc_sm_connected_init]: failed to initialize shared memory service”
and after a few minutes continues on to much the same emergency mode message

Not sure where to go from here to resolve this, would anyone have suggestions?
Hi,
not sure what SBC your are running but how is it behaving if you plug it into a USB2 port. As well can you check if your are using a JMicron SATA to USB adapter
Sorry, it’s a RPI 4 2GB. It behaves the same but slower when in a USB2. I reimaged the drive just to make sure but it still goes to the emergency mode message.
Looking at lsusb it mentions JMicron once but not SATA to USB.
Bus 002 Device 002: ID 0578:0578 Intrinsix Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.10
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 9
idVendor 0x0578 Intrinsix Corp.
idProduct 0x0578
bcdDevice 12.14
iManufacturer 1 JMicron
iProduct 2 KingSpec Z3-128
iSerial 3 DD564198838738BADB
bNumConfigurations 1
lsusb -t shows it using the UAS driver on raspberry pi os.
pi@raspberrypi:~ $ sudo lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
|__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=uas, 5000M
And a UAS driver is in use on windows 10 for it so doesn’t look like the JMicron UAS curse.

we have a couple of reports for these adaptor using JMicron chip. If possible try to use a different one, as this was the solution nearly all case.
Thanks, I’ll need to buy another drive at some point as it’s one of those compact portable SSDs so pretty much sealed up. Coupled with brexit and lockdowns it takes several weeks for anything to get delivered to me. Raspberry Pi OS boots from it so I’ll try that for awhile and see if I run in to any issues further down the line.
hmm if Raspberry OS is working, it should be working on DietPi as well. Because DietPi is nothing else as a Raspberry OS with some scripting on top. If you not mind, install plain Raspberry OS for testing and try running to run DietPi PREP script afterwards to setup DietPi on top https://dietpi.com/docs/hardware/#make-your-own-distribution
Curious to see how it will behave
I’m just setting this up for some home automation experiments and to learn more about docker so I have no problem wiping it again if you need me to try other things. Not sure if it makes a difference but I installed docker, python3 and a couple of other basics.
I ran that setup script and lost SSH access after the reboot so attached a screen and getting different errors.
First is a wait for something for 1m 33seconds. Not sure what but when raspberry pi os was running boot time seemed quite fast.
Once it gets past that there are a load of errors, plenty about the drive with EXT4_fs error (device sda2) and then it won’t respond to any inputs at all.
do you have the possibility to test a different adapter for the SSD?
This one is sealed so I can’t
the only alternative I have is an old startech USB to SATA adapter. I can give it a go, just not sure what chipset its using.
understood
Niall Kearney
for testing, can you install plain Raspberry OS and once up and running with your SSD, run DietPi PREP script https://dietpi.com/docs/hardware/#make-your-own-distribution
MichaIng
any ideas? I thought it might be the JMicron chip causing issues on boot. However the SSD is working in Raspberry OS
I just updated our images, probably a kernel update enhanced USB boot compatibility. Please re-download and flash the image.
Root partition and file system expansion btw succeeded, it’s the boot partition (partition 1 with vfat file system) that times out for some reason.
I downloaded the image from the site, it has a modified date of the 18th of January. When I flash this one I get the same result as the second test. EXT4_fs error (device sda2) and then it won’t respond to any inputs at all.
If I flash Raspberry Pi OS and follow the steps outlined here https://dietpi.com/docs/hardware/#make-your-own-distribution I get the same result as above.
If I try an older image (11th of September) I get the original error, sits for awhile with no messages after partition resize and then says it’s in emergency mode.
Imaging an SSD using my older Startech USB adaptor with the most recent image and it works, I get to a log in prompt, can log in and can all the way through the Dietpi-config install to a prompt. I can use that for the moment although it’s USB2 speeds.
hmm ok at least it’s working. So challenge is to get the JMicron adapter working. Maybe there is specific package missing as it is working on plain Raspi OS??
MichaIng
we had a couple of reports the last days regarding JMicron adapter. There is a sticky inside RPi board for the JMicron story. For some people a FW update of the adapter is working. For others, quirks did the trick. But this might be quite specific.
https://www.raspberrypi.org/forums/viewtopic.php?t=245931&start=50
If it works replicable and reliably with Raspberry Pi OS, indeed there must be difference, but I have zero idea what this might be, since kernel, firmware and boot parameters are all the same, also config.txt does not contain anything related.
UAS, which is enabled on RPi 4 by default, indeed seems to cause a lot of issues with specific drives, but I’m not sure whether disabling UAS by default is a good idea either, especially when it’s not disabled by default on Raspberry Pi OS. It enhances USB drive speed notably from what I read. To disable UAS for testing: echo ‘blacklist uas’ > /etc/modprobe.d/disable-uas.conf
Niall Kearney do you have a chance to catch the output of the partition and file system expansion script? I know that Raspberry Pi OS does this in two stages, first expanding partition, then reboot, then expanding file system, or if boot into console works: cat /var/tmp/dietpi/logs/fs_partition_resize.log
Since you faced file system errors on the root partition as well (sda2), probably some drives don’t like those two steps being made too short after another.
@Niall Kearney do you have a chance to catch the output of the partition and file system expansion script? I know that Raspberry Pi OS does this in two stages, first expanding partition, then reboot, then expanding file system, or if boot into console works: cat /var/tmp/dietpi/logs/fs_partition_resize.log
Since you faced file system errors on the root partition as well (sda2), probably some drives don’t like those two steps being made too short after another.
I can see if using the older DietPi image lets me get this info as that lets me get to console on boot. As I wasn’t actively using the drive I put it in a safe place, yes one of those so safe I can’t remember where it is now
I’ll update when I can find it and get that info.
Hi guys. I have that same jmicron adapter. Can I help debugging this? just tell what needs to be done.
Many thanks for the offer. If you find time to simply flash the current 32-bit DietPi RPi image onto a USB drive attached via that adapter and see if an RPi 3 or 4 successfully boots from it + has the root file system extended as expected, that would be great. So we can see whether it is adapter-specific or if probably our extension script logs some useful error that might give a hint for improvements our side, like doing one reboot between partition expansion and file system expansion.
Hi, MichaIng I install now on usb HDD connected to Rpi and it works out of the box without sd-card on jmicron adapter.
regards,
Przemek
Okay that is great, many thanks for reporting back
.
Hi,
I also have issues with a KingSpec Z3 128gb SSD even in quirks mode.
What I did so far:
1.)flashed an existing up-to-date dietpi img to SSD: with uas it didn’t work at all, after UAS disabled (modifieng cmdline.txt) I went into emergeny mode (EM),
2.)flashed vanilla dietpi (32 & 64bit): same result as Try-No 1
3.)flashed vanilla raspberry OS WITH UAS ENABLED: works like a charm
4.) disables UAS on Raspberry OS: still works like a charm
5.) applied Dietpi script as described: EM
When I do systemctl default it looks like dietpi is starting normaly.
But with the next reboot I’m stuck in EM again.
Can you somehow help me getting this running?
I would prefer to get the version in Try-No 1 running, but I will install whatever you want me to, if this helps somehow 
Appreciate any help!
Have a nice day!