summaryrefslogtreecommitdiffstats
path: root/images
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2011-04-13 09:50:18 +0000
committerAntoine Ginies <aginies@mandriva.com>2011-04-13 09:50:18 +0000
commite765ca17fcc1e3cc7d201f82e6cf71b3107bdb64 (patch)
treef377cf82b477f8d69b894cbe048506bd53e755e2 /images
parent420834d91de7a138573e296844fb13a1dc66567d (diff)
downloaddrakx-backup-do-not-use-e765ca17fcc1e3cc7d201f82e6cf71b3107bdb64.tar
drakx-backup-do-not-use-e765ca17fcc1e3cc7d201f82e6cf71b3107bdb64.tar.gz
drakx-backup-do-not-use-e765ca17fcc1e3cc7d201f82e6cf71b3107bdb64.tar.bz2
drakx-backup-do-not-use-e765ca17fcc1e3cc7d201f82e6cf71b3107bdb64.tar.xz
drakx-backup-do-not-use-e765ca17fcc1e3cc7d201f82e6cf71b3107bdb64.zip
restore previous commit (due to SVN issue)
Diffstat (limited to 'images')
-rw-r--r--images/Makefile2
-rwxr-xr-ximages/make_boot_img17
2 files changed, 13 insertions, 6 deletions
diff --git a/images/Makefile b/images/Makefile
index 850b7b83b..420191f9c 100644
--- a/images/Makefile
+++ b/images/Makefile
@@ -1,6 +1,6 @@
include ../Makefile.config
-VERSION=1.50
+VERSION=1.51
PRODUCT=drakx-installer-images
KERNELS=$(shell rpm -qf /lib/modules/2.*)
diff --git a/images/make_boot_img b/images/make_boot_img
index 87c333a1f..deceb07a8 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) + 64, 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";
}
@@ -775,9 +779,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";
@@ -810,7 +816,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");