Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have to do the whole system cleanup, deleting and recreating all partitions.

I'm wondering if I could simply tar all my / (excluding proc, sys and mnt) into archive and then untar it into clear partition from livecd after this full cleanup, reinstall grub and have my system working as before.

Would it work? If not, what would you recommend?

Probably, same troubles with partitions in system itself? (fstab is the simplest example)

share|improve this question
1  
I had done this once successfully. Best part is we can modify system files with ubuntu running. And you can use chroot to relocate root, and grub-update get everything working again. –  Sreevisakh Mar 31 '13 at 8:37
    
@Sreevisakh, Some little difference. I'll have absolutley empty partition to untar my system. So there's going to be no system installed there and no files to be 'hot removed'. –  MInner Mar 31 '13 at 8:39
2  
If you first create partitions and mount them to appropriate folders from your live cd, you can untar your files properly –  Sreevisakh Mar 31 '13 at 8:43
    
@Sreevisakh ,thank you. I'll try. –  MInner Mar 31 '13 at 8:46
    
Don't forget to not include /dev either. –  haneefmubarak May 12 '13 at 18:32

1 Answer 1

In general that should work. Some points to take care of:

  • Exclude /dev /proc /sys /run
  • You can usually also exlude /tmp /mnt /media
  • Create the tar archive with a live cd if possible
  • If you want the same sizes of your partitions, save your partition table (e.g. with parted /dev/sd... unit b print)
  • Do not forget to run grub-install
share|improve this answer

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.