Quote:
Originally Posted by Bruno Azzinnari
Is there any way I can do this without reinstalling Kubuntu?
|
Yeah, I think so. While you might be able to use
partimage as you imagine, I would not think that the easiest way. (Although if you care about the data, backing up is never a bad idea.) If you just want to trash what is currently on
/dev/sda, I would just suggest using your favorite partitioning tool to set up the the partitions for Linux as you want them, and then using
mkswap and
mkfs.ext3 to create your swap and filesystem. Or you could do all of this with your choice of
parted/
gparted/
qtparted. If you want to save the contents of
/dev/sda5, just use one of the previous tools to set things up as you like, with the apropriate partitions configured as EXT3 and linux-swap.
Then, instead of retoring from
partimage, I would just copy the files over:
rsync -a --ignore-existing /mnt/sdb5/ /mnt/sda1
where
/dev/sdb5 and
/dev/sda1 are already mounted on
/mnt/sdb5 and
/mnt/sda1 respectively. You will probably have to create these mount points with
mkdir. You can create/use other mount points if you wish. I am assuming you are copying into an newly created EXT3 file system that should have nothing but the
lost+found directory. The
--ignore-existing switch is so that that directory does not get copied. (The trailing slash on
/mnt/sdb5/ above is required, or else it will do something different.)
Quote:
I'm not sure there's even a chance that the new copy would boot up.
|
I'm pretty sure it won't boot up until you reinstall GRUB. You can do that by using your installation CD as a live CD. Although I've used the
grub command a few times, I still don't have great confidence in what I am doing, but I believe the following is correct.
After you boot the CD, get a terminal window, type
sudo grub, and then enter the following. I am including
grub's prompt -- what you enter is in red.
Code:
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
EDIT: BTW, when you restore a partition with
partimage, it is not necessary to first put a filesystem on it (format it). Since
partimage replaces all used sectors anyway, whatever you just put there gets wiped out. And the file system is part of what
partimage replaces.