1

I have installed rhel6.5 in my pc. After that I have changed some configurations in file system. now I have taken backup image of /dev/sda1 which is a root partition of 15gb in size using the command as follows:

dd if=/dev/zero of=zero.file
rm zero.file
dd if=/dev/sda1 | gzip -c > backup.img.gz

now the backup.img.gz size is 5.5gb then I copied this file in my pendrive now I installed fresh rhel6.5 and now I am replacing backup.img.gz image with root partition(dev/sda1) but I am getting black screen with blinking cursor. My doubt is can I replace 5.5gb of root partition with 15gb again if not what is the procedure for taking a backup of effected root partition and restoring it back to fresh installation. So that fresh installation should behave like the old one with effected features.

4
  • If I read your question correctly, it sounds like you wish to reinstall the OS and then reapply your configuration changes. If that is the case, you need only backup the few files you edited, reinstall the OS, and then carefully reapply your changes.
    – bsd
    Commented Nov 15, 2014 at 9:57
  • The title and the content doesn't seem to belong to the same question. To replace a backup image named backup_image_filenameof any partition, you don't need dd you just use cp filename backup_image_filename
    – Anthon
    Commented Nov 15, 2014 at 12:26
  • @bdowning as i changed some 100 files in entire filesystem and i just want to take the root dump and i will try replace in the new installed os
    – subbarao
    Commented Nov 15, 2014 at 17:03
  • Can't do that using dd, you need something more selective like tar, zip or even cpio.
    – bsd
    Commented Nov 15, 2014 at 21:50

0

You must log in to answer this question.

Browse other questions tagged .