Jump to content
Forums in Read-Only Mode - Please use Reddit ×
  • 0

Booting into a lost Windows partition


locustmage

Question

So i was feeling a bit adventurous. I have been away from linux for a while and i decided to jump back into the swing of things.

My Laptop Is an Asus R554L

Intel Core i-3

6GB

intel integrated graphics

single hard drive this is the partition scheme

 

 

 

 

 

 

 

 

 

Device Start End Sectors Size Type

/dev/sda1 2048 534527 532480 260M EFI System

/dev/sda2 534528 567295 32768 16M Microsoft reserved

/dev/sda3 567296 389689343 389122048 185.6G Microsoft basic data

/dev/sda4 389689344 390711295 1021952 499M Windows recovery environment

/dev/sda5 390711296 669573119 278861824 133G Microsoft basic data

/dev/sda6 669573120 964376575 294803456 140.6G Linux filesystem

/dev/sda7 964376576 976771071 12394496 5.9G Linux swap

 

so the Funtoo Bootloader is installed at ./sda1

the windows partition is the ./sda3 and i would like to add that to the grub boot menu. I can still find the efi file from windows. But not sure how to get the boot loader to understand the efi file. I tried to use grub-mkconfig and all it seemed to do was add a boot option inside my uefi bios for windows which does not properly load the Operating System.

 

I have turned off secure boot in the bios and turned off fast boot, however it is still booting uefi mode.

I tried adding an entry to /etc/boot.cfg and reinstalling the boot loader by mounting the /boot partition but that did not seem to work. below is the attempted entry on /etc/boot.cfg

 

boot {

generate grub

default "Funtoo Linux genkernel"

timeout 3

}

 

"Funtoo Linux" {

kernel bzImage[-v]

}

 

"Funtoo Linux genkernel" {

kernel kernel[-v]

initrd initramfs[-v]

params += real_root=auto rootfstype=auto

}

 

"Funtoo Linux better-initramfs" {

kernel vmlinuz[-v]

initrd /initramfs.cpio.gz

}

 

"Windows 10" --class windows --class os {

insmod ntfs

search --no-floppy --set=root --fs-uuid c132cb80-fdd7-4c84-84f4-46e164fa65dd

ntldr /bootmgr

}

 

any help would be appreciated. I was able to install kde so im starting to really enjoy this Distro. always been a fan of gentoo but the documentation seemed cryptic to say the least. I found my experience with Funtoo to be pretty easy considering ive been away from linux for about 4 years. If there is anymore information needed please let me know I do have a couple other issues im experiencing with USE flags but honestly, they are not as important as booting into my windows.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

the windows partition is the ./sda3 and i would like to add that to the grub boot menu.

Use this entry for Windows 10 in /etc/boot.cfg

 "Windows 10" {
                type win8
                params root=/dev/sda3
        }

Run boot-update as root to generate boot configuration:

# boot-update

 

Reference:

http://www.funtoo.org/Install#Installing_a_Bootloader

Funtoo and Windowd 10

boot-update and windows 10

Link to comment
Share on other sites

  • 0

I have a feeling this would have worked if I was using old Bios but im using UEFI bios. it added the entry but when i choose it, the computer tells me that the path to the efi file is not valid.. like i said before i know where the bootmanager is on the windows OS drive. is there a way to add something in the /etc/boot.cfg file to specify the location of the bootloader? since /dev/sda3 is a device block, i doubt i can just change it to a folder within the FS unless there is another parameter or something.. Im messing a bit with the efibootmgr cmd line program. I am noticing that the windows boot option was not "active" I updated that, removed an old attempt at creating a boot option and now im going to restart and see if the efi file is picked up by the system. if not, then ill have to attempt to explicitly tell efibootmgr where the efi file is. Could copying the folder to the EFI file on /boot help? then i should be able to choose /boot as the location because that partition is mounted when the computer is attempting to load the OS's

Link to comment
Share on other sites

  • 0

so im not having much success with efibootmgr. im trying to type

efibootmgr -b 0001 -l "\EFI\Microsoft\bootmgr.efi"

which chooses the proper boot option and tries to designate an efi associated with it.. So i do that and restart, nothing. I do it again and update-grub and it sees back on /dev/sda3 inside Windows/Boot/EFI/bootmgr.efi the boot manager and attempts to load that one. it says update-grub goes off of whats in /etc/boot.conf So if i can get that to properly point to the efi instead of the OS then it might work. My next attempt will be to change the root directory of the bootloader entry to /dev/sda1 where the efi file is. I was reading that UEFI is basically an operating system in its own right. An article i read stated also that the efi file is "smart" and knows where the OS is located. So maybe if i trick grub into thinking that the /boot is the windows drive, maybe the efi file will pick it up and run with it and load the OS on /dev/sda3

Link to comment
Share on other sites

  • 0

Find the <path to> bootmgfw.efi located on the EFI partition.

mkdir myefi
mount /dev/sda1 myefi
find myefi -iname bootmgfw.efi

Supply the <path to> for this command, replace $fs_uuid  in boot entry with the output:

# grub2-probe --target=fs_uuid myefi/<path to>/bootmgfw.efi

Supply the <path to> for this command, replace $hints_string in boot entry with the output:

# grub2-probe --target=hints_string myefi/<path to>/bootmgfw.efi

Place the boot entry in the /etc/grub.d/40_custom:

menuentry "Microsoft Windows 10 UEFI-GPT" {
		insmod part_gpt
		insmod fat
		insmod search_fs_uuid
		insmod chain
		search --fs-uuid --set=root $hints_string $fs_uuid
		chainloader /<path to>/bootmgfw.efi
	}
# boot-update
Link to comment
Share on other sites

  • 0

I don't seem to have the grub2-probe command. I have the grub-probe which didn't work. But the command

 

efibootmgr -b 0001 -l /path/to/efi-file worked however Windows says that the information in the BCD has changed (boot configuration data file) it tells me to use a Windows disk and recover the boot loader. Obviously I don't want to do that. So copying the boot loader didn't work. I also attempted to link to the original and got the same result. I wonder if there was another file on the EFI partition Windows created that I would have needed to copy before installing grub.

Link to comment
Share on other sites

×
×
  • Create New...