Hi,
finally I've got some time to work on this matter again.
I think, there should be something to warn about erasing the full drive,
'cause the function
with the question according to "fdisk_confirm" isn't called here ... =8-<
My config.pl now looks the following:
sub my_partition_cmds {
my $partition_cmds = $u->{'_meta'}->{'partition_cmds'};
foreach my $cmd (split /;/, $partition_cmds) {
print "Executing command: $cmd...\n";
system ("$cmd >/dev/null 2>&1");
}
}
if (( $u->{'_meta'}->{'fdisk_confirm'} == 1 ) &&
($u->{'_meta'}->{'partition_cmds'})){
print "\n";
print "ABOUT TO PARTITION THE FIRST HARD DRIVE!\n";
print "WARNING: This operation erases the disk!";
if (yes_no_choice ("Are you sure") == 1) {
$u->{'_meta'}->{'fdisk_cmds'} = \&my_partition_cmds;
}
else {
exit 1;
}
}
if ($u->{'_meta'}->{'partition_cmds'}) {
$u->{'_meta'}->{'fdisk_cmds'} = \&my_partition_cmds;
}
I couldn't find a way to call the code in install.pl. Since config.pl is
called via the do-operator there is no way to see anything in
install.pl. This applies for the "is_linux" check, too.
It would be better, too, if we could distinguish between the system
partition
and the data partition(s), e. g.
Only C: -> partition_cmds_system
Whole Disk: -> partition_cmds
Haven't worked on that since I don't need it.
But I've compiled parted 1.6.22 and copied the binary to my
linuxaux/usr/sbin/ directory. This version is capable of formatting my
newly created partitions, so I don't need the mkfs.vfat anymore.
In my unattend.txt the partition_cmds are now:
partition_cmds="parted /dev/dsk mklabel msdos;parted /dev/dsk mkpartfs
primary fat32 0 4000;parted -- /dev/dsk mkpart extended 10000 -0;parted
/dev/dsk mkpartfs logical fat32 10000 30000;parted -- /dev/dsk mkpartfs
logical fat32 30000 -0;parted /dev/dsk set 1 boot on"
When you build a new parted binary make sure to compile it without
readline support and make it statically linked. This way it works in the
unattended linux boot system.
Once again thanks to everybody contributing to this project.
Regards
Thomas
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
unattended-info mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unattended-info