Saving Fedora when installing Windows?

Chris Murphy lists at colorremedies.com
Wed Mar 12 18:29:18 UTC 2014


On Mar 12, 2014, at 7:06 AM, Timothy Murphy <gayleard at eircom.net> wrote:

> Chris Murphy wrote:
> 
>>> I want to upgrade Windows XP on my laptop to Windows 7,
>>> but I'd like to be sure that I can get back to Linux afterwards.
>>> (I'm sure Windows installation will over-write the MBR.)
> 
>> Which version of Fedora?
> 
> I'm running Fedora-20/KDE.
> 
>>> One thing I tried without success in the past
>>> was to specify a USB stick when running grub2-install.
> 
>> Sure, and then at the grub prompt you can use ls to find the designation
>> for the drive and partition, then use configfile
>> (hdx,msdosy)/grub2/grub.cfg which will produce the grub menu and let you
>> boot. Then you can reinstall grub to the hard drive once booted.
> 
> Last time I tried this I didn't get a grub prompt
> when re-starting the machine with the USB stick in.
> 
> Is that what you are suggesting?
> As far as I could see, the MBR written on the USB stick
> did not contain the required information to start the grub2 loader.

> What grub2-install command, precisely, did (or would) you give?

For this you use grub-mkrescue.
http://www.gnu.org/software/grub/manual/grub.html#Invoking-grub_002dmkrescue

That's why it's easier to use a livecd, or even easier is use the rescue boot option on DVD or netinstall media, which causes anaconda to find your installation,  and properly mount everything at /mnt/sysimage so that all you have to do is chroot it, and then reinstall grub.

chroot /mnt/sysimage
grub2-install /dev/sdX
grub2-mkconfig -o /boot/grub2/grub.cfg



>> Or you can just do this from Live Desktop written to a USB stick.
> 
> I did try installing Fedora KDE Live CD on the stick -
> is that what you are suggesting? -
> but I found the grub version that ran on the stick (presumably grub2)
> was not the best - 
> it didn't seem possible to use it interactively.

GRUB2 doesn't have an interactive mode when you're booted in linux, it has a set of script commands that run stand alone: e.g. grub2-install, grub2-mkconfig.

> 
> Possibly my experience is due to my ignorance of grub2 usage.
> But I also tried using a CentOS Live USB stick,
> and had no better luck.

Well that's a completely different beast because it uses GRUB legacy, there are more differences than similarities between the two GRUBs. GRUB2 is a rewrite. GRUB legacy is unmaintained by upstream for something like 8 years. They don't even provide help for it on their mailing list anymore.



Chris Murphy



More information about the users mailing list