7

Making partman partition a single disk is easy enough:

d-i partman-auto/disk string /dev/xvda
d-i partman-auto/method string regular
d-i partman-auto/expert_recipe string \
      boot-swap :: \
        2048 2048 -1 ext3 \
           $primary{ } \
           $bootable{ } \
           method{ format } \
           format{ } \
           use_filesystem{ } \
           filesystem{ ext3 } \
           mountpoint{ / } \
           device{ /dev/xvda } \
           . \

Or the even simpler:

d-i partman-auto/disk string xvda
d-i partman-auto/method string regular
d-i partman-auto/choose_recipe select atomic

But with more than one disk, none of the recipes I've found or written work. The installer gets to the screen where it asks for the partitioning method, and stalls there. I thought I had answered that question here:

# The presently available methods are:
# - regular: use the usual partition types for your architecture
# - lvm:     use LVM to partition the disk
# - crypto:  use LVM within an encrypted partition
d-i partman-auto/method string regular

Even if that does answer the question and it's actually stuck on the next bit, choosing a disk, isn't that answered by this?

d-i partman-auto/disk string /dev/xvda

I aim to end up with three disks: root on /dev/xvda, including /home, /usr and the rest; an extra swap volume on /dev/xvdb; and an EXT3 volume on /dev/xvdc, mounted on /var/build. Just to make things extra complicated, /var/build doesn't exist at installation time, so it needs making somehow too. This is on Debian Squeeze.

1 Answers1

3

I haven't tried this on squeeze, but what I did for etch should still work. Untested:

d-i preseed/late_command string echo ';' | sfdisk /dev/xvdb ; mkswap /dev/xvdb1 ;
    echo '/dev/sdb1 none swap sw 0 0' >> /target/etc/fstab ;
    echo ';' | sfdisk /dev/xvdb ; mke2fs -j -q /dev/xvdb1 ;
    mkdir /target/var/build ;
    echo '/dev/xvdb1 /var/build ext3 defaults 0 2' >> /target/etc/fstab

I'd have to dig up the reference where I found that sfdisk trick -- it basically wipes out the disk's partition table and makes one giant partition.

Mike Renfro
  • 1,307