Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'd like to backup the state of my system. It only runs Manjaro.

What I've done in the past when I need to install something else on the machine temporarily is just to dd the whole drive to a file and then back again when I want to restore it.

However, that doesn't really make sense this time, because the whole root filesystem only has 17gb in use. My question is this: could I

  • boot from a linux live usb
  • mount my root filesystem (sda2) somewhere
  • copy all of its contents to external media
  • install windows
  • do what i need to with windows
  • boot another live linux system.
  • repartition the drive, format the largest partition as ext4
  • restore the original volume contents to the drive
  • boot up again

And have it work as it did before I backed it up? Would it be basically functionally equivalent to the dd approach?

Would I be missing an MBR, still? Would this be remedied by simply setting the new partition to "boot" in gparted when partitioning? Any other caveats?

share|improve this question
    
I'm not familiar with manjaro, but dumping out a package list, doing a fresh install, and applying that package list and copying over the contents of /etc/, /var/, /home and so on is what I usually do on debian-alikes. Might be a very similar process on yours. Its a more elegant version of backing up using cp - which is what your answer will end up being I suspect. –  Journeyman Geek Oct 17 '13 at 8:54
    
Is this going to be a dual-boot pc, after this operation? –  MariusMatutiae Oct 17 '13 at 9:38
    
No, it's going to be exactly the same as it is now, hopefully. –  user259774 Oct 17 '13 at 12:26
add comment

1 Answer

What you are suggesting is correct, but I would also consider these simple points:

0) You talked about 17GB of stuff on your / directory. Don't you have a larger /home directory with all of your stuff? If you do, how do you intend to proceed to preserve it?

1) I have not understood whether you intend to keep the pc as a dual-boot machine, at the end of this. IF you do, read this point, otherwise just skip it.

What's the point of resizing the disk after having installed Windows? You might as well do it with the live Linux distro before installing Windows. It sounds as though you are going to clear your whole hard disk. If you partition it before installing Windows, keeping in mind its future dual-boot use, then you are going to save yourself the hassle of resizing working partitions, which is both tedious and dangerous.

2) After this whole exercise, you will have non-working grub and MBR. You can fix them both simultaneously from the live distro, before re-starting your system with the new manjaro distro.

First, fix the grub: from the live, mount the partition to which you have re-installed manjaro, let's say /dev/sda2:

sudo mount /dev/sda2 /mnt

Then chroot to it, update grub, and leave the chroot:

sudo chroot /mnt
sudo update-grub
exit

Now it is time to fix the MBR: install on your Ubuntu live BootRepair; following the instructions of this Web page, your MBR will be correctly configured.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.