Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-26-2006, 12:15 AM
|
#1
|
Member
Registered: Jul 2003
Posts: 256
Rep:
|
[solved] Using dd to clone an NTFS partition from a strange partition table
hda1 is the source partition, and hdb1 is the destination. The partitions appear to be the same when I ask for a basic listing:
Code:
root@1[knoppix]# fdisk -l
Disk /dev/hda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 561 4506201 7 HPFS/NTFS
/dev/hda2 562 24321 190852200 f W95 Ext'd (LBA)
/dev/hda5 562 24191 189807943+ 7 HPFS/NTFS
/dev/hda6 24192 24321 1044193+ 7 HPFS/NTFS
Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 1 561 4506201 7 HPFS/NTFS
root@1[knoppix]#
But I get some strange output when I list hda1 seperately:
Code:
root@1[knoppix]# fdisk /dev/hda1
Command (m for help): p
Disk /dev/hda1: 4614 MB, 4614349824 bytes
255 heads, 63 sectors/track, 560 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
This doesn't look like a partition table
Probably you selected the wrong device.
Device Boot Start End Blocks Id System
/dev/hda1p1 ? 13578 119522 850995205 72 Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(368, 111, 45) logical=(13577, 238, 11)
Partition 1 has different physical/logical endings:
phys=(371, 101, 51) logical=(119521, 238, 60)
Partition 1 does not end on cylinder boundary.
/dev/hda1p2 ? 45382 79243 271987362 74 Unknown
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(67, 115, 32) logical=(45381, 70, 3)
Partition 2 has different physical/logical endings:
phys=(299, 114, 44) logical=(79242, 34, 29)
Partition 2 does not end on cylinder boundary.
/dev/hda1p3 ? 10499 10499 0 65 Novell Netware 386
Partition 3 has different physical/logical beginnings (non-Linux?):
phys=(114, 111, 32) logical=(10498, 56, 41)
Partition 3 has different physical/logical endings:
phys=(353, 115, 52) logical=(10498, 56, 40)
Partition 3 does not end on cylinder boundary.
/dev/hda1p4 167628 167631 25817+ 0 Empty
Partition 4 has different physical/logical beginnings (non-Linux?):
phys=(0, 0, 0) logical=(167627, 190, 52)
Partition 4 has different physical/logical endings:
phys=(0, 0, 0) logical=(167630, 245, 26)
Partition 4 does not end on cylinder boundary.
Partition table entries are not in disk order
The first partition was created the XP Pro SP2 installer, and the rest by the XP Pro SP2 GUI disk manager. Here is what the destination partition looks like (created with Knoppix 4.0's fdisk):
Code:
root@1[knoppix]# fdisk /dev/hdb1
The number of cylinders for this disk is set to 8940.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/hdb1: 4614 MB, 4614349824 bytes
16 heads, 63 sectors/track, 8940 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
This doesn't look like a partition table
Probably you selected the wrong device.
Device Boot Start End Blocks Id System
/dev/hdb1p1 ? 216399 1904881 850995205 72 Unknown
Partition 1 does not end on cylinder boundary.
/dev/hdb1p2 ? 723265 1262922 271987362 74 Unknown
Partition 2 does not end on cylinder boundary.
/dev/hdb1p3 ? 167316 167316 0 65 Novell Netware 386
Partition 3 does not end on cylinder boundary.
/dev/hdb1p4 2671568 2671619 25817+ 0 Empty
Partition 4 does not end on cylinder boundary.
Partition table entries are not in disk order
Neither of these tables look right, and even worse, they don't appear to match. There should not even be a /dev/hdb1p2, /dev/hdb1p3, or /dev/hdb1p4, so that's also mysterious.
Any clues? Should I expect problems cloning the first NTFS partition, if I use the command "dd if=/dev/hda1 of=/dev/hdb1"?
Last edited by jgombos; 10-31-2006 at 04:43 PM.
Reason: tag as solved
|
|
|
10-26-2006, 12:37 AM
|
#2
|
Senior Member
Registered: Nov 2004
Distribution: Mint, MX, antiX, SystemRescue
Posts: 2,337
|
Your problem is that you are trying to run fdisk on a partition. fdisk works on disks. That's why, for example, fdisk /dev/hda would work, but fdisk /dev/hda1 would not. /dev/hda is a disk, /dev/hda1 is the first partition on that disk.
|
|
|
10-26-2006, 01:10 AM
|
#3
|
Member
Registered: Jul 2003
Posts: 256
Original Poster
Rep:
|
Yup, I think you're right on the money. I almost stopped myself from running fdisk /dev/hda1, but then I thought, naw, fdisk will error if it can't operate on a single partition. Well, it didn't. I'm glad to know that I was just chasing a ghost. dd ran fine.
|
|
|
All times are GMT -5. The time now is 10:38 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|