LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (http://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Filesystem duplication problem (http://www.linuxquestions.org/questions/linux-desktop-74/filesystem-duplication-problem-657068/)

digerati1338 07-20-2008 10:19 PM

Filesystem duplication problem
 
Alright, I have an interesting filesystem duplication problem here. I've found a couple of plausible solutions, but I wanna run it by some people before I screw myself over.

I've got a Debian Sid/Windows Vista dual boot system set up on my rig. I use Linux 90% of the time, but need Windows for some games and stuff. Anyway, I'm trying to get the Ext2 IFS driver for windows to access my 2 linux partitions (/home and /), both ext3. Unfortunately, the default inode size is 256 and the windows driver requires it to be 128. There is no way to change the Inode size without reformatting the partition using
Code:

# mkfs.ext3 -I 128 /dev/sda1
I have already fixed my home partiton like this:

I used Gparted Live to shrink my current home partition (lots of empty disk space right now cuz its a relatively new install) to roughly 1/2 its size. I made a new ext3 partition in the new empty space with the correct inode size. I then mounted the original as "/media/old" and the new one as "/media/new" all within the live cd. From there I did:
Code:

# cd /media/old
#cp -i -P -p ./* /media/new

Then I would delete /media/old and grow /media/new to fill the empty space. This worked great for the home partition, and seems to have correctly preserved permissions and system links as far as I can tell.

I could use the same technique for the root partition, but I've seen some sites that suggest using
Code:

# tar lcf - .|(cd /media/new; tar xpvf - )
I was wondering what the differences are between these two. I know the tar works by piping the tarred output to another tar that extracts it to the new partition, creating an exact copy. Are there any advantages to this? Also, GRUB is on my MBR. Do I need to be concerned about that?

syg00 07-20-2008 10:51 PM

I always use "CP -a ..." from a liveCD. tar would work just as well. If you're moving the (start of) partition, you'll need to fix grub - I always do that anyway, from the liveCD.
(must be a recent build to get bitten by the 256 inode change).


All times are GMT -5. The time now is 11:32 PM.