Переместить загрузчик или удалить раздел efi на втором диске

Я новичок здесь, поэтому заранее прошу прощения, если мой вопрос не является корректным.

У меня есть система двойной загрузки, на двух разных дисках. Windows was pre-installed on the first drive (500 Gb), then I installed ubuntu 20.04 on the second 1 Tb drive following the answer in this discussion Dual Booting win 10 and Ubuntu 18.04 on two separate physical ssds (I find it very very useful and clear). Both disks are SSD. The system is full uefi. Since I wanted to completely isolate the two different operating systems I configured the second drive like this:

  • 650 Mb Efi partition (sdb1)
  • 20 Gb Ext4 @ / (sdb2)
  • 10 Gb Swap (sdb3)
  • remaining free space @ /home (sdb4)

During the ubuntu installation process I did not unplug the first drive (where Windows is) and I incredibly skipped (that's my fault, I know) the “workaround” steps to avoid the installation of ubuntu bootloader on the first drive (this situation is known as a bug as I read in the discussion linked before). So, even if I chose the “sdb1” partition (just created) in the “Device for boot loader installation” menu, probably that bug occurred or simply my choice was ignored. Now I have two questions, which represent for me two alternative ways to restore the situation:

1 – Can I move the ubuntu bootloader from the first drive, to Efi partition in the second drive? If yes, how can I do this? In this way I hope to isolate the two OS.

If not, the second question is:

2 – Since the ubuntu bootloader is now installed on the Efi partition of the first drive, can I delete the Efi partition of the second drive that I created during installation process? In fact I see that this partition is empty and unmounted, so basically unutilized.

0
задан 14 June 2020 в 14:47

2 ответа

Столкнувшись с той же проблемой в Ubuntu 18.04, я последовал ответу PrakashS, убедившись, что новый раздел EFI был смонтирован в /boot/efi перед установкой в ​​него grub.

Сначала я создал новый раздел FAT32 с помощью GParted на диске Ubuntu с флагом boot. (GParted автоматически добавляет флаг esp при проверке boot.)

В приведенных ниже инструкциях используется sdb1 для нового раздела EFI, чтобы он соответствовал имени устройства в вашем вопрос.

  1. Найдите UUID sdb1:
    sudo blkid | grep /dev/sdb1

  2. Измените UUID записи /boot/efi в /etc/fstab на UUID sdb1:
    sudo nano /etc/fstab

  3. Отключите Windows EFI из и смонтируйте Ubuntu EFI в / boot/efi:
    sudo umount /boot/efi && sudo mount /boot/efi

  4. Подтвердите, что sdb1 смонтирован в /boot/efi:
    lsblk | grep /boot/efi

  5. Установить grub на sdb (без номера детали):
    sudo grub-install /dev/sdb

  6. Создать образ initramfs:
    sudo update-initramfs -u -k all

  7. Создать конфигурационный файл grub2:
    sudo update-grub

  8. Перезагрузить.

  9. Подтвердите, что sdb1 все еще смонтирован в /boot/efi:
    lsblk | grep /boot/efi

6
ответ дан 30 November 2020 в 16:04

Follow this procedure to move the boot loader:

  1. Find the UUID of /dev/sdb1 using sudo blkid (copy it)
  2. Change the UUID of boot/efi entry in /etc/fstab with that of sdb1
  3. sudo grub-install /dev/sdb
  4. sudo update-initramfs -u -k all
  5. sudo update-grub
  6. Reboot

Check with lsblk whether /dev/sdb1 be mounted in /boot/efi.

0
ответ дан 19 June 2020 в 21:25

Другие вопросы по тегам:

Похожие вопросы: