summaryrefslogtreecommitdiffstats
path: root/docs/README
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2001-03-29 22:47:09 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2001-03-29 22:47:09 +0000
commit84adb9036e99bc2e7560135694197b9312faa9e6 (patch)
treedfdc79ddfc972f2167c67ff96af51fbec5a7518c /docs/README
parent094971eecb7a5df84b325de8c6ae46e88fc1f0ea (diff)
downloaddrakx-backup-do-not-use-84adb9036e99bc2e7560135694197b9312faa9e6.tar
drakx-backup-do-not-use-84adb9036e99bc2e7560135694197b9312faa9e6.tar.gz
drakx-backup-do-not-use-84adb9036e99bc2e7560135694197b9312faa9e6.tar.bz2
drakx-backup-do-not-use-84adb9036e99bc2e7560135694197b9312faa9e6.tar.xz
drakx-backup-do-not-use-84adb9036e99bc2e7560135694197b9312faa9e6.zip
support more than one boot kernel :-)
Diffstat (limited to 'docs/README')
-rw-r--r--docs/README7
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/README b/docs/README
index 7cbdd66c0..71b23c84d 100644
--- a/docs/README
+++ b/docs/README
@@ -193,7 +193,7 @@ For pcmcia, it depends on the type of install.
********************************************************************************
Modules can be found in at least 2 places:
- in /modules/modules.mar
-- in /lib/modules.cz2
+- in /lib/modules.cz<KERNEL_VERSION_RELEASE>
/modules/modules.mar is used in mdk-stage1. It contains only modules
interesting for one kind of install. For example in an hd install, it
@@ -202,7 +202,8 @@ modules. (To create, extract or view files in a ``mar'' archive, please
use gi/mdk-stage1/mar/mar; this is basically an archive format meant to
be minimalistic)
-/lib/modules.cz2 contains every module, it is used in stage2.
+/lib/modules.cz<KERNEL_VERSION_RELEASE> contains all modules, it is used
+in stage2.
To install a module, use modprobe which is in /usr/bin. It's a perl wrapper
@@ -210,7 +211,7 @@ around /usr/bin/insmod. It uses the dependencies found in
/modules/modules.dep (stage1).
/usr/bin/insmod is a wrapper around /usr/bin/insmod_. It just extracts the
-module out of /lib/modules.cz2 in /tmp. Then it calls insmod_.
+module out of /lib/modules.cz in /tmp. Then it calls insmod_.
/usr/bin/insmod_ is the real prog (which you usually find in /sbin/). You need
to give it the complete path.
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
package install2; # $Id$

use diagnostics;
use strict;
use vars qw($o $version);

#-######################################################################################
#- misc imports
#-######################################################################################
use steps;
use common;
use install_any qw(:all);
use install_steps;
use install_any;
use lang;
use keyboard;
use mouse;
use fsedit;
use devices;
use partition_table qw(:types);
use modules;
use detect_devices;
use run_program;
use any;
use log;
use fs;
#-$::corporate=1;


#-#######################################################################################
#-$O
#-the big struct which contain, well everything (globals + the interactive methods ...)
#-if you want to do a kickstart file, you just have to add all the required fields (see for example
#-the variable $default)
#-#######################################################################################
$o = $::o = {
#    bootloader => { linear => 0, message => 1, timeout => 5, restricted => 0 },
#-    packages   => [ qw() ],
    partitioning => { clearall => 0, eraseBadPartitions => 0, auto_allocate => 0 }, #-, readonly => 0 },
    authentication => { md5 => 1, shadow => 1 },
    locale         => { lang => 'en_US' },
#-    isUpgrade    => 0,
    toRemove     => [],
    toSave       => [],
#-    simple_themes => 1,

    timezone => {
#-                   timezone => "Europe/Paris",
#-                   UTC      => 1,
                },
#-    superuser => { password => 'a', shell => '/bin/bash', realname => 'God' },
#-    user => { name => 'foo', password => 'bar', home => '/home/foo', shell => '/bin/bash', realname => 'really, it is foo' },

#-    keyboard => 'de',
#-    display => "192.168.1.19:1",
    steps        => \%steps::installSteps,
    orderedSteps => \@steps::orderedInstallSteps,

#- for the list of fields available for user and superuser, see @etc_pass_fields in install_steps.pm
#-    intf => { eth0 => { DEVICE => "eth0", IPADDR => '1.2.3.4', NETMASK => '255.255.255.128' } },

    netc => {},
    intf => {},
             
#-step : the current one
#-prefix
#-mouse
#-keyboard
#-netc
#-methods
#-packages compss
#-printer haveone entry(cf printer.pm)

};


sub installStepsCall {
    my ($o, $auto, $fun, @args) = @_;
    $fun = "install_steps::$fun" if $auto;
    $o->$fun(@args);
}

#-######################################################################################
#- Steps Functions
#- each step function are called with two arguments : clicked(because if you are a
#- beginner you can force the the step) and the entered number
#-######################################################################################

#------------------------------------------------------------------------------
sub selectLanguage {
    my ($_clicked, $ent_number, $auto) = @_;

    installStepsCall($o, $auto, 'selectLanguage', $ent_number == 1);
}

sub acceptLicense {
    my ($_clicked, $_ent_number, $auto) = @_;
    installStepsCall($o, $auto, 'acceptLicense') if !$o->{useless_thing_accepted};
}

#------------------------------------------------------------------------------
sub selectMouse {
    my ($clicked, $ent_number, $auto) = @_;

    require pkgs;
    my ($first_time) = $ent_number == 1;

    installStepsCall($o, $auto, 'selectMouse', !$first_time || $clicked);

    addToBeDone { mouse::write($o, $o->{mouse}) if !$o->{isUpgrade} || $clicked } 'installPackages';
}

#------------------------------------------------------------------------------
sub setupSCSI {
    my ($clicked, $_ent_number, $auto) = @_;

    if (!$o->{blank} && !$::testing && !$::uml_install) {
	-d '/lib/modules/' . c::kernel_version() ||
	  -s modules::cz_file() or die \N("Can't access kernel modules corresponding to your kernel (file %s is missing), this generally means your boot floppy in not in sync with the Installation medium (please create a newer boot floppy)", modules::cz_file());
    }

    installStepsCall($o, $auto, 'setupSCSI', $clicked);
}

#------------------------------------------------------------------------------
sub selectKeyboard {
    my ($clicked, $_ent_number, $auto) = @_;

    installStepsCall($o, $auto, 'selectKeyboard', $clicked);

    #- read keyboard ASAP (so that summary displays ok)
    addToBeDone {	
	$o->{keyboard}{unsafe} or return;
	if (my $keyboard = keyboard::read()) {
	    $o->{keyboard} = $keyboard;
	}
    } 'formatPartitions';
}

#------------------------------------------------------------------------------
sub selectInstallClass {
    my ($clicked, $_ent_number, $auto) = @_;

    installStepsCall($o, $auto, 'selectInstallClass', $clicked);

    if ($o->{isUpgrade}) {
	$o->{keepConfiguration} and @{$o->{orderedSteps}} = grep { !/selectMouse|selectKeyboard|miscellaneous|setRootPassword|addUser|configureNetwork|installUpdates|summary|configureServices|configureX/ } @{$o->{orderedSteps}};
    }
}

#------------------------------------------------------------------------------
sub doPartitionDisks {
    my ($_clicked, $_ent_number, $auto) = @_;
    $o->{steps}{formatPartitions}{done} = 0;
    installStepsCall($o, $auto, 'doPartitionDisksBefore');
    installStepsCall($o, $auto, 'doPartitionDisks');
    installStepsCall($o, $auto, 'doPartitionDisksAfter');
}

sub formatPartitions {
    my ($_clicked, $_ent_number, $auto) = @_;

    $o->{steps}{choosePackages}{done} = 0;
    installStepsCall($o, $auto, 'choosePartitionsToFormat', $o->{fstab}) if !$o->{isUpgrade};
    my $want_root_formated = fsedit::get_root($o->{fstab})->{toFormat};
    if ($want_root_formated) {
	foreach ('/usr') {
	    my $part = fsedit::mntpoint2part($_, $o->{fstab}) or next;
	    $part->{toFormat} or die \N("You must also format %s", $_);
	}
    }
    installStepsCall($o, $auto, 'formatMountPartitions', $o->{fstab}) if !$::testing;

    if ($want_root_formated) {
	#- we formatted /, ensure /var/lib/rpm is cleaned otherwise bad things can happen
	#- (especially when /var is *not* formatted)
	eval { rm_rf("$o->{prefix}/var/lib/rpm") };
    }

    mkdir "$o->{prefix}/$_", 0755 foreach 
      qw(dev etc etc/profile.d etc/rpm etc/sysconfig etc/sysconfig/console 
	etc/sysconfig/network-scripts etc/sysconfig/console/consolefonts 
	etc/sysconfig/console/consoletrans
	home mnt tmp var var/tmp var/lib var/lib/rpm var/lib/urpmi);
    mkdir "$o->{prefix}/$_", 0700 foreach qw(root root/tmp root/drakx);

    devices::make("$o->{prefix}/dev/null");
    chmod 0666, "$o->{prefix}/dev/null";

    common::screenshot_dir__and_move();

    any::rotate_logs($o->{prefix});

    require raid;
    raid::prepare_prefixed($o->{all_hds}{raids}, $o->{prefix});
}

#------------------------------------------------------------------------------
sub choosePackages {
    my ($_clicked, $ent_number, $auto) = @_;
    require pkgs;

    #- always setPackages as it may have to copy hdlist files and synthesis files.
    installStepsCall($o, $auto, 'setPackages', $o->{isUpgrade} && $ent_number == 1);
    installStepsCall($o, $auto, 'choosePackages', $o->{packages}, $o->{compssUsers}, $ent_number == 1);
    log::l("compssUsersChoice's: ", join(" ", grep { $o->{compssUsersChoice}{$_} } keys %{$o->{compssUsersChoice}}));

    #- check pre-condition where base backage has to be selected.
    pkgs::packageByName($o->{packages}, 'basesystem')->flag_available or die "basesystem package not selected";

    #- check if there are package that need installation.
    $o->{steps}{installPackages}{done} = 0 if $o->{steps}{installPackages}{done} && pkgs::packagesToInstall($o->{packages}) > 0;
}

#------------------------------------------------------------------------------
sub installPackages {
    my ($_clicked, $ent_number, $auto) = @_;

    installStepsCall($o, $auto, 'readBootloaderConfigBeforeInstall') if $ent_number == 1;

    installStepsCall($o, $auto, 'beforeInstallPackages');
    installStepsCall($o, $auto, 'installPackages');
    installStepsCall($o, $auto, 'afterInstallPackages');
}
#------------------------------------------------------------------------------
sub miscellaneous {
    my ($clicked, $_ent_number, $auto) = @_;

    installStepsCall($o, $auto, 'miscellaneousBefore', $clicked);
    installStepsCall($o, $auto, 'miscellaneous', $clicked);
    installStepsCall($o, $auto, 'miscellaneousAfter', $clicked);
}

#------------------------------------------------------------------------------
sub summary {
    my ($_clicked, $ent_number, $auto) = @_;
    installStepsCall($o, $auto, 'summaryBefore');
    installStepsCall($o, $auto, 'summary', $ent_number == 1);
    installStepsCall($o, $auto, 'summaryAfter');
}
#------------------------------------------------------------------------------
sub configureNetwork {
    my ($_clicked, $_ent_number, $auto) = @_;
    #- get current configuration of network device.
    require network::network;
    eval { network::network::read_all_conf($o->{prefix}, $o->{netc}, $o->{intf}) };
    installStepsCall($o, $auto, 'configureNetwork') if !$o->{isUpgrade};
}