aristanetworks / sonic

Open source drivers and initialization library for Arista platforms running SONiC
GNU General Public License v2.0
22 stars 30 forks source link

Can't find mount point on installer (boot0.j2) #47

Closed hugocollignon closed 1 year ago

hugocollignon commented 1 year ago

Hello

While studying boot0.j2, I found a small and not really blocking issue.

I got this error on the first boot:

123.65: Unpacking dockerfs.tar.gz delayed to initrd because /mnt/flash is vfat or docker_inram is on
123.65: Remove installer
df: /tmp/tmp.9C8swD/sonic-aboot-broadcom.swi: can't find mount point
125.02: Next reboot will use flash:image-202205.161660-cfc9af71e/.sonic-boot.swi
125.91: Kexecing[  125.913597] Starting new kernel

See https://github.com/sonic-net/sonic-buildimage/blob/master/files/Aboot/boot0.j2#L281

cleanup_swi_tmpfs() {
   rm -f "$swipath"
   clean_tmpfs "$(mountpoint_for_file "$swipath")"
}

By deleting $swipath, mountpoint_for_file "$swipath" (https://github.com/sonic-net/sonic-buildimage/blob/master/files/Aboot/boot0.j2#L70) goes into error.

As this issue is Arista specific, it's dropped here but if you prefer, I can move it into sonic-net/sonic-buildimage.

Have a nice day! Hugo

Staphylo commented 1 year ago

Hi @hugocollignon, This is a known but harmless issue. The stderr of df should be redirected to /dev/null I'll merge a fix for this upstream.