1

I have now three hard disks in my desktop. A Samsung SSD that boots Win7, a Toshiba HDD which is not bootable, and yesterday I added a Crucial SSD which boots Ubuntu 21.04.

If I now simply start my computer, Linux on the Crucial will boot..

If at startup I press F11 this allows to choose between these three and surprisingly, a non-existing fourth named "Ubuntu"(?). If I click on the Samsung then Windows will boot, if I click on the Crucial (or Ubuntu) Ubuntu will boot. As you can see on the left of the two pictures:

https://ibb.co/ctB75g0

The right picture shows what I get when press F2, the boot order setting at the ASRock Motherboard, while booting, I only get to "choose" between the identical Crucial and Ubuntu...

I want the Samsung to boot Win7 as default. From what I have heard, I have to do this in Ubuntu, and I know absolutely nothing about it. How do I make this change?

It was suggested to use grub-customizer for this, but as the picture shows, it does not even see the Samsung disk with the Windows.

https://ibb.co/fq1bKZC

My Win7 is not an UEFI, it is a legacy installation. Could that be the reason?

cocomac
  • 3,824

2 Answers2

0

You can convert an existing installation of Ubuntu from legacy to UEFI and vice versa. You need to reinstall GRUB to the device hosting grub, in my case this is /dev/nvme0n1

Legacy to UEFI

sudo grub-install --boot-directory=/boot --bootloader-id=ubuntu  --target=x86_64-efi --efi-directory=/boot/efi  /dev/nvme0n1

UEFI to Legacy

sudo grub-install --boot-directory=/boot --bootloader-id=ubuntu /dev/nvme0n1

Then update grub sudo update-grub

Now you can list grub entries by using this command:

grep -E "^(menuentry|submenu)" /boot/grub/grub.cfg | cut -d"'" -f2 | nl -v0

In my case it will show the following

     0  Ubuntu
     1  Advanced Options for Ubuntu
     2  Windows Boot Manager (sur /dev/nvme1n1p2)
     3  UEFI Firmware Settings

After you have to edit /etc/default/grub and set the corresponding number to GRUB_DEFAULT=0.

In my case Windows is entry n°2 so it will be GRUB_DEFAULT=2

Then you have to use sudo update-grub to update your grub, and now your computer will always boot windows by default.

Cheers

Fractalyse
  • 439
  • 3
  • 5
0

I've searched similar solution recently and this is the best I've found

boot loader configure last saved in ubuntu terminal

So according to this answer you can change the boot loader to load the last os you opened! also if you're not comfortable with gedit you can select for nano editor. This video shows to do with nano editor in very precise explaination.