Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

preseed with two hard disks

2,417 views
Skip to first unread message

Josep M.

unread,
Nov 28, 2009, 5:00:02 PM11/28/09
to
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.

Thanks
Josep

This is the related info, I changed this:


d-i partman-auto/expert_recipe string \
boot-root :: \
28000 512 28000 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
mountpoint{ / } \
. \
800 512 800 linux-swap \
$primary{ } \
method{ swap } format{ } \
. \
14130 256 14600 ext3 \
$primary{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
mountpoint{ /home } \
.


For this:

d-i partman-auto/expert_recipe string \
boot-root :: \
28000 512 28000 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
mountpoint{ / } \
. \
800 512 800 linux-swap \
$primary{ } \
method{ swap } format{ } \
. \
14130 256 14600 ext3 \
$primary{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
mountpoint{ /home } \
.
40000 256 40000 ext3 \
$primary{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
mountpoint{ /systembeta } \

And this is the full preseed part related to partitioning:


### Partitioning
# If the system has free space you can choose to only partition that space.
#d-i partman-auto/init_automatically_partition select biggest_free

# Alternatively, you can specify a disk to partition. The device name must
# be given in traditional non-devfs format.
# Note: A disk must be specified, unless the system has only one disk.
# For example, to use the first SCSI/SATA hard disk:
#d-i partman-auto/disk string /dev/sda
# In addition, you'll need to specify the method to use.
# The presently available methods are: "regular", "lvm" and "crypto"
d-i partman-auto/method string regular

# If one of the disks that are going to be automatically partitioned
# contains an old LVM configuration, the user will normally receive a
# warning. This can be preseeded away...
d-i partman-lvm/device_remove_lvm boolean true
# The same applies to pre-existing software RAID array:
d-i partman-md/device_remove_md boolean true
# And the same goes for the confirmation to write the lvm partitions.
d-i partman-lvm/confirm boolean true

# You can choose one of the three predefined partitioning recipes:
# - atomic: all files in one partition
# - home: separate /home partition
# - multi: separate /home, /usr, /var, and /tmp partitions
d-i partman-auto/choose_recipe select atomic

# Or provide a recipe of your own...
# The recipe format is documented in the file devel/partman-auto-recipe.txt.
# If you have a way to get a recipe file into the d-i environment, you can
# just point at it.
#d-i partman-auto/expert_recipe_file string /hd-media/recipe

# 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 :: \
28000 512 28000 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
mountpoint{ / } \
. \
800 512 800 linux-swap \
$primary{ } \
method{ swap } format{ } \
. \
14130 256 14600 ext3 \
$primary{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
mountpoint{ /home } \
.
40000 256 40000 ext3 \
$primary{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
&#-1;&#-1; mountpoint{ /systembeta } \
.. .

# This makes partman automatically partition without confirmation, provided
# that you told it what to do using one of the methods above.
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Richard Pijnenburg

unread,
Nov 28, 2009, 5:30:01 PM11/28/09
to
Hi Josep,

According to the documentation ( can't remember where exactly ) it's stated
that the preseed system can't handle 2 disks.
I'm trying to find a decent work around for it but no luck yet.
All we can do is hope the Debian developers will fix this some day.

Richard Pijnenburg


-----Oorspronkelijk bericht-----
Van: Josep M. [mailto:webs...@navegants.com]
Verzonden: zaterdag 28 november 2009 22:46
Aan: debia...@lists.debian.org
Onderwerp: preseed with two hard disks

Josep M.

unread,
Nov 28, 2009, 5:40:02 PM11/28/09
to
Hello Richard.

Thanks for the answer, I will add the second hard disk to /etc/fstab in
my script that is executed after install, where I install extra packages
after install.

Josep


El sáb, 28-11-2009 a las 23:13 +0100, Richard Pijnenburg escribió:
> Hi Josep,
>
> According to the documentation ( can't remember where exactly ) it's stated
> that the preseed system can't handle 2 disks.
> I'm trying to find a decent work around for it but no luck yet.
> All we can do is hope the Debian developers will fix this some day.
>
> Richard Pijnenburg
>
>
> -----Oorspronkelijk bericht-----
> Van: Josep M. [mailto:webs...@navegants.com]
> Verzonden: zaterdag 28 november 2009 22:46
> Aan: debia...@lists.debian.org
> Onderwerp: preseed with two hard disks
>
> 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.
>

--

Richard Pijnenburg

unread,
Nov 28, 2009, 5:40:01 PM11/28/09
to
I had the same idea.
My only problem is that I also want to be able to do Software raid and stuff.
The CentOS Kickstart can do all that, I hope that for the debian installer these options will be available soon.

Cheers.

Richard Pijnenburg


-----Oorspronkelijk bericht-----
Van: Josep M. [mailto:webs...@navegants.com]

Verzonden: zaterdag 28 november 2009 23:33
Aan: Richard Pijnenburg
CC: debia...@lists.debian.org
Onderwerp: RE: preseed with two hard disks

Jesús M. Navarro

unread,
Nov 29, 2009, 12:20:01 PM11/29/09
to
Hi, Richard:

On Saturday 28 November 2009 23:13:02 Richard Pijnenburg wrote:
> Hi Josep,
>
> According to the documentation ( can't remember where exactly ) it's stated
> that the preseed system can't handle 2 disks.
> I'm trying to find a decent work around for it but no luck yet.
> All we can do is hope the Debian developers will fix this some day.

I'd say going too complex is on the verge of going outside preseed's scope.
Given that even if you managed to do that you wouldn't be able
to "post-manage" the installation I'd say it would be a better fit using
preseed up the point of getting a basic running system and then passing
resposibility to a better suited tool for post-install management, like
puppet (or forgetting about preseed and push for FAI as your
install-automation tool).

Eric Gerlach

unread,
Nov 30, 2009, 4:20:02 PM11/30/09
to
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: eger...@feds.uwaterloo.ca

0 new messages