Hi JerryChang:
The situation is like this, we mounted nvme, which had a problem. It was fixed by executing fsck operation in win 10. Therefore, I want to execute fsck before mounting the system to perform a disk check and repair.
robot@tegra:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 16M 1 loop
zram0 251:0 0 970M 0 disk [SWAP]
zram1 251:1 0 970M 0 disk [SWAP]
zram2 251:2 0 970M 0 disk [SWAP]
zram3 251:3 0 970M 0 disk [SWAP]
zram4 251:4 0 970M 0 disk [SWAP]
zram5 251:5 0 970M 0 disk [SWAP]
zram6 251:6 0 970M 0 disk [SWAP]
zram7 251:7 0 970M 0 disk [SWAP]
nvme0n1 259:0 0 953.9G 0 disk
├─nvme0n1p1 259:1 0 952.4G 0 part /
├─nvme0n1p2 259:2 0 128M 0 part
├─nvme0n1p3 259:3 0 768K 0 part
├─nvme0n1p4 259:4 0 31.6M 0 part
├─nvme0n1p5 259:5 0 128M 0 part
├─nvme0n1p6 259:6 0 768K 0 part
├─nvme0n1p7 259:7 0 31.6M 0 part
├─nvme0n1p8 259:8 0 80M 0 part
├─nvme0n1p9 259:9 0 512K 0 part
├─nvme0n1p10 259:10 0 64M 0 part
├─nvme0n1p11 259:11 0 80M 0 part
├─nvme0n1p12 259:12 0 512K 0 part
├─nvme0n1p13 259:13 0 64M 0 part
├─nvme0n1p14 259:14 0 400M 0 part
└─nvme0n1p15 259:15 0 479.5M 0 part
robot@tegra:~$
it’s initrd ($OUT/Linux_for_Tegra/bootloader/l4t_initrd.img) to do system initialization, and root file system mounting.
as you can see, it uses rootwait within kernel command-line.
for instance, Kernel command line: root=PARTUUID=965a1544-2f9c-4ae7-a7bd-4c2bf110ad2a rw rootwait rootfstype=ext4
according to documentation, canonical/linux-jammy/kernel-source/Documentation/admin-guide/kernel-parameters.txt
I’m not sure whether it helps with retain_initrd or keepinitrd. I don’t have experience with that. I’ve never test them before.
or…
you may build your customized initrd image for your use-case.
Hi JerryChang,
Can I support fsck in initrd?
I moved the fsck of the device directly to initrd, but when executing
fsck -y /dev/nvme0n1p1, the debugger does not have a device;
How can I generate /dev/nvme0n1p1?