Author Topic: How to restore Manjaro from a Clonezilla backup image when Grub doesn't load  (Read 2773 times)

0 Members and 1 Guest are viewing this topic.

Offline Heart Of A Lion

  • Sr. Mitglied
  • ****
  • Posts: 313
  • I'm new. Be nice!
  • Branch: Stable
  • Desktop: Xfce, Enlightenment
  • GPU Card: ATi 7770 . . . . . . . CPU: AMD octacore 4GHz
  • GPU driver: Free (video-ATI)
  • Kernel: 4.6 (x64)
  • Skill: Intermediate
Some of you might have run into it. Your system broke or you messed something up, so you wanted to restore your system from a Clonezilla backup.

The backup of your disk went fine and restoring it also seemed to go well in Clonezilla.

But then you boot your computer.

And you find out that Grub doesn't even load.

So what can you do?

Here's the solution:

To repair a Manjaro installation that was restored using Clonezilla, but doesn't even boot Grub after restoring it - do the following:

Boot into Manjaro's live cd and mount your actual Manjaro installation into /mnt
Code: [Select]
sudo mount /dev/sdb /mnt
Then chroot into /mnt using mhwd-chroot (you can download mhwd-chroot from the Manjaro repositories)
Code: [Select]
sudo mhwd-chroot /mnt
Now install grub. This will probably install it on the same partition as the Manjaro installation itself, even if you previously had grub installed on a separate partition.
Code: [Select]
grub-install /dev/sdb
Recheck to ensure that the installation has completed without any errors:
Code: [Select]
grub-install --recheck /dev/sdb2
Now automatically configure Grub:
Code: [Select]
update-grub

Reboot the system. Watch the magic.


Extra note: If prior to the Clonezilla restoration process Grub was installed on a separate partition, then installing Grub can generate the following error: "warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible."

To Solve this error, open gParted. This is fixed by creating a 2MB partition on the hard disk and setting its flag to "bios_grub". However, if after a Clonezilla restore the Grub boot partition already exists, then you only need to set the flag to "bios_grub".
« Last Edit: 17. April 2016, 02:28:37 by Heart Of A Lion »

Offline gohlip

  • Held Mitglied
  • *****
  • Posts: 1689
  • Desktop: OpenBox
  • GPU Card: nvidia
  • GPU driver: nonfree
  • Kernel: linux46 - x64
  • Skill: Intermediate
Quote
grub-install /dev/sdb2
Should it be...
Code: [Select]
grub-install /dev/sda
Life is a sexually transmitted disease with a 100% mortality rate.

Offline lojze

  • Neuling
  • *
  • Posts: 44
  • Branch: Arch Linux
  • Desktop: Xfce
  • GPU Card: ATI Radeon 5450
  • GPU driver: free
  • Kernel: 4.4.8-1-lts Arch & 4.5.1-1 Arch
  • Skill: Novice
Use advanced option with clonezilla restore and enable grub restoration. It works perfectly ...http://www.dedoimedo.com/computers/clonezilla.html

Offline artoo

  • OpenRC Team
  • ****
  • Posts: 2373
  • Branch: Unstable
  • Desktop: LXQT/Plasma5, openrc & eudev
  • Kernel: x86_64
  • Skill: Advanced
In my view, this is totally crazy.
Why the hell going through cloning the entire hard drive, including error, when a simple chroot will do it?

Offline Strit

  • Maintainer
  • ***
  • Posts: 746
  • Manjaro Torrent Maintainer
    • Strits.dk
  • Branch: Stable
  • Desktop: XFCE
  • GPU Card: GTX 760 OC
  • GPU driver: Non-free nvidia 361
  • Kernel: 4.4.8-1-MANJARO
  • Skill: Intermediate
