Warning

 

Close

Confirm Action

Are you sure you wish to do this?

Confirm Cancel
Member Login

Site Notices
Posted: 7/1/2015 6:51:41 PM EDT
I recently reinstalled windows 7 on my laptop, which had fedora 22 running along side it. That wiped out the grub2 bootloader so I had to copy my /home directory to an external drive and then reinstall Fedora 22. I lost all of my installed apps (obviously) but I was able to remember most of them.

I'm concerned that when I upgrade to windows 10 at the end of this month it will again wipe out the bootloader and I'll be forced to reinstall fedora for a third time.

Is there any way I can back up my installed programs, or perhaps the entire fedora installation and then restore it after the upgrade to windows 10?
Link Posted: 7/1/2015 6:56:24 PM EDT
[Last Edit: 7/1/2015 6:59:50 PM EDT by AZ_Sky]
I use the free version of this program for managing the bootloader and it works great!

Link Posted: 7/1/2015 9:29:03 PM EDT
No one knows how to do this?
Link Posted: 7/1/2015 9:32:36 PM EDT
[Last Edit: 7/1/2015 9:35:06 PM EDT by AZ_Sky]
I you have your Linux install in a separate partition then there shouldn't be any problems other than the bootloader (managing the bootloader is simple).
If you install a new Windows OS and allow it to remove partitions and wipe the whole disk - don't choose that option, install Windows in its own partition.
I don't know if W10 is a clean install or an OS upgrade.
Link Posted: 7/1/2015 9:38:52 PM EDT
I've always just been able to reinstall the bootloader with a grub disk and have it revive my existing Linux install. Just make sure to do a custom install of Windows (don't let it use the entire drive) and manually select the same partition that Windows previously inhabited and your Linux shouldn't be touched (though the bootlegger will be overwritten, hence the need for the grub disk to reinstall it).
Link Posted: 7/1/2015 9:39:47 PM EDT
[Last Edit: 7/1/2015 9:42:13 PM EDT by Myceliyum]
Discussion ForumsJump to Quoted PostQuote History
Originally Posted By AZ_Sky:
I you have your Linux install in a separate partition then there shouldn't be any problems other than the bootloader (managing the bootloader is simple). If you install a new Windows OS and allow it to remove partitions and wipe the whole disk - don't choose that option.
I don't know if W10 is a clean install or an OS upgrade.

View Quote


That's not what I'm asking. I want to know how to back up my entire fedora installation and then restore it. Managing the bootloader SHOULD be simple, but it wasn't in my case. When I reinstalled grub it did not detect my fedora installation.. only the windows 7 was detected by the grub installer and os-prober.


mkdir /mnt/root
mount /dev/mapper/fedora_monolithnix-root /mnt/root
mount /dev/sda1 /mnt/root/boot/
mount -o bind /dev /mnt/root/dev
mount -o bind /proc /mnt/root/proc
mount -o bind /sys /mnt/root/sys
mount -o bind /run /mnt/root/run
chroot /mnt/root
grub2-install --no-floppy --recheck /dev/sda
grub2-mkconfig -o /boot/grub2/grub.cfg
exit
/sbin/shutdown -r now


[root@new-host-3 /] $ su -c 'grub2-mkconfig -o /boot/grub2/grub.cfg'
Generating grub configuration file ...
Found Windows 7 (loader) on /dev/sda1
done

[root@new-host-3 /] $ os-prober
/dev/sda1:Windows 7 (loader):Windows:chain



I didn't know what to do after that so I just backed up everything off my home folder and reinstalled just to get grub to work. That is simple enough, but I've already got this second install of fedora set up relatively like I want it to be and I don't want to have to re-download all of my packages and dependencies and all of the little tweaks I've done all over again.

I also tried repair-boot-disk (an live linux iso specifically for restoring the bootloader) which didn't work at all and told me to install the grub2 repository IN the fedora installation I was trying to fix.. which was impossible, since I couldn't boot into it.
Link Posted: 7/1/2015 9:41:03 PM EDT
[Last Edit: 7/1/2015 9:44:44 PM EDT by HarryStone]
Boot off linux install media, re-install bootloader.


edit - for backup, tar to external drive for initial backup, then rsync for incrementals with cron. I run rsync every night to copy anything new and then once a month I run it with delete on the destination.
Link Posted: 7/1/2015 9:43:13 PM EDT
[Last Edit: 7/1/2015 9:44:54 PM EDT by Myceliyum]
Discussion ForumsJump to Quoted PostQuote History
Originally Posted By HarryStone:
Boot off linux install media, re-install bootloader.


View Quote


Reinstalling the bootloader through the live fedora usb results in a grub2 install that only sees my windows installation. It didn't detect the fedora installation at all. See my above post.
Link Posted: 7/1/2015 9:46:01 PM EDT
[Last Edit: 7/1/2015 9:46:26 PM EDT by WilliamGray]
Have you tried LILO instead of grub?
Did windows overwrite the linux partition?
Was the linux partition the first partition on the disk or the first disk in the machine?
Link Posted: 7/1/2015 9:46:53 PM EDT
fdisk -l should show your partitions, better yet run grub again with your old config file which should be /etc/grub.conf

