12.04预先安装RAID和LVM

我正在尝试使用以下分区configuration来设置预安装(Ubuntu 12.04.03 64位),但这只是不工作,我不知道为什么。

请奥比万,你是我唯一的希望

在大小-1是原来的10亿,所以我试着改为-1但没有任何区别。

 di partman-lvm/device_remove_lvm boolean true di partman-md/device_remove_md boolean true di partman-auto/purge_lvm_from_device boolean true di partman-auto/disk string /dev/sda /dev/sdb di partman-auto/method string raid di partman-auto-lvm/new_vg_name string vg_sys di partman-auto-lvm/guided_size string max di partman-auto/choose_recipe select raid-lvm di partman-auto/expert_recipe string \ raid-lvm :: \ 512 10 512 raid \ $primary{ } $lvmignore{ } $bootable{ } \ method{ raid } \ . \ 8192 20 -1 raid \ $primary{ } $lvmignore{ } \ method{ raid } \ . \ 1024 100 1024 ext4 \ $defaultignore $lvmok{ } lv_name{ root } \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext4 } \ mountpoint{ / } \ . \ 4096 100 4096 linux-swap \ $defaultignore $lvmok{ } lv_name{ swap } \ method{ swap } format{ } \ . \ 1024 100 2048 ext4 \ $defaultignore $lvmok{ } lv_name{ tmp } \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext4 } \ mountpoint{ /tmp } \ . \ 4096 100 8192 ext4 \ $defaultignore $lvmok{ } lv_name{ var } \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext4 } \ mountpoint{ /var } \ . \ 2048 100 4096 ext4 \ $defaultignore $lvmok{ } lv_name{ usr } \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext4 } \ mountpoint{ /usr } \ . \ 2048 110 16384 ext4 \ $defaultignore $lvmok{ } lv_name{ home } \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext4 } \ mountpoint{ /home } \ . \ 512 1000 -1 ext4 \ $defaultignore $lvmok{ } lv_name{ deleteme } \ method{ lvm } \ . di partman-auto-raid/recipe string \ 1 2 0 ext4 /boot /dev/sda1#/dev/sdb1 . \ 1 2 0 lvm - /dev/sda2#/dev/sdb2 . # the 'deleteme' LV soaks up the leftover space in the VG di preseed/late_command string in-target lvremove -f vg_sys/deleteme di partman-partitioning/confirm_write_new_label boolean true di partman/choose_partition select finish di partman/confirm boolean true di partman/confirm_nooverwrite boolean true di partman-lvm/confirm boolean true di partman-md/confirm boolean true di partman-md/confirm_nooverwrite boolean true di partman/mount_style select label di mdadm/boot_degraded boolean false 

这是我得到的错误:

刺激性失败的形象

磁盘是双50GiB(准确地说,是536870912200字节)。

我认为你的错误在这里:

 di partman-auto/choose_recipe select raid-lvm di partman-auto/expert_recipe string \ raid-lvm :: \ 

当您要使用工厂预定义的配方时,可以使用partman-auto / choose_recipe。 如果你不是,那么使用partman-auto / expert_recipe制定你自己的配方,指定multiraid,而不是raid-lvm。

那么你的configuration文件应该是

 di partman-auto/expert_recipe string \ multiraid :: \ 

我的结论来自于阅读这个和这个 。

如果你在这里使用的是32位或者64位版本,你不会提到,但是我认为在你的错误中报告的数字是很奇怪的,“2200008705”。 那从哪里来? 那么,取这个数字,减去一个32位无符号整数(2147483647)的最大值,你会得到52,525,058,这看起来非常像你的50GB磁盘的确切大小,不是吗?

查看partman-auto-recipe.txt的第5部分,即关于使用非常大的尺寸来填充所有可用空间的分区,它说:

 Do not use higher than 1000000000 numbers because the shell arithmetic is limited to 31 bits (on i386). 

在你的问题中,你说过在将值设置为-1之前,它们被设置为10000000000,与他们对于最大值的build议相比,这是一个地方/零太多。 也许你在某个地方溢出了一个值,这就是为什么你的配方最初没有工作,然后再将它改为-1?

我在这里结束了,因为我得到了完全相同的错误:

 Error: No recipe specified in partman-auto-raid/recipe 

随着:

 Available disk space (XXX) too small for expert recipe (2200008705) 

这里是我的BAD preseed文件的相关位:

 di partman-auto/method string raid di partman-auto/disk string /dev/sda /dev/sdb di partman-auto/expert_recipe string \ multiraid :: \ 1 1 1 free \ $gptonly{ } \ $primary{ } \ $bios_boot{ } \ method{ biosgrub } \ . \ 4096 1000 4096 linux-swap \ $gptonly{ } \ $primary{ } \ method{ swap } format{ } \ . \ 141101 1000 141901 raid \ $gptonly{ } \ $primary{ } \ method{ raid } format{ } \ . \ 1 2000 -1 ext4 \ $gptonly{ } \ $primary{ } \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext4 } \ . \ # Last you need to specify how the previously defined partitions will be # used in the RAID setup. Remember to use the correct partition numbers # for logical partitions. RAID levels 0, 1, 5, 6 and 10 are supported; # devices are separated using "#". # Parameters are: # <raidtype> <devcount> <sparecount> <fstype> <mountpoint> \ # <devices> <sparedevices> di partman-auto-raid/recipe string 1 2 0 ext4 / /dev/sda2#/dev/sdb2 . 

问题,令人讨厌的是,我在专家配方的最后一行的末尾留下了一个尾随的反斜杠。 应该是这样的:

  1 2000 -1 ext4 \ $gptonly{ } \ $primary{ } \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext4 } \ . 

希望这有助于某人!

那么它semms,你有第一个错误是你的RAIDconfiguration不正确,因为我可以读:“configuration文件中找不到数组”

我猜你的RAIDconfiguration有问题。

也许你可以采取这样的线程: http : //ubuntuforums.org/showthread.php?t=1879350