summaryrefslogtreecommitdiffstats
path: root/perl-install/install
Commit message (Expand)AuthorAgeFilesLines
* update translation for HebrewDotan Kamber2008-03-011-7/+6
* Update Finnish translationThomas Backlund2008-02-291-26/+18
* 10.6.25Olivier Blin2008-02-281-0/+2
* remove spurious '*' character (grmpf)Olivier Blin2008-02-281-1/+1
* log changesOlivier Blin2008-02-281-0/+2
* create fs::any::prepare_minimal_root() out of install::install2::formatPartit...Olivier Blin2008-02-281-11/+1
* use fs::anyOlivier Blin2008-02-282-0/+2
* use newly moved fs::any::create_minimal_files (oops)Olivier Blin2008-02-281-1/+1
* move create_minimal_files() from install::any to fs::anyOlivier Blin2008-02-282-14/+2
* move mapper devices initialization slightly before (for next commit)Olivier Blin2008-02-281-6/+6
* 10.6.24Pascal Rigaux2008-02-281-0/+2
* move where it should be (bad merge)Pascal Rigaux2008-02-281-1/+1
* update Swedish translationThomas Backlund2008-02-271-95/+23
* - do not assign a mount point to partitions of type "Compaq diagnostics"Pascal Rigaux2008-02-271-0/+2
* updatesKeld Simonsen2008-02-261-18/+13
* - 2008.1 RC1 logoPascal Rigaux2008-02-262-0/+1
* 10.6.23Thierry Vignaud2008-02-251-0/+2
* update translation for ItalianAndrea Celli2008-02-231-3/+3
* update translation for ItalianAndrea Celli2008-02-231-13/+10
* Updated Estonian translation.Marek Laane2008-02-221-13/+5
* - adapt to cooker:Pascal Rigaux2008-02-221-0/+2
* - change background colorPascal Rigaux2008-02-212-2/+4
* 10.6.21Olivier Blin2008-02-191-0/+2
* - adapt to cooker rpm macros new locationsPascal Rigaux2008-02-192-2/+5
* 10.6.20Thierry Vignaud2008-02-181-0/+2
* use p4-clockmod for some Intel family 6 processors not supporting EST (Enhanc...Olivier Blin2008-02-181-0/+1
* use speedstep-centrino only for supported models and prefer acpi-cpufreq (pat...Olivier Blin2008-02-181-0/+2
* update NEWSOlivier Blin2008-02-181-0/+3
* update translation for PolishTomasz Bednarski2008-02-181-15/+12
* - do not create alt_windows unless needed Pascal Rigaux2008-02-181-0/+2
* 2008.1 updatePjetur Hjaltason2008-02-181-137/+25
* Update Czech translation.Michal Bukovjan2008-02-171-18/+13
* Update hu translation on behalf of hu teamChristophe Berthelé2008-02-161-6/+9
* Update eo translation on behalf of eo teamChristophe Berthelé2008-02-161-187/+111
* install linuxwacom if neededThierry Vignaud2008-02-151-0/+1
* updated translationWanderlei Antonio Cavassin2008-02-141-3/+3
* load disk/ide before disk/scsi (to prevent sata deps from overriding non-liba...Olivier Blin2008-02-122-1/+7
* 10.6.19Pascal Rigaux2008-02-121-0/+2
* - do not propose "KDE, GNOME or Custom" profiles if the partition is small Pascal Rigaux2008-02-122-1/+4
* - auto partitioning: ensure the "/" is bigger on small drivesPascal Rigaux2008-02-121-0/+2
* fix spacing in 10.6.18's changelogThierry Vignaud2008-02-121-0/+1
* 10.6.18Olivier Blin2008-02-111-0/+3
* use list_modules::load_default_moddeps instead of loading hardcoded /modules/...Olivier Blin2008-02-112-3/+3
* 10.6.16Pascal Rigaux2008-02-111-0/+2
* - Xorg needs xkb/rules/base, otherwise it can go crazy (#35912)Pascal Rigaux2008-02-112-0/+2
* detect systems with C7-M processor as laptop (like Belinea s.book)Olivier Blin2008-02-061-0/+1
* - add mkntfs (#37462)Pascal Rigaux2008-02-062-0/+3
* Updated Slovenian translationJure Repinc2008-02-061-139/+130
* 10.6.13Pascal Rigaux2008-02-051-0/+2
* - add "vesa" X driver to use when framebuffer failsPascal Rigaux2008-02-053-1/+8
;; #- check crc, csum contains the crc so result should be 0. compute_crc($tmp) == 0 or die "bad checksum"; @{$hd->{geom}}{qw(cylinders heads sectors)} = @info{qw(ncyl ntrks nsect)}; my @pt; my @infos_up = unpack $format1 x $nb_primary, $info{infos}; my @partitions_up = unpack $format2 x $nb_primary, $info{partitions}; for (0..$nb_primary-1) { my $h = { type => $infos_up[2 * $_], flag => $infos_up[1 + 2 * $_], start_cylinder => $partitions_up[2 * $_], size => $partitions_up[1 + 2 * $_] }; $h->{start} = $sector + $h->{start_cylinder} * $hd->cylinder_size(); $h->{type} && $h->{size} or $h->{$_} = 0 foreach keys %$h; push @pt, $h; } #- this code is completely broken by null char inside strings, it gets completely crazy :-) # my @pt = mapn { # my %h; # @h{@$fields1} = unpack $format1, $_[0]; # @h{@$fields2} = unpack $format2, $_[1]; # $h{start} = $sector + $h{start_cylinder} * $hd->cylinder_size(); # $h{type} && $h{size} or $h{$_} = 0 foreach keys %h; # \%h; # } [ grep { $_ } split /(.{$size1})/o, $info{infos} ], [ grep { $_ } split /(.{$size2})/o, $info{partitions} ]; [ @pt ], \%info; } # write the partition table (and extended ones) # for each entry, it uses fields: start, size, type, active sub write($$$;$) { my ($hd, $sector, $pt, $info) = @_; # my ($csize, $wdsize) = (0, 0); #- handle testing for writing partition table on file only! local *F; if ($::testing) { my $file = "/tmp/partition_table_$hd->{device}"; open F, ">$file" or die "error opening test file $file"; } else { partition_table_raw::openit($hd, *F, 2) or die "error opening device $hd->{device} for writing"; c::lseek_sector(fileno(F), $sector, $offset) or return 0; } ($info->{infos}, $info->{partitions}) = map { join '', @$_ } list2kv map { $_->{start} % $hd->cylinder_size() == 0 or die "partition not at beginning of cylinder"; # $csize += $_->{size} if $_->{type} != 5; # $wdsize += $_->{size} if $_->{type} == 5; $_->{flags} |= 0x10 if $_->{mntpoint} eq '/'; $_->{flags} |= 0x01 if partition_table::isSwap($_); local $_->{start_cylinder} = $_->{start} / $hd->cylinder_size() - $sector; pack($format1, @$_{@$fields1}), pack($format2, @$_{@$fields2}); } @$pt; # $csize == $wdsize or die "partitions are not using whole disk space"; #- compute the checksum by building the buffer to write and call compute_crc. #- set csum to 0 so compute_crc will give the right csum value. $info->{csum} = 0; $info->{csum} = compute_crc(pack($main_format, @$info{@$main_fields})); syswrite F, pack($main_format, @$info{@$main_fields}), psizeof($main_format) or return 0; sync(); 1; } sub info { my ($hd) = @_; #- take care of reduction of the number of cylinders, avoid loop of reduction! unless ($hd->{geom}{totalcylinders} > $hd->{geom}{cylinders}) { $hd->{geom}{totalcylinders} = $hd->{geom}{cylinders}; $hd->{geom}{cylinders} -= 2; #- rebuild some constants according to number of cylinders. $hd->{totalsectors} = $hd->{geom}{heads} * $hd->{geom}{sectors} * $hd->{geom}{cylinders}; } #- build a default suitable partition table, #- checksum will be built when writing on disk. #- note third partition is ALWAYS of type Whole disk. my $info = { info => "DiskDrake partition table", rspeed => 5400, pcylcount => $hd->{geom}{totalcylinders}, sparecyl => 0, ilfact => 1, ncyl => $hd->{geom}{cylinders}, nacyl => $hd->{geom}{totalcylinders} - $hd->{geom}{cylinders}, ntrks => $hd->{geom}{heads}, nsect => $hd->{geom}{sectors}, magic => $magic, }; $info; } sub clear_raw { my ($hd) = @_; my $pt = { raw => [ ({}) x $nb_primary ], info => info($hd) }; #- handle special case for partition 2 which is whole disk. $pt->{raw}[2] = { type => 5, #- the whole disk type. flags => 0, start_cylinder => 0, size => $hd->{geom}{cylinders} * $hd->cylinder_size(), }; $pt; } 1;