LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-26-2005, 08:54 PM   #1
junctionking
LQ Newbie
 
Registered: Jan 2005
Distribution: Slack 10.1
Posts: 25

Rep: Reputation: 15
copy hd to hd in other format.


can i copy a ntfs partition to a fat32 partition with dd? ok, so the entire senario goes as followes. i have windows 98se on one hard drive. then i got another hd out of a bad pc. all the info is on it like pics and files but it in ntfs which 98se can't read. if i can copy this over to fat32 i can clear the harddrive for use on a linux os. i have a linux recovery cd by the name of systemrescuecd-x86-0.2.15. that is running now. what do i do know?
 
Old 05-26-2005, 10:25 PM   #2
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
dd makes an identical copy, so the drives need to be identical and you end up with an "image" of the previous drive.

Your distro needs to have NTFS support (some don't out of the box, such as Red Hat/Fedora because of their "not-tainted" open source licensing), of course to do the following.

Personally, I would install the drives in the Linux box, partition and format the destination drive as desired, then pipe it over with tar.

If you just want just one large fat32 partition, however, a Windows 98 boot floppy might be best used to format the destination drive. Unplug all drives except for the destination drive and put it on the first ide slot as master, boot with the floppy and format C:/

If you use fdisk to make several partitions, it can also be used to change the filesystem type to vfat or ntfs as well as many other filesystems, but Windows partitions can't retain Linux permissions, so don't attempt to use the p flag in tar (keep permissions).

See man fdisk and man tar.

# Clone a distro to another drive or move directories around
Install drive in box and ensure BIOS can detect it. Boot into Linux and login to your user's account. Open an x terminal and partition and format the new drive as you wish
Code:
[fancy@tinwhistle fancy]$ su -
Password: 
[root@tinwhistle root]# fdisk /dev/hdb
Exit with w to write the partition table.

Format the partitions with the chosen filesystems:
mke2fs /dev/hdbX -> ext2
mke2fs -j /dev/hdbX -> ext3
mkswap /dev/hdbX -> swap
mkreiserfs /dev/hdbX -> reiserfs
mkfs.xfs /dev/hdbX -> xfs

Make directories for source and destination mount points. You need these to keep out of an endless loop of copying itsself over and over.
Code:
[root@tinwhistle root]# mkdir /mnt/source
[root@tinwhistle root]# mkdir /mnt/destination
Mount your os partitions that you want to clone on /mnt/source
Mount your partitions on the new drive, making directory entries for your separate partitions (/boot, /home, /var etc.). If you are just copying a directory such as var, just cd to the directory you wish to copy instead of mounting partitions on /mnt/source.

Now, cd to /mnt/source and pipe it over with tar
Code:
[root@tinwhistle root]# cd /mnt/source
[root@tinwhistle source]# tar cf - . | (cd /mnt/destination && tar xBf -)
Edit /etc/fstab as needed, install the boot loader if you moved a whole distro, and it should work when it is installed in it's final position.

Last edited by fancypiper; 05-26-2005 at 10:42 PM.
 
Old 05-29-2005, 06:18 AM   #3
mikejac69
Member
 
Registered: May 2004
Location: Lyon, France
Posts: 53

Rep: Reputation: 15
you could try the following;

plug in your hdd with all the info, run Knoppix, mount your 98 drive as read write as Linux can write to FAT32 and then just mount your NTFS drive as read only and copy away! Or if you already have Linux installed then just copy the files across.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
format a hard drive (/dev/hda1) in Reiser fs format Linh Linux - General 7 06-17-2009 06:30 AM
copy and paste not working (requested clipboard format not available) marie-p Linux - Software 1 01-23-2005 11:44 AM
use vi to convert linux format to windows format intolinux Linux - Software 2 12-10-2003 10:20 PM
Format Problems Saving Star Office Docs in Word Format kkempter Linux - Software 4 08-27-2003 04:23 PM
boot error after using Copy Commander to copy debian system onto larger new drive Interceptor Linux - Hardware 7 05-04-2003 12:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration