Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
#!/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.
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 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?
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.
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.
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:
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.
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.
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
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.
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.