summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-sysadm/2011-February/002673.html
blob: 96a919dfb4ed0d4759d0dae98d6f69bda2bc067f (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
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
 <HEAD>
   <TITLE> [Mageia-sysadm] [502] Import rescue
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B502%5D%20Import%20rescue&In-Reply-To=%3C20110209233033.6A5F3406AC%40valstar.mageia.org%3E">
   <META NAME="robots" CONTENT="index,nofollow">
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="002672.html">
   <LINK REL="Next"  HREF="002678.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[Mageia-sysadm] [502] Import rescue</H1>
    <B>root at mageia.org</B> 
    <A HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B502%5D%20Import%20rescue&In-Reply-To=%3C20110209233033.6A5F3406AC%40valstar.mageia.org%3E"
       TITLE="[Mageia-sysadm] [502] Import rescue">root at mageia.org
       </A><BR>
    <I>Thu Feb 10 00:30:33 CET 2011</I>
    <P><UL>
        <LI>Previous message: <A HREF="002672.html">[Mageia-sysadm] [501] manbo is dead (2)
</A></li>
        <LI>Next message: <A HREF="002678.html">[Mageia-sysadm] Login blacklist on identity
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#2673">[ date ]</a>
              <a href="thread.html#2673">[ thread ]</a>
              <a href="subject.html#2673">[ subject ]</a>
              <a href="author.html#2673">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>Revision: 502
Author:   pterjan
Date:     2011-02-10 00:30:32 +0100 (Thu, 10 Feb 2011)
Log Message:
-----------
Import rescue

Added Paths:
-----------
    drakx/trunk/rescue/
    drakx/trunk/rescue/.perl_checker
    drakx/trunk/rescue/Makefile
    drakx/trunk/rescue/NEWS
    drakx/trunk/rescue/aliases
    drakx/trunk/rescue/devices.pl
    drakx/trunk/rescue/dirs
    drakx/trunk/rescue/diskdrake-resize
    drakx/trunk/rescue/drvinst
    drakx/trunk/rescue/guessmounts
    drakx/trunk/rescue/install_bootloader
    drakx/trunk/rescue/list.xml
    drakx/trunk/rescue/lsparts
    drakx/trunk/rescue/make_flash_rescue
    drakx/trunk/rescue/make_partimage_save_rest_all
    drakx/trunk/rescue/make_rescue_img
    drakx/trunk/rescue/partimage_whole_disk
    drakx/trunk/rescue/rescue-doc
    drakx/trunk/rescue/restore-image-lib.sh
    drakx/trunk/rescue/restore-image.sh
    drakx/trunk/rescue/restore_ms_boot
    drakx/trunk/rescue/tree/
    drakx/trunk/rescue/tree/bin/
    drakx/trunk/rescue/tree/bin/insmod
    drakx/trunk/rescue/tree/bin/login
    drakx/trunk/rescue/tree/etc/
    drakx/trunk/rescue/tree/etc/fstab
    drakx/trunk/rescue/tree/etc/group
    drakx/trunk/rescue/tree/etc/host.conf
    drakx/trunk/rescue/tree/etc/hosts
    drakx/trunk/rescue/tree/etc/inittab
    drakx/trunk/rescue/tree/etc/issue
    drakx/trunk/rescue/tree/etc/passwd
    drakx/trunk/rescue/tree/etc/profile
    drakx/trunk/rescue/tree/etc/rc.reboot
    drakx/trunk/rescue/tree/etc/rc.sysinit
    drakx/trunk/rescue/tree/etc/resolv.conf
    drakx/trunk/rescue/tree/ka/
    drakx/trunk/rescue/tree/sbin/
    drakx/trunk/rescue/tree/sbin/fakeshutdown
    drakx/trunk/rescue/tree/sbin/modprobe
    drakx/trunk/rescue/tree/usr/
    drakx/trunk/rescue/tree/usr/lib/
    drakx/trunk/rescue/tree/usr/lib/CVS.
    drakx/trunk/rescue/tree/usr/share/
    drakx/trunk/rescue/tree/usr/share/symlinks

Added: drakx/trunk/rescue/.perl_checker
===================================================================
--- drakx/trunk/rescue/.perl_checker	                        (rev 0)
+++ drakx/trunk/rescue/.perl_checker	2011-02-09 23:30:32 UTC (rev 502)
@@ -0,0 +1,39 @@
+bytes
+constant
+AutoLoader
+Carp::Heavy
+Compress::Zlib
+Config::IniFiles
+Convert::ASN1
+Cwd
+Date::Manip
+Digest::MD5
+Encode
+encoding
+feature
+File::Basename
+File::Find
+File::FnMatch
+File::GlobMapper
+File::Path
+File::Temp
+Gtk2::Gdk::Keysyms
+IO::Compress::Gzip
+IO::Handle
+IO::Socket::SSL
+IO::Socket::UNIX
+IO::Uncompress::Gunzip
+Net::DBus::Binding::Introspector
+Net::DBus::Binding::Iterator
+Net::DBus::Test::MockIterator
+Net::LDAP
+Net::LDAP::Constant
+Net::LDAP::Control
+Net::LDAP::Filter
+Net::LDAP::Schema
+Net::LDAP::Util
+Scalar::Util
+String::ShellQuote
+Term::ReadKey
+Text::ParseWords
+Time::ZoneInfo

Added: drakx/trunk/rescue/Makefile
===================================================================
--- drakx/trunk/rescue/Makefile	                        (rev 0)
+++ drakx/trunk/rescue/Makefile	2011-02-09 23:30:32 UTC (rev 502)
@@ -0,0 +1,26 @@
+include ../Makefile.config
+
+VERSION=1.21
+PRODUCT=drakx-installer-rescue
+
+RESCUE = rescue.sqfs
+
+all: $(RESCUE)
+
+install: $(RESCUE)
+	cp -f $&lt; $(STAGE2_DEST)
+
+$(RESCUE): list.xml drvinst guessmounts lsparts rescue-doc make_rescue_img
+	DISTRIB_DESCR=$(DISTRIB_DESCR) ./make_rescue_img
+
+tar:
+	rm -rf $(PRODUCT)*.tar* $(PRODUCT)-$(VERSION)
+	mkdir -p $(PRODUCT)-$(VERSION)/tools
+	svn export -q -rBASE . $(PRODUCT)-$(VERSION)/rescue
+	cp ../Makefile.config $(PRODUCT)-$(VERSION)/
+	cp ../tools/install-xml-file-list $(PRODUCT)-$(VERSION)/tools
+	tar cfj $(PRODUCT)-$(VERSION).tar.bz2 $(PRODUCT)-$(VERSION)
+	rm -rf $(PRODUCT)-$(VERSION)
+
+clean: 
+	rm -f $(RESCUE) kernel_read_part


Property changes on: drakx/trunk/rescue/Makefile
___________________________________________________________________
Added: svn:eol-style
   + native

Added: drakx/trunk/rescue/NEWS
===================================================================
--- drakx/trunk/rescue/NEWS	                        (rev 0)
+++ drakx/trunk/rescue/NEWS	2011-02-09 23:30:32 UTC (rev 502)
@@ -0,0 +1,102 @@
+- include /etc/netconfig (needed by mount.nfs)
+
+Version 1.18 - 13 April 2010, by Olivier &quot;blino&quot; Blin
+
+- image restore script: use blkid instead of deprecated vol_id
+
+Version 1.17 - 12 April 2010, by Olivier &quot;blino&quot; Blin
+
+- Handle LVM (#44723)
+- image restore script: handle hybrid images (by matching main device)
+
+Version 1.16 - 9 October 2009, by Olivier &quot;blino&quot; Blin
+
+- work both with squashfs 3 and 4
+- image restore script (from Paulo Ricardo Zanoni):
+  o re-read partition table after writing image
+  o do not extend / to the end of the disk, it overlaps with swap
+    partition
+- do not make de-latin1 keymap a symlink/include loop (#45109)
+- use extipl from /usr/lib/extipl on x86_64 too
+  (to fix restore_ms_boot, hardcoding this path)
+
+Version 1.15 - 3 September 2009, by Thierry Vignaud
+
+- add back dumpe2fs
+- run /oem-rescue.sh if oem option is present on cmdline
+- allow to specify main partition in the restore config file
+  (MAIN_PART_NUMBER), if there is a restore partition at beginning of
+  disk
+- load ext4 module (#48816)
+- use blkid instead of vol_id which we no longer ship
+
+Version 1.14 - 27 May 2009, by Olivier &quot;blino&quot; Blin
+
+- adapt to new extipl location in x86_64
+- adapt to new magic.mgc location
+
+Version 1.13 - 27 May 2009, by Olivier &quot;blino&quot; Blin
+
+- include various commands
+- image restore script:
+  o better estimate of image dump progression
+  o fix detecting multiple partitions to avoid win32 detection
+  o fix guessing extension when filename contains a dot
+
+Version 1.12 - 20 February 2009, by Olivier &quot;blino&quot; Blin
+
+- image restore script:
+  o add swap partition
+  o use a minimum size for disks to be detected (Caio)
+  o resize Windows partitions if needed (Caio)
+- Flash rescue:
+  o add support for Flash 2009
+  o try to load squashfs-lzma too
+  o handle path to lzma distrib loopbacks
+- fix build:
+  o do not include dead parsehdlist
+  o do not include dead rpm helpers
+
+Version 1.11 - 25 September 2008, by Olivier &quot;blino&quot; Blin
+
+- add image restoration scripts (&quot;restore&quot; command line parameter)
+
+Version 1.10 - 25 April 2008, by Olivier &quot;blino&quot; Blin
+
+- fix &quot;Mounting other partitions from fstab&quot; which use UUID=xxx
+- fix build with latest file package, which only includes the
+  precompiled magic file
+
+Version 1.9 - 10 March 2008, by Olivier &quot;blino&quot; Blin
+
+- handle ntfs-3g in fstab
+- add missing modalias files (#38690)
+
+Version 1.8 - 28 February 2008, by Olivier &quot;blino&quot; Blin
+
+- support new modules location (#38207)
+- adapt to perl 5.10
+- fix build (fix a workaround in partimage_whole_disk)
+
+Version 1.7 - 25 September 2007, by Pascal &quot;Pixel&quot; Rigaux
+
+- add mount.nfs binary (since mount doesn't handle nfs fs anymore)
+
+Version 1.6 - 8 August 2007, by Pascal &quot;Pixel&quot; Rigaux
+
+- adapt to new libldetect together with drakx-installer-images 1.13
+- loadkeys file:
+  o handle new &quot;kbd&quot; rpm which have .map files instead of .kmap
+  o don't skip fr_CH-latin1
+  o handle &quot;fr_CH&quot;-like short names
+- remove rescuept (use testdisk instead, which is much nicer)
+
+Version 1.5 - 9 July 2007, by Pascal &quot;Pixel&quot; Rigaux
+
+- add /etc/mke2fs.conf in order to format ext3fs with 4k blocks (#27377)
+- add &quot;mkfs.ext3&quot; which is no more equivalent to &quot;mkfs.ext2 -J&quot;
+  (eg: dir_index &amp; resize_inode features)
+
+Version 1.4 - 4 April 2007, by Pascal &quot;Pixel&quot; Rigaux
+
+- zcat and gunzip can't be symlinks anymore, they are scripts

Added: drakx/trunk/rescue/aliases
===================================================================
--- drakx/trunk/rescue/aliases	                        (rev 0)
+++ drakx/trunk/rescue/aliases	2011-02-09 23:30:32 UTC (rev 502)
@@ -0,0 +1,2 @@
+/bin/vi vim-minimal
+/lib/modules /modules

Added: drakx/trunk/rescue/devices.pl
===================================================================
--- drakx/trunk/rescue/devices.pl	                        (rev 0)
+++ drakx/trunk/rescue/devices.pl	2011-02-09 23:30:32 UTC (rev 502)
@@ -0,0 +1,55 @@
+#!/usr/bin/perl
+
<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">+ at ARGV</A> == 1 &amp;&amp; chdir $ARGV[0] or die &quot;usage: devices.pl &lt;dir&gt;\n&quot;;
+
+foreach (&lt;DATA&gt;) {
+    chomp;
+    my ($typ, $maj, $min, @l) = split;
+    foreach (@l) {
+	my @l2 = do {
+	    if (my ($prefix, $ini, $end) = /(.*)(\d+)-(\d+)$/) {
+		map { &quot;$prefix$_&quot; } $ini .. $end;
+	    } else {
+		$_;
+	    }
+	};
+	foreach (@l2) {
+	    my $cmd = &quot;mknod-m600 $_ $typ $maj &quot; . $min++;
+	    system($cmd) == 0 or die &quot;$cmd failed\n&quot;;
+	}
+    }
+}
+
+__DATA__
+c   5   1 console
+b   2   0 fd0-1
+c   1   2 kmem
+b   7   0 loop0-15
+c   1   1 mem
+c   1   3 null
+c   1   4 port
+b   1   1 ram
+b   1   0 ram0-19
+b   1   0 ramdisk
+c   1   8 random
+b  11   0 scd0-7
+c   0   0 stderr
+c   0   0 stdin
+c   0   0 stdout
+c   5   0 tty
+c   4   0 tty0-9
+c   4  64 ttyS0-3
+c   1   9 urandom
+c   1   5 zero
+b   3   0 hda hda1-16
+b   3  64 hdb hdb1-16
+b  22   0 hdc hdc1-16
+b  22  64 hdd hdd1-16
+b  33   0 hde hde1-16
+b  33  64 hdf hdf1-16
+b  34   0 hdg hdg1-16
+b  34  64 hdh hdh1-16
+b   8   0 sda sda1-15 sdb sdb1-15 sdc sdc1-15 sdd sdd1-15 sde sde1-15 sdf sdf1-15 sdg sdg1-15 sdh sdh1-15
+b   9   0 md0-15
+c  10 144 nvram
+c   9   0 st0-15

Added: drakx/trunk/rescue/dirs
===================================================================
--- drakx/trunk/rescue/dirs	                        (rev 0)
+++ drakx/trunk/rescue/dirs	2011-02-09 23:30:32 UTC (rev 502)
@@ -0,0 +1,6 @@
+/lib
+/tmp
+/modules
+/proc
+/dev
+/dev/pts

Added: drakx/trunk/rescue/diskdrake-resize
===================================================================
--- drakx/trunk/rescue/diskdrake-resize	                        (rev 0)
+++ drakx/trunk/rescue/diskdrake-resize	2011-02-09 23:30:32 UTC (rev 502)
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+
+use lib qw(/usr/lib/libDrakX);
+
+use devices;
+use log;
+use resize_fat::main;
+use diskdrake::resize_ntfs;
+use diskdrake::resize_ext2;
+
+my ($device, $fs_type, $size) = @ARGV
+  or die &quot;usage: $0 &lt;device&gt; &lt;fs type&gt; &lt;size&gt;\n&quot;;
+
+my %fs_pkgs = (
+    vfat =&gt; 'resize_fat::main',
+    ntfs =&gt; 'diskdrake::resize_ntfs',
+    ext2 =&gt; 'diskdrake::resize_ext2',
+    ext3 =&gt; 'diskdrake::resize_ext2',
+);
+
+my $resize_pkg = $fs_pkgs{$fs_type}
+  or die &quot;no support for $fs_type type\n&quot;;
+
+log::l(&quot;resizing $device to $size&quot;);
+
+my $resize = $resize_pkg-&gt;new($device, devices::make($device))
+  or die &quot;unable to initialize resize\n&quot;;
+$resize-&gt;resize($size);


Property changes on: drakx/trunk/rescue/diskdrake-resize
___________________________________________________________________
Added: svn:executable
   + *

Added: drakx/trunk/rescue/drvinst
===================================================================
--- drakx/trunk/rescue/drvinst	                        (rev 0)
+++ drakx/trunk/rescue/drvinst	2011-02-09 23:30:32 UTC (rev 502)
@@ -0,0 +1,47 @@
+#!/usr/bin/perl
+#
+# Guillaume Cottenceau
+#
+# Copyright 2000-2005 Mandriva
+#
+# This software may be freely redistributed under the terms of the GNU
+# public license.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+use lib qw(/usr/lib/libDrakX);
+use common;
+use detect_devices;
+
+$ARGV[0] =~ /^--?h/ and die &quot;usage: drivers_install [drivertype1 [drivertype2 ...]]\n&quot;;
+my @types = @ARGV;
+
+sub install_module_raw {
+    my ($driver, $o_descr) = @_;
+    print STDERR &quot;Installing driver $driver&quot;, $o_descr ? &quot; (for \&quot;$o_descr\&quot;)&quot; : '', &quot;\n&quot;;
+    system(&quot;/sbin/modprobe&quot;, $driver) and print &quot;\tfailed\n&quot;;
+}
+
+my $already_usb;
+sub install_module {
+    my ($driver, $descr) = @_;
+    install_module_raw($driver, $descr);
+    if (!$already_usb &amp;&amp; $driver =~ /usb/) {
+	$already_usb = 1;
+	install_module_raw('usbkbd');
+	install_module_raw('keybdev');
+    }
+}
+
+#- start
+foreach my $card (detect_devices::pci_probe()) {
+    $card-&gt;{driver} eq 'unknown' || $card-&gt;{driver} =~ /:/ and next;
+    $card-&gt;{media_type} eq &quot;DISPLAY_VGA&quot; and next;
+
+    if (!@ARGV || find { $card-&gt;{media_type} =~ /$_/i } @types) {
+	install_module($card-&gt;{driver}, $card-&gt;{description});
+    }
+}


Property changes on: drakx/trunk/rescue/drvinst
___________________________________________________________________
Added: svn:executable
   + *

Added: drakx/trunk/rescue/guessmounts
===================================================================
--- drakx/trunk/rescue/guessmounts	                        (rev 0)
+++ drakx/trunk/rescue/guessmounts	2011-02-09 23:30:32 UTC (rev 502)
@@ -0,0 +1,100 @@
+#!/usr/bin/perl
+#
+# Guillaume Cottenceau
+#
+# Copyright 2001-2005 Mandriva
+#
+# This software may be freely redistributed under the terms of the GNU
+# public license.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+use lib qw(/usr/lib/libDrakX);
+use common;
+use fs;
+use fs::proc_partitions;
+use fs::type;
+use lvm;
+use run_program;
+
+my @proc_mounts = fs::read_fstab('', '/proc/mounts');
+
+my $target = '/mnt';
+
+if (fs::get::mntpoint2part($target, \@proc_mounts)) {
+    print STDERR &quot;$target is already mounted (according to /proc/mounts)\n&quot;;
+    exit 0;
+}
+
+system('drvinst', 'STORAGE');
+
+print STDERR &quot;\nPlease wait, trying to find your root device...\n&quot;;
+
+mkdir_p($target);
+
+lvm::detect_during_install();
+
+my @parts = map {
+    $_-&gt;{device} = delete $_-&gt;{dev};
+    put_in_hash($_, fs::type::type_subpart_from_magic($_));   
+} fs::proc_partitions::read_raw();
+my ($raid_parts, $normal_parts) = partition { isRawRAID($_) } @parts;
+
+if (@$raid_parts) {
+    require raid;
+    raid::detect_during_install_once(@$raid_parts);
+    my $raids = raid::get_existing(@$raid_parts);
+    push @$normal_parts, @$raids;
+}
+
+my @fstab;
+my $root;
+
+foreach (@$normal_parts) {
+    my $dev = devices::make($_-&gt;{device});
+
+    my $fs = find {
+	system(&quot;mount -t $_ $dev $target 2&gt;/dev/null&quot;) == 0;
+    } fs::type::true_local_fs_types() or next;
+
+    if (my $release_file = common::release_file($target)) {
+	print STDERR &quot;=&gt; found a %s root partition on $dev\n=&gt; type $fs, version `&quot;,
+	  chomp_(cat_(&quot;$target$release_file&quot;)), &quot;'\n&quot;;
+	@fstab = fs::read_fstab($target, '/etc/fstab');
+	$root = $dev;
+	last;
+    } else {
+	system('umount', $target) == 0 or die &quot;error unmounting $target\n&quot;;
+    }
+}
+
+if ($root) {
+    print STDERR &quot;\nMounting other partitions from fstab on $target...\n&quot;;
+    foreach (@fstab) {
+	my ($valued_options, $options) = fs::mount_options::unpack($_);
+
+	next if 
+	  !$_-&gt;{fs_type} || $_-&gt;{device} eq 'none'
+	    || $valued_options-&gt;{noauto}
+	    || $_-&gt;{mntpoint} eq '/'
+	    || member($_-&gt;{fs_type}, 'swap', 'nfs', 'ntfs', 'ntfs-3g');
+
+	delete $valued_options-&gt;{'iocharset='};
+	delete $valued_options-&gt;{'codepage='};
+	fs::mount_options::pack($_, $valued_options, $options); #- vfat opts, we don't have the modules in rescue
+
+	my $where = &quot;$target$_-&gt;{mntpoint}&quot;;
+	my $dev = fs::wild_device::from_part('', $_);
+	mkdir_p($where);
+	print STDERR &quot;\t$dev on $where type $_-&gt;{fs_type} options $_-&gt;{options}\n&quot;;
+	system(&quot;mount -t $_-&gt;{fs_type} $dev $where -o $_-&gt;{options}&quot;);
+	system(&quot;cp -f /etc/mtab $target/etc/mtab&quot;); #- to allow a nice chrooted &quot;mount&quot; or &quot;df&quot;
+    }
+    print STDERR &quot;\nYour system is ready on $target.\n\n&quot;;
+} else {
+    die &quot;Could not find your root device :-(.\n&quot;;
+}
+


Property changes on: drakx/trunk/rescue/guessmounts
___________________________________________________________________
Added: svn:executable
   + *

Added: drakx/trunk/rescue/install_bootloader
===================================================================
--- drakx/trunk/rescue/install_bootloader	                        (rev 0)
+++ drakx/trunk/rescue/install_bootloader	2011-02-09 23:30:32 UTC (rev 502)
@@ -0,0 +1,69 @@
+#!/usr/bin/perl
+#
+# Guillaume Cottenceau
+#
+# Copyright 2001-2005 Mandriva
+#
+# This software may be freely redistributed under the terms of the GNU
+# public license.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+use lib qw(/usr/lib/libDrakX);
+use common;
+use bootloader;
+use fs;
+
+if ($ARGV[0] eq '--auto') {
+    $auto = shift @ARGV;
+}
+
+$::prefix = '/mnt';
+
+my $release = common::mandrake_release($::prefix) || 
+  do {
+      system('guessmounts') == 0 or die 'guessmounts failed';
+      common::mandrake_release($::prefix);
+  };
+
+if ($release) {
+    $release =~ /Mageia|Mandriva/ or die &quot;release file doesn't contain '%s', exiting.\n&quot;;
+} elsif (fs::get::mntpoint2part($::prefix, [ fs::read_fstab('', '/proc/mounts') ])) {
+    die &quot;unknown distribution mounted in $::prefix\n&quot;;
+} else {
+    die &quot;Your root device isn't mounted on $::prefix\n&quot;;
+}
+
+my @main_methods = bootloader::configured_main_methods();
+
+my $main_method;
+if (@main_methods == 0) {
+    die &quot;Cannot find a configured boot loader\n&quot;;
+} elsif (@main_methods == 1) {
+    ($main_method) = @main_methods;
+} else {
+    while (1) {
+	print &quot;Configuration files for Boot Loaders &quot;, join(' and ', @main_methods), &quot; were found.\n&quot;;
+	print &quot;Which one one should be installed? &quot;;
+	chomp($main_method = &lt;STDIN&gt;);
+	if (member($main_method, @main_methods)) {
+	    last;
+	} else {
+	    print &quot;bad choice\n&quot;;
+	}
+    }
+}
+
+my $install = $bootloader::{'install_raw_' . $main_method} or die &quot;unknown bootloader method install_raw_$main_method\n&quot;;
+
+print &quot;About to re-install Boot Loader $main_method of following %s distribution:\n\t&quot;,
+  $release, &quot;\n&quot;;
+if (!$auto) {
+    print &quot;=&gt; ok? &lt;press Enter to continue, 'n' and Enter to cancel&gt; &quot;;
+    &lt;STDIN&gt; =~ /^n/i and exit 0;
+}
+
+$install-&gt;();


Property changes on: drakx/trunk/rescue/install_bootloader
___________________________________________________________________
Added: svn:executable
   + *

Added: drakx/trunk/rescue/list.xml
===================================================================
--- drakx/trunk/rescue/list.xml	                        (rev 0)
+++ drakx/trunk/rescue/list.xml	2011-02-09 23:30:32 UTC (rev 502)
@@ -0,0 +1,348 @@
+&lt;list no-arch-libraries=&quot;on&quot;&gt;
+
+&lt;from expand=&quot;binary&quot;&gt;
+  bash sh
+
+  false true
+  pwd reset
+
+  ls
+  cp ln mkdir mknod mv rm rmdir   
+  chmod chown
+  dd touch
+
+  cat less
+  tail head tee
+  sort split cut
+  grep
+
+  cmp diff
+  find
+  file md5sum
+
+  gzip zcat gunzip
+  bzip2 bunzip2 bzcat
+
+  df du
+
+  packdrake
+  cpio ftp tar
+  rsync
+  ssh scp
+  telnet
+  host
+
+  date
+  dmesg
+  chroot
+  sleep
+  sync
+
+  eject
+  mount mount.nfs umount
+  losetup
+
+  ldconfig
+  mingetty init
+  reboot halt shutdown
+  kill killall5 ps strace
+  sed tr
+  strings
+
+  loadkeys tset stty
+
+  ping hostname ifconfig route
+
+  fdformat badblocks
+  mkswap swapoff swapon
+  e2fsck fsck.ext2 fsck.ext3 fsck.ext4
+  mke2fs mkfs.ext2 mkfs.ext3 mkfs.ext4 
+  dumpe2fs tune2fs resize2fs debugfs
+
+  mkfs.reiserfs resize_reiserfs reiserfstune reiserfsck
+  mkfs.xfs xfs_admin xfs_repair fsck.xfs
+  mkfs.ntfs mkdosfs dosfslabel mkntfs ntfsresize ntfslabel 
+  &lt;if ARCH=&quot;i.86|x86_64&quot;&gt;
+    mkfs.jfs fsck.jfs jfs_tune
+  &lt;/if&gt;
+  quotacheck
+  cryptsetup dmsetup
+
+  &lt;if ARCH=&quot;ppc&quot;&gt;
+    hformat
+  &lt;/if&gt;
+
+  &lt;if-not ARCH=&quot;ppc&quot;&gt;
+    fdisk gpart
+    testdisk photorec
+  &lt;/if-not&gt;
+
+  &lt;if-not ARCH=&quot;ppc|sparc&quot;&gt;
+    sfdisk
+  &lt;/if-not&gt;
+                     
+  &lt;if ARCH=&quot;ppc&quot;&gt;
+    pdisk 
+  &lt;/if&gt;
+  dump dump.ext2 restore restore.ext2 dump.ext3 restore.ext3 dump.xfs restore.xfs
+  parted partimage
+
+  mdadm lvm2
+  mdmon kpartx
+  dmevent_tool
+  dmeventd
+  &lt;if ARCH=&quot;i.86|x86_64|ia64&quot;&gt;
+    dmraid
+  &lt;/if&gt;
+
+  lsmod
+  insmod
+  rmmod
+
+  setserial
+  mt stinit
+
+  lspci lspcidrake
+
+  rpm
+  rpm2cpio rpmdb
+  rpmquery rpmverify
+
+  vim-minimal hexedit
+
+  perl
+  uniq
+  wget
+
+  awk clear dialog wc
+  setterm
+
+  &lt;if ARCH=&quot;i.86|x86_64|ia64&quot;&gt;
+    dmidecode 
+  &lt;/if&gt;
+
+  &lt;if ARCH=&quot;i.86|x86_64&quot;&gt;
+    grub grub-install
+  &lt;/if&gt;
+  &lt;if ARCH=&quot;ia64&quot;&gt;
+    efibootmgr 
+  &lt;/if&gt;
+  &lt;if ARCH=&quot;ppc&quot;&gt;
+    ybin
+    mkofboot ofpath
+    nvsetenv
+  &lt;/if&gt;
+  &lt;if ARCH=&quot;sparc&quot;&gt;
+    silo
+  &lt;/if&gt;
+&lt;/from&gt;
+
+&lt;from&gt;
+  /usr/lib/kbd/keymaps/include
+  &lt;if ARCH=&quot;i.86|x86_64&quot;&gt;    
+    /usr/lib/kbd/keymaps/i386/include
+    /usr/lib/kbd/keymaps/i386/azerty/be-latin1.map.gz &lt;!-- this one is needed by be2-latin1 --&gt;
+  &lt;/if&gt;
+  /usr/share/misc/magic.mgc
+  /usr/share/terminfo/l/linux
+  /usr/share/pci.ids
+  /var/run/utmp
+
+  &lt;if ARCH=&quot;i.86|x86_64&quot;&gt;    
+    &lt;from dir=&quot;/lib/grub/ARCH-mageia&quot; expand=&quot;glob&quot;&gt;
+      stage1
+      stage2
+      *_stage1_5
+    &lt;/from&gt;
+    /usr/lib/extipl/aldebaran.bin
+  &lt;/if&gt;
+
+  &lt;if ARCH=&quot;ppc&quot;&gt;
+    /usr/lib/yaboot/ofboot
+    /usr/lib/yaboot/yaboot    
+  &lt;/if&gt;
+
+  &lt;from expand=&quot;command&quot;&gt;
+    perl -Mkeyboard -I/usr/lib/libDrakX -le 'print foreach keyboard::loadkeys_files()'
+  &lt;/from&gt;
+
+  &lt;if set=&quot;LANGUAGE_fr_FR&quot;&gt;
+    /usr/lib/gconv/gconv-modules
+    /usr/lib/gconv/ISO8859-15.so
+    /usr/share/locale/ISO-8859-15
+    /usr/share/locale/fr_FR
+    /usr/share/locale/fr/LC_MESSAGES/partimage.mo
+  &lt;/if&gt;
+  &lt;if set=&quot;LANGUAGE_pt_BR&quot;&gt;
+    /usr/lib/gconv/gconv-modules
+    /usr/lib/gconv/ISO8859-15.so
+    /usr/share/locale/ISO-8859-15
+    /usr/share/locale/pt_BR
+    /usr/share/locale/pt/LC_MESSAGES/partimage.mo
+  &lt;/if&gt;
+  &lt;!-- needed by mlabel used during Flash upgrades --&gt;
+  /usr/lib/gconv/IBM850.so
+
+
+  /sbin/mount.ntfs-3g &lt;!-- can not be expanded as binary, not executable for all users --&gt;
+  /sbin/blkid
+&lt;/from&gt;
+
+&lt;from dir=&quot;/usr/lib/rpm&quot; expand=&quot;glob&quot;&gt;
+  &lt;mode copy=&quot;keep-links&quot;&gt;
+    rpmrc
+    macros
+    rpmpopt-*
+  &lt;/mode&gt;
+&lt;/from&gt;
+
+&lt;filter subst=&quot;/^__END__/ and $_ = '', close ARGV&quot;&gt;
+&lt;from expand=&quot;main-perl&quot;&gt;
+  AutoLoader.pm
+  strict.pm
+  vars.pm
+  warnings/register.pm
+  warnings.pm
+  Carp.pm
+  Exporter.pm
+  File/Path.pm
+  File/Basename.pm
+  ARCH-linux-thread-multi/re.pm
+  ARCH-linux-thread-multi/Cwd.pm
+  ARCH-linux-thread-multi/auto/Cwd/Cwd.so
+  ARCH-linux-thread-multi/CORE/libperl.so
+  ARCH-linux-thread-multi/auto/POSIX/autosplit.ix
+  ARCH-linux-thread-multi/auto/POSIX/load_imports.al
+  ARCH-linux-thread-multi/auto/POSIX/POSIX.so
+  ARCH-linux-thread-multi/POSIX.pm
+  ARCH-linux-thread-multi/XSLoader.pm
+  ARCH-linux-thread-multi/lib.pm
+  ARCH-linux-thread-multi/Socket.pm
+  ARCH-linux-thread-multi/IO/Socket.pm

@@ Diff output truncated at 20000 characters. @@
-------------- next part --------------
An HTML attachment was scrubbed...
URL: &lt;/pipermail/mageia-sysadm/attachments/20110210/4504d0b9/attachment-0001.html&gt;
</PRE>
















<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="002672.html">[Mageia-sysadm] [501] manbo is dead (2)
</A></li>
	<LI>Next message: <A HREF="002678.html">[Mageia-sysadm] Login blacklist on identity
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#2673">[ date ]</a>
              <a href="thread.html#2673">[ thread ]</a>
              <a href="subject.html#2673">[ subject ]</a>
              <a href="author.html#2673">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-sysadm">More information about the Mageia-sysadm
mailing list</a><br>
</body></html>