Hi Thomas,
>
> While browsing the archive I've come at least twice across postings
> asking for putting the ProfilesDir on another partition.
>
I've been searching for such a solution, too, so thanx for your approach.
Nevertheless, I've some thoughts about it.
> I have worked out the following solution:
>
> My Setup: Drive C: Windows, Drive D: Applications, Drive E: Documents
> and Settings
>
> Put the following code in your site/config.pl
> ...
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-<
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
In case of installation we can decide to partition the whole drive
or just renew the system partition without data partition(s).
So, I've got a slightly different solution here. I'm no perl programmer,
but it seems to work here (I've reduced the setup to
two partitions, but this surely can be changed):
In unattended.txt:
---------------------------------------------------------------
partition_cmds="parted /dev/dsk mklabel msdos;parted /dev/dsk mkpart
primary fat32 0 4000;parted -- /dev/dsk mkpart extended 10000
-0;parted -- /dev/dsk mkpart logical fat32 10000 -0;sleep 2;parted
/dev/dsk set 1 boot on;make-blkdev-nodes hda;mkfs.vfat /dev/dsk1 -F
32;mkfs.vfat /dev/dsk5 -F 32"
partition_cmds_sys="parted /dev/dsk rm 1; parted /dev/dsk mkpart primary
fat32 0 4000; parted /dev/dsk set 1 boot on;make-blkdev-nodes
hda;mkfs.vfat /dev/dsk1 -F 32;"
; if the drive isn't partitioned, we have to delete the C: drive and
; format it
fdisk_confirm=1
--------------------------------------------------------------
Just for the protocol:
The "--" after "parted" are to indicate, that there are no options to
follow
(needed if there is a "-0" in the command) - had to fined that out, too ...
In config.pl:
-----------------------------------------------------------------------------------------
sub my_partition_cmds {
chdir ("/usr/sbin");
symlink "/z/linuxaux/usr/sbin/mkfs.vfat", "mkfs.vfat";
chdir ("/");
my $partition_cmds = $u->{'_meta'}->{'partition_cmds'};
defined $partition_cmds
or $partition_cmds = $u->{'_meta'}->{'partition_cmds_sys'}
or return undef ;
while (1) {
($u->{'_meta'}->{'fdisk_confirm'})
or last;
print "\n";
print "About to PARTITION the WHOLE FIRST HARD DRIVE!\n\n";
print "WARNING: This operation erases the disk!\n";
print "If unsure, say NO, and ONLY C: will be DELETED.\n";
print "If you won't neither, press CTRL-ALT-DEL!\n";
yes_no_choice ("Are you sure")
and last;
$partition_cmds = '';
$partition_cmds = $u->{'_meta'}->{'partition_cmds_sys'};
defined $partition_cmds
or return undef;
last;
}
foreach my $cmd (split /;/, $partition_cmds) {
print "Executing command to partition: $cmd...\n";
system ("$cmd");
}
};
$u->{'_meta'}->{'fdisk_cmds'} = \&my_partition_cmds;
---------------------------------------------------------------------------------------------------------
I think, there should be a test, if we are under linux, with the
"$is_linux" function, too.
But this isn't relevant for me.
What script have you got for converting the D:,E: ... partitions to ntfs?
As you use a separate partition for programsdir: do you change
the default programs dir via registry?
Best regards,
Falko
-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
unattended-info mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unattended-info