diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-08-31 08:30:52 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-08-31 08:30:52 +0000 |
commit | 5f94b12578bb9a5ca44e01d19c72b15aa458abf4 (patch) | |
tree | b74adcb67b906515510172dea2ee1c78014eb6d7 /images/make_boot_img | |
parent | 390a60dea5eddbcc76624436b311677dec704b3e (diff) | |
download | drakx-backup-do-not-use-5f94b12578bb9a5ca44e01d19c72b15aa458abf4.tar drakx-backup-do-not-use-5f94b12578bb9a5ca44e01d19c72b15aa458abf4.tar.gz drakx-backup-do-not-use-5f94b12578bb9a5ca44e01d19c72b15aa458abf4.tar.bz2 drakx-backup-do-not-use-5f94b12578bb9a5ca44e01d19c72b15aa458abf4.tar.xz drakx-backup-do-not-use-5f94b12578bb9a5ca44e01d19c72b15aa458abf4.zip |
- dynamically determine the size of all.img
Diffstat (limited to 'images/make_boot_img')
-rwxr-xr-x | images/make_boot_img | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/images/make_boot_img b/images/make_boot_img index 2ab543098..6916642bc 100755 --- a/images/make_boot_img +++ b/images/make_boot_img @@ -232,8 +232,6 @@ sub remove_ending_zero { sub boot_img_i386 { my ($type, $I, $img, $kernel) = @_; - _ "dd if=/dev/zero of=$img bs=1k count=" . ($type eq 'all' ? 10500 : $type eq 'ka' ? 2950 : 1440); - _ "rm -rf $tmp_mnt"; mkdir $tmp_mnt; _ "cat $kernel > $tmp_mnt/vmlinuz"; @@ -253,6 +251,9 @@ 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); + _ "dd if=/dev/zero of=$img bs=1k count=$size"; + _ "mkdosfs-with-dir $tmp_mnt $img"; _ "syslinux $img"; _ "rm -rf $tmp_mnt"; |