In my first post I was asking how can I save linux system
and restore it back without re-installation.
- dd the MBR to a regular binary file in the current partion
- cp/cpio all the data to a backup location
- boot into a live distro and fdisk the drive, reformatting it as you need
- still in the live distro copy the data to the proper locations
- stilli in the live distro dd the mbr back.
NOTE: dding a mbr where the ~/mbr.bak is the backup location your saving to:
dd if="/dev/hda" of="~/mbr.bak" bs=512 count=1
dding it back
dd if="~/mbr.bak" of="/dev/hda" bs=512 count=1
This will only work if all the partion numbers for the /boot and / stay the same...
Alternativly use a partion editor that supports extended attributes and non-destructive repartioning
[plug=shameless]
[/plug]