Ubuntu

Preseed Ubuntu / Debian - 分區:防止“分區 1 不在物理扇區邊界上啟動”。

  • July 13, 2016

Ubuntu / Debian 的預置工作正常 - 系統是可啟動的。

fdisk -l結果如下:

Disk /dev/sda: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x000e157a

Device     Boot    Start       End  Sectors   Size Id Type
/dev/sda1             63    192779   192717  94.1M 83 Linux
/dev/sda2  *      192780   1172744   979965 478.5M 83 Linux
/dev/sda3        1172745  96470324 95297580  45.5G 83 Linux
/dev/sda4       96470325 104856254  8385930     4G 82 Linux swap / Solaris

Partition 1 does not start on physical sector boundary.
Partition 2 does not start on physical sector boundary.
Partition 3 does not start on physical sector boundary.
Partition 4 does not start on physical sector boundary.

我目前在 preseed 中的分區參數是:

d-i partman-lvm/device_remove_lvm                   boolean true
d-i partman-auto/purge_lvm_from_device              boolean true
d-i partman-md/device_remove_md                     boolean true
d-i partman-lvm/confirm                             boolean true
d-i partman/alignment                               select cylinder
d-i partman/confirm                                 boolean true
d-i partman-basicfilesystems/no_swap                  boolean false
d-i partman-partitioning/confirm_write_new_label    boolean true
d-i partman/choose_partition                        select finish
d-i partman/confirm_nooverwrite                     boolean true
d-i grub-installer/only_debian                      boolean true
d-i grub-installer/bootdev                                      string /dev/sda
d-i partman-auto/disk                               string /dev/sda
d-i partman-auto/method                             string regular
d-i partman-auto/expert_recipe string                         \
     boot-root ::                                            \
             100 50 100 free                                 \
                         $gptonly{ }                         \
                         $primary{ }                         \
                         $bios_boot{ }                       \
                         method{ biosgrub }                  \
             .                                               \
             500 50 500 ext2                                 \
                     $primary{ } $bootable{ }                \
                     method{ format } format{ }              \
                     use_filesystem{ } filesystem{ ext2 }    \
                     mountpoint{ /boot }                     \
             .                                               \
             500 10000 1000000000 ext4                       \
                     $primary{ }                             \
                     method{ format } format{ }              \
                     use_filesystem{ } filesystem{ ext4 }    \
                     mountpoint{ / }                         \
             .                                               \
             200% 500 200% linux-swap                        \
                     $primary{ }                             \
                     method{ swap } format{ }                \
             .

如何避免Partition {n} does not start on physical sector boundary錯誤。預置時如何在partman中設置正確的起始扇區和扇區大小?

d-i partman/alignment將您的參數更改為,optimal而不是cylinder. 這應該可以解決問題。

引用自:https://serverfault.com/questions/789310