Manjaro/Win7 dualboot. GRUB not showing Windows

Hi guys,

I’d like to ask for bit of advice/help. My situation: I was running dualboot Windows7(pre-installed) with Linux Mint and decided to swap Mint with Manjaro. Had a bit of trouble with Calamares but managed to install it in the end. The problem is, that now I don’t have the Windows entry in GRUB (ther’s only the Windows Recovery entry).

I have tried mounting the windows partition and then update-grubFound Intel Microcode image Found linux image: /boot/vmlinuz-4.4-i686 Found initrd image: /boot/initramfs-4.4-i686.img Found initrd fallback image: /boot/initramfs-4.4-i686-fallback.img Found Windows Recovery Environment (loader) on /dev/sda4 Found memtest86+ image: /boot/memtest86+/memtest.bin done
output of os-prober:

output of fdisk -l

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048    411647    409600   200M  7 HPFS/NTFS/exFAT
/dev/sda2          411648 535437219 535025572 255,1G  7 HPFS/NTFS/exFAT
/dev/sda3       535437310 945829887 410392578 195,7G  f W95 Ext'd (LBA)
/dev/sda4       945829888 976773167  30943280  14,8G  2 XENIX root
/dev/sda5       885022720 945829887  60807168    29G  7 HPFS/NTFS/exFAT
/dev/sda6       870758400 885020671  14262272   6,8G 82 Linux swap / Solaris
/dev/sda7       535439360 577689599  42250240  20,2G 83 Linux
/dev/sda8       577691648 870756351 293064704 139,8G 83 Linux

uname -a:

4.4.63-1-MANJARO #1 SMP PREEMPT Fri Apr 21 13:10:33 UTC 2017 i686 GNU/Linux
cat /etc/default/grub

GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR='Manjaro'
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=b90722db-104c-4b14-87fc-ce4f2c8d4ec4"
GRUB_CMDLINE_LINUX=""

# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.
GRUB_SAVEDEFAULT=true

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
GRUB_COLOR_NORMAL="light-gray/black"
GRUB_COLOR_HIGHLIGHT="green/black"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
GRUB_BACKGROUND="/usr/share/grub/background.png"
#GRUB_THEME="/path/to/gfxtheme"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

As a linux newbie I’m not able to say if the windows partition/booting got somehow corrupted during the process of whteher I’m just missing entry in some config file.
Any help appreciated

At grub menu, go to grub prompt (grub>) by typing 'c’
At grub prompt type in the following (without ‘grub>’ ) and press enter after each line

grub> insmod part_msdos
grub> insmod ntfs
grub> set root='hd0,msdos2’
grub> ntldr /bootmgr

If that boots to windows, go to Manjaro and create a custom.cfg, open this file and add the following entry to this custom.cfg. Save file and reboot. No need to update-grub and will not be shown in 'update-grub or os-prober. But will be at bottom of grub menu when you reboot.

sudo touch /boot/grub/custom.cfg

.

menuentry "Windows ntldr" {
  insmod part_msdos
  insmod ntfs
  search --set=root --fs-uuid xxxxxxxxxxxxxxx
  ntldr /bootmgr
}

where xxxxxxxxxxxxxxxxxxxxx is the UUID of sda2. Check its UUID with ‘sudo blkid’

Note: if sda2 won’t boot, use sda5. If you know where windows partition is, go straight to it (sda2 or sda5)
and the corresponding UUID.

ps: XENIX? where did you get this?

Thanks for the reply.
Unfortunately I’m getting an error file /bootmgr not found. All the windows data is definitely on sda2 (well, there is some system stuff on sda1). sda4 and sda5 are Lenovo partitions with some recovery stuff (i’ve never actully used it). I might try some boot-recovery windows discs automagic and hope for it not to screw grub. What do you think?

You can check at grub prompt
grub> insmod ntfs
grub> search -f /bootmgr
does that give more partitions than just ‘hd0,msdos4’ ?
(hd0,4) boots your recovery, you said. If that gives only (hd0,4), have you tried to boot that entry?

Then only
Check your all your windows ntfs parttion if any of them contains /bootmgr.
If it is in bios-legacy mode , it should have this file.
check if sda4 has this, it is the recovery partition and should have this file. But as you noted it boots into recovery. Check all others if there is this file.

If you see this file in sda2 or sda3 (both exfat) contains this file “/EFI/Microsoft/Boot/bootmgfw.efi”, give a shout. It means your windows is in fact uefi booted. But note your disk is most likely msdos partitioned (check with sudo parted -l) and it is unlikely your windows is uefi (it can happen with factory install but rare).

Confirm too that your manjaro is bios-legacy booted (most likely is) by
test -d /sys/firmware/efi && echo UEFI || echo BIOS

You can use windows boot-recovery but I’m not familiar or good in this. But that is all else have failed.

ps: sda4 has ~15 GB, that’s pretty big for a recovery partition.

Everything looks (unfortunately) as expected:

Nope, just hd0,msdos4

Checked all of them. Only sda4 has it. It is indeed WIndows recovery. I can boot into it (Yet there is just a background image and a command line window opened)

I have also found no /EFI/ folder and my disk looks indeed msdos partitioned. Output of sudo parted -l:

[code]
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 211MB 210MB primary ntfs boot
2 211MB 274GB 274GB primary ntfs
3 274GB 484GB 210GB extended lba
7 274GB 296GB 21,6GB logical ext4
8 296GB 446GB 150GB logical ext4
6 446GB 453GB 7302MB logical linux-swap(v1)
5 453GB 484GB 31,1GB logical ntfs
4 484GB 500GB 15,8GB primary ntfs
[/code][quote=“gohlip, post:4, topic:23267”]
Confirm too that your manjaro is bios-legacy booted (most likely is)
[/quote]

$ test -d /sys/firmware/efi && echo UEFI || echo BIOS
BIOS

It all looks fine to me. Just a tiny bootmgr missing :confused:

Okay, looks like you’ve lost your windows boot file.
Then you’ve got to go get windows boot repaired through windows.
Sorry but good luck.

But after repairing this, if you cannot boot up Manjaro after that, we sure can help you with it.

So I went through windows bootrec /fixmbr (which did something apparently but it gives no output so I have no idea what it really did) which seems to have overriden GRUB’s starting. I’m getting an Operating system wasn't found. Try disconnecting any drives that do not contain an operating system.
Any tips how to get GRUB back up?
P.S.: thanks for the help so far gohlip. I really do appreciate it

This should help.
Dont’ forget to update-grub after you get back your manjaro to include windows.
If you need further help, give us a ring.

ps: you got back windows? It wasn’t clear.

Forum kindly sponsored by Bytemark