Score:-1

How can I setup a dual boot of Ubuntu 22.04 and Windows 7?

hm flag

Sorry if this question has already been answered, but there is a lot of information online and I am not sure what to do.

What I want, is a system where I can boot into Ubuntu or Windows from my computer startup. I think this is done by using GRUB but I'm not sure.

Here is everything that I have:


I have 3 disks:


When I boot up my computer, it boots into GRUB and asks me what I want to boot up.

To get this to work originally, I had to change some stuff in /etc/default/grub. Here is what it looks like (top half only):

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

I changed GRUB_TIMEOUT_STYLE from hidden to menu, and I changed GRUB_TIMEOUT from 0 to 10.

The GRUB menu though only shows Ubuntu, Advanced Options for Ubuntu, and 2 memory tests.


After that, I installed boot-repair using:

$ sudo add-apt-repository ppa:yannubuntu/boot-repair
$ sudo apt-get update
$ sudo apt-get install -y boot-repair

and I ran it using $ boot-repair, clicked Recommended Repair, and it outputted:

GPT detected. Please create a BIOS-Boot partition (>1MB, unformatted filesystem, bios_grub flag). This can be performed via tools such as Gparted. Then try again.
Alternatively, you can retry after activating the [Separate /boot/efi partition:] option.

According to other answers, I think I need to create an unformatted partition and give it the flag bios_grub, but I'm not sure.


Extra info:

  • $ neofetch returns: neofetch.
  • $ sudo os-prober returns: /dev/sdc1:Windows 7:Windows:chain.

Sorry if this question ended up too long or if there is a really simple fix.

I am quite new to Ubuntu and still getting used to the way it works.

Thanks in advance :)

Will avatar
id flag
I know this doesn’t answer your question, but are you really sure you want to run windows 7? If it’s connected in any way, it’s not safe at all - all support ended over 3 years ago so there have been no security updates at all for a very long time.
Aaron Chauhan avatar
hm flag
@Will I'm only going to be using Windows 7 for one app (ableton live). I spent 3-4 hours yesterday trying to get Windows 10 to work but no luck. As soon as I tried Windows 7 everything was fine. Plus, I'm pretty sure that Windows 7 is less intensive so for only running one app it is fine for me :)
Aaron Chauhan avatar
hm flag
@user68186 I just want to have a system where I can boot into either Ubuntu or Windows. Ubuntu is my main os where I'll be spending most of my time, and Windows will be for just using one app (ableton live), and potentially non-linux apps in the future. Ubuntu 22.04 and Windows 7 are already installed. (edited question for clarity)
oldfred avatar
cn flag
You should not try to mix UEFI & BIOS. Still do not recommend unsupported Windows. But you need to change drive to gpt & install in UEFI mode. Newer Windows 7 ISO offer UEFI without Secure Boot. Older versions had to have installer converted to UEFI boot. All versions of Windows only boot in UEFI mode from gpt drives & only in BIOS mode from MBR(msdos) drives. And conversion normally erases drive to have good backups.
Aaron Chauhan avatar
hm flag
@oldfred So do I just convert the 160GB HDD (`/dev/sdc`) to GPT mode and reinstall Windows 7 in UEFI mode? Or do I need to convert a different drive into GPT? Is my drive currently in MBR so thats why it is not showing up?
oldfred avatar
cn flag
UEFI & BIOS are not compatible. WIndows requires gpt, Ubuntu should, but you can use MBR with UEFI & Ubuntu. Once you start to boot in one mode you cannot switch, or grub can only boot other installs in same boot mode. Technically only since two drives you can have UEFI & BIOS boot, but may even have to change default boot mode in UEFI/BIOS to match install. And never boot from grub, just UEFI boot menu.
Aaron Chauhan avatar
hm flag
@oldfred ah right makes sense now thank you. I'm now just installing MBR ubuntu as I write this. Hopefully everything runs smoothly :)
Score:0
ml flag

Since you have windows installed on a separate drive you could always just change your boot device in bios to change which disk to boot from.

To use grub to select your OS at boot time, you would have to install them both on the same boot drive (I believe, never tried it on separate drives.) and both using the same boot mode as suggested previously.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.