1

I've been battling with this problem for a couple of weeks now. I'm trying to automate the installation of Ubuntu servers using PXE and Kickstart. I've managed to fix most problems I've run in to through Google but this one has me stumped. The only other example of this problem I can find is on askubuntu where a guy is asking exactly the same question I'm about to ask but it has no responses. From this I can conclude one of two things - no-one is using Kickstart or this is a problem cause by some obscure setting I haven't found.

To my question. This line in my preseed file

d-i partman-auto/choose_recipe select atomic

supposedlyartitions the entire disk as one partition. Exactly what I want. However, onc the install is complete, my disk looks like this

Filesystem                              Size  Used Avail Use% Mounted on
/dev/mapper/server1-root                9.2G  1.5G  7.3G  18% /
...some other stuff like udev...
/dev/sda1                               228M   25M  191M  12% /boot
/dev/mapper/server1-home                203G  188M  192G   1% /home

So the hard disk has been partitioned with a tiny root partition and a massive home partition. Reading the manuals implies this is what

d-I partman-auto/choose_recipe select homes

does but it also implies there's no "default" action - that is if my syntax for this line was wrong or if it was missing altogether, the installer would stop and ask me what to do. But it doesn't - it just ploughs on and creates this massive /home partition.

The main thing that's confusing me (which the other poster didn't mention) is why it's

/dev/mapper/server1-home

That implies to me it thinks it's a RAID or some other DM volume. Which it isn't - it's a single 240Gb disk.

The rest of my preseed as it stand at the moment is below. Please note this is version 1 million and something - I've really been hacking away at this for days. I've tried non-LVM versions and so on. This just happens to be the most recent version I tried before I posted on here.

d-i partman-auto/disk string /dev/sda
d-i partman/default_filesystem string ext4
d-i partman-auto/method string lvm
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-lvm/guided_size string max
d-i partman-auto/choose_recipe select atomic
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

The machine also has a second 1Tb disk in it which would be mounted as /data once I get the first disk portioned correctly.

I really hope someone out there can help because I've spent way to long on this one problem.

Steve

2 Answers 2

1

By selecting "atomic" you are telling the installer to use a predefined recipe file. The installer will look for this "atomic" recipe file in the following dirs:

/lib/partman/recipes-<arch>-<subarch>/*
/lib/partman/recipes-<arch>/*
/lib/partman/recipes/*

Search for the atomic recipe in these dirs to see if it is defining what you want.

Here is a preseed recipe that I have working on our PXE server to only set up a swap partition and use the rest of the disk for root(Ubuntu 14.04, netboot install):

d-i partman-auto/init_automatically_partition select biggest_free

d-i partman-auto/expert_recipe string             \
    swap-root ::                                  \
        2048 4000 2048 linux-swap                 \
            method{ swap } format{ }              \
    .                                             \
        100 10000 100000000 ext3                  \
            $primary{ }                           \
            method{ format } format{ }            \
            use_filesystem{ } filesystem{ ext3 }  \
            mountpoint{ / }                       \
    .

#d-i partman-auto/choose_recipe select swap-root
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
0

I've found out what is going on. I'm not sure if I want to use the word "bug" to describe this but I've been able to repeat it and carry out tests to confirm my findings.

Long story short - the machines I'm working on have a 240GB SSD and 512GB of memory. If I reduce the amount of RAM so it's less than 120Gb (half the size of the SSD) the atomic partition scheme works correctly. As soon as the installed RAM exceeds 120Gb I get a 9Gb / partition and everything else assigned to /home.

I've got round this by learning about expert recipes and specifying a 64Gb swap partition. Everything else just falls in to place.

I hope this helps someone else out.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .