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

LVM preseed install fails with partition error

1,098 views
Skip to first unread message

Sandeep Raman

unread,
Mar 13, 2014, 4:00:02 PM3/13/14
to

I am using a preseed file on a physical server with the following requirement:

The 146gb disk need to be partitioned as 120gb '/' partition and 25gb 'swap' partition with lvm.

The install fails with the error "Description: Failed to partition the selected diskThis happened because the selected recipe does not contain any partition that can be created on LVM volumes."

The following lines from the preseed specific to disk configuration:

d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string lvm
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-lvm/confirm boolean true
d-i partman/choose_partition select finish
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-auto-lvm/guided_size string max
d-i partman-auto/choose_recipe select root_swap
d-i partman/default_filesystem string ext4
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman-auto/expert_recipe string root_swap :: \
120000 10 120000 ext4 \
$defaultignore{ }
$lvmok{ } lv_name{ root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / }

25000 20 25000 linux-swap \
$lvmok{ } lv_name{ swap_1 } \
method{ swap } format{ }

Is any other option needed in the preseed for this to work?

Cheers,
Sandeep.

Iain M Conochie

unread,
Mar 13, 2014, 5:40:03 PM3/13/14
to
Hi Sandeep

I think you are missing a section to describe the LVM volume group
you want to create. This one works for me:

100 1000 1000000000 ext3 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
device{ /dev/sda } \
vg_name{ systemlv } \
.

I think you also need to add

in_vg{ systemlv }

to all the logical volumes (partitions) you want to create. Obviously,
you can change the name systemlv to what ever you want.

You may also want to add this to the disk partition definition:

d-i partman/choose_partition select Finish partitioning and write
changes to disk

Good luck!

Iain
--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/53222205...@thargoid.co.uk

Sandeep Raman

unread,
Mar 14, 2014, 11:40:02 AM3/14/14
to
On Fri, Mar 14, 2014 at 2:54 AM, Iain M Conochie <ia...@thargoid.co.uk> wrote:
Hi Sandeep

  I think you are missing a section to describe the LVM volume group you want to create. This one works for me:

              100 1000 1000000000 ext3       \
                       $defaultignore{ }     \
                       $primary{ }           \
                       method{ lvm }         \
                       device{ /dev/sda }  \
                       vg_name{ systemlv }    \
              .

I think you also need to add

in_vg{ systemlv }

to all the logical volumes (partitions) you want to create. Obviously, you can change the name systemlv to what ever you want.

You may also want to add this to the disk partition definition:

d-i partman/choose_partition select Finish partitioning and write changes to disk

Good luck!

Iain



Hi Iain,

I made changes as below based on your inputs. However I see the same error. Perhaps I'm missing something too obvious. Is there a chance the old content is being read still even though the preseed file is updated with the changes?

It is a vm with 150gb disk. 
To make sure I am doing it correctly and my understanding is right about the three values given below:

153600 100 153600 ext4 - Use the full 150gb disk and a priority # 100
120000 90 120000 ext4 \ - Use 120gb / partition with priority # 90
25000 80 25000 linux-swap \ - Use 25gb swap partition with priority # 80

d-i partman-auto/expert_recipe string i3 ::     \
153600 100 153600 ext4       \
$defaultignore{ }     \
$primary{ }           \
method{ lvm }         \
device{ /dev/sda }  \
vg_name{ i3vg }    \

120000 90 120000 ext4 \
$defaultignore{ }
$lvmok{ } lv_name{ root } in_vg{ i3vg } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / }

25000 80 25000 linux-swap \
$lvmok{ } lv_name{ swap_1 } in_vg{ i3vg } \
method{ swap } format{ }

Instead of <<d-i partman/choose_partition select Finish partitioning and write changes to disk>>, the following works for me <<d-i partman/choose_partition select finish>>

Cheers,
Sandeep.

Sandeep Raman

unread,
Mar 17, 2014, 6:40:02 AM3/17/14
to
On Sun, Mar 16, 2014 at 2:38 AM, Iain M Conochie <ia...@thargoid.co.uk> wrote:
Hi Sandeep

  Can you perhaps try this for your preseed?


d-i partman-auto/disk string /dev/sda
d-i partman-auto/choose_recipe select root_swap
d-i partman-auto/method string lvm
d-i partman-auto/purge_lvm_from_device boolean true
d-i partman-auto-lvm/guided_size string 100%
d-i partman-auto-lvm/no_boot boolean true
d-i partman/choose_partition select finish

d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
d-i partman-partitioning/confirm_write_new_label boolean true


d-i partman-auto/expert_recipe string i3 ::     \
153600 100 153600 ext4       \
$defaultignore{ }     \
$primary{ }           \
method{ lvm }         \
device{ /dev/sda }  \
vg_name{ i3vg }    \ .



120000 10 120000 ext4 \
$defaultignore{ }
$lvmok{ } lv_name{ root } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } . \


25000 20 25000 linux-swap \
$lvmok{ } lv_name{ swap_1 } \
method{ swap } format{ } .

Good luck

Iain


Hi Iain,

I removed all the partman related lines and created a new preseed file. It works now on vm but has issue with baremetal for which i'll start a new thread. This is my complete preseed file for reference - http://paste.debian.net/88147/

Cheers,
Sandeep.

Brian

unread,
Mar 17, 2014, 1:40:03 PM3/17/14
to
On Mon 17 Mar 2014 at 16:00:34 +0530, Sandeep Raman wrote:

> thread. This is my complete preseed file for reference -
> http://paste.debian.net/88147/

It can be referred to up to 2014-06-15 11:30:04. After that it expires.

I'll note that the mail you sent was about 10096 in size. The file at
paste.debian.net is about a third the size of the mail, 3800, and easily
compressed to 1200, As an attachment sent to the List it would surely be
acceptable. It would also not expire and serve a use for future readers.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/1703201417244...@desktop.copernicus.demon.co.uk

Iain M Conochie

unread,
Mar 17, 2014, 9:10:01 PM3/17/14
to
<snip>


Hi Iain,

I removed all the partman related lines and created a new preseed file. It works now on vm but has issue with baremetal for which i'll start a new thread. This is my complete preseed file for reference - http://paste.debian.net/88147/

Cheers,
Sandeep.

I think it was getting picky with no . after the partition definition. I will be interested to see what issues you have with baremetal that are do not exist for a VM

Cheers

Iain

Chris Bannister

unread,
Mar 17, 2014, 11:20:01 PM3/17/14
to
On Mon, Mar 17, 2014 at 05:34:17PM +0000, Brian wrote:
> I'll note that the mail you sent was about 10096 in size. The file at
> paste.debian.net is about a third the size of the mail, 3800, and easily
> compressed to 1200, As an attachment sent to the List it would surely be
> acceptable. It would also not expire and serve a use for future readers.

I think the attachment size limit is about 40K, although I can't be too
sure if that relates to lists.debian.org but it does for the OT list on
alioth.

I think it is important that log and screen snapshots be accepted so
that future archive searches don't end up being directed to some
pastebin site which will probably expire after a time anyway.

--
"If you're not careful, the newspapers will have you hating the people
who are being oppressed, and loving the people who are doing the
oppressing." --- Malcolm X


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Archive: https://lists.debian.org/20140318031228.GA22947@tal
0 new messages