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 need to install ubuntu server 10.04 by preseed file and part disk into 50% for / and rest for /tmp. I tried this:

    # Partitioning
# use first hard drive SCSI/SATA:
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular
d-i partman-auto/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

# Actualy use 50% for / and rest 50% for /LOGS
d-i partman-auto/expert_recipe string                         \
      boot-root ::                                            \
              2048 50% 1000000000 ext4                        \
                      $primary{ }                             \
                      method{ format } format{ }              \
                      use_filesystem{ } filesystem{ ext4 }    \
                      mountpoint{ / }                         \
              .                                               \
              2048 50% -1 ext4                                \
                      method{ format } format{ }              \
                      use_filesystem{ } filesystem{ ext4 }    \
                      mountpoint{ /TMP}                       \
              .                                               \
              50% 4096 50% linux-swap                         \
                      method{ swap } format{ }                \
              .

d-i partman-partitioning/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

Can anyone tell me, why it doesn't works? It creates only 1.9 Gb to / and /tmp.

Thanks!

share|improve this question
    
Why on earth do you want a dedicated and very large /tmp partition? Normally /tmp is mounted as a tmpfs so its contents are kept in ram/swap for fast access. Putting it on a hard disk will slow things down, and using such a large and dedicated partition for it makes it more likely that one or the other partition will fill up while there is plenty of space on the other. –  psusi Jan 10 '12 at 16:49
add comment

2 Answers 2

It seems that I solve that problem. I should use digital values instead of percentage.

# Partitioning
# use first hard drive SCSI/SATA:
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular
d-i partman-auto/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

# Actualy use 50% for / and rest 50% for /TMP
d-i partman-auto/expert_recipe string                         \
      boot-root ::                                            \
              2048 30720 1000000000 ext4                      \
                      $primary{ }                             \
                      method{ format } format{ }              \
                      use_filesystem{ } filesystem{ ext4 }    \
                      mountpoint{ / }                         \
              .                                               \
              50% 4096 50% linux-swap                         \
                      method{ swap } format{ }                \
              .                                               \
              2048 30720 -1 ext4                              \
                      method{ format } format{ }              \
                      use_filesystem{ } filesystem{ ext4 }    \
                      mountpoint{ /TMP }                      \
              .                                               \

d-i partman-partitioning/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
share|improve this answer
add comment

It looks like your definitions are wrong, so partman might be misinterpreting it. If you look at the spec (e.g. here) then the order of the limits is:

<minimal size> <priority> <maximal size> <parted fs>

So your initial version had a "50%" priority. Your swap was correct (according to the spec) but gave a swap partition that was 50% of the size of your memory (so 1GB if you had 2GB RAM) with a priority of 4096.

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.