Hi Mr. hkl8324,
Forget all about that windows things. The system you have has better tools to do it. The partitions you have to save are /dev/hda3 (boot) and /dev/hda5 (/). You will need a boot disk to recover the system or even duplicate it. To save it, you will use tar. The command will be
Code:
tar czv --one-file-system /boot / >"backup-file-name.tgz"
This command will get both partitions and save it on the file "backup-file-name.tgz". You may even save it on your windows partition if it is really a fat32. If, during the restore operation you have the same partition numbers, you won't need to make any edition to properly set the system. However, if you decide to install the backup in another partition, after the restore phase you must edit the file /etc/fstab and /boot/grub/grub.conf.
How to restore or install in another hd:
- boot with the boot floppy;
- execute fdisk if needed to partition the disk;
- execute mk2fs to format the partitions if needed or e2fsck to check it;
- mount the target root partition in any directory; remember you are not running into the hd; your root probably is in memory now; so, you may create any directory as the target with mkdir; for example,
Code:
mkdir /target
mount /dev/hda5 /target
- if you want to preserve the /boot partition separated from /, you need to
Code:
mkdir /target/boot
mount /dev/hda3 /target/boot
You have already to mount the partition where you stored the backup, for example
Code:
mkdir /backup
mount /dev/hda2 /backup
now, if you enter "df -v" you will see both partitions mounted, /target and /target/boot
- cd into /target
- tar xzvf /backup/"backup-file-name.tgz"
- After this, it's time to edit /target/etc/fstab and /target/boot/grub/grub.conf to the new partitions if you are installing in partitions other than the original ones.
- Now, if you are installing a new disk or the partition numbers were changed, you need to reinstall grub.
- As your software is already in place, you may chroot to use it[code]
chroot /target
grub[code]
You will have the grub prompt "grub>".
you will enter
Code:
root (hd0,2)
find /grub/stage1
setup (hd0)
quit
The first command for grub is our root is in "/dev/hda3". Grub uses a notation based on 0, so its partition numbers are always the normal partition number -1.