On Fri, Jan 08, 2021 at 08:39:47AM +0800, Yi Zhao wrote:
> We encountered a file not found error when the symlink filesize is 60:
> $ ls -l initrd
> lrwxrwxrwx 1 root root 60 Jan  6 16:37 initrd -> 
> secure-core-image-initramfs-5.10.2-yoctodev-standard.cpio.gz
>
> When booting, we got the following error in grub:
> error: file `/initrd' not found
>
> The root cause is although the size of diro->inode.symlink is 60, it
> includes the trailing '\0'. So if the symlink filesize is exactly 60, it
> is also stored in a separate block rather than in the inode.
>
> Signed-off-by: Yi Zhao <[email protected]>

Reviewed-by: Daniel Kiper <[email protected]>

Daniel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to