I've learned alot from working on ARM based SBC's. I'm getting more and more used to just tarball the entire system up (excluding mountpoints etc ofcourse). Everything on Linux (except bootloader) are stored in files, and all those files get compressed when doing a tarball. So instead of having a 10 GB Clonezilla image, you could have a 2-3 GB tarball, that does exactly the same.
Desktop PC: Manjaro XFCE 15.12 (stable, kernel 4.4)
Private Laptop: Manjaro Strit 16.03 (unstable, kernel 4.6)
Work Laptop: Manjaro Strit 16.03 (stable, kernel 4.4)
Netbook: Arch Linux XFCE/LXqt (i686, kernel 4.0)

Offline dyfi

  • Jr. Mitglied
  • **
  • Posts: 60
  • Skill: Novice
Plus one for tar - it was probably one of the first backup methods available to the early Linux geeks.

Offline Strit

  • Maintainer
  • ***
  • Posts: 746
  • Manjaro Torrent Maintainer
    • Strits.dk
  • Branch: Stable
  • Desktop: XFCE
  • GPU Card: GTX 760 OC
  • GPU driver: Non-free nvidia 361
  • Kernel: 4.4.8-1-MANJARO
  • Skill: Intermediate
Plus one for tar - it was probably one of the first backup methods available to the early Linux geeks.

And tar + rsync is brilliant for remote backups. :P
Desktop PC: Manjaro XFCE 15.12 (stable, kernel 4.4)
Private Laptop: Manjaro Strit 16.03 (unstable, kernel 4.6)
Work Laptop: Manjaro Strit 16.03 (stable, kernel 4.4)
Netbook: Arch Linux XFCE/LXqt (i686, kernel 4.0)

Offline lojze

  • Neuling
  • *
  • Posts: 44
  • Branch: Arch Linux
  • Desktop: Xfce
  • GPU Card: ATI Radeon 5450
  • GPU driver: free
  • Kernel: 4.4.8-1-lts Arch & 4.5.1-1 Arch
  • Skill: Novice
In my view, this is totally crazy.
Why the hell going through cloning the entire hard drive, including error, when a simple chroot will do it?

I don't clone entire drive (that is totaly crazy!), i create image of separate partitions and that's it. No errors. Why would i chroot for the sake of it? Simply ticking couple of advanced options in clonezilla does it for me.

Offline Heart Of A Lion

  • Sr. Mitglied
  • ****
  • Posts: 313
  • I'm new. Be nice!
  • Branch: Stable
  • Desktop: Xfce, Enlightenment
  • GPU Card: ATi 7770 . . . . . . . CPU: AMD octacore 4GHz
  • GPU driver: Free (video-ATI)
  • Kernel: 4.6 (x64)
  • Skill: Intermediate
In my view, this is totally crazy.
Why the hell going through cloning the entire hard drive, including error, when a simple chroot will do it?

I had Grub installed on a seperate boot partition. Clonezilla did not account very well for that. So I had to reinstall Grub by chrooting into my Manjaro installation More people might run into this issue.

Should it be...
Code: [Select]
grub-install /dev/sda

Yes, that's true if your disk only has one partition I think.

Update: You are right, even if there is an extra Grub boot partition on the disk, selecting the entire disk instead of just the partition on which Manjaro is installed - is probably better practice.
« Last Edit: 14. April 2016, 21:30:51 by Heart Of A Lion »

Offline Heart Of A Lion

  • Sr. Mitglied
  • ****
  • Posts: 313
  • I'm new. Be nice!
  • Branch: Stable
  • Desktop: Xfce, Enlightenment
  • GPU Card: ATi 7770 . . . . . . . CPU: AMD octacore 4GHz
  • GPU driver: Free (video-ATI)
  • Kernel: 4.6 (x64)
  • Skill: Intermediate
Use advanced option with clonezilla restore and enable grub restoration. It works perfectly ...http://www.dedoimedo.com/computers/clonezilla.html

I tried it, but that doesn't seem to work if Grub was installed on a separate boot partition.