Link Posted: 7/1/2015 9:49:44 PM EDT
[Last Edit: 7/1/2015 9:50:09 PM EDT by WilliamGray]
To back up EVERYTHING you could just tar the root directory.
You will have to edit the boot loader afterwards though.
Link Posted: 7/1/2015 9:54:41 PM EDT
Discussion ForumsJump to Quoted PostQuote History
Originally Posted By WilliamGray:
Have you tried LILO instead of grub?
Did windows overwrite the linux partition?
Was the linux partition the first partition on the disk or the first disk in the machine?
View Quote


Fedora doesn't give you the option of choosing another bootloader. Grub works fine for me, except the part where when I reinstall it it doesn't detect the fedora install.

And no, windows did not overwrite the linux partition. I could still see it by running fdisk -l on the live cd.. but os-prober, amd grub2-install would not detect it.

The linux partition was on sda4 or sda5.

Disk /dev/mapper/fedora_monolithnix-root: 55.9 GiB, 59999518720 bytes, 117186560 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_monolithnix-home: 55.9 GiB, 59999518720 bytes, 117186560 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_monolithnix-swap: 7.5 GiB, 8002732032 bytes, 15630336 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
Link Posted: 7/1/2015 9:55:48 PM EDT
Discussion ForumsJump to Quoted PostQuote History
Originally Posted By WilliamGray:
To back up EVERYTHING you could just tar the root directory.
You will have to edit the boot loader afterwards though.
View Quote


What I'd rather do is just create a list of my installed packages and save it to a file and then have yum/dnf read from that list and re-install the packages again on a fresh install of fedora after I upgrade to windows 10 (assuming it wipes out the bootloader again).
Link Posted: 7/1/2015 9:58:25 PM EDT
sudo yum list installed >packagelist

Link Posted: 7/1/2015 10:03:02 PM EDT
Did you upgrade fedora, and are trying to recover a newer version from an old installation cd?
Link Posted: 7/1/2015 10:03:59 PM EDT
[Last Edit: 7/1/2015 10:05:11 PM EDT by webtaz99]
Get another PC.

I run Mint 17 on a mini ITX with a fanless CPU in a low profile case and a fanless PSU.

Doesn't make a sound, pegs out at 38 watts, idles at 7, runs my email and basic browsing. I never turn it off.
Link Posted: 7/1/2015 10:08:36 PM EDT
Are you running grub from the live distribution or are you using the rescue mode ?
Try booting from the CD and type "linux rescue" at the prompt.
Link Posted: 7/1/2015 10:16:17 PM EDT
Discussion ForumsJump to Quoted PostQuote History
Originally Posted By WilliamGray:
Are you running grub from the live distribution or are you using the rescue mode ?
Try booting from the CD and type "linux rescue" at the prompt.
View Quote


Live distribution. Apparently fedora doesn't have a rescue mode except for the fedora server netinstall version which I did just download. I'm going to try to use that if this happens again, but I've never done it before. But I don't understand why reinstalling grub from the live cd would install grub but not detect the existing fedora install on my system.
Link Posted: 7/1/2015 10:18:42 PM EDT
Originally Posted By webtaz99:
Get another PC.

I run Mint 17 on a mini ITX with a fanless CPU in a low profile case and a fanless PSU.

Doesn't make a sound, pegs out at 38 watts, idles at 7, runs my email and basic browsing. I never turn it off.
View Quote


Link Posted: 7/1/2015 10:36:38 PM EDT
[Last Edit: 7/1/2015 10:37:19 PM EDT by gribble]
I can't remember the name of the program, but Ubuntu had a program that would create a live, installable ISO of YOUR install that could be installed like any other live disk. Otherwise, you could use sorting like clonezilla to clone your Linux partition, then just restore it AFTER you install Linux and have a functioning bootloader that will allow you to access the Linux partition.
Link Posted: 7/1/2015 10:38:16 PM EDT
did you try BOOT-REPAIR?
Link Posted: 7/1/2015 10:48:04 PM EDT
Discussion ForumsJump to Quoted PostQuote History
Originally Posted By ManMan:
did you try BOOT-REPAIR?
View Quote


If you mean boot-repair-disk, yes I did and it didn't work. It gave this error:

"Please enable a repository containing the [grub2] packages in the software sources of Fedora release 22"

Link Posted: 7/1/2015 10:56:41 PM EDT
Grab the grub.conf file from the working dual boot system.

Boot from recovery media.

Copy grub.conf into your Linux install

Run grub to reinstall the boot loader


Linux is not always "auto detect". Sometimes you have to actually do it yourself.
Top Top