Skip to content
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

Corrupted Rootfs Partition #33

Open
0xB4demeister opened this issue Sep 9, 2024 · 2 comments
Open

Corrupted Rootfs Partition #33

0xB4demeister opened this issue Sep 9, 2024 · 2 comments

Comments

@0xB4demeister
Copy link

Hello,
I am currently trying to generate my own Petalinux image (Version 2024.1) with ROS2 integration and some further dependencies.
I can add all dependencies and configurations except the ros2-dev dependencies and successfully build a wic image and use it on the board, but when I try to add the ros2-dev packagegroup or manually add its dependencies the process works out fine but the generated image contains a corrupted rootfs partition.

When booting, I see the following error message:

[    6.275596] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    6.285553]  sda: sda1 sda2
[    6.288574] sd 0:0:0:0: [sda] Attached SCSI removable disk
root contains a file system with errors, check forced.
fsck.ext4: Inode checksum does not match inode while reading bad blocks inode


root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
        (i.e., without -a or -p options)
Warning: fsck failed, try running fsck manua[    7.518822] EXT4-fs error (device sda2): __ext4_fill_super:5474: inode #2: comm mount: iget: checksum invalid
lly
[    7.532587] EXT4-fs (sda2): get root inode failed
[    7.537290] EXT4-fs (sda2): mount failed
mount: mounting /dev/sda2 on /rootfs failed: Bad message
Failed to mount selected root filesystem (/dev/sda2)
umount: can't unmount /rootfs: Invalid argument
There's no '/dev' on ext4(/dev/sda2) partition.
udhcpc: started, v1.35.0

I can however, successfully mount the rootfs.ext4 and inspect the files locally on my machine.
I did not notice any warnings/errors during the petalinux-build,.. commands.
Can you provide me some help on how to fix it or manually perform the petalinux-package command to obtain a working rootfs partition?
Let me know if you need any details regarding logs or configuration options

@0xB4demeister
Copy link
Author

0xB4demeister commented Sep 9, 2024

I mainly add these dependencies via user-rootfsconfig

CONFIG_packagegroup-petalinux-kria
CONFIG_packagegroup-petalinux-ros
CONFIG_ament-lint-auto
CONFIG_ament-cmake-auto
CONFIG_ament-cmake-core
CONFIG_ament-cmake-cppcheck
CONFIG_ament-cmake-cpplint 
CONFIG_ament-cmake-export-definitions 
CONFIG_ament-cmake-export-dependencies 
CONFIG_ament-cmake-export-include-directories 
CONFIG_ament-cmake-export-interfaces 
CONFIG_ament-cmake-export-libraries 
CONFIG_ament-cmake-export-link-flags 
CONFIG_ament-cmake-export-targets 
CONFIG_ament-cmake-gmock 
CONFIG_ament-cmake-gtest 
CONFIG_ament-cmake-include-directories 
CONFIG_ament-cmake-libraries 
CONFIG_ament-cmake 
CONFIG_ament-cmake-pytest 
CONFIG_ament-cmake-python 
CONFIG_ament-cmake-ros 
CONFIG_ament-cmake-target-dependencies 
CONFIG_ament-cmake-test 
CONFIG_ament-cmake-version 
CONFIG_ament-cmake-uncrustify 
CONFIG_ament-cmake-flake8 
CONFIG_ament-cmake-pep257 
CONFIG_ament-copyright 
CONFIG_ament-cpplint 
CONFIG_ament-flake8 
CONFIG_ament-index-python 
CONFIG_ament-lint-cmake 
CONFIG_ament-mypy 
CONFIG_ament-package 
CONFIG_ament-pclint 
CONFIG_ament-pep257 
CONFIG_ament-pycodestyle 
CONFIG_ament-pyflakes 
CONFIG_ament-uncrustify 
CONFIG_ament-xmllint 
CONFIG_cmake 
CONFIG_eigen3-cmake-module 
CONFIG_fastcdr 
CONFIG_fastrtps-cmake-module 
CONFIG_fastrtps 
CONFIG_foonathan-memory-vendor 
CONFIG_gmock-vendor 
CONFIG_gtest-vendor 
CONFIG_libyaml 
CONFIG_libyaml-vendor 
CONFIG_packagegroup-core-buildessential 
CONFIG_python-cmake-module 
CONFIG_python3-catkin-pkg 
CONFIG_python3-colcon-common-extensions 
CONFIG_python3-empy 
CONFIG_python3 
CONFIG_python3-pytest 
CONFIG_rcutils 
CONFIG_rmw-implementation-cmake 
CONFIG_rosidl-cmake 
CONFIG_rosidl-default-generators 
CONFIG_rosidl-generator-c 
CONFIG_rosidl-generator-cpp 
CONFIG_rosidl-generator-dds-idl 
CONFIG_rosidl-generator-py 
CONFIG_rosidl-parser 
CONFIG_rosidl-runtime-c 
CONFIG_rosidl-runtime-cpp 
CONFIG_rosidl-typesupport-c 
CONFIG_rosidl-typesupport-cpp 
CONFIG_rosidl-typesupport-fastrtps-cpp 
CONFIG_rosidl-typesupport-interface 
CONFIG_rosidl-typesupport-introspection-c 
CONFIG_rosidl-typesupport-introspection-cpp 

@0xB4demeister
Copy link
Author

I resolved the issue. It was caused by the petalinux-package wic command, which default size for the root partition was too small - perhaps it would be helpful, if this would be indicated by a warning/error message?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant