Here is a LAZY and backwards way to avoid entering information twice but, as
Pat said, he does not know an effictive way to get things to work in DOS.
This works since all of my systems are partitioned the same.
I just make an additional diskette with a simple batch that wipes & prepares the drive.
When it is done I put the Unattended disk in and begin my work.
Now with the code Pat supplied I can tell it not to ask me about the partitioning.
Yes I know this is the wrong way to do it, but it saves me time until we can find a
better method.
Just make sure to label the diskette (or add prompts in the batch). "I think this is
my recovery disk"... "Oh * wrong disk"
--
Sean
----- Original Message -----
From: "Patrick J. LoPresti" <[EMAIL PROTECTED]>
Date: 03 Jun 2003 10:31:31 -0400
To: Rosario Esposito <[EMAIL PROTECTED]>
Subject: Re: [Unattended] partitioning disk
> Rosario Esposito <[EMAIL PROTECTED]> writes:
>
> > Hello,
>
> > I'm trying to modify the install.pl script (in \dosbin directory)
> > because I would like to get only one question during the
> > installation: "which percentage of disk space do you want for
> > Windows ?".
>
> If you create z:\site\config.pl and put calls to set_value() in it,
> they will override the defaults in install.pl. This way, you can
> avoid editing install.pl itself, which will make it easier to upgrade
> to future releases of Unattended. (Never mind that I have no idea
> when I will find time to MAKE another release...)
>
> > I added, in "ask_fdisk_cmds", something like:
> >
> > print "Choose percentage of disk space for Windows\n";
> > my $perc = <STDIN>;
> > chomp($perc);
>
> You could use simple_q() instead:
>
> my $perc = simple_q ("Choose percentage of disk space for Windows\n");
>
> > $ret='fdisk /pri:'.$perc.',100';
>
> Looks fine.
>
> > It works fine but it is not an "elegant" solution because:
> > - when installation starts it asks me for the percentage of disk space
> > for Windows
> > - then the disk is partitioned and the system reboots
> > - when installation restarts it asks me AGAIN for the percentage of
> > disk space for Windows
> > - then disk is partitioned but no changing in partition table are
> > detected, so the installation goes on
>
> This is an artifact of using DOS to perform the installation. DOS
> requires a reboot to recognize the partition table change, but
> rebooting erases our memory and makes us start over.
>
> Fixing this is not easy. We cannot store anything in the file system
> until after the partition table has been updated; Catch-22.
>
> There are 64 one-bit "flags" in the MBR we could use; they can be
> manipulated with the /SETFLAG, /TESTFLAG, and /CLEARFLAG switches to
> fdisk. But making this work reliably is tricky, because we have no
> guarantee about the values of those flags when the installation
> starts. We would have to use multiple bits as a "signature", which
> would be clunky because fdisk only allows us to set/test/clear one bit
> at a time.
>
> My only suggestion is to change your $ret assignment like this:
>
> $ret = (defined $perc
> ? 'fdisk /pri:'.$perc.',100'
> : undef);
>
> Combined with using simple_q() to set $perc, this will let you press
> Enter to skip the partitioning step completely. (I know, this is not
> much better.)
>
> In the long run, I would like to move away from DOS, because real
> operating systems let you modify the partition table without
> rebooting. But this requires a new design and new implementation,
> both of which require time.
>
> - Pat
--
______________________________________________
http://www.linuxmail.org/
Now with e-mail forwarding for only US$5.95/yr
Powered by Outblaze