In a couple of days I'll be replacing a 200-gig PATA internal drive with a 500-gig PATA drive. My VectorLinux partition on that drive is about 11 gigs. On the new drive it will be 100 gigs. The old drive is fine, by the way. I just need more room. The Windows partitions on the drive hold just data, not the operating system. They are Drive H and Drive I in Windows.
The new drive will have 100 gigs for VL 5.8 Standard, about 500 megs for a swap partition, about 150 gigs in FAT32 for photos and music files shared with Windows, and the remaining space in NTFS for videos and video editing. I have the same arrangement now, but the partitions are smaller and the photo and music drive is NTFS.
My plan is to copy all the NTFS data to an external hard drive formatted with NTFS and using the Beryl LiveCD, copy the contents of /dev/hdd8 to an ext2 partition on an external hard drive. I'll then swap the old drive with the new one. I'll set up and format the FAT32 and NTFS partitions on the new drive with Partition Commander and copy the Windows data from the external hard drive to the new Windows partitions. Next I'll reboot with the 5.8 Beryl LiveCD, use cfdisk to create the Linux swap file and the VectorLinux partition (all on /, no separate /home) on the new drive, and format with mkfs.reiserfs.
I'll copy the data from the Linux external drive back to the new /dev/hdd8 and reboot.
Will this work? If I booted with the Live CD and highlighted all the directories in the mounted /dev/hdd8 in a file manager and copied them to /mnt/vl-hot/sdf/vol6 (the external drive), would file ownership and attributes be maintained? The target partition is ext2. I'm not good at command-line stuff, but in looking at man cp, I thought this command might do what I want:
cp -pr /mnt/hdd8 /mnt/vl-hot/sdf/vol6
I've already checked /mnt/hdd8 while I'm running the Beryl LiveCD and there is nothing in /mnt/hdd8's /mnt directory or in its /proc directory. I do want symlinks to be copied, but all symlinks on /dev/hdd8 point to files on /dev/hdd8.
dd if=/dev/hdd8 of=/dev/whatever/mnt/vl-hot-/sdf/vol6is
be better? I forgot to see what /dev the external drive is recognized as, but can check that tomorrow. I have a vague memory of something to be aware of if the source and the destination partitions are different sizes. Am I confused?
I've read man pages for dd and cp and info dd, but it's WAY too techie for me and I can't make heads or tails of it.
What I want is an exact copy of everything in my 11-gig VL partition on /dev/hdd8 so it'll be restored exactly to the new 100-gig VL partition, ownership, permissions, dates, and symlinks intact. There'll be a lot more empty space, though, after the files are copied back.