summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rwxr-xr-xmake_boot_img12
2 files changed, 11 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 4c96865cd..7d252daa1 100644
--- a/Makefile
+++ b/Makefile
@@ -62,6 +62,7 @@ install_only:
ifeq (i386,$(ARCH))
rm -rf $(ROOTDEST)/isolinux
cp -af isolinux $(ROOTDEST)
+ cp -f images/cdrom-changedisk.img $(ROOTDEST)/images
endif
install live_update $(ROOTDEST)/live_update
diff --git a/make_boot_img b/make_boot_img
index ff2b7ebf8..d1058c413 100755
--- a/make_boot_img
+++ b/make_boot_img
@@ -74,6 +74,13 @@ foreach (@kernels) {
}
if ($arch =~ /i.86/ && $img =~ /all/) {
isolinux($main, @kernels);
+
+ my ($img, $img_sav) = ("images/cdrom.img-$main", 'images/cdrom.img-sav');
+ rename($img, $img_sav);
+ $type = 'cdrom';
+ boot_img_i386($mnt, $img, "kernel/all.kernels/$main/boot/vmlinu*", sub { $_[0] =~ s/\bautomatic=\S+\b//; "$_[0] changedisk" });
+ rename($img, 'images/cdrom-changedisk.img');
+ rename($img_sav, $img);
}
if (my ($tftpboot) = grep { -e $_ } qw(/tftpboot /var/lib/tftpboot)) {
@@ -155,7 +162,7 @@ sub entries_append {
}
sub boot_img_i386 {
- my ($mnt, $img, $kernel) = @_;
+ my ($mnt, $img, $kernel, $args_callback) = @_;
__ "$sudo umount $mnt 2>/dev/null";
@@ -193,9 +200,10 @@ F1 help.msg
F2 advanced.msg
F3 boot.msg
" . join('', map {
+ my $args = $args_callback ? $args_callback->($_->[1]) : $_->[1];
"label $_->[0]
kernel vmlinuz
- append initrd=$type.rdz $_->[1]
+ append initrd=$type.rdz $args
" } entries_append($type));
_ "sync";