Jump to content

nand-sata-install hoses XU4 rev 1


Go to solution Solved by sgjava,

Recommended Posts

Posted

Using Armbian_25.8.1_Odroidxu4_noble_current_6.6.102.img I can boot off SD. Then when I run nand-sata-install it sharts and comes up with initramfs prompt. I'll try to fix it there next time, but I'm just using a 3.5" SATA laptop disk with USB controller.

 

.oading, please wait..
.tarting systemd-udevd version 255.4-1ubuntu0.11
.begin: Loading essential drivers ... done.
.begin: Running /scripts/init-premount ... done.
.begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
.begin: Running /scripts/local-premount ... done.
.begin: Waiting for root file system ... Begin: Running /scripts/local-block ... done.
done.
Save up waiting for root file system device. Common problems:
 - Boot args (cat /proc/cmdline)
 - Check rootdelay=(did the system wait long enough?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT! UUID=546a0798-29c9-4f3c-beea-1563d848abd0 does not exist. Dropping to a shell!

BusyBox v1.36.1 (Ubuntu 1:1.36.1-6ubuntu3.1) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs) _

 

I had old image Armbian_23.11.1_Odroidxu4_jammy_current_6.1.63.img and it works fine.

Posted

OK, tried build my own full server image and the same error. It cannot find SSD, but nand-sata-install  had no problem copying the file system over from the SD. The fstabs and boot.ini looks fine. I guess no one has tested this for a while. I'm just going to use Jammy version for now since it still works.

Posted

OK, good thing I don't give up easily. I found the cause, but now I need to figure out a fix. Using Armbian_23.11.1_Odroidxu4_jammy_current_6.1.63.img I changed the setenv rootdev to a bad UUID. I get the same error as latest image, but cat /proc/modules shows what's happening.

 

Armbian_23.11.1_Odroidxu4_jammy_current_6.1.63.img initramfs loads:

 

Module             Function
------------------ -------------------------------------------------------------
scsi_mod           Core SCSI subsystem. (Crucial)
sd_mod             SCSI disk driver (used for all block devices like SD, USB, SATA). (Crucial)
t10_pi             T10 Protection Information (disk data integrity).
crc64_rocksoft_generic CRC algorithm.
crc64_rocksoft     CRC algorithm.
sg                 SCSI Generic (raw access to SCSI devices).
uas                USB Attached SCSI (Driver for USB-to-SATA adapter). (Crucial)
usb_storage        Generic USB Mass Storage driver. (Crucial)
scsi_common        Common SCSI routines.
zram               Compressed RAM block device.
zsmalloc           ZRAM memory allocator.
sch_fq_codel       Network queue scheduler.

 

Armbian-unofficial_25.11.0-trunk_Odroidxu4_noble_current_6.6.108.img initramfs only loads usbhid. Not sure how nand-sata-install works, but I'm assuming the something is hosed in initrd.img. Maybe @Igor knows where to look. I'm going to see if I can get the SD initrd.img on the SSD.

 

 

Posted

Long time no see! :)

 

On 10/17/2025 at 9:15 PM, sgjava said:

 initramfs only loads usbhid.

 

This doesn't look right. I checked docents of commits and so far couldn't find anything that would stand out. nand-sata-install only copies / rsync file-system, recreate boot scripts and flash boot-loader if necessary. If usb_storage is missing from initird, its normal that it doesn't boot. Its as module:

https://github.com/armbian/build/blob/main/config/kernel/linux-odroidxu4-current.config#L1274

 

I would say its something to do with initird generation. Could be on the build / distro tools side.

 

@belegdol perhaps knows something?

Posted (edited)

What does lsinitramfs say? Is the usb_storage in? This is how it looks here:

$ lsinitramfs /boot/initrd.img-6.6.108-current-odroidxu4 | grep usb
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/hid/usbhid
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/hid/usbhid/usbhid.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/i2c/busses/i2c-tiny-usb.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/net/usb
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/net/usb/aqc111.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/net/usb/asix.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/net/usb/ax88179_178a.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/net/usb/catc.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/net/usb/cdc_eem.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/net/usb/cdc_ncm.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/net/usb/ch9200.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/net/usb/dm9601.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/net/usb/int51x1.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/net/usb/kaweth.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/net/usb/lan78xx.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/net/usb/mcs7830.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/net/usb/pegasus.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/net/usb/rndis_host.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/net/usb/rtl8150.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/net/usb/smsc75xx.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/net/usb/smsc95xx.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/net/usb/sr9700.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/net/usb/sr9800.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb/host
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb/host/ehci-fsl.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb/host/fsl-mph-dr-of.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb/storage
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb/storage/uas.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb/storage/ums-alauda.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb/storage/ums-cypress.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb/storage/ums-datafab.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb/storage/ums-eneub6250.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb/storage/ums-freecom.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb/storage/ums-isd200.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb/storage/ums-jumpshot.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb/storage/ums-karma.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb/storage/ums-onetouch.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb/storage/ums-realtek.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb/storage/ums-sddr09.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb/storage/ums-sddr55.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb/storage/ums-usbat.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb/storage/usb-storage.ko
usr/lib/systemd/network/73-usb-net-by-mac.link
usr/lib/udev/rules.d/50-usb-realtek-net.rules

 

