diff options
-rw-r--r-- | images/NEWS | 4 | ||||
-rwxr-xr-x | images/make_boot_img | 26 |
2 files changed, 15 insertions, 15 deletions
diff --git a/images/NEWS b/images/NEWS index 674642e15..ba5bed173 100644 --- a/images/NEWS +++ b/images/NEWS @@ -1,3 +1,7 @@ +- adjust image creation for new dosfstools 4 using 63 cylinders everywhere +- let mkdosfs create the image file, and drop usage of dd +- revert "back to arch dependant isolinux.bin (mga#17771)" + Version 2.33 - 26 Apr 2016 by Thierry Vignaud - sync with kernel-4.6 diff --git a/images/make_boot_img b/images/make_boot_img index d4cda303a..3b670c941 100755 --- a/images/make_boot_img +++ b/images/make_boot_img @@ -225,12 +225,11 @@ sub boot_img_i386 { _ "cp -f $rdz $tmp_mnt/$short_type.rdz"; unlink $rdz; - # mtools wants the image to be a power of 32 + # mtools wants the image to be a power of 32, and matching 63 cylinders from new dosfstools my $syslinux_overhead = 32 * 16; - my $size = max(ceil(chomp_(`du -s -k $tmp_mnt`) / 32) * 32 + $syslinux_overhead, 1440); - _ "dd if=/dev/zero of=$img bs=1k count=$size"; + my $size = ceil(max(ceil(chomp_(`du -s -k $tmp_mnt`) / 32) * 32 + $syslinux_overhead, 1440) / 63) * 63; - _ "/sbin/mkdosfs $img"; + _ "/sbin/mkdosfs -C $img $size"; _ "mcopy -i $img $tmp_mnt/* ::"; _ "syslinux $img"; _ "rm -rf $tmp_mnt"; @@ -357,11 +356,10 @@ sub boot_iso { # add theme _ "cp -r /boot/grub2/{fonts,themes} .boot_iso/EFI/BOOT/"; _ "cp -f grub2.theme .boot_iso/EFI/BOOT/themes/maggy/theme.txt"; - # create efiboot.img - my $efisize = ceil(chomp_(`du -s -k .boot_iso/EFI`) / 1024) * 1024; + # create efiboot.img, matching 63 cylinders from new dosfstools + my $efisize = ceil(ceil(chomp_(`du -s -k .boot_iso/EFI`) / 1024) * 1024 / 63) * 63; my $efi_img = ".boot_iso/isolinux/efiboot.img"; - _ "dd if=/dev/zero of=$efi_img bs=1k count=$efisize"; - _ "/sbin/mkdosfs -F12 $efi_img"; + _ "/sbin/mkdosfs -F12 -C $efi_img $efisize"; _ "mcopy -s -i $efi_img .boot_iso/EFI ::"; # create iso _ "$cmd -eltorito-alt-boot -e isolinux/efiboot.img -no-emul-boot -o $iso .boot_iso"; @@ -380,10 +378,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 - my $size = ceil((40_000 + sum(map { -s $_ } @grub_files)) / 32 / 1024) * 32; - - _ "dd if=/dev/zero of=$img bs=1k count=$size"; + # 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; _ "rm -rf $tmp_mnt"; mkdir $tmp_mnt; _ "cp @grub_files $tmp_mnt"; @@ -396,8 +392,8 @@ fallback 1 title Mageia Install root (hd0,0) -kernel /cooker/isolinux/alt0/vmlinuz $default_append $default_acpi $default_vga $default_iswmd automatic=method:disk -initrd /cooker/isolinux/alt0/all.rdz +kernel /cauldron/isolinux/alt0/vmlinuz $default_append $default_acpi $default_vga $default_iswmd automatic=method:disk +initrd /cauldron/isolinux/alt0/all.rdz title Help @@ -416,7 +412,7 @@ pause . pause HELP END EOF - _ "/sbin/mkdosfs $img"; + _ "/sbin/mkdosfs -C $img $size"; _ "mcopy -i $img $tmp_mnt/* ::"; _ "rm -rf $tmp_mnt"; |