Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm attempting to create my first Ubuntu Server 10.04-4 LTS x64 preseed file and I'm afraid I can't figure out the hard drive partitioning aspect:

I have a 2TB hard disk that I need configured as follows (please note this system has hardware RAID that is already configured, so the OS install merely sees one large hard drive):

Partitions:

  • / - 40 GB (ext4, must be bootable)
  • /swap - 32 GB
  • /local - all remaining free space (ext4)

The file systems need to be ext4 (with the exception of swap of course), and / must be bootable. I also need to use regular partitions rather than LVM. Also, I don't care about any data that's currently on the disk. I've been trying to cook something up via the examples on this page to no avail:

http://www.tylerlesmann.com/2008/jul/06/fun-preseed/

I just found this example, but am uncertain how to modify it based on my exact needs (I had to replace all of the # comment signs with & symbols because this forum was bolding all of the comment lines):

# If not, you can put an entire recipe into the preconfiguration file in one 
# (logical) line. This example creates a small /boot partition, suitable 
# swap, and uses the rest of the space for the root partition: 
# d-i partman-auto/expert_recipe string \
# boot-root :: \
# 40 50 100 ext3 \
# $primary{ } $bootable{ } \
# method{ format } format{ } \
# use_filesystem{ } filesystem{ ext3 } \
# mountpoint{ /boot } \
#. \
# 500 10000 1000000000 ext3 \
# method{ format } format{ } \
# use_filesystem{ } filesystem{ ext3 } \
# mountpoint{ / } \
# . \
# 64 512 300% linux-swap \
# method{ swap } format{ } \
#.

Any help is greatly appreciated (please note I'm incredibly new to *nix, so please handle with care)! =)

share|improve this question
add comment

1 Answer

TobiSGD over at LinuxQuestions.org was able to resolve this for me. Here's the solution:

"At first, if you set d-i partman-auto/choose_recipe select atomic the installer will not use your recipe, so comment that out.

Here's your actual recipe, corrected with the sizes you want:

d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular
d-i partman-lvm/purge_lvm_from_device boolean true
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-lvm/confirm boolean true
#d-i partman-auto/choose_recipe select atomic
d-i partman-auto/expert_recipe string \
boot-root :: \
   40000 50 41000 ext4 \
   $primary{ } $bootable{ } \
   method{ format } format{ } \
   use_filesystem{ } filesystem{ ext4 } \
   mountpoint{ / } \
. \
500 10000 1000000000 ext4 \
   method{ format } format{ } \
   use_filesystem{ } filesystem{ ext4 } \
   mountpoint{ /local } \
. \
   32000 512 33000 linux-swap \
   method{ swap } format{ } \
.

d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

I have changed the mount-points and the sizes for the partitions. Note that it is not possible to give exact sizes to the installer with preseeding, so your /-partition is set to be anywhere between 40000MB and 41000MB and your swap will be anywhere between 32000MB and 33000MB. The rest of the disk will be partitioned and mounted as /local."

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.