summaryrefslogtreecommitdiffstats
path: root/images/make_boot_img
blob: a2a93f47c03754a84d993c4455c9faa57d0025e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
#!/usr/bin/perl

use Config;
use FileHandle;
use MDK::Common;
use POSIX;
use Carp;

Config->import;
my ($arch) = $Config{archname} =~ /(.*?)-/;

my $default_append = '';
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 $tmp_mnt = '/tmp/drakx_mnt';
my $tmp_initrd = '/tmp/drakx_initrd';

my $sudo;
if ($>) {
    $sudo = "sudo";
    $ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}";
}

sub __ { print @_, "\n"; system(@_) }
sub _ { __ @_; $? and croak "'" . join(' ', @_) . "failed ($?)\n" }

sub mke2fs { 
    my ($f) = @_;
    _ "/sbin/mke2fs -q -m 0 -F -s 1 $f";
    _ "/sbin/tune2fs -c 0 -U clear -T 1970010101 $f";
}

_ "mkdir -p $tmp_mnt";
mkdir "images";

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;

foreach my $img (@images) {
    my ($type, $I, $extension) = $img =~ m!([^/]*)(64)?\.([^.]*)$!;

    if ($img =~ /hd_grub/) {
	hd_grub($img);
    } elsif ($img =~ /isolinux/) {
	isolinux(\@kernels);

	if (my ($tftpboot) = grep { -e $_ } qw(/tftpboot /var/lib/tftpboot)) {
	    system("/bin/cp -f isolinux/alt0/* $tftpboot");
	}
    } elsif ($img =~ /boot.iso/) {
	boot_iso($img, \@kernels);
    } elsif ($extension eq 'rdz') {
	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;
	rename("$img-$kernels[0]", $img);
    } else {
	die "unknown image $img";
    }
}

sub syslinux_color {
    "0" . {
	default => '7',
	blue    => '9',
	green   => 'a',
	red     => 'c',
	yellow  => 'e',
	white   => 'f',
    }->{$_[0]} || die "unknown color $_[0]\n";
}

sub syslinux_msg { 
    my ($msg_xml_file, @more_text) = @_;

    require XML::Parser;

    sub xml_tree2syslinux {
	my ($current_color, $tree) = @_;
	my (undef, @l) = @$tree;
	join('', map {
	    my ($type, $val) = @$_;
	    if ($type eq '0') {
		$val;
	    } else {
		syslinux_color($type) . xml_tree2syslinux($type, $val) . syslinux_color($current_color);
	    }
	} group_by2(@l));
    }

    print "parsing $msg_xml_file\n";
    my $tree = XML::Parser->new(Style => 'Tree')->parsefile($msg_xml_file);
    $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";
}

sub syslinux_cfg {
    my ($entries, $b_gfxboot) = @_;
    my $default = 'linux';

    my $header = <<EOF;
default $default
prompt 1
timeout $timeout
display help.msg
implicit 1
EOF
    my $header_gfxboot = <<EOF;
ui gfxboot.c32 bootlogo
label harddisk
  localboot 0x80
EOF
    my $header_non_gfxboot = <<EOF;
F1 help.msg
F2 advanced.msg
F3 boot.msg
EOF

    my @l = map {
	$_->{append} =~ s/\s+/ /g;
	"label $_->{label}\n" .
	"  kernel $_->{kernel}\n" .
	($_->{initrd} ? "  append initrd=$_->{initrd} $_->{append}\n" : '');
    } @$entries;

    $header . ($b_gfxboot ? $header_gfxboot : $header_non_gfxboot) . join('', @l);
}

