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#3036 - x86-64-generic-squashfs-rootfs.img image won't boot #7818
Comments
Darlelet: Could be related to: |
Darlelet:
|
tmn505: Can You try with this reverted: https://git.openwrt.org/282e7862b77eb32cfff14a7b8e15089b94a9c3f9 ? |
Darlelet: Found the culprit: -nopad option populated in include/image.mk (Image/mkfs/squashfs) Without this option, the final squashfs image is OK and system boots fine. Meanwhile, if removing this option does not incur any unwanted side effect, this could be used as a workaround. |
Darlelet: @tm505 i'm gonna give it a try |
Darlelet: Didn't help, https://git.openwrt.org/282e7862b77eb32cfff14a7b8e15089b94a9c3f9 seems harmless |
Darlelet: Yes indeed. New x86 (generic) image generation was introduced in https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=5a5df62d95f52892c9a24fe1216796a2a903e544 and https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=cb007a7bf6199ebca89f79c8ee5f9b1807a0c5b0 From the later, squashfs standalone image isn't generated anymore (only combined images, no more rootfs-squashfs.img) The following commit https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=258f070d1a4fe1808b654f58f50779fd0afafa1a adds standalone squashfs back, but the resulting image is broken (see the original bug report) I won't spend more time looking for a "clean fix", as someone might already know why the new image generation process breaks squashfs image. Meanwhile, as mentioned earlier in this topic, removing the -nopad option from the mksquashfs4 command invocation in include/image.mk could be used as a workaround (assuming it does not cause any side effect) to make squashfs-rootfs image functional again. |
tmn505: The only difference between old and new squashfs rootfs images is that the old one was padded but the new one isn't. You can pad the image Yourself, assuming CONFIG_TARGET_ROOTFS_PARTSIZE=104 then: Would be nice if You could test it. |
Darlelet: Yes, def a padding issue. Padding the image to its "real" size makes squashfs mount handler happy again :) This is it I guess, padding is only done for combined images under Build/combined (target/linux/x86/image/Makefile), this should be done for squashfs images too. (or at least available through menuconfig option) Thanks for your help |
ynezz: Can you try following proposed fix https://patchwork.ozlabs.org/project/openwrt/patch/20200425105617.26258-1-ynezz@true.cz/ ? |
Darlelet: Proposed patch works fine |
aparcar0: Hi, tested with qemustart script and it works, thanks for the fix! |
Darlelet:
openwrt-x86-64-generic-squashfs-rootfs.img (coupled with openwrt-x86-64-generic-kernel.bin) won't boot due to incorrect squashfs image generation.
Related bootlog:
[ 1.777677] F2FS-fs (xvda): Magic Mismatch, valid(0xf2f52010) - read(0x84289960) [ 1.777713] F2FS-fs (xvda): Can't find valid F2FS filesystem in 1th superblock [ 1.778325] F2FS-fs (xvda): Magic Mismatch, valid(0xf2f52010) - read(0x4e8ee223) [ 1.778357] F2FS-fs (xvda): Can't find valid F2FS filesystem in 2th superblock [ 1.778407] List of all partitions: [ 1.778431] ca00 4207 xvda [ 1.778433] driver: vbd [ 1.778468] No filesystem could mount root, tried: [ 1.778470] ext3 [ 1.778487] ext2 [ 1.778495] ext4 [ 1.778504] squashfs [ 1.778512] iso9660 [ 1.778520] f2fs [ 1.778529] [ 1.778547] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(202,0)
This used to work fine on [[https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=97940f876616ad3b6ff7f88d0c1303eaff774a0a|97940f876616ad3b6ff7f88d0c1303eaff774a0a]] (openwrt-x86-64-vmlinuz+openwrt-x86-64-rootfs-squashfs.img) using same build parameters.Test environment: XenServer x86_64
The text was updated successfully, but these errors were encountered: