diff options
author | Andrew Robbins <contact@andrewrobbins.info> | 2018-12-29 00:40:00 -0500 |
---|---|---|
committer | Andrew Robbins <contact@andrewrobbins.info> | 2018-12-29 00:50:47 -0500 |
commit | 9f5d89440e5219d9aef61461cc3ac6a90baccc9c (patch) | |
tree | c4f4750fb0fd678d17bf858e308deb78169e67a9 /projects/grub | |
parent | dacd26cb9014cd70dc6ddd73f692f4a08ac3db9f (diff) | |
download | librebootfr-9f5d89440e5219d9aef61461cc3ac6a90baccc9c.tar.gz librebootfr-9f5d89440e5219d9aef61461cc3ac6a90baccc9c.zip |
Copy correct number of bytes for floppy BPB
The Bios Parameter Block (BPB) is 51 bytes, not 52. As-is, the
first byte of executable code from the floppy image boot record
is copied along with the BPB to boot.img; this extra byte
isn't harmful to leave in since execution begins at offset 0x63+2
rather than 0x3C+2, but is a little messy.
Diffstat (limited to 'projects/grub')
-rwxr-xr-x | projects/grub/grub-helper | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/projects/grub/grub-helper b/projects/grub/grub-helper index 3a74095f..ce874070 100755 --- a/projects/grub/grub-helper +++ b/projects/grub/grub-helper @@ -278,7 +278,7 @@ grub_floppy_image_make_bootable() { local oem_name='\x4C\x49\x42\x52\x45\x20\x20\x20' # write $floppyimg Bios Parameter Block to $bootimg first - dd if="$floppyimg" of="$bootimg" bs=1 skip=11 seek=11 count=52 conv=notrunc + dd if="$floppyimg" of="$bootimg" bs=1 skip=11 seek=11 count=51 conv=notrunc dd if=<(printf "$oem_name") of="$bootimg" bs=1 seek=3 conv=notrunc dd if=/dev/zero of="$floppyimg" count=1 conv=notrunc dd if="$bootimg" of="$floppyimg" conv=notrunc |