Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20microsoft finds twice Windows7 on BIOS system #4

Open
sebma opened this issue Nov 20, 2020 · 4 comments
Open

20microsoft finds twice Windows7 on BIOS system #4

sebma opened this issue Nov 20, 2020 · 4 comments

Comments

@sebma
Copy link

sebma commented Nov 20, 2020

Hi,
Your 20microsoft script detects twice Windows7 on a BIOS system :

$ blkid /dev/sda1 /dev/sda2
/dev/sda1: LABEL="RECOVERY" UUID="AAC65E94C65E609D" TYPE="ntfs" PARTUUID="1c6f1e23-01"
/dev/sda2: LABEL="WIN7" UUID="5E8C15298C14FCE9" TYPE="ntfs" PARTUUID="1c6f1e23-02"
$ df -Th | grep /mnt/sda.
/dev/sda2                                          fuseblk    40G   33G  7.1G  83% /mnt/sda2
/dev/sda1                                          fuseblk   9.0G  8.7G  396M  96% /mnt/sda1
$ egrep -oas "(W.i.n.d.o.w.s. .[0-9].)(.|.{50})" /mnt/sda{1,2}/*/BCD | uniq
/mnt/sda1/BOOT/BCD:Windows 7 Home Premium (recovered)
/mnt/sda2/Boot/BCD:Windows 7
$

Can you help me ?

@sebma
Copy link
Author

sebma commented Nov 22, 2020

On windows, bcdedit says :

C:> bcdedit
Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=\Device\HarddiskVolume1
path                    \bootmgr
description             Windows Boot Manager
locale                  en-US
default                 {current}
resumeobject            {5f597a5b-b711-11e7-aab4-806e6f6e6963}
displayorder            {current}
timeout                 30

Windows Boot Loader
-------------------
identifier              {current}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows 7 Home Premium (recovered) 
locale                  en-US
recoverysequence        {6b4c6d09-f7da-11e6-bc98-85f4c9da94bf}
recoveryenabled         Yes
osdevice                partition=C:
systemroot              \Windows
resumeobject            {5f597a5b-b711-11e7-aab4-806e6f6e6963}

C:> 

Could it be possible that the Windows Boot Manager is installed on a different partition than the Windows Boot Loader ?

I wish I knew on which \Device\HarddiskVolume my C: is.

@sebma
Copy link
Author

sebma commented Nov 22, 2020

The /dev/sda2 partition entry in grub boots into a Windows Recovery Environment.

Why does your 20microsoft script see it has a normal Windows 7 boot entry ?

@sebma
Copy link
Author

sebma commented Nov 22, 2020

Here's the output of list volume in the diskpart utility :

Microsoft DiskPart version 6.1.7601
Copyright (C) 1999-2008 Microsoft Corporation.
On computer: SEB-WIN7-PC

DISKPART> 
  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     G                       DVD-ROM         0 B  No Media           
  Volume 1         RECOVERY     NTFS   Partition      9 GB  Healthy    System  
  Volume 2     C   WIN7         NTFS   Partition     40 GB  Healthy    Boot    
  Volume 3     D   DONNEES_PAR  NTFS   Partition     46 GB  Healthy            
  Volume 4     H                       Removable       0 B  No Media           

DISKPART> 

@igorpupkinable
Copy link

igorpupkinable commented Nov 9, 2022

Same issue on Ubuntu 22 LTS and Windows 10.
Windows 10 Recovery Partition was hidden before, so dual-boot GRUB menu showed a single Windows entry and single Ubuntu entry.

Ubuntu 20 LTS to 22 LTS upgrade has failed on my laptop, so neither Ubuntu nor Windows could boot.
I had to fix boot configuration, but Windows Recovery Partition became visible and sudo update-grub generated two entries as below:

Found Windows 10 on /dev/sda1
Found Windows 10 on /dev/sda2
done

I have hidden Windows Recovery Partition by setting hidden flag using disk manager, but GRUB update script still reports two instances of Windows which boot same installation of Windows.

It did work before Ubuntu 20 upgrade, so there had to be a way to let GRUB script know to ignore either sda1 or sda2.

Has anyone else managed to fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants