Just like in the title:
I have two HDD (
/dev/sda
and/dev/sdb
) on my PC, each has its own EFI (flags:boot
,hidden
,esp
) partition. How to force ubuntu to install/boot/efi
on/dev/sdb2
instead of on/dev/sda1
My setup:
ubuntu@ubuntu:~$ sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
NAME FSTYPE SIZE MOUNTPOINT LABEL
sda 119.2G
├─sda1 vfat 100M ESP
├─sda2 16M
├─sda3 ntfs 118.1G Acer
└─sda4 ntfs 1G Recovery
sdb 931.5G
├─sdb1 ntfs 481.5G Data
├─sdb2 vfat 512M
├─sdb3 ext4 5G
├─sdb4 swap 32G [SWAP]
└─sdb5 LVM2_member 150G
└─vg_ubuntu-lv_ubuntu
100G
sdc 7.3G
└─sdc1 vfat 7.3G /cdrom UBUNTU 19_0
ubuntu@ubuntu:~$
sda
is my "factory installed" windows.
sda1
is (Windows boot loader).
My "goal" is to keep sda
intact/unchanged via installing linux as follows:
NAME FSTYPE SIZE MOUNTPOINT LABEL
sda 119.2G
├─sda1 vfat 100M ESP
├─sda2 16M
├─sda3 ntfs 118.1G Acer
└─sda4 ntfs 1G Recovery
sdb 931.5G
├─sdb1 ntfs 481.5G Data
├─sdb2 vfat 512M /boot/efi
├─sdb3 ext4 5G /boot
├─sdb4 swap 32G [SWAP]
└─sdb5 LVM2_member 150G
└─vg_ubuntu-lv_ubuntu /
unfortunately, yesterday I messed something up, and I installed ubuntu 19 this way:
NAME FSTYPE SIZE MOUNTPOINT LABEL
sda 119.2G
├─sda1 vfat 100M /boot/efi ESP
├─sda2 16M
├─sda3 ntfs 118.1G Acer
└─sda4 ntfs 1G Recovery
sdb 931.5G
├─sdb1 ntfs 481.5G Data
├─sdb2 vfat 512M
├─sdb3 ext4 5G /boot
├─sdb4 swap 32G [SWAP]
└─sdb5 LVM2_member 150G
└─vg_ubuntu-lv_ubuntu /
I plan to boot into /dev/sdb
via changing the order bios' bootloader.
Any idea what can I do to "achieve" the desired effect?
EDIT:
This question was marked as a possible duplicate of:
How can I reinstall GRUB to the EFI partition?
This is not true. The link above (at least according to my understanding) explains how to move grub
from one partition to another, or how to install it from "zero". With the requirement that the Linux OS is already installed.
My question was about "forcing" the grub onto the correct partition during the installation, not after.
If anything, this question is closer to being a duplicate of:
How do I install Ubuntu to a USB key? (without using Startup Disk Creator)
(just replace "USB key
" with "2nd internal HDD
")
ESP flags
(boot
,hidden
,efi
) from the/dev/sda1
partition. The 18th comment (https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1396379/comments/18) in the bug-thread explains the solution. – PatrykB Aug 03 '19 at 20:18