sub initrd {
    my ($type, $I, $img) = @_;
    my $stage1_root = $ENV{USE_LOCAL_STAGE1} ? "../mdk-stage1" : "/usr/$lib/drakx-installer-binaries";
    my ($ext) = $img =~ /rdz-(.*)/ or die "bad initrd name ($img)";

    _ "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";
    _ "install -D /usr/share/terminfo/s/screen $tmp_initrd/usr/share/terminfo/s/screen";
    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";
    }

    output("$tmp_initrd/hotplug", q{#!/bin/sh  
if [ "$SUBSYSTEM" = firmware ] && [ "$ACTION" = add ] && [ -n "$FIRMWARE" ] ; then
  if [ ! -e /sys$DEVPATH/loading ]; then
    exit 1
  fi
  if [ -e "/lib/firmware/$FIRMWARE" ]; then
    echo 1 > /sys$DEVPATH/loading
    cat "/lib/firmware/$FIRMWARE" > /sys$DEVPATH/data
    echo 0 > /sys$DEVPATH/loading
    exit 0
  fi
  echo -1 > /sys$DEVPATH/loading
  exit 1
fi
});
    _ "chmod 755 $tmp_initrd/hotplug";
    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";
    }
    # ka deploy need some files in all.rdz 
    if ($ENV{DEBUGSTAGE1}) {
	mkdir_p("$tmp_initrd/$_") foreach qw(dev ka proc var/tmp tmp/stage2);
	symlink("/sbin", "$tmp_initrd/bin");
	cp_af("/usr/bin/ka-d-client", "$tmp_initrd/ka/ka-d-client");
	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;
    }

    my $devs = sprintf "ls /dev/{%s}", join(',', qw(console fb0 fd0 loop3 mem null ppp ptmx ptyp0 ram3 random tty[0-7] ttyp0 ttyS0 urandom));

    _ "(cd $tmp_initrd; (find . ; $devs) | cpio -o -c --quiet) | xz --check=crc32 --lzma2=dict=512KiB  > $img";
    _ "rm -rf $tmp_initrd";
}

sub entries_append {
    my ($type) = @_;

    my $automatic = $type =~ /cdrom/ ? 'automatic=method:cdrom ' : '';
    $automatic .= 'changedisk ' if $type =~ /changedisk/;

    my @simple_entries = (
	linux => $default_vga,
	vgalo => "vga=785",
	vgahi => "vga=791",
	text => "text",
#	patch => "patch $default_vga",
	rescue => "rescue",
    );
    my @entries = (
        (map { $_->[0] => "$automatic$default_acpi $_->[1]" } group_by2(@simple_entries)),
	noacpi => "$automatic$default_vga acpi=off",
#	restore => "$automatic$default_vga restore",
    );

    map { { label => $_->[0], append => join(' ', grep { $_ } $default_append, $_->[1]) } }
      group_by2(@entries);
}

sub syslinux_cfg_all {
    my ($type, $b_gfxboot) = @_;

    syslinux_cfg([
	(map {
	    { kernel => 'alt0/vmlinuz', initrd => 'alt0/all.rdz', %$_ };
	} entries_append($type)),
	(map_index {
	    { label => "alt$::i", kernel => "alt$::i/vmlinuz", initrd => "alt$::i/all.rdz", 
	      append => join(' ', grep { $_ } $default_append, $default_acpi, $default_vga) };
	} @kernels),
	{ label => 'memtest', kernel => 'memtest' },
    ], $b_gfxboot);
}
sub remove_ending_zero {
    my ($img) = @_;
    _(q(perl -0777 -pi -e 's/\0+$//' ) . $img);
}

sub boot_img_i386 {
    my ($type, $I, $img, $kernel) = @_;

    _ "rm -rf $tmp_mnt"; mkdir $tmp_mnt;
    _ "cat $kernel > $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);
    my $short_type = substr($type, 0, 8);

    output("$tmp_mnt/syslinux.cfg", 
	   syslinux_cfg([ map {
			    { kernel => 'vmlinuz', initrd => "$short_type.rdz", %$_ };
			} entries_append($type) ]));

    _ "cp -f $rdz $tmp_mnt/$short_type.rdz";
    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);
    _ "dd if=/dev/zero of=$img bs=1k count=$size";

    _ "/sbin/mkdosfs $img";
    _ "mcopy -i $img $tmp_mnt/* ::";
    _ "syslinux $img";
    _ "rm -rf $tmp_mnt";
}

# 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) = @_;

    map { "$_\n" }
      $ENV{DISTRIB_DESCR},
      scalar gmtime(),
      '', @$kernels;
}

sub syslinux_all_files {
    my ($dir, $kernels) = @_;

    eval { rm_rf($dir) }; mkdir_p($dir);

    @$kernels or die "syslinux_all_files: no kernel\n";

    $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");
    } @$kernels;

    _ "install -m 644 -D /boot/memtest* $dir/memtest";

    output("$dir/help.msg", syslinux_msg('help.msg.xml'));
    output("$dir/advanced.msg", syslinux_msg('advanced.msg.xml', 
					     "\nYou can choose the following kernels :\n",
					     map_index { " o  " . syslinux_color('white') . "alt$::i" . syslinux_color('default') . " is kernel $_\n" } @$kernels));
}

sub isolinux {
    my ($kernels) = @_;

    syslinux_all_files('isolinux', $kernels);

    _ "cp $isolinux_bin isolinux/isolinux.bin";
    _ "cp /usr/lib/syslinux/gfxboot.c32 isolinux/gfxboot.c32";
    output("isolinux/isolinux.cfg", syslinux_cfg_all('cdrom', 1));

    xbox_stage1() if arch() =~ /i.86/;
}

sub xbox_stage1() {
    my $xbox_kernel = find { /xbox/ } all('all.kernels') or return;

    my $dir = 'isolinux/xbox';
    eval { rm_rf($dir) }; mkdir_p($dir);

    _ "cp all.kernels/$xbox_kernel/vmlinuz $dir";
    initrd('all', '', "images/all.rdz-$xbox_kernel");
    rename("images/all.rdz-$xbox_kernel", "$dir/initrd");

    _ "cp /usr/share/cromwell/xromwell-installer.xbe $dir/default.xbe";
    output("$dir/linuxboot.cfg", <<EOF);
kernel $dir/vmlinuz
initrd $dir/initrd
append root=/dev/ram3 ramdisk_size=36000 automatic=method:cdrom
EOF
}

sub boot_iso {
    my ($iso, $kernels) = @_;

    syslinux_all_files('.boot_iso/isolinux', $kernels);

    output('.boot_iso/VERSION', VERSION($kernels));	   
   
    # for the boot iso, use standard isolinux
    _ "cp /usr/lib/syslinux/isolinux.bin .boot_iso/isolinux/isolinux.bin";

    my $with_gfxboot = 0;
    _ "cp /usr/share/gfxboot/themes/Mageia/install/* .boot_iso/isolinux" if $with_gfxboot;
# _ "cp /home/pixel/cooker/soft/theme/mandriva-gfxboot-theme/inst/* .boot_iso/isolinux" if $with_gfxboot;
    #_ "cp /home/teuf/mdv/src/mandriva-gfxboot-theme/inst/* .boot_iso/isolinux" if $with_gfxboot;
    _ "cp /usr/lib/syslinux/gfxboot.c32 .boot_iso/isolinux/gfxboot.c32" if $with_gfxboot;

    output('.boot_iso/isolinux/isolinux.cfg', syslinux_cfg_all('', $with_gfxboot));

    _ "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');
}

sub hd_grub {
    my ($img) = @_;
    my $mapfile = '/tmp/device.map.tmp';

    my ($grub_dir) = glob("/lib/grub/*-*");
    my @grub_files = map { "$grub_dir/$_" } qw(stage1 stage2);

    # 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";

    output("$tmp_mnt/menu.lst", <<EOF);
timeout 10
default 0
fallback 1

title Mageia Install

root (hd0,0)
kernel /cooker/isolinux/alt0/vmlinuz $default_append $default_acpi $default_vga automatic=method:disk
initrd /cooker/isolinux/alt0/all.rdz

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 .
pause To specify the location where Mageia is copied,
pause choose "Mageia Install", and press "e".
pause Then change "root (hd0,0)". FYI:
pause - (hd0,0) is the first partition on first bios hard drive (usually hda1)
pause - (hd0,4) is the first extended partition (usually hda5)
pause - (hd1,0) is the first partition on second bios hard drive
pause Replace /cauldron to suit the directory containing Mageia
pause .
pause HELP END
EOF

    _ "/sbin/mkdosfs $img";
    _ "mcopy -i $img $tmp_mnt/* ::";
    _ "rm -rf $tmp_mnt";

    output($mapfile, "(fd0) $img\n");

    open(my $G, "| grub --device-map=$mapfile --batch");
    print $G <<EOF;
root (fd0)
install /stage1 d (fd0) /stage2 p /menu.lst
quit
EOF
    close $G;
    unlink $mapfile;
}
str">configuration. Obviously, you want to answer \"No\" if your machine is to act as a server, or if you were not successful in getting the display configured."), createBootdisk => N_("The Mandrake Linux CD-ROM has a built-in rescue mode. You can access it by booting from the CD-ROM, press the >>F1<< key at boot and type >>rescue<< at the prompt. But in case your computer cannot boot from the CD-ROM, you should come back to this step for help in at least two situations: * when installing the bootloader, DrakX will rewrite the boot sector ( MBR) of your main disk (unless you are using another boot manager), to allow you to start up with either Windows or GNU/Linux (assuming you have Windows in your system). If you need to reinstall Windows, the Microsoft install process will rewrite the boot sector, and then you will not be able to start GNU/Linux! * if a problem arises and you cannot start up GNU/Linux from the hard disk, this floppy disk will be the only means of starting up GNU/Linux. It contains a fair number of system tools for restoring a system, which has crashed due to a power failure, an unfortunate typing error, a typo in a password, or any other reason. If you say \"Yes\", you will be asked to enter a disk inside the drive. The floppy disk you will insert must be empty or contain data which you do not need. You will not have to format it since DrakX will rewrite the whole disk."), doPartitionDisks => N_("You now need to choose where you want to install the Mandrake Linux operating system on your hard drive. If your hard drive is empty or if an existing operating system is using all the available space, you will need to partition it. Basically, partitioning a hard drive consists of logically dividing it to create space to install your new Mandrake Linux system. Because the partitioning process' effects are usually irreversible, partitioning can be intimidating and stressful if you are an inexperienced user. Fortunately, there is a wizard which simplifies this process. Before beginning, please consult the manual and take your time. If you are running the installation in Expert mode, you will enter DiskDrake, the Mandrake Linux partitioning tool, which allows you to fine-tune your partitions. See the DiskDrake section in the ``Starter Guide''. From the installation interface, you can use the wizards as described here by clicking the dialog's \"Wizard\" button. If partitions have already been defined, either from a previous installation or from another partitioning tool, simply select those to install your Linux system. If partitions are not defined, you will need to create them using the wizard. Depending on your hard drive configuration, several options are available. * \"Use free space\": this option will simply lead to an automatic partitioning of your blank drive(s). You will not be prompted further; * \"Use existing partition\": the wizard has detected one or more existing Linux partitions on your hard drive. If you want to use them, choose this option. You will then be asked to choose the mount points associated to each of the partitions. The legacy mount points are selected by default, and you should generally keep them. * \"Use the free space on the Windows partition\": if Microsoft Windows is installed on your hard drive and takes all the space available on it, you have to create free space for Linux data. To do so, you can delete your Microsoft Windows partition and data (see ``Erase entire disk'' or ``Expert mode'' solutions) or resize your Microsoft Windows partition. Resizing can be performed without the loss of any data, provided you previously defragment the Windows partition. Backing up your data won't hurt either.. This solution is recommended if you want to use both Mandrake Linux and Microsoft Windows on the same computer. Before choosing this option, please understand that after this procedure, the size of your Microsoft Windows partition will be smaller than at the present time. You will have less free space under Microsoft Windows to store your data or to install new software; * \"Erase entire disk\": if you want to delete all data and all partitions present on your hard drive and replace them with your new Mandrake Linux system, choose this option. Be careful with this solution because you will not be able to revert your choice after you confirm; !! If you choose this option, all data on your disk will be lost. !! * \"Remove Windows\": this will simply erase everything on the drive and begin fresh, partitioning everything from scratch. All data on your disk will be lost; !! If you choose this option, all data on your disk will be lost. !! * \"Expert mode\": choose this option if you want to manually partition your hard drive. Be careful -- it is a powerful but dangerous option. You can very easily lose all your data. Hence, do not choose this unless you know what you are doing. To know how to use the DiskDrake utility used here, refer to the section ``Managing Your Partitions'' of the ````Starter Guide''''"), exitInstall => N_("There you are. Installation is now completed and your GNU/Linux system is ready to use. Just click \"OK\" to reboot the system. You can start GNU/Linux or Windows, whichever you prefer (if you are dual-booting), as soon as the computer has booted up again. The \"Advanced\" button (in Expert mode only) shows two more buttons to: * \"generate auto-install floppy\": to create an installation floppy disk which will automatically perform a whole installation without the help of an operator, similar to the installation you just configured. Note that two different options are available after clicking the button: * \"Replay\". This is a partially automated installation as the partitioning step (and only this one) remains interactive; * \"Automated\". Fully automated installation: the hard disk is completely rewritten, all data is lost. This feature is very handy when installing a great number of similar machines. See the Auto install section on our web site; * \"Save packages selection\"(*): saves the package selection as done previously. Then, when doing another installation, insert the floppy inside the drive and run the installation going to the help screen by pressing on the [F1] key, and by issuing >>linux defcfg=\"floppy\"<<. (*) You need a FAT-formatted floppy (to create one under GNU/Linux, type \"mformat a:\")"), formatPartitions => N_("Any partitions that have been newly defined must be formatted for use (formatting means creating a filesystem on it). At this time, you may wish to reformat some already existing partitions to erase any data they contain. If you wish to do that, please select those partitions as well. Please note that it is not necessary to reformat all pre-existing partitions. You must reformat the partitions containing the operating system (such as \"/\", \"/usr\" or \"/var\") but you do not have to reformat partitions containing data that you wish to keep (typically \"/home\"). Please be careful when selecting partitions. After formatting, all data on the selected partitions will be deleted and you will not be able to recover it. Click on \"OK\" when you are ready to format partitions. Click on \"Cancel\" if you want to choose another partition for your new Mandrake Linux operating system installation. Click on \"Advanced\" if you wish to select partitions that will be checked for bad blocks on the disk."), installPackages => N_("Your new Mandrake Linux operating system is currently being installed. Depending on the number of packages you will be installing and the speed of your computer, this operation could take from a few minutes to a significant amount of time. Please be patient."), installUpdates => N_("At the time you are installing Mandrake Linux, it is likely that some packages have been updated since the initial release. Some bugs may have been fixed, and security issues solved. To allow you to benefit from these updates, you are now able to download them from the Internet. Choose \"Yes\" if you have a working Internet connection, or \"No\" if you prefer to install updated packages later. Choosing \"Yes\" displays a list of places from which updates can be retrieved. Choose the one nearest you. Then a package-selection tree appears: review the selection, and press \"Install\" to retrieve and install the selected package(s), or \"Cancel\" to abort."), license => N_("Before continuing, you should read carefully the terms of the license. It covers the whole Mandrake Linux distribution, and if you do not agree with all the terms included in it, click on the \"Refuse\" button which will immediately terminate the installation. To continue with the installation, click on the \"Accept\" button."), miscellaneous => N_("At this point, it is time to choose the security level desired for the machine. As a rule of thumb, the more exposed the machine is, and the more the data stored in it is crucial, the higher the security level should be. However, a higher security level is generally obtained at the expense of ease of use. Refer to the \"msec\" chapter of the ``Reference Manual'' to get more information about the meaning of these levels. If you do not know what to choose, keep the default option."), partition_with_diskdrake => N_("At this point, you need to choose which partition(s) will be used for the installation of your Mandrake Linux system. If partitions have already been defined, either from a previous installation of GNU/Linux or from another partitioning tool, you can use existing partitions. Otherwise, hard drive partitions must be defined. To create partitions, you must first select a hard drive. You can select the disk for partitioning by clicking on ``hda'' for the first IDE drive, ``hdb'' for the second, ``sda'' for the first SCSI drive and so on. To partition the selected hard drive, you can use these options: * \"Clear all\": this option deletes all partitions on the selected hard drive; * \"Auto allocate\": this option enables to automatically create ext3 and swap partitions on your hard drive's free space; \"More\": gives access to additional features: * \"Save partition table\": saves the partition table to a floppy. Useful for later partition-table recovery, if necessary. It is strongly recommended to perform this step; * \"Restore partition table\": allows to restore a previously saved partition table from a floppy disk; * \"Rescue partition table\": if your partition table is damaged, you can try to recover it using this option. Please be careful and remember that it can fail; * \"Reload partition table\": discards all changes and loads your initial partition table; * \"Removable media automounting\": unchecking this option will force users to manually mount and unmount removable medias such as floppies and CD-ROMs. * \"Wizard\": use this option if you wish to use a wizard to partition your hard drive. This is recommended if you do not have a good knowledge of partitioning; * \"Undo\": use this option to cancel your changes; * \"Toggle to normal/expert mode\": allows additional actions on partitions (type, options, format) and gives more information; * \"Done\": when you are finished partitioning your hard drive, this will save your changes back to disk. Note: you can reach any option using the keyboard. Navigate through the partitions using [Tab] and [Up/Down] arrows. When a partition is selected, you can use: * Ctrl-c to create a new partition (when an empty partition is selected); * Ctrl-d to delete a partition; * Ctrl-m to set the mount point. To get information about the different filesystem types available, please read the ext2FS chapter from the ``Reference Manual''. If you are installing on a PPC machine, you will want to create a small HFS ``bootstrap'' partition of at least 1MB, which will be used by the yaboot bootloader. If you opt to make the partition a bit larger, say 50MB, you may find it a useful place to store a spare kernel and ramdisk images for emergency boot situations."), resizeFATChoose => N_("More than one Microsoft partition has been detected on your hard drive. Please choose the one you want to resize in order to install your new Mandrake Linux operating system. Each partition is listed as follows: \"Linux name\", \"Windows name\" \"Capacity\". \"Linux name\" is structured: \"hard drive type\", \"hard drive number\", \"partition number\" (for example, \"hda1\"). \"Hard drive type\" is \"hd\" if your hard dive is an IDE hard drive and \"sd\" if it is a SCSI hard drive. \"Hard drive number\" is always a letter after \"hd\" or \"sd\". With IDE hard drives: * \"a\" means \"master hard drive on the primary IDE controller\"; * \"b\" means \"slave hard drive on the primary IDE controller\"; * \"c\" means \"master hard drive on the secondary IDE controller\"; * \"d\" means \"slave hard drive on the secondary IDE controller\". With SCSI hard drives, an \"a\" means \"lowest SCSI ID\", a \"b\" means \"second lowest SCSI ID\", etc. \"Windows name\" is the letter of your hard drive under Windows (the first disk or partition is called \"C:\")."), resizeFATWait => N_("Please be patient. This operation can take several minutes."), selectInstallClass => N_("DrakX now needs to know if you want to perform a default (\"Recommended\") installation or if you want to have greater control (\"Expert\") over your installation. You can also choose to do a new installation or upgrade your existing Mandrake Linux system: * \"Install\": completely wipes out the old system. However, depending on what is currently installed on your machine, you may be able to keep some old partitions (Linux or otherwise) unchanged; * \"Upgrade\": this installation class allows to simply update the packages currently installed on your Mandrake Linux system. It keeps your hard drives' current partitions as well as user configurations. All other configuration steps remain available, similar to a normal installation; * \"Upgrade Packages Only\": this new installation class allows you to upgrade an existing Mandrake Linux system while keeping all system configurations unchanged. Adding new packages to the current installation is also possible. Upgrades should work fine on Mandrake Linux systems using version \"8.1\" or later. Depending on your GNU/Linux knowledge, select one of the following choices: * Recommended: choose this if you have never installed a GNU/Linux operating system. The installation will be very easy and you will only be asked a few questions; * Expert: if you have a good GNU/Linux understanding, you may wish to perform a highly customized installation. Some of the decisions you will have to make may be difficult if you do not have good GNU/Linux knowledge, so it is not recommended that those without a fair amount of experience select this installation class."), selectKeyboard => N_("Normally, DrakX selects the right keyboard for you (depending on the language you have chosen). However, you might not have a keyboard that corresponds exactly to your language: for example, if you are an English speaking Swiss person, you may still want your keyboard to be a Swiss keyboard. Or if you speak English but are located in Quebec, you may find yourself in the same situation. In both cases, you will have to go back to this installation step and select an appropriate keyboard from the list. Click on the \"More\" button to be presented with the complete list of supported keyboards. If you choose a keyboard layout based on a non-latin alphabet, you will be asked in the next dialog to choose the key binding that will switch the keyboard layout between the latin and non-latin layouts."), selectLanguage => N_("The first step is to choose your preferred language. Please choose your preferred language for installation and system usage. Clicking on the \"Advanced\" button will allow you to select other languages to be installed on your workstation. Selecting other languages will install the language-specific files for system documentation and applications. For example, if you host users from Spain on your machine, select English as the main language in the tree view and in the Advanced section, click on the box corresponding to \"Spanish|Spain\". Note that multiple languages may be installed. Once you have selected any additional locales, click the \"OK\" button to continue. To switch from one language to the other, you can launch the \"/usr/sbin/localedrake\" command as \"root\" to change the whole system language, or as a simple user to only change that user's default language."), selectMouse => N_("DrakX generally detects the number of buttons your mouse possesses. If not, it assumes you have a two-button mouse and will set it up for third-button emulation. DrakX will automatically know whether it is a PS/2, serial or USB mouse. If you wish to specify a different type of mouse, select the appropriate type from the provided list. If you choose a mouse other than the default, a test screen will be displayed. Use the buttons and wheel to verify that the settings are correct. If the mouse is not working well, press the space bar or [Return] to \"Cancel\" and choose again. Sometimes, wheel mouses are not automatically detected. You will need to manually select it in the list. Be sure to select the one corresponding to the correct port it is attached to. After you have pressed the \"OK\" button, a mouse image will be displayed. You then need to move the wheel of your mouse to activate it correctly. Then test that all buttons and movements are correct."), selectSerialPort => N_("Please select the correct port. For example, the \"COM1\" port under Windows is named \"ttyS0\" under GNU/Linux."), setRootPassword => N_("This is the most crucial decision in regards with the security of your GNU/Linux system: you have to enter the \"root\" password. \"Root\" is the system administrator and is the only one authorized to make updates, add users, change the overall system configuration, and so on. In short, \"root\" can do everything! That is why you must choose a password that is difficult to guess -- DrakX will tell you if it is too easy. As you can see, you can choose not to enter a password, but we strongly advise you against this if only for one reason: do not think that because you booted GNU/Linux that your other operating systems are safe from mistakes. Since \"root\" can overcome all limitations and unintentionally erase all data on partitions by carelessly accessing the partitions themselves, it is important for it to be difficult to become \"root\". The password should be a mixture of alphanumeric characters and at least 8 characters long. Never write down the \"root\" password -- it makes it too easy to compromise a system. However, please do not make the password too long or complicated because you must be able to remember it without too much effort. The password will not be displayed on screen as you type it in. Hence, you will have to type the password twice to reduce the chance of a typing error. If you do happen to make the same typing error twice, this ``incorrect'' password will have to be used the first time you connect. In Expert mode, you will be asked if you will be connecting to an authentication server, like NIS or LDAP. If your network uses either LDAP, NIS, or PDC Windows Domain authentication services, select the appropriate one as \"authentication\". If you have no clue, ask your network administrator. If your computer is not connected to any administrated network, you will want to choose \"Local files\" for authentication."), setupBootloader => N_("LILO and grub are GNU/Linux bootloaders. Normally, this stage is totally automated. In fact, DrakX analyzes the disk boot sector and acts accordingly, depending on what it finds there: * if a Windows boot sector is found, it will replace it with a grub/LILO boot sector. Hence, you will be able to load either GNU/Linux or another OS; * if a grub or LILO boot sector is found, it will replace it with a new one. if in doubt, DrakX will display a dialog with various options. * \"Bootloader to use\": you have three choices: * \"GRUB\": if you prefer grub (text menu); * \"LILO with graphical menu\": if you prefer LILO with its graphical interface; * \"LILO with text menu\": if you prefer LILO with its text menu interface. * \"Boot device\": in most cases, you will not change the default (\"/dev/hda\"), but if you prefer, the bootloader can be installed on the second hard drive (\"/dev/hdb\"), or even on a floppy disk (\"/dev/fd0\"); * \"Delay before booting the default image\": when rebooting the computer, this is the delay granted to the user to choose -- in the bootloader menu, another boot entry than the default one. !! Beware that if you choose not to install a bootloader (by selecting \"Cancel\" here), you must ensure that you have a way to boot your Mandrake Linux system! Also, be sure you know what you do before changing any of the options. !! Clicking the \"Advanced\" button in this dialog will offer many advanced options, which are reserved for the expert user."), setupBootloaderAddEntry => N_("After you have configured the general bootloader parameters, the list of boot options which will be available at boot time will be displayed. If there is another operating system installed on your machine, it will automatically be added to the boot menu. Here, you can choose to fine-tune the existing options. Select an entry and click \"Modify\" to modify or remove it. \"Add\" creates a new entry. and \"Done\" goes on to the next installation step. You may also not want to give access to these other operating systems to anyone. In which case, you can delete the corresponding entries. But then, you will need a boot disk in order to boot those other operating systems!"), setupBootloaderBeginner => N_("You must indicate where you wish to place the information required to boot GNU/Linux. Unless you know exactly what you are doing, choose \"First sector of drive (MBR)\"."), setupDefaultSpooler => N_("Here, we select a printing system for your computer. Other OSes may offer you one, but Mandrake Linux offers two. * \"pdq\" -- which means ``print, don't queue'', is the choice if you have a direct connection to your printer and you want to be able to panic out of printer jams, and you do not have networked printers. It will handle only very simple network cases and is somewhat slow for networks. Pick \"pdq\" if this is your first voyage to GNU/Linux. You can change your choices after installation by running PrinterDrake from the Mandrake Control Center and clicking the expert button. * \"CUPS\" -- ``Common Unix Printing System'', is excellent at printing to your local printer and also halfway-around the planet. It is simple and can act as a server or a client for the ancient \"lpd\" printing system. Hence, it is compatible with the systems that went before. It can do many tricks, but the basic setup is almost as easy as \"pdq\". If you need this to emulate an \"lpd\" server, you must turn on the \"cups-lpd\" daemon. It has graphical front-ends for printing or choosing printer options."), setupSCSI => N_("DrakX now detects any IDE device present in your computer. It will also scan for one or more PCI SCSI cards on your system. If a SCSI card is found, DrakX will automatically install the appropriate driver. Because hardware detection does not always detect a piece of hardware, DrakX will ask you to confirm if a PCI SCSI card is present. Click \"Yes\" if you know that there is a SCSI card installed in your machine. You will be presented with a list of SCSI cards to choose from. Click \"No\" if you have no SCSI hardware. If you are unsure, you can check the list of hardware detected in your machine by selecting \"See hardware info\" and clicking \"OK\". Examine the hardware list and then click on the \"OK\" button to return to the SCSI interface question. If you have to manually specify your adapter, DrakX will ask if you want to specify options for it. You should allow DrakX to probe the hardware for the card-specific options which the hardware needs to initialize. This usually works well. If DrakX is not able to probe for the options which need to be passed, you will need to manually provide options to the driver."), setupYabootAddEntry => N_("You can add additional entries for yaboot, either for other operating systems, alternate kernels, or for an emergency boot image. For other OSes, the entry consists only of a label and the \"root\" partition. For Linux, there are a few possible options: * Label: this is simply the name you will have to type at the yaboot prompt to select this boot option; * Image: this would be the name of the kernel to boot. Typically, vmlinux or a variation of vmlinux with an extension; * Root: the \"root\" device or ``/'' for your Linux installation; * Append: on Apple hardware, the kernel append option is used quite often to assist in initializing video hardware, or to enable keyboard mouse button emulation for the often lacking 2nd and 3rd mouse buttons on a stock Apple mouse. The following are some examples: video=aty128fb:vmode:17,cmode:32,mclk:71 adb_buttons=103,111 hda=autotune video=atyfb:vmode:12,cmode:24 adb_buttons=103,111 * Initrd: this option can be used either to load initial modules, before the boot device is available, or to load a ramdisk image for an emergency boot situation; * Initrd-size: the default ramdisk size is generally 4,096 bytes. If you need to allocate a large ramdisk, this option can be used; * Read-write: normally the \"root\" partition is initially brought up in read-only, to allow a filesystem check before the system becomes ``live''. Here, you can override this option; * NoVideo: should the Apple video hardware prove to be exceptionally problematic, you can select this option to boot in ``novideo'' mode, with native frame buffer support; * Default: selects this entry as being the default Linux selection, selectable by just pressing ENTER at the yaboot prompt. This entry will also be highlighted with a ``*'', if you press [Tab] to see the boot selections."), setupYabootGeneral => N_("Yaboot is a bootloader for NewWorld MacIntosh hardware. It is able to boot either GNU/Linux, MacOS or MacOSX if present on your computer. Normally, these other operating systems are correctly detected and installed. If this is not the case, you can add an entry by hand in this screen. Be careful to choose the correct parameters. Yaboot's main options are: * Init Message: a simple text message displayed before the boot prompt; * Boot Device: indicates where you want to place the information required to boot to GNU/Linux. Generally, you set up a bootstrap partition earlier to hold this information; * Open Firmware Delay: unlike LILO, there are two delays available with yaboot. The first delay is measured in seconds and at this point, you can choose between CD, OF boot, MacOS or Linux; * Kernel Boot Timeout: this timeout is similar to the LILO boot delay. After selecting Linux, you will have this delay in 0.1 second before your default kernel description is selected; * Enable CD Boot?: checking this option allows you to choose ``C'' for CD at the first boot prompt; * Enable OF Boot?: checking this option allows you to choose ``N'' for Open Firmware at the first boot prompt; * Default OS: you can select which OS will boot by default when the Open Firmware Delay expires."), summary => N_("Here are presented various parameters concerning your machine. Depending on your installed hardware, you may (or may not), see the following entries: * \"Mouse\": check the current mouse configuration and click on the button to change it if necessary; * \"Keyboard\": check the current keyboard map configuration and click on the button to change that if necessary; * \"Timezone\": DrakX, by default, guesses your time zone from the language you have chosen. But here again, as for the choice of a keyboard, you may not be in the country for which the chosen language should correspond. Hence, you may need to click on the \"Timezone\" button in order to configure the clock according to the time zone you are in; * \"Printer\": clicking on the \"No Printer\" button will open the printer configuration wizard. Consult the correpsonding chapter of the ``Starter Guide'' for more information on how to setup a new printer. The interface presented there is similar to the one used at installation time; * \"Sound card\": if a sound card is detected on your system, it will be displayed here. * \"TV card\": if a TV card is detected on your system, it will be displayed here. * \"ISDN card\": if an ISDN card is detected on your system, it will be displayed here. You can click on the button to change the parameters associated to it."), takeOverHdChoose => N_("Choose the hard drive you want to erase in order to install your new Mandrake Linux partition. Be careful, all data present on it will be lost and will not be recoverable!"), takeOverHdConfirm => N_("Click on \"OK\" if you want to delete all data and partitions present on this hard drive. Be careful, after clicking on \"OK\", you will not be able to recover any data and partitions present on this hard drive, including any Windows data. Click on \"Cancel\" to stop this operation without losing any data and partitions present on this hard drive."), );