Re: Moving whole partitions



On Sat, 10 Feb 2007 19:01:42 +0100, Alexander Korsunsky wrote:
Anyway, I wanted to ask how I could manage to copy some whole partitions
(preferably as is, e.g. as an image) to an extern hard drive,

Hmm, bad blocks and wasted space too?
No me.

repartition my disk and get the partitions back onto my hard drive again.
First question: Can I copy a whole partition, and if yes, how.

Tar can be used.
First Create/format target partition(s), mount and tar partition accross.
General example follows:
Boot a rescue cd/diskette.
mkdir /old
mkdir /new
mount -t auto /dev/hdWX /old # you solve fory W X
mount -t auto /dev/hdYZ /new # you solve fory Y Z
cd /old
tar cfp - . | (cd /new && tar xpf -)
cd
umount /old /new

Second question: What do I have to change in my linux systems to get
them working again (apart from grub menu)

/etc/fstab changes

Third Question: Can I resize a partition?

I find a live partition cd can come in handy for everything you
want so far.
http://sourceforge.net/project/showfiles.php?group_id=115843&package_id=173828

Fourth question: My Ubuntu partition contains both the / and the /home
directories, which I now find quite inconvenient. Is there a chance to
split them now without reinstalling the whole system?

Yes, create/format your new home partition. mount it /new_home
cd /home
tar cfp - . | (cd /new_home && tar xpf -)
umount /new_home
mv /home /home_old
mkdir /home
modify /etc/fstab to have /home as an mount point instead of /new_home
mount /home

.



Relevant Pages

  • Re: asrock, problem with nic after windows-boot - Mount Issues [Resolved]
    ... Like an idiot, I mounted hda1, when I needed to mount the whole hda ... mkdir /p1 ... I think I'm wrong about KDE being the umount culprit though; ... This hda4 is a copy (and a Primary partition, as most know) of a win98 ...
    (comp.os.linux.networking)
  • Re: unable to mount a drive imaged using dd
    ... mkdir /mnt/hdd1 ... mount: special device /dev/hdd1 does not exist ... Stefan - I'm trying to access a partition, ...
    (comp.os.linux.hardware)
  • Re: formatting hardrive
    ... > partition a second hardrive so I could dump/restore the content of my first ... Now mount partition a on /mnt so you can make the mount points for ... by doing mkdir /dmp, then replace /mnt with /dmp in all these commands) ... Don't try to dump to the mounted directory. ...
    (freebsd-questions)
  • Re: copy hard drive
    ... You first have to partition the new drive and set up file systems on ... Then mkdir /new and mount the root partition of the new drive there. ... or CD to handle a possible kernel panic or lilo failure:+) ...
    (alt.os.linux)
  • Re: Problem with random disks mount sequence
    ... I'll get random mount sequences. ... At the beginning the USB ... nautilus remember that 'storage3' was 1st partition, ... SCSI drives are listed by order of discovery. ...
    (Fedora)