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.

Some of the machines that I'm provisioning have a separate /dev/sdb to be used for /home, and some only have a single disk.

Is there a way I can set up preseed so that if /dev/sdb exists, it uses 100% of that for /home, but if it doesn't, it makes a /home partition on /dev/sda?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Short answer: you can't.

Long answer: as far as I am aware, you will need to run some kind of early_command to read the current disks and echo the results of that to a file that partman will read later, presumably on /hd-media somewhere.

I have once found a program/script that would do this, I think, but my Google-fu does not seem to work right now =/

share|improve this answer
    
Thanks. What I ended up doing was writing a little script for my postinstall which, if the 2nd disk is present, moves the contents of /home to that disk and then does all the necessary stuff (fstab, etc) to make that the new /home. –  dmd Mar 9 '13 at 15:45
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.