[NTLUG:Discuss] How to move data from one drive to another

Leroy Tennison leroy_tennison at prodigy.net
Fri Aug 5 05:13:35 CDT 2005


John Thomas wrote:

> Thanks for all the advice, guys.  I see now that dd won't work since 
> the disk geometries will be different.
>
> I didn't think of the idea of simply moving, say /home, to the new 
> drive.  Should I use fdisk to format the drive as Linux FS and then 
> make a /home partition there?  Will the kernel find /home  on whatever 
> drive it is on?  (Home is where most of the data is, partly because 
> I'm running XP under VMWare).
>
> This would be simple, since I could continue to use the small drive to 
> boot.
>
> JT
>
> _______________________________________________
> https://ntlug.org/mailman/listinfo/discuss
>
Yes, you can use fdisk (just make sure and specify /dev/hdb) and then 
mke2fs (use the -j switch for ext3 if you want, assuming you want ext2 
or 3 - if not then use the appropriate mk???fs command).  You will need 
to modify /etc/fstab to refer to the new device (if you want it mounted 
on /home and that's what you are currently are using then you will have 
to make the modification anyway).  One other issue, be careful what 
label you decide to use for the partition on the second drive.  I've run 
into trouble installing multiple distros on the same drive because most 
want to call their install partition '/'.  It is possible to have 
multiple partitions with the same label but doing so puts you in "the 
nebulous zone".  Sometimes things work, sometimes they don't.  The 
solution (when you have multiple partitions with the same label) is to 
NOT use 'LABEL=' in fstab.  Use 'UUID=' instead.  You can get the UUID 
with dumpe2fs (again, assuming ext2 or 3, use the -h switch and pipe to 
less).  Be aware that you can not use UUID as a kernel command line 
parameter (asked about this on kernel.org and got the 'No' rerply). 
 However, this is probably a non-issue unless you're doing 
'mix-and-match' hard drive combinations (which is how I discovered all 
this the hard way).





More information about the Discuss mailing list