mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-21 21:09:00 +02: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 a new issue