Jump to content
Frank Woods

How To Retore PClinuxOS Grub

Recommended Posts

When I do a Windows 7 image it does not backup the Grub in the boot loader. After I perform a image restore all I have is the Windows 7 Login. How can I restore GRUB. I have The Ultimate Boot CD but have never used it. Any help with this would be greatly appreciated.

Share this post


Link to post
Share on other sites

Hiya, Frank...

 

The easiest way is to use your PCLinuxOS Live CD, if you still have one lying around. Here's a little tutorial on what to do --> http://pclinuxos2007.blogspot.com/2010/01/restoring-grub-through-pclinuxos-livecd.html

 

If that doesn't work for you, give a holler. There are other alternative methods available.

  • Like 1

Share this post


Link to post
Share on other sites

Maybe this blog link will help:

 

Restoring GRUB through PCLinuxOS LiveCD

 

restoring-grub-pclinuxos.png

Distro-hopping or multi-OS-booting sometimes results in a non-booting grub. You can use PCLinuxOS (or any other) LiveCD to restore grub in a safe way. Here are the steps:

 

1. Boot system from PCLinuxOS LiveCD

2. Open a terminal and be root user - enter "su"

3. Enter command "grub" (it will put you on grub> prompt)

4. Then locate grub files by: "find /boot/grub/stage1"

5. It will return grub locations (it may be (hd0,0) or (sd0,0))

6. As per the location of grub enter "root (hd0,0)" or "root (sd0,0)" or some other.

7. Then issue "setup (hd0)" or "setup (sd0)" or some other.

8. Finally enter "quit"

 

Now reboot the computer without LiveCD.

Note: Use commands without quotes.

 

Not sure if that is still the way though...I would wait for some confirmation regarding the new versions of PCLos from others.

 

Wow, Eric. I think that would be a yes. LOL!

 

 

We were both posting at the same time.

  • Like 2

Share this post


Link to post
Share on other sites

Frank, may I enquire as to what you use to image your Windows 7 partition? I use Clonezilla weekly to clone my Arch Linux partition but any time I have tried using it to clone my Windows 7 Partition, it fails. When I had XP on my other laptop on sda1, Clonezilla cloned it and re-imaged just fine. But I always uncheck the box asking to clone the MBR so that when I re-image it does not mess up my grub.

  • Like 1

Share this post


Link to post
Share on other sites

When I do a Windows 7 image it does not backup the Grub in the boot loader.

When I do image backups of the C: drive with Windows 7 backup it includes doing an image backup of the boot partition. I've done system restores of the C: drive and assumed it restored the boot partition also. But even if it didn't whatever is on the boot partition would still be there.

 

BTW Doesn't Clonezilla do file/folder backups rather than image backups? If so it would explain why it can't backup the bootmgr file on the boot partition. It's in use.

Edited by Ed_P

Share this post


Link to post
Share on other sites

I beat you by three seconds.I searched w/ Duck Duck Go... how 'bout you? ;)

 

Same, but I also was copying stuff to quote as well ;)

  • Like 1

Share this post


Link to post
Share on other sites
BTW Doesn't Clonezilla do file/folder backups rather than image backups? If so it would explain why it can't backup the bootmgr file on the boot partition. It's in use.

Clonezilla can do partition images or disk images depending on settings.

 

I'm sure I imaged Win 7 after I installed it, but never restored it as Win 7 never broke.

Share this post


Link to post
Share on other sites

Clonezilla can do partition images or disk images depending on settings.

 

I'm sure I imaged Win 7 after I installed it, but never restored it as Win 7 never broke.

Thanks for the Clonezilla info. In addition to Windows 7 backups I sometimes use DriveImage XML and CloneDisk. And I found that Windows 7 Backup exists in Windows 8!!

 

I backup and restore Windows 7 when testing new apps or changes. If I like them I do another backup, if I don't I do a restore and they never existed. And I always do a backup before the 2nd Tuesday of the month. ;-)

Share this post


Link to post
Share on other sites

I have never attempted to do a whole disk image with Clonezilla as I always have partitions with different OS's on them. Just better to clone the partition as it only clones the "USED" space allowing for a smaller backup file.

 

I may need to see if an updated version of Clonezilla will in fact clone my Win7 Pro 64 Bit partition on SDA1 as it failed on an earlier version. ;)

Share this post


Link to post
Share on other sites

Myeh... 't weren't nuthin'. ;)

 

Did you get your GRUB/MBR back the way you wanted it?

 

Yes I did it is fine now. But I just reinstalled PCLos I had messed up some other things in it.

  • Like 2

Share this post


Link to post
Share on other sites

I used the Windows 7 Built in image backup under programs/maint and no it does not back up Grub.

 

Of course, it doesn't. GRUB is found on your Linux partitions. MS won't go there. What will usually happen is MS Win will retake control of the master boot record on the boot drive, which requires you to reinstall the GRUB bootloader there.

  • Like 1

Share this post


Link to post
Share on other sites

The method posted did not work. I do not know if it because I use a Graphical Grub or because it is 64 Bit. When in the consoles as root, it would not"find /boot/grub/stage1"

Share this post


Link to post
Share on other sites

I was using one of Bruno's tricks and got this into the home directory

 

file:///home/gary/boot.mbr Now is that what I need in order to boot? I can save it to my usb drive.

 

I burned a copy of clonezilla but it confused the heck out of me.

Edited by Frank Woods

Share this post


Link to post
Share on other sites

.97 is GRUB legacy. I don't know what that file you're showing above is. the GRUB configuration is in /boot/grub. The actual bootloader is installed on your hard disk's master boot record. I'm not a PCLinuxOS expert by a long shot. I can't remember who is around here, either. It used to be Bruno, of course. Nowadays, though... ?

 

When following the steps in the above linked procedure, what were the outputs (error notices) of the commands that failed?

 

1. Boot system from PCLinuxOS LiveCD

2. Open a terminal and be root user - enter "su"

3. Enter command "grub" (it will put you on grub> prompt)

4. Then locate grub files by: "find /boot/grub/stage1"

5. It will return grub locations (it may be (hd0,0) or (sd0,0))

6. As per the location of grub enter "root (hd0,0)" or "root (sd0,0)" or some other.

7. Then issue "setup (hd0)" or "setup (sd0)" or some other.

8. Finally enter "quit"

 

Now reboot the computer without LiveCD.

 

Note: Use commands without quotes.

  • Like 1

Share this post


Link to post
Share on other sites

Eh? Error 37? That sounds like some sort of browser TCP error notice. When you get a chance, run the commands again and C/P the errors here, if you can... or screenshot, if need be.

 

Thanks. :)

Share this post


Link to post
Share on other sites

Of course, it doesn't. GRUB is found on your Linux partitions. MS won't go there. What will usually happen is MS Win will retake control of the master boot record on the boot drive, which requires you to reinstall the GRUB bootloader there.

 

 

I don't know the history of this problem -- but will make the point that if the pc in question was one that came loaded with win7 then it probably has a hidden first partition that is the real 'boot' partition. And so that makes C: something that is probably actually a /dev/sda2 -- and restoring that will not recover the boot files. You need to also image the first hidden partition, and then restore it first when repairing the part where windows lives.

 

Suggest booting with a live linux cd and run #cfdisk /dev/sda on it to reveal the true partition structure, and which is the real boot partition -- it will be marked with an asterisk. Those hidden first parts are usually not very big, which makes for an easy and secure backup situation: just use dd to take a full image of that first part, and store it on some external media. Restoring that file [again with dd] will absolutely get you back the MBR and master partition table, along with the drivers that are usually stored in that first hidden part.

Share this post


Link to post
Share on other sites

I don't know the history of this problem -- but will make the point that if the pc in question was one that came loaded with win7 then it probably has a hidden first partition that is the real 'boot' partition. And so that makes C: something that is probably actually a /dev/sda2 -- and restoring that will not recover the boot files. You need to also image the first hidden partition, and then restore it first when repairing the part where windows lives.

 

Suggest booting with a live linux cd and run #cfdisk /dev/sda on it to reveal the true partition structure, and which is the real boot partition -- it will be marked with an asterisk. Those hidden first parts are usually not very big, which makes for an easy and secure backup situation: just use dd to take a full image of that first part, and store it on some external media. Restoring that file [again with dd] will absolutely get you back the MBR and master partition table, along with the drivers that are usually stored in that first hidden part.

 

No I built it. But thanks anyway. /dev/sda is where it is located.

Share this post


Link to post
Share on other sites

Sorry that I have taken so long to respond but I figured out how to make my own Live cd out of PClinuxOS and it is easy to re install. I also have been using VirtualBox to try out new Distros .

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...