setup-storage and windows 7

Toomas Tamm tt-fai at
Fri Mar 9 08:38:35 CET 2012

On Fri, 2012-03-09 at 07:23 +0100, Gémes Géza wrote:
> Hi,
> After some digging of the mail archives I've found that my problem is
> quite general:
> Partitioning with fai a disk which had windows 7 installed and trying to
> preserve that installation.

The information that you report is interesting and useful indeed. I have
not done a dual-boot install for a while (we have switched to running
Windows inside Virtualbox VMs instead), but Michael Tautschnig (the main
author of setup-storage) implemented a couple of useful changes in the
experimental series:

- if the "preserve_always:all" flag is present, this means literally "do
not touch any partitioning information at all".
- primary partitions on disk need not be physically in the same order as
in the partition table.

The first one allows for manual re-partitioning of the disk (I usually
used the Windows 7 built-in partitioning tool to shrink the primary
Windows partition to necessary size, then gparted to create an extended
partition with logical partitions for Linux in the free space). This
does not scale to massive installs, but worked well for a small number
of laptops.

The second patch is useful in conjunction with the first one if there is
a "recovery" partition at the end of the Windows disk. This is usually
the third partition in the partition table, and the extended partition,
created as just explained, becomes fourth in the PT, but third on the
disk. Setup-storage does not create such layouts, but can preserve them
if asked to do so.

Finally, here is a typical disk configuration file for installing a dual
boot host.

# This computer comes with a boot partition as sda1, a C:
# partition as sda2, a recovery parition as sda3,
# and Linux is installed into the extended partition sda4
# physically located in the middle of the disk.
# We preserve the size and location of everything, 
# but create new filesystems. The actual partitioning is done
# manually before executing FAI.
# The ordering of lines in this file is very important!

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

More information about the linux-fai mailing list