Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Ubuntu This forum is for the discussion of Ubuntu Linux.


  Search this Thread
Old 12-10-2008, 02:36 AM   #1
LQ Newbie
Registered: Aug 2008
Posts: 13

Rep: Reputation: 0
Question saving grub files to use in case

I had installed both XP and Ubuntu 8.04 in my computer. One day my brother had tried to fix something in XP by running XP installation cd and ultimately I couldn't run my Ubuntu installation. But XP worked well. And when I checked it with the live cd, all the contents of /boot directory was gone. I tried several times to copy the contents of /boot in the live cd rom to my real installation and then boot up. But it didn't work! So I reinstalled Ubuntu. I want to know if there is a way to recover the Ubuntu installation in situations like these? And is there a way to save the contents of /boot directory to somewhere else and can I use this copied /boot directory at a later time to fix the system in a situation like this?
Old 12-10-2008, 05:17 AM   #2
Registered: Nov 2008
Location: Ljubljana
Distribution: OpenSuSE
Posts: 56

Rep: Reputation: 18
The situation you're describing is highly atypical, so trying to safeguard yourself from it "reoccurring" would be quite overzealous. I'm completely baffled that the XP CD could actually ruin anything residing on a GNU/Linux partition -- Windows don't even know how to read those partitions at all (well, some read-only drivers do exist for Windows, but they are in no way present on a XP installation CD). A Windows CD could mess up your entire GNU/Linux partition, to be sure, but it could never nuke just selected directories on it! What it could do, however, and do it gladly, is overwrite your Grub bootblock code (or MBR, as they call it) with its own. Now, you'd be facing two possible situations:
1. Highly probable. Only your MBR has been overwritten. You simply overwrite it again (using a GNU/Linux live CD) with the command grub setup.
2. Almost impossible. Your /boot directory (or, far more likely, a separate /boot partition) has been deleted. You use a live GNU/Linux distro to run a fake "reinstallation", skipping all the steps until you get to the Grub installation phase and there reinstall Grub. I must admit I've never tried this solution myself, it's just something that's been circulating on the Internet for a long time. An alternate way to achieve the same (at least with some distros) would be running grub-install from a virtual terminal.
Old 12-12-2008, 01:21 PM   #3
LQ Newbie
Registered: Aug 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks JozipBros for your reply. As you have mentioned in the second situation, I tried to reinstall only grub by skipping the other steps but the CD didn't allow me to do that. That's why I had to reinstall the entire system from the scratch. That was very cumbersome.
Old 02-26-2009, 04:11 PM   #4
Registered: Mar 2006
Location: Czech Republic
Distribution: Gentoo, Chakra
Posts: 964
Blog Entries: 14

Rep: Reputation: 135Reputation: 135
Hi, I know this is slightly outdated, but I feel the need to submit my hypothesis : the thing I see the most probable is that XP overwrote the MBR, thus GRUB had no way of starting. You booted Ubuntu LiveCD, and mounted your / partition. What you didn't do is mount your /boot partition. The mount point being a directory, when you looked inside it, you saw nothing, because all the data it should have contained was on another partition which you didn't mount. That's just my view of the situation, so it may not be what actually happened, but as I have never heard abot Windows writing do an ext partition, I think this might have happened.

btw:in this case Josip's situation number1 would have applied to you. And just reinsalling GRUB wouldn't reinstall the kernel image, so I don't think number 2 would work.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying files from case-sensitive Linux to case-insensitive Windows via CIFS? SlowCoder Linux - General 4 05-07-2008 08:03 PM
Saving to usb sometimes changes file name case knobby67 Debian 1 01-15-2008 07:59 AM
i broke grub... not saving using yast CopyrightPhilly Linux - Software 1 01-14-2007 05:49 PM
Why are all my upper case files being shown as lower case?? [Kernel 2.6.9-1.667 FC3] t3gah Fedora 4 03-11-2005 05:09 PM
grub bootloader : saving a new configuration file? lynnsbomb Mandriva 3 02-03-2004 05:10 PM > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 06:41 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration