1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 21:21:06 +00:00

sd-image: Verifies the FAT partition before copying it.

This is to ensure `mtools`-based operations don't wreck the FS.
This commit is contained in:
Samuel Dionne-Riel 2018-11-27 21:51:41 -05:00 committed by Tuomas Tynkkynen
parent 2570da8077
commit 2e5eb135aa

View file

@ -135,6 +135,8 @@ in
# Copy the populated /boot into the SD image
(cd boot; mcopy -bpsvm -i ../bootpart.img ./* ::)
# Verify the FAT partition before copying it.
fsck.vfat -vn bootpart.img
dd conv=notrunc if=bootpart.img of=$img seek=$START count=$SECTORS
'';
}) {};