Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I know that boot partition is possible to create within debian distribution that has grub 2.0, as I have done before with ubuntu. I have been trying many different ...
  1. #1
    Just Joined!
    Join Date
    Mar 2011
    Posts
    6

    How to make boot partition within LVM in debian using preseed

    Hi, I know that boot partition is possible to create within debian distribution that has grub 2.0, as I have done before with ubuntu. I have been trying many different options with my preseed file but it keeps taking the boot partition out of LVM and creating and extended partition too and then creates the LVM primary partition. My preseed file is below if someone can please address the problem would be great.


    <code>

    ### Partitioning.

    # you can specify a disk to partition. The device name can be given in either
    # devfs or traditional non-devfs format. For example, to use the first disk
    # devfs knows of:

    ## NOTE: disabled for lenny, as it seemed to cause issues
    #d-i partman-auto/disk string /dev/discs/disc0/disc

    # 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 lvm


    #If the folowing section is uncommented, the some new LVs are created and associated to mountpoints
    #but the LVs are not what is specified in the recipe below
    d-i partman-auto-lvm/new_vg_name string DEBIAN
    d-i partman-lvm/vgcreate string DEBIAN

    # 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-auto/purge_lvm_from_device boolean true
    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

    # For LVM partitioning, you can select how much of the volume group to use
    # for logical volumes.
    #d-i partman-auto-lvm/guided_size string max
    #d-i partman-auto-lvm/guided_size string 10GB
    #d-i partman-auto-lvm/guided_size string 50%

    # Alternately, If the system has free space you can choose to only partition
    # that space.
    #d-i partman-auto/init_automatically_partition select Use the largest continuous free space
    #d-i partman-auto/init_automatically_partition select Guided - use entire disk

    # You can choose from any of the predefined partitioning recipes:
    #d-i partman-auto/choose_recipe select All files in one partition (recommended for new users)
    #d-i partman-auto/choose_recipe select Desktop machine
    #d-i partman-auto/choose_recipe select Multi-user workstation


    #options are cylinder/minimal/optimal
    #d-i partman-auto/alignment string optimal


    # If not, you can put an entire recipe in one line. This example creates
    # a small /boot partition, suitable swap, and uses the rest of the space
    # for the root partition:

    #####################LVM RECIPE

    d-i partman-auto/expert_recipe string \
    dphys-ws-part :: \
    1000000 1000000 -1 ext3 \
    $primary{ } \
    $bootable{ } \
    method{ lvm } \
    vg_name{ DEBIAN } . \
    256 256 256 ext3 \
    $lvmok{_} in_vg{ DEBIAN } lv_name{ Boot } \
    method{ format } format{ } \
    use_filesystem{ } filesystem{ ext3 } \
    mountpoint{ /boot } . \
    1000 1000 200% linux-swap \
    $lvmok{_} in_vg{ DEBIAN } lv_name{ Swap } \
    method{ swap } format{ } . \
    60000 100000 -1 xfs \
    $lvmok{_} in_vg{ DEBIAN } lv_name{ Root } \
    method{ format } format{ } \
    use_filesystem{ } filesystem{ xfs } \
    mountpoint{ / } \
    options/noatime{ noatime } \
    options/noquota{ noquota } \
    options/ikeep{ ikeep } \
    options/logbufs{ logbufs=8 } \
    options/logbsize{ logbsize=256k } . \
    10000 10000 10000 ext3 \
    $lvmok{_} in_vg{ DEBIAN } lv_name{ Spare } \
    method{ keep } .

    ############################

    # uncomment the following three values to makes partman automatically partition
    # without confirmation.
    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

    </code>
    Last edited by shorif2000; 03-16-2011 at 02:07 PM.

  2. #2
    Just Joined!
    Join Date
    Mar 2011
    Posts
    6
    The following creates a single LVM primary partition but there is no boot as i don't know how to put that in.

    Code:
    d-i partman-auto/expert_recipe string				\
    	boot-root ::	                                        \
    	1000000 1000000 -1 ext3					\
    		$lvmignore{ }					\
    		$primary{ } $bootable{ }			\
    		method{ lvm } .					\
    	1000 1000 200% linux-swap                               \
    		$lvmok{ } lv_name{ Swap }			\
    		method{ swap } format{ } .			\
    	20000 100000 -1 xfs                                  	\
    		$lvmok{ } lv_name{ Root }			\
    		method{ format } format{ }                      \
    		use_filesystem{ } filesystem{ xfs }		\
    		mountpoint{ / }					\
    		options/noatime{ noatime } .			\
    	10000 10000 10000 ext3                                 	\
    		$lvmok{ } lv_name{ Spare1 }			\
    		method{ format } format{ }                      \
    		use_filesystem{ } filesystem{ ext3 }		\
    		options/noatime{ noatime } .			\
    	10000 10000 10000 ext3                                 	\
    		$lvmok{ } lv_name{ Spare1 }			\
    		method{ format } format{ }                      \
    		use_filesystem{ } filesystem{ ext3 }		\
    		options/noatime{ noatime } .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •