mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 07:01:54 +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:
parent
2570da8077
commit
2e5eb135aa
@ -135,6 +135,8 @@ in
|
|||||||
|
|
||||||
# Copy the populated /boot into the SD image
|
# Copy the populated /boot into the SD image
|
||||||
(cd boot; mcopy -bpsvm -i ../bootpart.img ./* ::)
|
(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
|
dd conv=notrunc if=bootpart.img of=$img seek=$START count=$SECTORS
|
||||||
'';
|
'';
|
||||||
}) {};
|
}) {};
|
||||||
|
Loading…
Reference in New Issue
Block a user