Во время установки Debian на сервере с SSD получил ошибку в процессе установки Grub. Диск был абсолютно новый, поэтому для его разметки использовал утилиту fdisk
. В процессе создал один primary
раздел на все доступное пространство диска. Когда программа fdisk
попросила указать первый и последний сектор для нового раздела, я просто нажал Enter чтобы использовать параметры по умолчанию.
Затем на этом разделе создал физический том LVM и запустил установку системы. Когда дело дошло до записи загрузчика, grub-pc
выдал мне следующую ошибку:
grub-install: warning: Attempting to install GRUB to a disk with multiple partition labels. This is not supported yet.. grub-install: error: embedding is not possible, but this is required for RAID and LVM install.
Проблема была вызвана тем, что после создания раздела, оставшегося пространства было достаточно для записи файлов загрузчика Grub.
Для разметки диска используйте следующую инструкцию. В процессе разметки, у меня первый сектор раздела по умолчанию был равен 96. После того как я изменил это значение до 2048, загрузчик Grub установился без проблем.
# fdisk /dev/sda GNU Fdisk 1.2.5 Copyright (C) 1998 - 2006 Free Software Foundation, Inc. This program is free software, covered by the GNU General Public License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Using /dev/sda Command (m for help): d Partition number (1-1): 1 Command (m for help): p Disk /dev/sda: 128 GB, 128034708480 bytes 255 heads, 63 sectors/track, 15566 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System Command (m for help): n Partition type e extended p primary partition (1-4) p First cylinder (default 0cyl): 2047 Last cylinder or +size or +sizeMB or +sizeKB (default 15565cyl): Command (m for help): a Partition number (1-1): 1 Command (m for help): t Partition number (1-1): 8e Error: Partition doesn't exist. Command (m for help): p Disk /dev/sda: 128 GB, 128034708480 bytes 255 heads, 63 sectors/track, 15566 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 2048 15566 124969383 83 Linux Command (m for help): w Information: Don't forget to update /etc/fstab, if necessary. Writing all changes to /dev/sda.