setup-storage and preserving partitions

Toomas Tamm tt-fai at kky.ttu.ee
Fri Jun 18 15:46:16 CEST 2010


Hello!

More than two months since the "always_format" flag was introduced, I
got a chance to test it. Unsuccessfully, it seems.

The disk layout on this test system was set up to imitate that on a
laptop with a total of four existing Windows partitions, (three primary
and one logical), none of which should be touched. The empty Linux
partitions were created manually with gparted. FAI is expected to create
filesystems on those during each install. There is some empty space on
the disks as well.

Here is the output from fdisk:

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0003d396

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1         127     1020096    7  HPFS/NTFS
/dev/hda2             128        1402    10241437+   7  HPFS/NTFS
/dev/hda3            1403        9051    61440592+   5  Extended
/dev/hda4            9052        9729     5446035    7  HPFS/NTFS
/dev/hda5            1403        5226    30716248+   7  HPFS/NTFS
/dev/hda6            5230        5306      618471   83  Linux
/dev/hda7            5307        5561     2048256   82  Linux swap / Solaris
/dev/hda8            5562        5650      714861   83  Linux
/dev/hda9            5651        5739      714861   83  Linux
/dev/hda10           5740        6504     6144831   83  Linux
/dev/hda11           6505        7779    10241406   83  Linux
/dev/hda12           7780        8990     9727326   83  Linux

My disk configuration file looks like this:

disk_config disk1 bootable:1 preserve_always:1,2,3,4,5,6,7,8,9,10,11,12 always_format:6,7,8,9,10,11,12
primary  -      0   -     -
primary  -      0   -     -
logical  -      0   -     -
logical  /      0   ext3  rw,errors=remount-ro   createopts="-c -j"
logical  swap   0   swap  sw
logical  /var   0   ext3  rw                     createopts="-c -m 5 -j"
logical  /tmp   0   ext3  rw                     createopts="-c -m 0 -j"
logical  /usr   0   ext3  rw                     createopts="-c -j"
logical  /home  0   ext3  rw,nosuid,nodev        createopts="-m 1 -j"
logical  /wrk   0   ext3  rw,nosuid,nodev        createopts="-m 1 -j"
primary  -      0   -     -

And the result of running "setup-storage -d" is attached.

Perhaps my syntax is incorrect too, but it crashed with an
"uninitialized value" from Perl which it probably should not.

Toomas Tamm




On Tue, 2010-04-06 at 23:55 +0200, Michael Tautschnig wrote:
> > On Fri, 2010-03-26 at 13:08 -0600, Jeffrey Stolte wrote:
> > 
> > > (I should mention that one of our main uses of FAI is to upgrade
> > > machines from one Debian release to the next.  However, rather than do
> > > an in-place upgrade, we do a fresh install of the new release while
> > > preserving the existing partition sizes on the disk.)
> > > 
> > > I hope this makes some sense.  If no one else has asked for this
> > > capability, though, maybe we need to reconsider our practice of
> > > preserving partition sizes.  I don't want you to have to add an option
> > > that no one else uses or that is not considered to be a "best
> > practice".
> > > Let me know if you need any additional information.  Thanks.
> > 
> > I would cast another vote towards adding such an option. Our use case is
> > the following: we have several dual-booting laptops where the Windows
> > partition(s), as well as the master boot record (which may contain
> > manufacturer-specific code to access recovery partitions, etc) should be
> > touched as little as possible. Just as the above user, we prefer fresh
> > installs to in-place upgrades.
> > 
> > It would feel very reassuring if there were an option in FAI which
> > essentially meant "do not touch anything in disk paritioning, just
> > create new filesystems on existing partitions where requested, and leave
> > all the rest unchanged".
> > 
> > In today's situation, I always feel an urge to test my setups (based on
> > hooks and/or manual intervention) several times on a "disposable" test
> > machine before I dare to run FAI on a "real" system.
> > 
> 
> I've added an option "always_format" which can be used along with
> preserve_always, etc. and works the same way as the "format" option did in
> setup_harddisks. 
> 
> I believe the following should work, adapting Jeffrey's example:
> 
> disk_config sda disklabel:msdos bootable:1 preserve_always:1,2,5,6,7 always_format:1,2,5
> primary  /      0   ext3  defaults,errors=remount-ro    createopts="-j"
> primary  swap   0   swap  sw
> logical  /var   0   ext3  defaults,errors=remount-ro    createopts="-j"
> logical  /home  0   ext3  defaults,nosuid,nodev,errors=remount-ro
> logical  /d1    0   ext3  defaults,nosuid,nodev,errors=remount-ro
> 
> In case some of the partitions need not exist in all cases, you can use
> preserve_lazy instead of preserve_always, but then some size other than 0 must
> be specified.
> 
> This option is available as of 3.3.5+experimental2. For details on how to obtain
> the experimental builds please see
> http://faiwiki.informatik.uni-koeln.de/index.php/Main_Page#getting_FAI
> Testing is much appreciated!!
> 
> 
> Best,
> Michael
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: format.log
Type: text/x-log
Size: 6072 bytes
Desc: not available
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20100618/be455ff6/attachment.bin 


More information about the linux-fai mailing list