I install windows 7 in fedora running system without overwrite the previous OS.but the problem is if i install windows 7, it shows 2 os's when starting my system.I want to boot my system in fedora by default.what's the solution??????????????

Dani AI

Generated

Common cause and quick plan: installing Windows after Fedora often changes the boot controller or boot order so the Windows entry becomes the visible/default choice. If both OS entries appear at startup, the system is most likely using GRUB2 and Windows was simply added as another menu entry; if the machine boots straight into Windows, the Windows boot manager probably replaced GRUB. The sensible options are (A) make Fedora the GRUB default, (B) change the UEFI BootOrder so Fedora/GRUB comes first, or (C) restore GRUB if Windows overwrote it. was right to point at GRUB; ’s VM suggestion avoids this entire class of problems; ’s install-order tip is good for fresh installs.

Detect boot mode and list grub entries:

# UEFI check
if [ -d /sys/firmware/efi ]; then echo "UEFI"; else echo "BIOS"; fi

# List menu entries (try both paths)
sudo grep "^menuentry " /boot/grub2/grub.cfg | cut -d"'" -f2
sudo grep "^menuentry " /boot/efi/EFI/fedora/grub.cfg | cut -d"'" -f2

Make Fedora the default under GRUB2 (when GRUB controls boot): back up /etc/default/grub, set GRUB_DEFAULT=saved and then use the exact menuentry name from the grep output with grub2-set-default. After that regenerate the config:

sudo grub2-set-default "Fedora Linux (…exact menuentry…)"
# BIOS
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
# UEFI
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

If UEFI’s Windows Boot Manager is first, use efibootmgr to inspect and reorder entries (put Fedora’s BootXXXX first):

sudo efibootmgr -v
sudo efibootmgr -o 0003,0001,0002   # example: put Fedora's ID first

If GRUB was overwritten and Fedora won’t boot, the normal recovery is a Fedora live USB, mount/chroot into the installed system and reinstall GRUB (use grub2-install for legacy/BIOS or recreate the EFI entry for UEFI), then regenerate the grub config. Back up configuration files before edits and avoid running installer commands on the wrong disk.

Recommended Answers

All 3 Replies

So what is wrong with the grub ?? and I didn't get what you want exactly , what did you mean by

I install windows 7 in fedora running system
??
windows 7 isn't applicatuin to be installed in fedora

To run it in a running Fedora system, you need a virtual machine manager such as VMware or VirtualBox so you can install/run Windows in a virtual machine. That way, your Fedora applications continue to run while you simultaneously run Windows applications. I do that all the time.

if you want dual boot system
  1. install windows 7 in first partition or /dev/sda1
  2. then istall distro linux your like
  3. grub will auto detect your windows
use virtual box or qemu

$ qemu -cdrom YOUR_DISTRO.iso -boot d -m 1024

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.