download | 0 files changed, 0 insertions, 0 deletions
target\n";
}
}
if ($root) {
print STDERR "\nMounting other partitions from fstab on $target...\n";
foreach (@fstab) {
my ($valued_options, $options) = fs::mount_options::unpack($_);
next if
!$_->{fs_type} || $_->{device} eq 'none'
|| $valued_options->{noauto} || $valued_options->{supermount}
|| $_->{mntpoint} eq '/'
|| member($_->{fs_type}, 'swap', 'nfs', 'ntfs');
delete $valued_options->{'iocharset='};
delete $valued_options->{'codepage='};
fs::mount_options::pack($_, $valued_options, $options); #- vfat opts, we don't have the modules in rescue
my $where = "$target$_->{mntpoint}";
mkdir_p($where);
print STDERR "\t$_->{device} on $where type $_->{fs_type} options $_->{options}\n";
system("mount -t $_->{fs_type} /dev/$_->{device} $where -o $_->{options}");
system("cp -f /etc/mtab $target/etc/mtab"); #- to allow a nice chrooted "mount" or "df"
}
print STDERR "\nYour system is ready on $target.\n\n";
} else {
die "Could not find your root device :-(.\n";
}
|
---|