diff options
Diffstat (limited to 'images/make_boot_img')
| -rwxr-xr-x | images/make_boot_img | 526 |
1 files changed, 55 insertions, 471 deletions
diff --git a/images/make_boot_img b/images/make_boot_img index 29b60a6af..5d65049f8 100755 --- a/images/make_boot_img +++ b/images/make_boot_img @@ -14,7 +14,7 @@ my $default_acpi = ''; my $default_vga = "vga=788 splash quiet"; my $timeout = 150; my $lib = $arch eq 'x86_64' ? 'lib64' : 'lib'; -my $isolinux_bin = '/usr/lib/syslinux/isolinux-' . ($arch eq 'x86_64' ? 'x86_64' : 'i586') . '.bin'; +my $isolinux_bin = '/usr/lib/syslinux/isolinux.bin'; my $tmp_mnt = '/tmp/drakx_mnt'; my $tmp_initrd = '/tmp/drakx_initrd'; @@ -42,8 +42,6 @@ my @kernels = chomp_(cat_('all.kernels/.list')); my @all_images = ( if_($arch =~ /i.86/, 'isolinux', 'boot.iso', 'all.img', 'hd_grub.img'), if_($arch =~ /x86_64/, 'isolinux', 'boot.iso', 'all.img', 'hd_grub.img'), - if_($arch =~ /ia64/, 'all.img'), - if_($arch =~ /ppc/, 'all.img'), ); my @images = @ARGV ? @ARGV : map { "images/$_" } @all_images; @@ -62,10 +60,10 @@ foreach my $img (@images) { } elsif ($img =~ /boot.iso/) { boot_iso($img, \@kernels); } elsif ($extension eq 'rdz') { - initrd($type, $I, "$img-$_") foreach @kernels; + initrd($type, $I, "$img-$_", $_) foreach @kernels; } elsif ($extension eq 'img') { print STDERR "calling boot_img_$arch for $img\n"; - $::{"boot_img_$arch"}->($type, $I, "$img-$_", "all.kernels/$_/vmlinuz") foreach @kernels; + $::{"boot_img_$arch"}->($type, $I, "$img-$_", $_, "all.kernels/$_/vmlinuz") foreach @kernels; rename("$img-$kernels[0]", $img); } else { die "unknown image $img"; @@ -106,7 +104,7 @@ sub syslinux_msg { $tree->[0] eq 'document' or die "bad file $msg_xml_file\n"; my $text = xml_tree2syslinux('default', $tree->[1]); - pack("C*", 0x0E, 0x80, 0x03, 0x00) . "" + "" . $text . join('', @more_text) . "\n" . syslinux_color('red') . "[F1-Help] [F2-Advanced Help]" . syslinux_color('default') . "\n"; } @@ -125,7 +123,7 @@ EOF my $header_gfxboot = <<EOF; ui gfxboot.c32 bootlogo label harddisk - localboot 0x80 + com32 chain.c32 hd0 exit EOF my $header_non_gfxboot = <<EOF; F1 help.msg @@ -143,73 +141,31 @@ EOF $header . ($b_gfxboot ? $header_gfxboot : $header_non_gfxboot) . join('', @l); } +sub trim { + return $_[0] =~ s/^\s+|\s+$//rg; +} + sub initrd { - my ($type, $I, $img) = @_; - my $stage1_root = $ENV{USE_LOCAL_STAGE1} ? "../mdk-stage1" : "/usr/$lib/drakx-installer-binaries"; + my ($type, $I, $img, $kernel) = @_; + my $stage1_binary = $ENV{USE_LOCAL_STAGE1} ? trim(`realpath ../mdk-stage1/stage1`) : ""; + my $init_binary = $ENV{USE_LOCAL_STAGE1} ? trim(`realpath ../mdk-stage1/init`) : ""; my ($ext) = $img =~ /rdz-(.*)/ or die "bad initrd name ($img)"; + my $modules = " mgainstaller "; + my $drivers = `perl ../kernel/modules.pl list_needed_modules $kernel | xargs`; + my $fakedrivers = `perl ../kernel/modules.pl list_fake_modules $kernel | xargs`; - _ "rm -rf $tmp_initrd"; - mkdir_p("$tmp_initrd$_") foreach qw(/etc /firmware /lib /modules /sbin /tmp /var); - symlink "../modules", "$tmp_initrd/lib/modules"; - symlink "../firmware", "$tmp_initrd/lib/firmware"; - - symlink "/proc/mounts", "$tmp_initrd/etc/mtab"; - symlink "../tmp", "$tmp_initrd/var/run"; - _ "install -D /usr/share/terminfo/l/linux $tmp_initrd/usr/share/terminfo/l/linux"; - foreach ('pcitable', 'usbtable') { - _ "install -D /usr/share/ldetect-lst/$_.gz $tmp_initrd/usr/share/ldetect-lst/$_.gz"; - } - _ "install -D /usr/share/pci.ids $tmp_initrd/usr/share/pci.ids"; - foreach ("dkms-modules.alias", "fallback-modules.alias", "/lib/module-init-tools/ldetect-lst-modules.alias") { - my $file = m!^/! ? $_ : "/usr/share/ldetect-lst/$_"; - _ "install -D $file $tmp_initrd$file"; - } - foreach my $firm (glob_("all.kernels$I/$ext/firmware/*")) { - my $dest=$firm; - $dest =~ s|all.kernels$I/$ext/||; - _ "cp -a $firm $tmp_initrd/$dest"; - } - - _ "install $stage1_root/hotplug $tmp_initrd/"; - symlink "../hotplug", "$tmp_initrd/sbin/hotplug"; - _ "install $stage1_root/init $tmp_initrd/"; - _ "install $stage1_root/stage1 $tmp_initrd/sbin/"; - foreach ('pppd', 'pppoe') { - _ "install /usr/sbin/${_}-diet $tmp_initrd/sbin/$_"; - } - - if ($arch !~ /ppc|ia64/) { - mkdir_p("$tmp_initrd/etc/pcmcia"); - _ "cp -a /etc/pcmcia/config.opts $tmp_initrd/etc/pcmcia"; - } - { - my $modz = "all.kernels$I/$ext"; - mkdir_p("$tmp_initrd/modules/$ext"); - __ "tar xC $tmp_initrd/modules/$ext -f $modz/${type}_modules.tar"; - _ "cp -f $modz/modules.$_ $tmp_initrd/modules/$ext" foreach qw(order builtin); - substInFile { s,.*/,, } "$tmp_initrd/modules/$ext/modules.order"; - _ "depmod -b $tmp_initrd $ext"; - # depmod keeps only available modules in modules.alias, but we want them all - _ "cp -f $modz/modules.alias $modz/modules.description $tmp_initrd/modules/$ext"; - } - mkdir_p("$tmp_initrd/$_") foreach qw(dev proc sys var/tmp tmp/stage2); - # ka deploy need some files in all.rdz if ($ENV{DEBUGSTAGE1} || $ENV{BUILD_KA}) { - symlink("/sbin", "$tmp_initrd/bin"); - cp_af("/bin/busybox.static", "$tmp_initrd/sbin/busybox"); - my @funct = map { /functions:/ .. /^$/ ? do { s/\s//g; split /,/ } : () } `busybox.static`; - shift @funct; - symlink('busybox', $tmp_initrd . "/sbin/$_") foreach @funct; - } - if ($ENV{BUILD_KA}) { - mkdir_p("$tmp_initrd/ka"); - cp_af("/usr/bin/ka-d-client", "$tmp_initrd/ka/ka-d-client"); + $modules="$modules busybox "; } + $modules="$modules mgakadeploy " if ($ENV{BUILD_KA}); - _ "(cd $tmp_initrd; find . | cpio -o -c --quiet) | xz --check=crc32 --lzma2=dict=512KiB > $img"; - _ "rm -rf $tmp_initrd"; + mkdir_p("build/dracut.conf.d"); + # TODO if --nofscks and --no-hostonly are switched, dracut gives an error - fix or report upstream + __ "DRAKX_STAGE1_BINARY=$stage1_binary DRAKX_INIT_BINARY=$init_binary DRAKX_FAKE_MODULES='$fakedrivers' dracut --conf dracut.conf --confdir ./build/dracut.conf.d --add ' $modules ' --add-drivers ' $drivers ' '$img' '$kernel'"; + chmod(0644, $img); } + sub entries_append { my ($type) = @_; @@ -222,7 +178,7 @@ sub entries_append { vgahi => "vga=791", text => "text", # patch => "patch $default_vga", - rescue => "rescue", + rescue => "audit=0 rescue", ); my @entries = ( (map { $_->[0] => "$automatic$default_acpi $_->[1]" } group_by2(@simple_entries)), @@ -239,10 +195,10 @@ sub syslinux_cfg_all { syslinux_cfg([ (map { - { kernel => 'alt0/vmlinuz', initrd => 'alt0/all.rdz', %$_ }; + { kernel => "$arch/vmlinuz", initrd => "$arch/all.rdz", %$_ }; } entries_append($type)), (map_index { - { label => "alt$::i", kernel => "alt$::i/vmlinuz", initrd => "alt$::i/all.rdz", + { label => "$arch", kernel => "$arch/vmlinuz", initrd => "$arch/all.rdz", append => join(' ', grep { $_ } $default_append, $default_acpi, $default_vga) }; } @kernels), { label => 'memtest', kernel => 'memtest' }, @@ -254,17 +210,17 @@ sub remove_ending_zero { } sub boot_img_i386 { - my ($type, $I, $img, $kernel) = @_; + my ($type, $I, $img, $kernel, $vmlinuz) = @_; _ "rm -rf $tmp_mnt"; mkdir $tmp_mnt; - _ "cat $kernel > $tmp_mnt/vmlinuz"; + _ "cat $vmlinuz > $tmp_mnt/vmlinuz"; output("$tmp_mnt/help.msg", syslinux_msg('help.msg.xml')); output("$tmp_mnt/advanced.msg", syslinux_msg('advanced.msg.xml')); (my $rdz = $img) =~ s/\.img/.rdz/; (my $initrd_type = $type) =~ s/-changedisk//; - initrd($initrd_type, $I, $rdz); + initrd($initrd_type, $I, $rdz, $kernel); my $short_type = substr($type, 0, 8); output("$tmp_mnt/syslinux.cfg", @@ -276,7 +232,8 @@ sub boot_img_i386 { unlink $rdz; # mtools wants the image to be a power of 32 - my $size = max(ceil(chomp_(`du -s -k $tmp_mnt`) / 32) * 32 + 128, 1440); + my $syslinux_overhead = 32 * 8; + 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"; _ "/sbin/mkdosfs $img"; @@ -288,397 +245,6 @@ sub boot_img_i386 { # alias to x86 variant, slightly bigger with images though sub boot_img_x86_64 { &boot_img_i386 } -sub boot_img_alpha { - my ($type, $I, $img) = @_; - - __ "$sudo umount $tmp_mnt 2>/dev/null"; - _ "dd if=/dev/zero of=$img bs=1k count=1440"; - mke2fs($img); - _ "/sbin/e2writeboot $img /boot/bootlx"; - _ "$sudo mount -t ext2 $img $tmp_mnt -o loop"; - _ "cp -f vmlinux.gz $tmp_mnt"; - -f "$type.rdz" ? _ "cp -f $type.rdz $tmp_mnt" : initrd($type, $I, "$tmp_mnt/$type.rdz"); - - mkdir "$tmp_mnt/etc", 0777; - output("$tmp_mnt/etc/aboot.conf", -"0:vmlinux.gz initrd=$type.rdz rw $default_append $type -1:vmlinux.gz initrd=$type.rdz rw $default_append text $type -"); - _ "sync"; - _ "df $tmp_mnt"; -} - -sub boot_img_ia64 { - my ($type, $_I, $img, $kernel) = @_; - my $rdz = $img; $rdz =~ s/\.img/.rdz/; - - __ "$sudo umount $tmp_mnt 2>/dev/null"; - _ "dd if=/dev/zero of=$img bs=1k count=16384"; - _ "mkdosfs $img"; - _ "$sudo mount -t vfat $img $tmp_mnt -o loop,umask=000"; - _ "$sudo cp -f $kernel $tmp_mnt/vmlinux"; - _ "cp -f $rdz $tmp_mnt/$type.rdz"; - _ "$sudo cp -f tools/ia64/elilo.efi $tmp_mnt"; - output("$tmp_mnt/elilo.conf", qq( -prompt -timeout=50 - -image=vmlinux - label=linux - initrd=$type.rdz - append=" ramdisk_size=120000" - read-only - -image=vmlinux - label=rescue - initrd=$type.rdz - append=" rescue ramdisk_size=120000" -")); - _ "sync"; - _ "df $tmp_mnt"; - -} - -sub boot_img_sparc { - my ($type, $I, $_img) = @_; - if ($type =~ /^live(.*)/) { - #- hack to produce directly into /export the needed file for cdrom boot. - my $dir = "/export"; - my $boot = "boot"; #- non-absolute pathname only! - - _ "mkdir -p $dir/$boot"; - _ "cp -f /boot/cd.b /boot/second.b $dir/$boot"; - _ "cp -f vmlinux$1 $dir/$boot/vmlinux$1"; - -f "live$1.rdz" ? _ "cp -f live$1.rdz $dir/$boot" : initrd($type, $I, "$dir/$boot/live$1.rdz"); - - output("$dir/$boot/silo.conf", qq( -partition=1 -default=linux -timeout=100 -read-write -message=/$boot/boot.msg -image="cat /$boot/boot.msg" - label=1 - single-key -image="cat /$boot/general.msg" - label=2 - single-key -image="cat /$boot/expert.msg" - label=3 - single-key -image="cat /$boot/rescue.msg" - label=4 - single-key -image="cat /$boot/kickit.msg" - label=5 - single-key -image="cat /$boot/param.msg" - label=6 - single-key -image[sun4c,sun4d,sun4m]=/$boot/vmlinux - label=linux - alias=install - initrd=/$boot/live.rdz - append="ramdisk_size=128000" -image[sun4c,sun4d,sun4m]=/$boot/vmlinux - label=text - initrd=/$boot/live.rdz - append="ramdisk_size=128000 text" -image[sun4c,sun4d,sun4m]=/$boot/vmlinux - label=expert - initrd=/$boot/live.rdz - append="ramdisk_size=128000 expert" -image[sun4c,sun4d,sun4m]=/$boot/vmlinux - label=ks - initrd=/$boot/live.rdz - append="ramdisk_size=128000 ks" -image[sun4c,sun4d,sun4m]=/$boot/vmlinux - label=rescue - initrd=/$boot/live.rdz - append="ramdisk_size=128000 rescue" -image[sun4u]=/$boot/vmlinux64 - label=linux - alias=install - initrd=/$boot/live64.rdz - append="ramdisk_size=128000" -image[sun4u]=/$boot/vmlinux64 - label=text - initrd=/$boot/live64.rdz - append="ramdisk_size=128000 text" -image[sun4u]=/$boot/vmlinux64 - label=expert - initrd=/$boot/live64.rdz - append="ramdisk_size=128000 expert" -image[sun4u]=/$boot/vmlinux64 - label=ks - initrd=/$boot/live64.rdz - append="ramdisk_size=128000 ks" -image[sun4u]=/$boot/vmlinux64 - label=rescue - initrd=/$boot/live64.rdz - append="ramdisk_size=128000 rescue" -")); - - output("$dir/$boot/README", " -To Build a Bootable CD-ROM, try: - genisoimage -R -o t.iso -s /$boot/silo.conf /export -"); - } elsif ($type =~ /^tftprd(.*)/) { - my $dir = "/export"; - my $boot = "images"; - my $setarch = $1 ? "sparc64" : "sparc32"; - - _ "mkdir -p $dir/$boot"; - -f "$type.rdz" or initrd($type, $I, "$type.rdz"); - _ "cp -f vmlinux$1.aout $dir/$boot/$type.img"; - _ "$setarch kernel$1/src/arch/sparc$1/boot/piggyback $dir/$boot/$type.img kernel$1/boot/System.map $type.rdz"; - } elsif ($type =~ /^tftp(.*)/) { - my $dir = "/export"; - my $boot = "images"; - - _ "mkdir -p $dir/$boot"; - _ "cp -f vmlinux$1.aout $dir/$boot/$type.img"; - } else { - my $dir = "floppy"; - __ "$sudo umount $tmp_mnt 2>/dev/null"; - _ "rm -rf $dir"; - _ "mkdir -p $dir"; - _ "cp -f /boot/fd.b /boot/second.b $dir"; - _ "cp -f vmlinuz$I $dir/vmlinux$I.gz"; - -f "$type.rdz" ? _ "cp -f $type.rdz $dir" : initrd($type, $I, "$dir/$type.rdz"); - - output("$dir/boot.msg", " -Welcome to Mageia $ENV{DISTRIB_VERSION} - -Press <Enter> to install or upgrade a system 7mMageia7m -"); - - output("$dir/silo.conf", qq( -partition=1 -default=linux -timeout=100 -read-write -message=/boot.msg -image=/vmlinux$I.gz - label=linux - initrd=/$type.rdz - append="ramdisk_size=128000 $type" -")); - _ "genromfs -d $dir -f /dev/ram -A 2048,/.. -a 512 -V 'DrakX boot disk'"; - _ "$sudo mount -t romfs /dev/ram $tmp_mnt"; - _ "silo -r $tmp_mnt -F -i /fd.b -b /second.b -C /silo.conf"; - _ "$sudo umount $tmp_mnt"; - _ "dd if=/dev/ram of=$type.img bs=1440k count=1"; - _ "sync"; - _ "$sudo mount -t romfs /dev/ram $tmp_mnt"; - _ "df $tmp_mnt"; - } -} - -sub boot_img_ppc { - my ($_type, $I, $_img, $_kernel) = @_; - foreach (glob("all.kernels/*")) { - my $ext = basename($_); - if ($ext =~ /legacy/) { - initrd("all", $I, "images/all.rdz-$ext"); - _ "mv images/all.rdz-$ext images/all.rdz-legacy"; - _ "cp $_/vmlinuz images/vmlinux-legacy"; - } - elsif ($ext =~ /2.6/) { - initrd("all", $I, "images/all.rdz-$ext"); - _ "mv images/all.rdz-$ext images/all.rdz"; - _ "cp $_/vmlinuz images/vmlinux"; - } - } - _ "cp -f /usr/lib/yaboot/yaboot images/yaboot"; - - output("images/ofboot.b", '<CHRP-BOOT> -<COMPATIBLE> -MacRISC -</COMPATIBLE> -<DESCRIPTION> -Mageia PPC bootloader -</DESCRIPTION> -<BOOT-SCRIPT> -" screen" output -load-base release-load-area -dev screen -" "(0000000000aa00aa0000aaaaaa0000aa00aaaa5500aaaaaa)" drop 0 8 set-colors -" "(5555555555ff55ff5555ffffff5555ff55ffffff55ffffff)" drop 8 8 set-colors -device-end -3 to foreground-color -0 to background-color -" "(0C)" fb8-write drop -" Booting Mageia PPC..." fb8-write drop 100 ms -boot cd:,\boot\yaboot -</BOOT-SCRIPT> -<OS-BADGE-ICONS> -1010 -000000000000F8FEACF6000000000000 -0000000000F5FFFFFEFEF50000000000 -00000000002BFAFEFAFCF70000000000 -0000000000F65D5857812B0000000000 -0000000000F5350B2F88560000000000 -0000000000F6335708F8FE0000000000 -00000000005600F600F5FD8100000000 -00000000F9F8000000F5FAFFF8000000 -000000008100F5F50000F6FEFE000000 -000000F8F700F500F50000FCFFF70000 -00000088F70000F50000F5FCFF2B0000 -0000002F582A00F5000008ADE02C0000 -00090B0A35A62B0000002D3B350A0000 -000A0A0B0B3BF60000505E0B0A0B0A00 -002E350B0B2F87FAFCF45F0B2E090000 -00000007335FF82BF72B575907000000 -000000000000ACFFFF81000000000000 -000000000081FFFFFFFF810000000000 -0000000000FBFFFFFFFFAC0000000000 -000000000081DFDFDFFFFB0000000000 -000000000081DD5F83FFFD0000000000 -000000000081DDDF5EACFF0000000000 -0000000000FDF981F981FFFF00000000 -00000000FFACF9F9F981FFFFAC000000 -00000000FFF98181F9F981FFFF000000 -000000ACACF981F981F9F9FFFFAC0000 -000000FFACF9F981F9F981FFFFFB0000 -00000083DFFBF981F9F95EFFFFFC0000 -005F5F5FDDFFFBF9F9F983DDDD5F0000 -005F5F5F5FDD81F9F9E7DF5F5F5F5F00 -0083DD5F5F83FFFFFFFFDF5F835F0000 -000000FBDDDFACFBACFBDFDFFB000000 -000000000000FFFFFFFF000000000000 -0000000000FFFFFFFFFFFF0000000000 -0000000000FFFFFFFFFFFF0000000000 -0000000000FFFFFFFFFFFF0000000000 -0000000000FFFFFFFFFFFF0000000000 -0000000000FFFFFFFFFFFF0000000000 -0000000000FFFFFFFFFFFFFF00000000 -00000000FFFFFFFFFFFFFFFFFF000000 -00000000FFFFFFFFFFFFFFFFFF000000 -000000FFFFFFFFFFFFFFFFFFFFFF0000 -000000FFFFFFFFFFFFFFFFFFFFFF0000 -000000FFFFFFFFFFFFFFFFFFFFFF0000 -00FFFFFFFFFFFFFFFFFFFFFFFFFF0000 -00FFFFFFFFFFFFFFFFFFFFFFFFFFFF00 -00FFFFFFFFFFFFFFFFFFFFFFFFFF0000 -000000FFFFFFFFFFFFFFFFFFFF000000 -</OS-BADGE-ICONS> -</CHRP-BOOT> -'); - - output("images/yaboot.conf", ' -init-message = "\nWelcome to Mageia PPC!\nHit <TAB> for boot options.\n\n" -timeout = 150 -device=cd: -default = install-gui -message=/boot/yaboot.msg - -image = /boot/vmlinux - label = install-gui - initrd = /boot/all.gz - initrd-size = 34000 - append = " ramdisk_size=128000" - -image = /boot/vmlinux-power4 - label = install-gui-power4 - initrd = /boot/all-power4.gz - initrd-size = 34000 - append = " ramdisk_size=128000" - -image = /boot/vmlinux - label = install-text - initrd = /boot/all.gz - initrd-size = 34000 - append = " text ramdisk_size=128000" - -image = /boot/vmlinux-power4 - label = install-text-power4 - initrd = /boot/all-power4.gz - initrd-size = 34000 - append = " text ramdisk_size=128000" - -image = /boot/vmlinux - label = install-gui-old - initrd = /boot/all.gz - initrd-size = 34000 - append = " gui-old ramdisk_size=128000" - -image = /boot/vmlinux-power4 - label = install-gui-old-power4 - initrd = /boot/all-power4.gz - initrd-size = 34000 - append = " gui-old ramdisk_size=128000" - -image = enet:0,vmlinux - label = install-net - initrd = enet:0,all.gz - initrd-size = 34000 - append = " ramdisk_size=128000" - -image = enet:0,vmlinux-power4 - label = install-net-power4 - initrd = enet:0,all-power4.gz - initrd-size = 34000 - append = " ramdisk_size=128000" - -image = enet:0,vmlinux - label = install-net-text - initrd = enet:0,all.gz - initrd-size = 34000 - append = " text ramdisk_size=128000" - -image = enet:0,vmlinux-power4 - label = install-net-text-power4 - initrd = enet:0,all-power4.gz - initrd-size = 34000 - append = " text ramdisk_size=128000" - -image = /boot/vmlinux - label = rescue - initrd = /boot/all.gz - initrd-size = 34000 - append = " rescue ramdisk_size=128000" - -image = /boot/vmlinux-power4 - label = rescue-power4 - initrd = /boot/all-power4.gz - initrd-size = 34000 - append = " rescue ramdisk_size=128000" - -image = enet:0,vmlinux - label = rescue-net - initrd = enet:0,all.gz - initrd-size = 34000 - append = " rescue ramdisk_size=128000" - -image = enet:0,vmlinux-power4 - label = rescue-net-power4 - initrd = enet:0,all-power4.gz - initrd-size = 34000 - append = " rescue ramdisk_size=128000" -'); - - output("images/yaboot.msg", ' -Thanks for choosing Mageia PPC. The following is a short -explanation of the various options for booting the install CD. - -All options ending with "-power4" use the BOOT kernel for ppc 9xx and POWER4. -The default syntax with no suffix uses the BOOT kernel for ppc 6xx 7xx and 7xxx. -The default if you just hit enter is "install-gui". - -install-gui: uses Xorg fbdev mode -install-text: text based install -install-net: allows you to use a minimal boot CD, - pulling the rest of the install from - a network server -install-net-text: text mode network install -rescue: boots the rescue image -rescue-net: boots the rescue image from a network server - -'); - -} - sub VERSION { my ($kernels) = @_; @@ -698,10 +264,10 @@ sub syslinux_all_files { $default_vga =~ /788/ or die 'we rely on vga=788 for bootsplash'; each_index { - mkdir "$dir/alt$::i", 0777; - _ "cp all.kernels/$_/vmlinuz $dir/alt$::i"; - initrd('all', '', "images/all.rdz-$_"); - rename("images/all.rdz-$_", "$dir/alt$::i/all.rdz"); + mkdir "$dir/$arch", 0777; + _ "cp all.kernels/$_/vmlinuz $dir/$arch"; + initrd('all', '', "images/all.rdz-$_", $_); + rename("images/all.rdz-$_", "$dir/$arch/all.rdz"); } @$kernels; _ "install -m 644 -D /boot/memtest* $dir/memtest"; @@ -718,7 +284,14 @@ sub isolinux { syslinux_all_files('isolinux', $kernels); _ "cp $isolinux_bin isolinux/isolinux.bin"; + _ "cp /usr/lib/syslinux/ifcpu.c32 isolinux/ifcpu.c32"; + _ "cp /usr/lib/syslinux/ldlinux.c32 isolinux/ldlinux.c32"; + _ "cp /usr/lib/syslinux/libcom32.c32 isolinux/libcom32.c32"; + _ "cp /usr/lib/syslinux/libgpl.c32 isolinux/libgpl.c32"; + _ "cp /usr/lib/syslinux/libmenu.c32 isolinux/libmenu.c32"; + _ "cp /usr/lib/syslinux/libutil.c32 isolinux/libutil.c32"; _ "cp /usr/lib/syslinux/gfxboot.c32 isolinux/gfxboot.c32"; + _ "cp /usr/lib/syslinux/chain.c32 isolinux/chain.c32"; output("isolinux/isolinux.cfg", syslinux_cfg_all('cdrom', 1)); xbox_stage1() if arch() =~ /i.86/; @@ -731,7 +304,7 @@ sub xbox_stage1() { eval { rm_rf($dir) }; mkdir_p($dir); _ "cp all.kernels/$xbox_kernel/vmlinuz $dir"; - initrd('all', '', "images/all.rdz-$xbox_kernel"); + initrd('all', '', "images/all.rdz-$xbox_kernel", $xbox_kernel); rename("images/all.rdz-$xbox_kernel", "$dir/initrd"); _ "cp /usr/share/cromwell/xromwell-installer.xbe $dir/default.xbe"; @@ -750,7 +323,14 @@ sub boot_iso { output('.boot_iso/VERSION', VERSION($kernels)); # for the boot iso, use standard isolinux - _ "cp /usr/lib/syslinux/isolinux.bin .boot_iso/isolinux/isolinux.bin"; + _ "cp $isolinux_bin .boot_iso/isolinux/isolinux.bin"; + _ "cp /usr/lib/syslinux/ifcpu.c32 .boot_iso/isolinux/ifcpu.c32"; + _ "cp /usr/lib/syslinux/ldlinux.c32 .boot_iso/isolinux/ldlinux.c32"; + _ "cp /usr/lib/syslinux/libcom32.c32 .boot_iso/isolinux/libcom32.c32"; + _ "cp /usr/lib/syslinux/libgpl.c32 .boot_iso/isolinux/libgpl.c32"; + _ "cp /usr/lib/syslinux/libmenu.c32 .boot_iso/isolinux/libmenu.c32"; + _ "cp /usr/lib/syslinux/libutil.c32 .boot_iso/isolinux/libutil.c32"; + _ "cp /usr/lib/syslinux/chain.c32 .boot_iso/isolinux/chain.c32"; my $with_gfxboot = 0; _ "cp /usr/share/gfxboot/themes/Mageia/install/* .boot_iso/isolinux" if $with_gfxboot; @@ -760,6 +340,10 @@ sub boot_iso { output('.boot_iso/isolinux/isolinux.cfg', syslinux_cfg_all('', $with_gfxboot)); + if ($ENV{BOOT_AUTOMATIC_METHOD}) { + _ "sed -i 's#\\(append .*\\)\\(splash quiet\\|rescue\\)\$#\\1\\2 automatic=$ENV{BOOT_AUTOMATIC_METHOD}#' .boot_iso/isolinux/isolinux.cfg" + } + _ "genisoimage -r -f -J -cache-inodes -V 'Mga Boot ISO' -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o $iso .boot_iso"; _ "isohybrid -o 1 $iso"; rm_rf('.boot_iso'); @@ -795,7 +379,7 @@ title Help pause To display the help, press <space> until you reach "HELP END" pause . -pause Please see http://qa.mandriva.com/hd_grub.cgi for a friendlier solution +pause Please see http://doc.mageia.org/ for a friendlier solution pause . pause To specify the location where Mageia is copied, pause choose "Mageia Install", and press "e". |