Offline Heart Of A Lion

  • Sr. Mitglied
  • ****
  • Posts: 313
  • I'm new. Be nice!
  • Branch: Stable
  • Desktop: Xfce, Enlightenment
  • GPU Card: ATi 7770 . . . . . . . CPU: AMD octacore 4GHz
  • GPU driver: Free (video-ATI)
  • Kernel: 4.6 (x64)
  • Skill: Intermediate
I've learned alot from working on ARM based SBC's. I'm getting more and more used to just tarball the entire system up (excluding mountpoints etc ofcourse). Everything on Linux (except bootloader) are stored in files, and all those files get compressed when doing a tarball. So instead of having a 10 GB Clonezilla image, you could have a 2-3 GB tarball, that does exactly the same.

Clonezilla can compress the image as well and encrypt it too. It can also split your image into multiple parts, in case you have to carry your image on multiple USB sticks.

Offline Heart Of A Lion

  • Sr. Mitglied
  • ****
  • Posts: 313
  • I'm new. Be nice!
  • Branch: Stable
  • Desktop: Xfce, Enlightenment
  • GPU Card: ATi 7770 . . . . . . . CPU: AMD octacore 4GHz
  • GPU driver: Free (video-ATI)
  • Kernel: 4.6 (x64)
  • Skill: Intermediate
I don't clone entire drive (that is totaly crazy!), i create image of separate partitions and that's it. No errors. Why would i chroot for the sake of it? Simply ticking couple of advanced options in clonezilla does it for me.

That didn't work in my case, because I had Grub installed on a separate boot partition, which Clonezilla didn't seem to handle very well.

Offline Heart Of A Lion

  • Sr. Mitglied
  • ****
  • Posts: 313
  • I'm new. Be nice!
  • Branch: Stable
  • Desktop: Xfce, Enlightenment
  • GPU Card: ATi 7770 . . . . . . . CPU: AMD octacore 4GHz
  • GPU driver: Free (video-ATI)
  • Kernel: 4.6 (x64)
  • Skill: Intermediate
My system is back up running smoothly though.

Since there is now a boot directory on Manjaro's partition itself, I might delete the separate boot partition on which Grub resided to have just 1 partition on my SSD. It will hopefully make backing up my system and restoring it using Clonezilla a smoother process without issues in the future.

Offline badbodh

  • Held Mitglied
  • *****
  • Posts: 923
  • Windows assumes I'm stupid, Linux proves it.
  • Branch: Testing
  • Desktop: Xfce, i3
  • GPU Card: Intel Mobile 4 Series
  • Kernel: linux41 64-bit
  • Skill: Intermediate
But why go through all that complication for backing up a linux ?
It's nothing but a bunch of files on your hard drive and grub. You can do anything with files, can't you? rsync, tar, bzip, gpg. Just exclude /sys, /proc, /dev, /run, /mnt, /media and /tmp - those are not "a bunch of files on your hard drive" . Wiki explains how to restore grub. Done.

It appears your "windows user" is getting triggered here   C:-)
« Last Edit: 14. April 2016, 17:19:09 by badbodh »
You can't feel the love till it hurts a little. Go rolling, go bleeding-edge !

Offline artoo

  • OpenRC Team
  • ****
  • Posts: 2373
  • Branch: Unstable
  • Desktop: LXQT/Plasma5, openrc & eudev
  • Kernel: x86_64
  • Skill: Advanced
But why go through all that complication for backing up a linux ?
It's nothing but a bunch of files on your hard drive and grub. You can do anything with files, can't you? rsync, tar, bzip, gpg. Just exclude /sys, /proc, /dev, /run and /tmp - those are not "a bunch of files on your hard drive" . Wiki explains how to restore grub. Done.

It appears your "windows user" is getting triggered here   C:-)

 ;D

Precisely.

Just to reinstall grub, by cloning hdd sounds little bit like a joke.
Booting livecd and chroot is fully sufficient to accomplish recovering grub. Takes perhaps 5 minutes.