summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--images/NEWS2
-rwxr-xr-ximages/make_boot_img17
2 files changed, 14 insertions, 5 deletions
diff --git a/images/NEWS b/images/NEWS
index 1970e2025..abf60aab0 100644
--- a/images/NEWS
+++ b/images/NEWS
@@ -1,5 +1,7 @@
Version 1.54 - 20 May 2011 by Olivier Blin
- add ums-* (USB mass storage) modules in disk/usb category
+- merge mkdosfs patch from packages SVN
+ (to replace mkdosfs-with-dir which requires obsolete perl-suid)
Version 1.53 - 5 May 2011 by Anne Nicolas
- make boot.iso isohybrid
diff --git a/images/make_boot_img b/images/make_boot_img
index 2cb2ba586..5b6fbc5f2 100755
--- a/images/make_boot_img
+++ b/images/make_boot_img
@@ -3,6 +3,8 @@
use Config;
use FileHandle;
use MDK::Common;
+use POSIX;
+
Config->import;
my ($arch) = $Config{archname} =~ /(.*?)-/;
@@ -281,10 +283,12 @@ sub boot_img_i386 {
_ "cp -f $rdz $tmp_mnt/$short_type.rdz";
unlink $rdz;
- my $size = max(chomp_(`du -s -k $tmp_mnt`) + 50, 1440);
+ # mtools wants the image to be a power of 32
+ my $size = max((ceil(chomp_(`du -s -k $tmp_mnt`) / 32) * 32) + 128, 1440);
_ "dd if=/dev/zero of=$img bs=1k count=$size";
- _ "mkdosfs-with-dir $tmp_mnt $img";
+ _ "/sbin/mkdosfs $img";
+ _ "mcopy -i $img $tmp_mnt/* ::";
_ "syslinux $img";
_ "rm -rf $tmp_mnt";
}
@@ -776,9 +780,11 @@ sub hd_grub {
my ($grub_dir) = glob("/lib/grub/*-*");
my @grub_files = map { "$grub_dir/$_" } qw(stage1 stage2);
- my $size = 40_000 + sum(map { -s $_ } @grub_files);
- _ "dd if=/dev/zero of=$img bs=1 count=$size";
+ # 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";
_ "rm -rf $tmp_mnt"; mkdir $tmp_mnt;
_ "cp @grub_files $tmp_mnt";
@@ -811,7 +817,8 @@ pause .
pause HELP END
EOF
- _ "mkdosfs-with-dir $tmp_mnt $img";
+ _ "/sbin/mkdosfs $img";
+ _ "mcopy -i $img $tmp_mnt/* ::";
_ "rm -rf $tmp_mnt";
output($mapfile, "(fd0) $img\n");