1
我有一些问题让我的分区是主类型,而不是逻辑/扩展。Ubuntu 14.04 preseed LVM磁盘配置
这里是我的preseed的相关代码:
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-md/device_remove_md boolean true
d-i partman-lvm/confirm boolean true
d-i partman-auto-lvm/guided_size string max
d-i partman-auto/choose_recipe select boot-root
d-i partman-auto-lvm/new_vg_name string vg00
d-i partman-auto/expert_recipe string \
boot-root :: \
512 512 512 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
mountpoint{ /boot } \
. \
2048 2048 2048 swap \
$primary{ } $lvmok{ } lv_name{ lv_swap } $defaultignore{} \
method{ swap } format{ } \
. \
1024 10000 -1 ext4 \
$primary{ } $lvmok{ } lv_name{ lv_root } $defaultignore{}\
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{/} \
.
d-i partman-partitioning/confirm_write_new_label 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/confirm_nooverwrite boolean true
的问题是,这则创建以下分区方案:
[email protected]:~# fdisk /dev/sda
Command (m for help): p
Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders, total 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/O size (minimum/optimal): 512 bytes/512 bytes
Disk identifier: 0x0009ac4d
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2000895 999424 83 Linux
/dev/sda2 2002942 20969471 9483265 5 Extended
/dev/sda5 2002944 20969471 9483264 8e Linux LVM
我想删除这个多余的扩展/逻辑分区,只需将Linux LVM分区放在sda2(主)上即可。像这样:
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2000895 999424 83 Linux
/dev/sda2 2002942 20969471 9483265 8e Linux LVM