Hi, just stumbled upon this. I'm trying to use dd to restore a partition from a backed up image. Anyone know how to mount an image to RAID? (not sure if possible)
Anyway, I found this on a gentoo forum:
Code:
telinit 1; cp /dev/sda /dev/sdb
http://www.unix.com/gentoo/30298-how...partition.html
for copying a whole drive. Not sure if that works with GUI running. There are more ideas on that link.
For the record you don't need to use dd to copy a root partition and have it be functional. Various "weird" directories like /proc as you mention only contain date that is used when the system is running. I'm pretty sure it's of no importance to save for the next reboot. I've usually just used rsync instead of cp because I like all the info it gives me to make sure I'm not making a mistake. I usually use:
Code:
rsync -avnu --stats --progress / /mnt/newlocation
And I've never had problems. I even copy the boot partition this way.
As for the GRUB, Use the super GRUB disk. I am in love with this simple liveCD ever since I discovered it and I can't recommend it enough. Basically the cp command copies all the important data - all you need is the GRUB on the MBR. This is normally a kind of tricky thing to do because MBR is annoying. But with the Super GRUB CD all you do is boot the cd, select the partition where your /boot is and it writes the MBR automagically and next time you boot fine without the CD. Sometimes it is harder if you have many bootable partitions to remember the drive numbers but that is exactly when you need SUPERGRUB to help you. The GUI of supergrub is a very primative and confusing at first but once you get it it is perfect. It won't harm anything unless you have a Windoze partition to worry about. Yay SuperGRUB!
PS if you prefer to use cp over rsync use this:
Code:
cp -dpRx / /mnt/newlocation
which I got from:
http://www.howtoforge.com/software-r...debian-etch-p2
Bookmarks