LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-13-2016, 08:53 PM   #1
tnandy
Member
 
Registered: Oct 2003
Location: Tennessee
Distribution: Devuan 3.0 (Beowulf)
Posts: 217

Rep: Reputation: 18
dual boot system; can't find windows; fedora 23 seems OK


I've got an HP 17-g161us laptop with an i3 CPU and a 1TB hard drive. It came with Windows 10 preinstalled. I made some space on the hard drive and loaded Fedora 23.

The initial problem(s) were the grub screen was blank and only windows would boot. I decided the easiest way to fix it was to reinstall Fedora. Here's where I screwed things up. I am used to Master Boot Record (MBR) systems. This is my first UEFI dual boot. Without knowing what I was doing, I reformatted the EFI partition. Now Fedora works fine, but Windows is nowhere to be found.

I attempted to reinstall Windows from downloaded DVD install media. At least this brought back the Microsoft directories and files in the EFI partition, but this does not help grub find Windows anywhere.

To be more specific, I strongly suspect Windows is still there...somewhere...but grub2 simply can't find it. In fact, grub2 won't make a menuentry for Windows--not even a non-functional menuentry.

I tried adding a menuentry manually in /etc/grub.d/40_custom and running grub2-mkconfig, but this doesn't help. Still no menuentry.

Here is some information that may (or may not be) helpful:
Code:
# lsblk
NAME            MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda               8:0    0 931.5G  0 disk 
├─sda1            8:1    0   260M  0 part /boot/efi
├─sda2            8:2    0   128M  0 part 
├─sda3            8:3    0 400.4G  0 part /Windows
├─sda4            8:4    0   731M  0 part 
├─sda5            8:5    0  25.6G  0 part 
├─sda6            8:6    0   500M  0 part /boot
└─sda7            8:7    0   504G  0 part 
  ├─fedora-root 253:0    0    50G  0 lvm  /
  ├─fedora-swap 253:1    0   5.9G  0 lvm  [SWAP]
  └─fedora-home 253:2    0 448.1G  0 lvm  /home
sr0              11:0    1  1024M  0 rom  
mmcblk0         179:0    0   7.4G  0 disk 
└─mmcblk0p1     179:1    0   7.4G  0 part /run/media/<userid>/3039-6539
There is a SD chip in the reader. The last line does not say "<userid>", it has my actual user ID in the path.

Code:
# ls /boot/efi
EFI  mach_kernel  System  Temp
# ls /boot/efi/EFI
BOOT  fedora  Microsoft
# ls /boot/efi/EFI/Microsoft
Boot  Recovery
# ls /boot/efi/EFI/Microsoft/Boot
BCD       BCD.LOG2      BOOTSTAT.DAT  da-DK  en-US  Fonts  it-IT           kd_02_10ec.dll  kd_02_15b3.dll  kd_02_8086.dll  kdstub.dll   nb-NO  pt-BR     Resources   sv-SE  zh-HK
BCD.LOG   bootmgfw.efi  boot.stl      de-DE  es-ES  fr-FR  ja-JP           kd_02_1137.dll  kd_02_1969.dll  kd_07_1415.dll  ko-KR        nl-NL  pt-PT     ru-RU       tr-TR  zh-TW
BCD.LOG1  bootmgr.efi   cs-CZ         el-GR  fi-FI  hu-HU  kd_02_10df.dll  kd_02_14e4.dll  kd_02_19a2.dll  kd_0C_8086.dll  memtest.efi  pl-PL  qps-ploc  sr-Latn-CS  zh-CN
Code:
# os-prober
/dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
/etc/grub.d/40_custom
Code:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry 'Windows 10' { 
set root='(hd0,gpt1)'
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
Code:
#
# /etc/fstab
# Created by anaconda on Sun Mar  6 09:24:03 2016
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/fedora-root                   /         ext4 defaults                   1 1
UUID=26AA6C8AAA6C57F7                     /Windows  ntfs default,ro                 0 0
UUID=6d46fc18-78fc-4cdf-801e-2925a471c326 /boot     ext4 defaults                   1 2
UUID=AAA1-E51A                            /boot/efi vfat umask=0077,shortname=winnt 0 2
/dev/mapper/fedora-home                   /home     ext4 defaults                   1 2
/dev/mapper/fedora-swap                   swap      swap defaults                   0 0
Please let me know what else you'd like to see. I appreciate any help you can provide.
 
Old 03-14-2016, 05:38 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
I would search for a windows 10 rescue CD. These use the windows files on your disk (copyright issues) but fix boot issues pretty well. This will probably restore windows at Fedora's expense.

You need to find out a bit about configuring dual boot in Fedora before any reinstall.
 
Old 03-14-2016, 07:57 AM   #3
tnandy
Member
 
Registered: Oct 2003
Location: Tennessee
Distribution: Devuan 3.0 (Beowulf)
Posts: 217

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by business_kid View Post
I would search for a windows 10 rescue CD. These use the windows files on your disk (copyright issues) but fix boot issues pretty well. This will probably restore windows at Fedora's expense.

You need to find out a bit about configuring dual boot in Fedora before any reinstall.
(CD???)

I downloaded a Windows install DVD from Microsoft and used it to restore the files in the EFI partition, but that didn't help. Is this different from the rescue CD you suggest?
 
Old 03-14-2016, 08:06 AM   #4
tnandy
Member
 
Registered: Oct 2003
Location: Tennessee
Distribution: Devuan 3.0 (Beowulf)
Posts: 217

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by business_kid View Post
I would search for a windows 10 rescue CD. These use the windows files on your disk (copyright issues) but fix boot issues pretty well. This will probably restore windows at Fedora's expense.

You need to find out a bit about configuring dual boot in Fedora before any reinstall.
I downloaded a Windows install DVD from Microsoft and used it to restore the files in the EFI partition, but that didn't help. I take it this is different from the rescue CD you suggest. Unfortunately, when I google how to create a rescue CD, it requires Windows, so I'm kind of stuck. Can you suggest one available for download? Keep in mind this is a UEFI system, not a MBR system.
 
Old 03-14-2016, 08:53 AM   #5
tnandy
Member
 
Registered: Oct 2003
Location: Tennessee
Distribution: Devuan 3.0 (Beowulf)
Posts: 217

Original Poster
Rep: Reputation: 18
I attempted to "reset this PC" using the Windows 10 install DVD that I downloaded. It said it would wipe out Windows applications, but this was not the total reset that wipes out the hard drive. It gets to 37% then says "There was a problem resetting this PC." (Thanks for the explicit diagnostic message, Microsoft. Ugh.)

I'm going to delay the total wipe until I have another working computer I can use.

I'm still hoping there's a solution short of erasing the entire hard drive and starting over.
 
Old 03-14-2016, 10:05 AM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,502

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
Which partition is marked active? I don't use UEFI but from what I've read the windows system partition contains boot files also and should be marked active, that would be sda3. You might run fdisk -l to check what is active and try to change it from the Fedora install media or a GParted Live CD.

Your path looks different. The EFI files generally are in the path:

Quote:
/EFI/Microsoft/Boot/bootmgfw.efi
/EFI/Microsoft/Boot/bootmgr.efi
/EFI/Microsoft/Boot/memtest.efi
You have the boot files, no memtest but that should not matter for booting. Your path shows:

Quote:
ls /boot/efi/EFI/Microsoft/Boot
I'm not sure this matters, might just be different with Fedora than other systems since as I understand, you created the EFI partition when installing Fedora.
 
Old 03-15-2016, 02:34 AM   #7
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Quote:
Originally Posted by tnandy View Post
(CD???)

I downloaded a Windows install DVD from Microsoft and used it to restore the files in the EFI partition, but that didn't help. Is this different from the rescue CD you suggest?
Yes. M$ does not do rescue CDs, but forums for the various windows versions often have d/l links for rescue CDs. It's possible the Win 10 CD has not been made up diets, but losers keep building them for every mess m$ leaves.
 
Old 03-20-2016, 08:37 AM   #8
tnandy
Member
 
Registered: Oct 2003
Location: Tennessee
Distribution: Devuan 3.0 (Beowulf)
Posts: 217

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by yancek View Post
Which partition is marked active? I don't use UEFI but from what I've read the windows system partition contains boot files also and should be marked active, that would be sda3. You might run fdisk -l to check what is active and try to change it from the Fedora install media or a GParted Live CD.
Here's the output of # fdisk -l :
Code:
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: BA73B25B-2B1C-4539-A4DC-C8C17AF8D8DD

Device          Start        End    Sectors   Size Type
/dev/sda1        2048     534527     532480   260M EFI System
/dev/sda2      534528     796671     262144   128M Microsoft reserved
/dev/sda3      796672  840464383  839667712 400.4G Microsoft basic data
/dev/sda4  1898391552 1899888639    1497088   731M Windows recovery environment
/dev/sda5  1899888640 1953517567   53628928  25.6G Windows recovery environment
/dev/sda6   840464384  841488383    1024000   500M Linux filesystem
/dev/sda7   841488384 1898391551 1056903168   504G Linux LVM

Partition table entries are not in disk order.

Disk /dev/mapper/fedora-root: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/mapper/fedora-swap: 5.9 GiB, 6308233216 bytes, 12320768 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device         Boot Start      End  Sectors  Size Id Type
/dev/mmcblk0p1       8192 15523839 15515648  7.4G  b W95 FAT32

Disk /dev/mapper/fedora-home: 448.1 GiB, 481132806144 bytes, 939712512 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
I suspect my path to the EFI partition is shown in Fedora that way because my fstab is set up that way.

Code:
#
# /etc/fstab
# Created by anaconda on Sun Mar  6 09:24:03 2016
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/fedora-root                   /         ext4 defaults                   1 1
UUID=26AA6C8AAA6C57F7                     /Windows  ntfs default,ro                 0 0
UUID=6d46fc18-78fc-4cdf-801e-2925a471c326 /boot     ext4 defaults                   1 2
UUID=AAA1-E51A                            /boot/efi vfat umask=0077,shortname=winnt 0 2
/dev/mapper/fedora-home                   /home     ext4 defaults                   1 2
/dev/mapper/fedora-swap                   swap      swap defaults                   0 0
Quote:
Originally Posted by yancek View Post
I'm not sure this matters, might just be different with Fedora than other systems since as I understand, you created the EFI partition when installing Fedora.
Windows was able to find the EFI partition since it put the Windows EFI boot files there.
 
Old 03-20-2016, 09:17 AM   #9
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,502

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
The link below to the windows 10 forum by user 'genet' indicates that with an EFI no partition needs to be active/bootable. I'm sure he knows more about it than I do as I've never used windows 10.

http://www.tenforums.com/installatio...partition.html
 
Old 04-08-2016, 10:47 AM   #10
tnandy
Member
 
Registered: Oct 2003
Location: Tennessee
Distribution: Devuan 3.0 (Beowulf)
Posts: 217

Original Poster
Rep: Reputation: 18
I figured out the first problem. I didn't specify the output file for grub2-mkconfig. grub2-mkconfig was working, it just defaults to putting the output file in the wrong place. For an UEFI system, you have to enter it this way:

# grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

I had been entering:

# grub2-mkconfig

with no options/arguments. THIS IS WRONG AND DOES NOT WORK!

Windows is still not booting, but at least I'm seeing the logo as I was before I messed things up.

Since I don't believe my problem with Windows has anything to do with Linux, I'm marking this problem as solved.
 
Old 04-09-2016, 04:44 AM   #11
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Grub2 seemed to start life as a set of non working scripts and has not seemed to have the resilience you would like in a boot loader.

Perhaps when you sort it post a full howto?
 
Old 04-09-2016, 07:35 AM   #12
tnandy
Member
 
Registered: Oct 2003
Location: Tennessee
Distribution: Devuan 3.0 (Beowulf)
Posts: 217

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by business_kid View Post
Grub2 seemed to start life as a set of non working scripts and has not seemed to have the resilience you would like in a boot loader.

Perhaps when you sort it post a full howto?
It sure would be great if I could. The big problem is I can't make heads or tails of /etc/grub.d/10_linux. It's essentially undocumented code, so trying to explain it would be a massive undertaking. Back in the day, grub.conf was a flat text file. Everything was just right there, it made sense, it was easy to edit, change, update. Grub2 configuration is spread across numerous files in multiple directories and the scripts are totally inscrutable.

I'm told this approach is necessary due to UEFI systems, but I suspect this kludge could be radically simplified.
 
Old 04-09-2016, 11:41 AM   #13
Weapon S
Member
 
Registered: May 2011
Location: Netherlands
Distribution: Debian, Archlinux
Posts: 262
Blog Entries: 2

Rep: Reputation: 49
Didn't your laptop come with a recovery DVD? I see some Windows rescue partitions. Definitely focus on getting Windows working, because putting Linux on there is a cinch. If you are sure Windows is on there, you could manually boot it from your UEFI (BIOS). If Windows isn't in the UEFI, you could try manually adding it with `efibootmgr`... given there is a working installation of Windows hidden on your disk.
 
Old 04-09-2016, 11:59 AM   #14
TxLonghorn
Member
 
Registered: Feb 2004
Location: Austin Texas
Distribution: Mandrake 9.2
Posts: 702

Rep: Reputation: 231Reputation: 231Reputation: 231
Your problem with Windows has to do with UEFI, and I believe using the rEFInd boot manager could provide a solution.

rEFInd boot manager intro
rEFind for UEFI Windows dual boot
Troubleshooting UEFI boot
 
Old 04-10-2016, 10:18 AM   #15
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Quote:
Originally Posted by tnandy View Post
It sure would be great if I could. The big problem is I can't make heads or tails of /etc/grub.d/10_linux. It's essentially undocumented code, so trying to explain it would be a massive undertaking. Back in the day, grub.conf was a flat text file. Everything was just right there, it made sense, it was easy to edit, change, update. Grub2 configuration is spread across numerous files in multiple directories and the scripts are totally inscrutable.

I'm told this approach is necessary due to UEFI systems, but I suspect this kludge could be radically simplified.
I feel (and once shared) your pain.I believe your assessment of grub2 is totally correct. There were some years when serious hardware & software people could not handle UEFI. It's a pity what looks like the best effort to date causes so much suffering.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Unable to Find Windows in dual boot System gemmajid Linux - Newbie 5 04-02-2012 01:27 AM
How to make dual boot system with windows Xp and fedora 11. akram Linux - Newbie 2 01-23-2010 05:01 AM
System boot failure after installation of fedora fc11 in dual boot with windows xp npsdevan Fedora - Installation 1 08-10-2009 04:45 AM
installing windows on dual boot system with fedora linux and windows xp vaishalicoep Linux - Newbie 2 04-23-2009 05:11 AM
Multiple intermittent boot errors on a Fedora 9 / Windows XP dual boot system RichyAD Linux - General 4 09-15-2008 03:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration