Jump to content


How To Retore PClinuxOS Grub

grub restore

  • Please log in to reply
27 replies to this topic

#1 OFFLINE   Frank Woods

Frank Woods

    Message Adept

  • Members
  • PipPipPip
  • 98 posts

Posted 14 April 2013 - 07:02 PM

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.

Australis ruins Firefox! Australis should be Abandoned!


#2 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 21,629 posts

Posted 14 April 2013 - 09:02 PM

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...xos-livecd.html

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

Posted Image

#3 OFFLINE   LilBambi

LilBambi

    Australisches Googler

  • Forum Admins
  • 22,548 posts

Posted 14 April 2013 - 09:05 PM

Maybe this blog link will help:

Quote

Restoring GRUB through PCLinuxOS LiveCD


Posted Image
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.
Bambi
AKA Fran

Posted Image
My Public Key for Email :: BambisMusings Blog :: Fran's Computer Services Blog :: MyPassionIsBooks Blog :: 5BuckReview :: CNIRadio
"The Net interprets censorship as damage and routes around it." ~John Gilmore (Time Magazine, Dec 6, 1993)

#4 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 21,629 posts

Posted 14 April 2013 - 09:09 PM

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

Posted Image

#5 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 21,629 posts

Posted 14 April 2013 - 09:16 PM

The formatting is a bit buggered on this thread, but the info is still good --> http://forums.scotsn...48
Posted Image

Posted Image

#6 OFFLINE   Frank Woods

Frank Woods

    Message Adept

  • Members
  • PipPipPip
  • 98 posts

Posted 15 April 2013 - 08:57 AM

Thanks for All of the help! :clap:

Australis ruins Firefox! Australis should be Abandoned!


#7 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 21,629 posts

Posted 15 April 2013 - 11:37 AM

View PostFrank Woods, on 15 April 2013 - 08:57 AM, said:

Thanks for All of the help! :clap:

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

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

Posted Image

#8 OFFLINE   ichase

ichase

    Chasing the Penguin

  • Forum MVP
  • 1,835 posts

Posted 15 April 2013 - 01:33 PM

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.
Ian Chase

Try Parted Magic The must have tool for any linux user's tool box.  (Contains Gparted, wifi support, Clonezilla, SuperGrubDisk/2, plop bootloader and more!!!)
CNI Radio

"I'm in repair.............I'm not together, but I'm getting there"
- John Mayer


Registered Linux User:  526317 10/22/2010
  Posted Image

#9 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 21,629 posts

Posted 15 April 2013 - 02:18 PM

Carp! That reminds me.... I forgot to rsync my Slackware yesterday. Will do so now...
Posted Image

Posted Image

#10 OFFLINE   Ed_P

Ed_P

    Discussion Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 3,094 posts

Posted 15 April 2013 - 02:54 PM

View PostFrank Woods, on 14 April 2013 - 07:02 PM, said:

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, 15 April 2013 - 02:56 PM.

Ed

#11 OFFLINE   LilBambi

LilBambi

    Australisches Googler

  • Forum Admins
  • 22,548 posts

Posted 15 April 2013 - 04:17 PM

View PostV.T. Eric Layton, on 14 April 2013 - 09:09 PM, said:

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 ;)
Bambi
AKA Fran

Posted Image
My Public Key for Email :: BambisMusings Blog :: Fran's Computer Services Blog :: MyPassionIsBooks Blog :: 5BuckReview :: CNIRadio
"The Net interprets censorship as damage and routes around it." ~John Gilmore (Time Magazine, Dec 6, 1993)

#12 OFFLINE   sunrat

sunrat

    Thread Kahuna

  • Forum Moderators
  • 5,808 posts

Posted 15 April 2013 - 08:53 PM

View PostEd_P, on 15 April 2013 - 02:54 PM, said:

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.
registered Linux user number 324659  ||    The importance of Reading The *Fine* Manual! :D
Posted ImagePosted ImagePosted ImagePosted Image
For the things we have to learn before we can do them, we learn by doing them.

#13 OFFLINE   Ed_P

Ed_P

    Discussion Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 3,094 posts

Posted 16 April 2013 - 01:30 AM

View Postsunrat, on 15 April 2013 - 08:53 PM, said:

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. ;-)
Ed

#14 OFFLINE   ichase

ichase

    Chasing the Penguin

  • Forum MVP
  • 1,835 posts

Posted 16 April 2013 - 08:30 AM

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.  ;)
Ian Chase

Try Parted Magic The must have tool for any linux user's tool box.  (Contains Gparted, wifi support, Clonezilla, SuperGrubDisk/2, plop bootloader and more!!!)
CNI Radio

"I'm in repair.............I'm not together, but I'm getting there"
- John Mayer


Registered Linux User:  526317 10/22/2010
  Posted Image

#15 OFFLINE   Frank Woods

Frank Woods

    Message Adept

  • Members
  • PipPipPip
  • 98 posts

Posted 16 April 2013 - 11:03 AM

View PostV.T. Eric Layton, on 15 April 2013 - 11:37 AM, said:

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.

Australis ruins Firefox! Australis should be Abandoned!


#16 OFFLINE   Frank Woods

Frank Woods

    Message Adept

  • Members
  • PipPipPip
  • 98 posts

Posted 16 April 2013 - 12:55 PM

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

Australis ruins Firefox! Australis should be Abandoned!


#17 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 21,629 posts

Posted 16 April 2013 - 01:07 PM

View PostFrank Woods, on 16 April 2013 - 12:55 PM, said:

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.
Posted Image

Posted Image

#18 OFFLINE   Frank Woods

Frank Woods

    Message Adept

  • Members
  • PipPipPip
  • 98 posts

Posted 26 April 2013 - 02:23 PM

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"

Australis ruins Firefox! Australis should be Abandoned!


#19 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 21,629 posts

Posted 26 April 2013 - 03:06 PM

Are you using GRUB2 (1.99/2.0)? Or legacy GRUB (.97)?
Posted Image

Posted Image

#20 OFFLINE   Frank Woods

Frank Woods

    Message Adept

  • Members
  • PipPipPip
  • 98 posts

Posted 26 April 2013 - 03:52 PM

How do I find out? It is Grub 097-27

Edited by Frank Woods, 26 April 2013 - 03:55 PM.

Australis ruins Firefox! Australis should be Abandoned!


#21 OFFLINE   Frank Woods

Frank Woods

    Message Adept

  • Members
  • PipPipPip
  • 98 posts

Posted 26 April 2013 - 04:40 PM

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, 26 April 2013 - 04:42 PM.

Australis ruins Firefox! Australis should be Abandoned!


#22 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 21,629 posts

Posted 26 April 2013 - 09:10 PM

.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.


Posted Image

Posted Image

#23 OFFLINE   Frank Woods

Frank Woods

    Message Adept

  • Members
  • PipPipPip
  • 98 posts

Posted 27 April 2013 - 01:04 PM

After step 4 above I get an error 37 I believe.

Australis ruins Firefox! Australis should be Abandoned!


#24 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 21,629 posts

Posted 27 April 2013 - 01:55 PM

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. :)
Posted Image

Posted Image

#25 OFFLINE   burninbush

burninbush

    Multithreader

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,279 posts

Posted 27 April 2013 - 03:12 PM

View PostV.T. Eric Layton, on 16 April 2013 - 01:07 PM, said:

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.





Also tagged with one or more of these keywords: grub, restore

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users