[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: preseed with two hard disks



On Sat, Nov 28, 2009 at 10:46:28PM +0100, Josep M. wrote:
> Hello.
> 
> I use lenny, I do tests in Virtualbox virtual machines, I have one HD of
> 40GB in these virtual machine, now I added a second hard disk in the
> virtual machine, but I can't 
> found how to do for create a partition on this second hard disk.

We do this on our systems, but we use LVM (which might be necessary, can't
recall, try it without first)).

The relevant preseed section is below.  Enjoy!

Cheers,

Eric

### BEGIN Partitioning
# Okay, this is pretty complicated, don't mess with it unless you know what
# you're doing.

# Since we're installing on VMWare servers *always*, we can assume that
# the hard drive is /dev/sda.  But we also need to specify /dev/sdb for the
# swap disk
d-i partman-auto/disk string /dev/sda /dev/sdb

# We're using the LVM disk partitioning method.  This is so we can specify
# which disk a partition is on, and so that we have static device names across
# all systems.
d-i partman-auto/method string lvm

# If one of the disks that are going to be automatically partitioned contains
# an old LVM configuration, we normally receive a warning. This can be
# preseeded away...
d-i partman-lvm/device_remove_lvm boolean true
# Also the prompt to write out the LVM configuration to disk
d-i partman-lvm/confirm boolean true

# This is the recipe to create our partitions.  How to make one is described in
# partman-auto-recipe.txt.  Just google the filename to find out more.  Right
# now we get roughly:
# -  100M /boot
# -  1.0G /
# -  2.0G /usr
# -  1.0G /tmp
# -  2.0G /var
# -  1.0G /var/log
# -  2.0G swap
d-i partman-auto/expert_recipe string                                   \
        feds-server ::                                                  \
                50 1000 100 ext3                                        \
                        $primary{ }                                     \
                        $bootable { }                                   \
                        method{ format }                                \
                        format{ }                                       \
                        use_filesystem{ }                               \
                        filesystem{ ext3 }                              \
                        mountpoint{ /boot } .                           \
                50 5000 500000000 ext3                                  \
                        $defaultignore{ }                               \
                        $primary{ }                                     \
                        method{ lvm }                                   \
                        device{ /dev/sda }                              \
                        vg_name{ vgmain } .                             \
                50 5000 500000000 ext3                                  \
                        $defaultignore{ }                               \
                        $primary{ }                                     \
                        device{ /dev/sdb }                              \
                        method{ lvm }                                   \
                        vg_name{ vgswap } .                             \
                512 1024 1536 ext3                                      \
                        $lvmok{ }                                       \
                        in_vg{ vgmain }                         \
                        lv_name{ root }                                 \
                        method{ format }                                \
                        format{ }                                       \
                        use_filesystem{ }                               \
                        filesystem{ ext3 }                              \
                        mountpoint{ / } .                               \
                1024 2048 2560 ext3                                     \
                        $lvmok{ }                                       \
                        in_vg{ vgmain }                                 \
                        lv_name{ usr }                                  \
                        method{ format }                                \
                        format{ }                                       \
                        use_filesystem{ }                               \
                        filesystem{ ext3 }                              \
                        mountpoint{ /usr } .                            \
                512 1024 1536 ext3                                      \
                        $lvmok{ }                                       \
                        in_vg{ vgmain }                                 \
                        lv_name{ tmp }                                  \
                        method{ format }                                \
                        format{ }                                       \
                        use_filesystem{ }                               \
                        filesystem{ ext3 }                              \
                        mountpoint{ /tmp } .                            \
                1024 2048 2560 ext3                                     \
                        $lvmok{ }                                       \
                        in_vg{ vgmain }                                 \
                        lv_name{ var }                                  \
                        method{ format }                                \
                        format{ }                                       \
                        use_filesystem{ }                               \
                        filesystem{ ext3 }                              \
                        mountpoint{ /var } .                            \
                512 1024 1536 ext3                                      \
                        $lvmok{ }                                       \
                        in_vg{ vgmain }                                 \
                        lv_name{ var_log }                              \
                        method{ format }                                \
                        format{ }                                       \
                        use_filesystem{ }                               \
                        filesystem{ ext3 }                              \
                        mountpoint{ /var/log } .                        \
                512 5000 5000000000 linux-swap                          \
                        $lvmok{ }                                       \
                        in_vg{ vgswap }                                 \
                        lv_name{ swap }                                 \
                        method{ swap }                                  \
                        format{ } .

# These are just to get rid of prompts
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition \
       select Finish partitioning and write changes to disk
d-i partman/confirm boolean true
### END Partitioning


-- 
Eric Gerlach, Network Administrator
Federation of Students
University of Waterloo
p: (519) 888-4567 x36329
e: egerlach@feds.uwaterloo.ca


Reply to: