Problem including e2fsck in L4T-INITRD

Using l4t_initrd.img from jetpack 4.2.2 or L4T 32.2.1

I have successfully extracted Linux_for_Tegra/bootloader/l4t_initrd.img added a shell script and created Linux_for_Tegra/bootloader/initrd which flash.sh will use to program the xavier. And my new shell script is now executed by initrd.

Now I want to add e2fsck in the initrd (currently not included). I thought I would just grab the sample rootfs one.

My problem is that I cannot find what l4t_initrd.img was made with.

If I try using e2fsck from Tegra_Linux_Sample-Root-Filesystem_R28.3.1_aarch64.tbz2, I get:

… has unsupported feature(s):
[ 7.104171] metadata_csum
[ 7.104242]
[ 7.104289] e2fsck: Get a newer version of e2fsck!

If I try using e2fsck from Tegra_Linux_Sample-Root-Filesystem_R31.1.0_aarch64.tbz2, I get:

[ 7.171241] e2fsck: symbol lookup error: e2fsck: undefined symbol: ext2fs_xattrs_read

My understanding, l4t_initrd.img was probably made around R28.3.1 as there is no execution error, but is not compatible with newer mkfs.ext4 in recent sample rootfs. And newer e2fsck are missing dependencies in the older l4t_initrd.img.

Why NVIDIA does not keep l4t_initrd.img in sync with it’s current sample root file system release?

How can I update l4t_initrd.img to newer tools?
Do I need to create a buildroot or yocto project?
Does NVIDIA already have a buildroot or yocto somewhere?

hello fguimond,

you’re correct, l4t_initrd.img did not sync with each release of rootfs.
could you please refer to the documentation, Setting Up Your File System to customize your file system.
thanks

Hello Mr Chang,

I am confused by your reference to “Setting Up Your File System”. Our file system is already customized to our will, I was not talking about that but initramfs instead. Now if you want me to build an initrd from those instruction, the ubuntu base image (26MB instead of 5MB from the current initrd) contains apt, systemd, etc. which are all no use for initrd.

I am sure NVIDA has a script somewhere to rebuild the initrd.
Would it be possible to make it available?
I don’t mind if it does not work anymore, but at least it would be a start.

Thanks.

A colleague suggested using a newer statically linked version of e2fsck and place it in initrd.
It works.

Hello fguimond,

I am trying to incule e2fsck in L4T-INITRD but I have no idea how to do it. Would you please share more details?

I am sorry I changed project over a year ago, and I don’t have access to the Jetson or the source code.

What I do remember is I didn’t invent this recipe, instructions to modify initrd must be buried somewhere in Nvidia’ documentation, or just as general linux knowledge.

Good luck.

Thank you.
I unzipped initrd.img-4.9.201-tegra image and in the init file, I changed line 63 which is export forcefsck=n to export forcefsck=y. I don’t know whether is the solution or not, But is maybe a good hint for those who are looking for the solution.