Edited by belegdol
Posted

@belegdol This is from an image I built, but even the downloaded one wouldn't work with nand-sata-install.

 

lsinitramfs /boot/initrd.img-6.6.108-current-odroidxu4 | grep usb
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/hid/usbhid
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/hid/usbhid/usbhid.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb/host
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb/host/ehci-fsl.ko
usr/lib/modules/6.6.108-current-odroidxu4/kernel/drivers/usb/host/fsl-mph-dr-of.ko
usr/lib/systemd/network/73-usb-net-by-mac.link
usr/lib/udev/rules.d/50-usb-realtek-net.rules



 

Posted

@IgorI'm back from the brink. New job, new house build 3 hurricanes. I'm still working on my 1 acre lot to clean up the vines and stuff, but I'm starting to have more time for this kind of stuff. I need to get all my old boards up to date, hahaha

  • Solution
Posted

@Igor @belegdol I was able to get it working, but maybe this can be fixed in the build?

 

Fix: Odroid XU4 – Armbian-unofficial_25.11.0-trunk_Noble_6.6.108 fails to boot from SATA after nand-sata-install
 

Problem


After running nand-sata-install on an Odroid XU4 (kernel 6.6.108), the system copies to SATA correctly but fails to boot afterward, dropping into the initramfs shell.


Checking the loaded modules shows only:


usbhid


meaning no USB or SCSI drivers are available to detect /dev/sda1. Inspecting the initramfs with:


lsinitramfs /boot/initrd.img-6.6.108-current-odroidxu4 | grep usb


reveals that usb-storage.ko, uas.ko, and other USB mass-storage modules are missing.


Root Cause


The file /etc/initramfs-tools/initramfs.conf already had:


MODULES=most


so the base configuration was fine.

 

However, Armbian’s initramfs build process did not automatically include the USB/SCSI modules, because the system was booted from SD and those drivers were not "in use" during image generation.
 

As a result, the cloned SATA system lacked the drivers needed to mount its root filesystem.


Solution


Fix the SD card initramfs before running nand-sata-install.


This ensures the SATA copy inherits a working image with all required modules.


1️⃣ Boot from SD and verify

Confirm you are booted from SD:

df -h /

You should see /dev/mmcblk0p* as /.


2️⃣ Verify initramfs configuration

Open /etc/initramfs-tools/initramfs.conf and confirm it contains:

MODULES=most


3️⃣ Add required USB and SCSI modules

Create or edit /etc/initramfs-tools/modules:

USB host + storage + SCSI stack for SATA boot usbcore usb-common ehci-hcd ehci-platform ehci-fsl fsl-mph-dr-of xhci-hcd xhci-pci xhci-plat-hcd scsi_mod sd_mod sg uas usb-storage


4️⃣ Rebuild the initramfs and regenerate uInitrd

sudo update-initramfs -c -k $(uname -r) cd /boot sudo mkimage -A arm -O linux -T ramdisk -C none -n uInitrd -d initrd.img-$(uname -r) uInitrd sync


5️⃣ Verify the new initramfs

lsinitramfs /boot/initrd.img-$(uname -r) | grep usb/storage

Expected output (partial):

.../usb-storage.ko .../uas.ko .../ums-*.ko


6️⃣ Reboot from SD to confirm it works

sudo reboot

If it boots normally, the rebuilt initramfs is valid.


7️⃣ Run nand-sata-install

sudo nand-sata-install

Select your SATA target.

Because the SD image is now fixed, the SATA copy will contain a working initramfs.


8️⃣ Update boot.ini

Edit /media/mmcboot/boot.ini and set:

setenv rootdev "UUID=<your SATA UUID>"


9️⃣ Reboot and verify SATA root

df -h /

Expected result:

/dev/sda1 → / /dev/mmcblk0p1 → /media/mmcboot

Result

SATA boots successfully

Kernel loads usb-storage, uas, sd_mod, scsi_mod early

/ mounts from SATA cleanly — no initramfs prompt

nand-sata-install works correctly on Odroid XU4 (Noble 6.6.108)


Summary


Even though MODULES=most was already set, the USB/SCSI stack was not automatically included in the initramfs when booting from SD.


Manually listing the required modules in /etc/initramfs-tools/modules before rebuilding ensures the image contains usb-storage.ko, uas.ko, and related drivers.


Once rebuilt, both SD and SATA boots work reliably.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines