summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--images/NEWS3
-rwxr-xr-ximages/make_boot_img12
2 files changed, 9 insertions, 6 deletions
diff --git a/images/NEWS b/images/NEWS
index 6a1ede81f..08cb554cb 100644
--- a/images/NEWS
+++ b/images/NEWS
@@ -1,3 +1,6 @@
+- dosfstools 4.1 does not require 63 sector layout anymore
+ on filesystems less than 512MB
+
Version 2.41 - 6 January 2017 by Thomas Backlund
- disable audit logging as it floods the logs
diff --git a/images/make_boot_img b/images/make_boot_img
index 2cb607d20..b591f486c 100755
--- a/images/make_boot_img
+++ b/images/make_boot_img
@@ -226,9 +226,9 @@ sub boot_img_i386 {
_ "cp -f $rdz $tmp_mnt/$short_type.rdz";
unlink $rdz;
- # mtools wants the image to be a power of 32, and matching 63 cylinders from new dosfstools
+ # mtools wants the image to be a power of 32.
my $syslinux_overhead = 32 * 16;
- my $size = ceil(max(ceil(chomp_(`du -s -k $tmp_mnt`) / 32) * 32 + $syslinux_overhead, 1440) / 63) * 63;
+ my $size = max(ceil(chomp_(`du -s -k $tmp_mnt`) / 32) * 32 + $syslinux_overhead, 1440);
_ "/sbin/mkdosfs -C $img $size";
_ "mcopy -i $img $tmp_mnt/* ::";
@@ -357,8 +357,8 @@ sub boot_iso {
# add theme
_ "cp -r -L /boot/grub2/{fonts,themes} .boot_iso/EFI/BOOT/";
_ "cp -f grub2.theme .boot_iso/EFI/BOOT/themes/maggy/theme.txt";
- # create efiboot.img, matching 63 cylinders from new dosfstools
- my $efisize = ceil(ceil(chomp_(`du -s -k .boot_iso/EFI`) / 1024) * 1024 / 63) * 63;
+ # create efiboot.img, mtools wants the image to be a power of 32.
+ my $efisize = ceil(ceil(chomp_(`du -s -k .boot_iso/EFI`) / 1024) * 1024 / 32) * 32;
my $efi_img = ".boot_iso/isolinux/efiboot.img";
_ "/sbin/mkdosfs -F12 -C $efi_img $efisize";
_ "mcopy -s -i $efi_img .boot_iso/EFI ::";
@@ -381,8 +381,8 @@ sub hd_grub {
my ($grub_dir) = glob("/lib/grub/*-mageia");
my @grub_files = map { "$grub_dir/$_" } qw(stage1 stage2);
- # mtools wants the image to be a power of 32 and matching 63 cylinders from new dosfstools
- my $size = ceil(ceil((40_000 + sum(map { -s $_ } @grub_files)) / 32 / 1024) * 32 / 63) * 63;
+ # mtools wants the image to be a power of 32.
+ my $size = ceil((40_000 + sum(map { -s $_ } @grub_files)) / 32 / 1024) * 32;
_ "rm -rf $tmp_mnt"; mkdir $tmp_mnt;
_ "cp @grub_files $tmp_mnt";