LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   fedora 21 windows duel boot reinstall windows (https://www.linuxquestions.org/questions/fedora-35/fedora-21-windows-duel-boot-reinstall-windows-4175560659/)

oceanmbs 12-04-2015 02:11 PM

fedora 21 windows duel boot reinstall windows
 
hi here,
i need some urgent help.

i was running duel boot of fedora 21 and win 7 on my pc without any problem.

long story short: an electrical disturbance near my home fried my motherboard and processor. so i had to get a new mb, processor and rom (everything else unchanged).

with my new hardwares, fedora 21 is running just fine. but no surprise, windows in not running. so i need to reinstall windows 7 or install win 8.1 (i dont want win 10 yet).

now how can i reinstall windows without creating any issues with my current fedora? i want to keep the fedora as it is.

the last time i installed fedora, i made a boot partition of 150 MB. so after installing windows (7 or 8.1, fresh install), can i create a boot file like what i have right now?

thanks in advance.

ugjka 12-04-2015 02:28 PM

Is your system Uefi or Bios?

oceanmbs 12-04-2015 03:02 PM

according to the setupact.log file from my windows>panther, its BIOS.

NGIB 12-04-2015 03:19 PM

Windows does not respect any other OS and a Windows install will certainly destroy the Linux bootloader. If you're very careful it may not damage your Linux partition and then you can repair the bootloader...

oceanmbs 12-04-2015 03:25 PM

so can i repair/recreate the bootloader from the installation disk?

syg00 12-04-2015 05:22 PM

Yes - trivial.
As for Win7, if you have it already on the disk, it will be recognised by the installer, and will probably offer to repair it for you. I have had occasions where I needed to run the repair a couple of times. You may even need to do a full install after all that - it just doesn't seem to work correctly.
As stated, grub will be be over-written.

oceanmbs 12-04-2015 06:48 PM

ok i get it.

but now my question is, how can i repair/recreate the grub?

someone told me once that if i run the fedora installation in the regular way (from usb/dvd) and at the time of partitions, i just put the /boot partition on the previous /boot and leave everything untouched, it will again create the grub. will it work?

yancek 12-05-2015 07:16 AM

Once you have windows booting from your disk, use the method at the fedora project site to create a new grub.cfg file and reinstall grub2.

https://ask.fedoraproject.org/en/que...ub2-fedora-21/

John VV 12-05-2015 11:51 AM

BE AWARE
Fedora 21 is now PAST it's End Of Life !!!

there will NEVER be any more security updates and there is no more support

Please stay current and install Fedora 23

oceanmbs 12-05-2015 03:13 PM

Quote:

Originally Posted by yancek (Post 5460140)
Once you have windows booting from your disk, use the method at the fedora project site to create a new grub.cfg file and reinstall grub2.

https://ask.fedoraproject.org/en/que...ub2-fedora-21/

thank u very much!

this shows the easiest way to recreate grub. i hope it will work after i'm done with the installation.

i'll post the updates.

oceanmbs 12-05-2015 03:15 PM

Quote:

Originally Posted by John VV (Post 5460258)
BE AWARE
Fedora 21 is now PAST it's End Of Life !!!

there will NEVER be any more security updates and there is no more support

Please stay current and install Fedora 23

thank u. i know. but upgrading fedora will cause huge hassles for me now. so i think i'll stay with f21 for a few more months :-s.

oceanmbs 12-05-2015 08:10 PM

hi yancek,
the procedures given in that link is not working :-(

i ran win 8.1. after running that grub repair method, now i'm getting error at boot.
'error: no such device
entering rescue mode
grub rescue>'

what should i do now?

oceanmbs 12-06-2015 07:19 AM

anyway,
using supegrubdisk2, i could log into my old fedora.

any help on how can i now repair the grub?
the instructions provided on their page is not working.
when i put

Quote:

sudo grub-install /dev/sdb
(because both of my OSs are on sdb)

i get,
Quote:

bash:grub-install: command not found
anyway, from the supergrubdisk screen, it shows all the kernels of fedora 21 with windows 8, just as it should've been. i guess all i need now is to put this on MBR.

oceanmbs 12-06-2015 07:54 AM

update: Solved it finally !!!
once i tried after logging in from my old fedora 21 installation, the instructions provided at the link by yancek worked like a charm! they weren't working from the live DVD.

anyway, whoever faces the same problem in future (grub2 gone in duel boot after reinstalling windows and the pc boots to windows right away), can follow the below procedures:

1. don't panic. unless u have messed up with the installation location (the HD and the partitions), ur old linux with all the files are completely ok.

2. from windows, download supergrubdisk2 http://www.supergrubdisk.org. u'll also need yumi to make a bootable cd/dvd/usb drive. follow the instructions and links provided at supergrubdisk2's website for how it do it.

3. using the bootable cd/dvd/usb, log in to your old fedora installation. again, supergrubdisk2's website has the instructions on how to do it.

4. using terminal from fedora, follow the steps given here :https://ask.fedoraproject.org/en/que...ub2-fedora-21/

5. ur old grub menu is back.

yancek 12-06-2015 08:09 AM

Quote:

bash:grub-install: command not found
The second post at the link I posted with a number of different commands is what would have worked. The "grub-install" doesn't work on Fedora as you can see from the link. It needs to be "grub2-install". The first post suggesting booting a usb/DVD and running the two commands obviously won't work as it will simply create a new grub.cfg file and try to install Grub to the usb/DVD which won't help anything on your hard drive.


All times are GMT -5. The time now is 06:20 PM.