aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/rc.sysinit
Commit message (Expand)AuthorAgeFilesLines
* rc.sysinit: be more verboseLukas Nykryn2015-02-271-3/+3
* rc.sysinit: set affinity also for current shellLukas Nykryn2015-02-271-0/+1
* readonly-root: remount rpc_pipefs if readonly-root is usedLukas Nykryn2014-06-061-0/+4
* netfs: implicitly handle glusterfs as a network filesystemdLukas Nykryn2014-04-301-2/+2
* rc.sysinit: apply sysctl settings before starting udevLukas Nykryn2014-03-261-0/+3
* rc.sysinit: use 'vgchange --ignoreskippedcluster'Lukas Nykryn2014-03-261-1/+1
* rc.sysinit: increase the saved random-seed to 4K (#1023471)Lukas Nykryn2014-03-261-1/+1
* remove duplicit thenLukas Nykryn2013-10-101-1/+0
* add ability to disable LVM activation on boot (#1015065)Lukas Nykryn2013-10-101-1/+6
* remount /proc to set attributes from fstab #984003Lukas Nykryn2013-08-091-0/+2
* Remount /dev/shm in sysinit to apply attributes from fstab (#669700)Lukas Nykryn2012-10-081-0/+3
* use vgchange -aay in rc.sysinit and netfs init scriptLukas Nykryn2012-10-081-1/+1
* fix the NIS domain settingLukas Nykryn2012-10-081-1/+1
* Set NIS domain (#704919)Lukas Nykryn2012-04-271-0/+1
* rc.sysinit - use rcS-emergency job instead of suloginPetr Lautrbach2012-02-141-3/+3
* use restorecon -F for /dev and /dev/pts (#743222)Petr Lautrbach2011-10-071-2/+2
* plymouth lives in /bin. (#702814)Bill Nottingham2011-08-161-5/+6
* Fix logic error (#698520, <jlau@redhat.com>)Bill Nottingham2011-08-151-1/+1
* Add a comment explaining the oft-confused -t nox,y,z mount syntax.Bill Nottingham2011-08-151-0/+1
* Move sysctl.conf/sysctl.d handling to a function, call it where appropriate. ...Bill Nottingham2011-08-151-5/+1
* Add support for sysctl.d (#59311)Martin Langhoff2011-08-151-0/+4
* Simplify various string match constructs. (#558575)Ville Skyttä2010-12-061-4/+4
* Don't frob the console loglevel on boot. (#621257, #626572)Bill Nottingham2010-08-241-5/+0
* Remove 'press 'I' for interactive startup message.Bill Nottingham2010-07-011-4/+0
* Use plymouth wait-keystroke, etc. for interactive mode, not getkey. (#605016)Bill Nottingham2010-07-011-16/+3
* Also init_crypto for encrypyed network block devices. (#605600)Bill Nottingham2010-06-231-160/+0
* Use /etc/system-release instead of /etc/redhat-releaseBill Nottingham2010-06-181-6/+6
* Always reboot on autorelabel. (#595823)Bill Nottingham2010-06-031-19/+9
* Use new lvm2 --sysinit option. Conflict with older lvm2. (#588777)Bill Nottingham2010-05-181-3/+1
* Change how we handle RAID arrays. (<dledford@redhat.com>)Bill Nottingham2010-04-091-1/+1
* The current rawhide dmraid has proper error codes.Bill Nottingham2010-02-261-1/+1
* Check dmraid's return code, to catch 'no raid sets' error. (#568790)Bill Nottingham2010-02-261-1/+1
* Suppress bogus LVM2 warnings. (#561938, <prajnoha@redhat.com>)Bill Nottingham2010-02-161-0/+2
* Move mdadm after dmraid. (#494821)Bill Nottingham2010-01-111-3/+3
* Fix indenting/whitespaceBill Nottingham2010-01-111-25/+25
* Handle yet another random return string from dmraid.Bill Nottingham2009-11-251-1/+1
* Put /dev/shm in mtab too, as dracut now mounts it. (#528667)Bill Nottingham2009-10-151-0/+1
* dmraid can return 'no raid disks' to stdout. Handle it. (#527726, <mschmidt@r...Bill Nottingham2009-10-091-8/+11
* Do not try and activate ISW raidsets, unless noiswmd is passed. (#524355, <hd...Bill Nottingham2009-09-211-3/+5
* Support rwtab and state passed from dracut initrd.Warren Togami2009-09-021-3/+3
* Restore context of recreated files. (#519748)Bill Nottingham2009-08-271-0/+1
* Fix some whitespace annoyances.Bill Nottingham2009-08-201-44/+44
* /selinux is not configurable. Don't pretend it is (fixes #518164)Bill Nottingham2009-08-201-10/+9
* Remove call to pam_console_apply.Bill Nottingham2009-08-041-3/+0
* Use resolv.conf from dracut netboot before setting hostname. (#514801, <wtoga...Bill Nottingham2009-07-301-0/+3
* Use $() instead of `` for process expansion.Bill Nottingham2009-07-301-10/+10
* Fix dmraid partition naming (#501476, <hdegoede@redhat.com>)Bill Nottingham2009-05-261-1/+6
* Silence errors.Bill Nottingham2009-04-021-1/+1
* Fix syntax error.initscripts-8.92-1Bill Nottingham2009-04-021-1/+1
* Add a disk scan synchronization point with scsi_wait_scan. (#481470)Bill Nottingham2009-04-021-0/+3
class="hl kwb">$F), $sector, $offset) or die "reading of partition in sector $sector failed"; sysread $F, $tmp, psizeof($main_format) or die "error while reading partition table in sector $sector"; my %info; @info{@$main_fields} = unpack $main_format, $tmp; #- check magic number $info{magic} == $magic or die "bad magic number on disk $hd->{device}"; #- 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}; foreach (0..$nb_primary-1) { my $h = { flag => $infos_up[1 + 2 * $_], start_cylinder => $partitions_up[2 * $_], size => $partitions_up[1 + 2 * $_] }; fs::type::set_pt_type($h, $infos_up[2 * $_]); $h->{start} = $sector + $h->{start_cylinder} * $hd->cylinder_size; $h->{pt_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{pt_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, pt_type, active sub write($$$;$) { my ($hd, $sector, $pt, $info) = @_; # my ($csize, $wdsize) = (0, 0); #- handle testing for writing partition table on file only! my $F; if ($::testing) { my $file = "/tmp/partition_table_$hd->{device}"; open $F, ">$file" or die "error opening test file $file"; } else { $F = partition_table::raw::openit($hd, 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 $_->{pt_type} != 5; # $wdsize += $_->{size} if $_->{pt_type} == 5; $_->{flags} |= 0x10 if $_->{mntpoint} eq '/'; $_->{flags} |= 0x01 if !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; common::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] = { pt_type => 5, #- the whole disk type. flags => 0, start_cylinder => 0, size => $hd->{geom}{cylinders} * $hd->cylinder_size, }; $pt; } 1;