New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FS#2904 - usb-storage fails to load in pre-init #7686
Comments
por: So /overlay is still on internal storage. Did you recreate the extroot from the rootfs_data ? And, assuming the extroot has been added into /etc/config/fstab, did you remove the old marker from the external storage before trying to boot with extroot ? |
higuita: yes, done all those steps, i just redone then and same result [ 41.505538] block: extroot: cannot find device sda1 extroot fail to work due the missing usb_storage, that is being loaded only on the init step, not in the pre-init |
por: Okay, but if your analysis is correct then extroot would not run anywhere, but it does here (ipq806x, OpenWrt 19.07.2). Or d I miss something. |
higuita: I agree with you, this is weird. You are also using a usb-storage device, correct?
for me, only the /etc/modules*.d/ i have the usb-storage, the /rom do not have anything for usb-storage and how about the /etc/config/fstab? mine is this one:
config global
option anon_swap '0'
option anon_mount '0'
option auto_swap '1'
option auto_mount '1'
option delay_root '15'
option check_fs '0'
|
por: Your has two entries for the external filesystem (same UUID). Removing the first one that's disabled may help. Also some options seem missing. Assuming your extroot has ext4 fs, these are: The initially installed modules in /rom are determined by the DEVICE_PACKAGES in the makefile for the device, in case of the wl-500w those are: Assuming ext4 for the extroot fs, extra packages needed would be: Using imagebuilder is recommended as it allows to include all needed packages in /rom which saves space in the initial overlay fs (non-extroot) as the fs for /rom (squashfs) is denser than the fs used for the internal overlay (jffs). Good luck. |
higuita: i have removed the first /dev/sda1 config, added the ext4 and fsck to the last entry, confirmed that i have all those packages installed... rebooted and still same result, no extroot mounted, usb_storage is only loaded in init step, after giving up of mounting extroot. i do not know if there is some bug in pre-init scripts that fail to check the /etc/modules-boot.d/usb-storage or some magic inside kmodloader (i strace and it never even looks to the /etc/modules-boot.d, but i do not know if during boot it does different steps). Can you please check if in your system, usb_storage is loaded in pre-init? i will probably try the imagebuilder, some years ago i failed to build a working image, but lets try again. thanks for the help |
por: To be sure:
Once the external fs is mounted on /overlay, etc/.extroot-uuid is created on that fs and the file contains the UUID of the fs mounted on /rom. If the UUID in etc/.extroot-uuid on the external fs does not match that of the fs mounted on /rom, then the internal overlay storage is mounted. When still having problems, please show actual contents of /etc/config/fstab, and possibly etc/.extroot-uuid on the external fs and the output of the "block info" command. |
higuita: Yes, content was been copied in 2 different attempts, with tar and with cp (the old2 was the first attempt and inside also have another subfolder with my previous openwrt extroot, so i can copy some configs to the new setup, when it works) no .extroot-uuid is found anywhere
root@submarino:~# df -hT
Filesystem Type Size Used Available Use% Mounted on
/dev/root squashfs 2.6M 2.6M 0 100% /rom
tmpfs tmpfs 13.8M 60.0K 13.7M 0% /tmp
/dev/mtdblock5 jffs2 3.8M 1000.0K 2.8M 26% /overlay
overlayfs:/overlay overlay 3.8M 1000.0K 2.8M 26% /
tmpfs tmpfs 512.0K 0 512.0K 0% /dev
/dev/sda1 ext4 233.2M 22.7M 194.3M 10% /mnt
root@submarino:~# ls -la /mnt/ /overlay/
/mnt/:
drwxr-xr-x 5 root root 1024 Feb 9 02:03 .
drwxr-xr-x 1 root root 0 Mar 16 2020 ..
lrwxrwxrwx 1 root root 1 Feb 9 02:03 .fs_state -> 2
drwxr-xr-x 10 root root 1024 Feb 9 02:03 old2
drwxr-xr-x 7 root root 1024 Feb 9 02:03 upper
drwxr-xr-x 3 root root 1024 Feb 9 02:03 work
The missing b43 and ppp modules are ok, i removed the wifi card of this router and i do not use adsl |
higuita:
As per forum post:
https://forum.openwrt.org/t/usb-storage-fail-to-load-in-preinit/54903
Basically, installed openwrt, added external root, all looks correctly configured, but after reboot external root fails to mount.
searching in the logs we can see that usb-storage is only loaded after pre-init, but it is listed in /etc/modprobe-boot.d/ ... checking /rom/etc/modules-boot.d/ it is not there.
Either something is missing in the https://openwrt.org/docs/guide-user/additional-software/extroot_configuration to add the usb-storage to the pre-init, or something is broken that makes pre-init fail to load usb-storage when it should.
The same setup worked fine with a older openwrt version (15.01 IIRC)
Supply the following if possible:
Device problem occurs on
asus wl-500w
Software versions of OpenWrt/LEDE release, packages, etc.
OpenWrt 19.07.1, r10911-c155900f66
Steps to reproduce
Install openwrt
add external root
manually mount to confirm setup
reboot
external root not mounted nor switched to, logs show that usb-storage is only loaded after normal root is mounted
manual mount still works
The text was updated successfully, but these errors were encountered: