John Lange wrote:
On Tue, 2005-10-04 at 22:03 -0500, Dan Martin wrote:
It turns out that my BIOS and ATA interface cannot handle HDs bigger
than 137 GB, so I am switching my new larger drives to another computer
and using its drives in the P3 - ie, lots of copying drives and partitions.
I could be wrong here, its been a while, but, so long as your first
primary partition was below the maximum size your bios allows I think
you should be able to boot from it. Once linux takes over it will be
able to see beyond the bios limit.
Hopefully someone else on this list can provide better information.
I believe this is true, at least for the newer kernels. However, I
can't see more than 137GB with Mandrake 8.1 (a 2.4 kernel) nor Windows
2000 pro sp3. I turns out there are tweaks to be made to Windows to
get it to work which I did not make on that system. I suspect,
however, that the main problem is my ATA interface. In fact, I was
ordering a BIOS but I was advised by a technician (from esupport.com)
that this would not solve my problem.
1) I need to copy a primary partition on one drive to a logical
partition on another. I assume that if I do something like this:
# dd if=/dev/hdc3 of=/dev/hda7 bs=1M
that the boot sector of the primary will overwrite partition info in the
boot sector of the logical partition, destroying extended partition
info. Is there a way around this? If I create the logical partition
with Partition Magic under DOS and copy into it, skipping the first
sector, will that work?
No, dd moves the raw data between any two character devices. /dev/hdc3
does not have a "boot sector", only /dev/hdc does. Moving data between
partitions regardless if they are logical or primary should be fine.
I believe primary partitions do have boot sectors, containing a stage 1
loader for whatever OS might be on the partition. There is only boot
code, no partition tables since they are contained in the MBR.
However, if you instead did
# dd if=/dev/hdc of=/dev/hda7 bs=1M
then you would have a problem since you are moving between a raw device
and a partition. I don't think /dev/hda7 would be mountable at that
point (never tried it).
But you would be able to reverse the process and it would be usable.
The reverse would overwrite the MBR.
To restate the question:
Primary partitions have a boot sector that may or may not containing
loading instructions (in fact I think there is a whole track at the
start which is not part of the filesystem proper). Logical partitions
may start with such code as well, but they also "contain" a partition
table like that of the MBR, but with only 2 records filled to indicate
the address of the partition and that of the next logical partition in
the chain. It would be disastrous to overwrite this table by copying a
primary partition into it, or even a (incorrect) table from another
logical partition.
Therefor, I assume that "hda7" starts after the partition table
adjacent to the partition table associated with hda7, and will not be
overwitten by copying another device's characters into it. Is this
true?
I didn't take a chance - I used Partition Magic to transform a primary
partition into a logical one. This process took approximately 16 hours
for a 75GB partition!
2) I also installed Linux in my P4. When Linux complained it couldn't
read the partition tables for sda, I let it rewrite them, thinking this
was the new drive I put in. Instead, it was my serial ATA drive array.
I have it configured to show up as one large drive under Windows. A
large number of ATI video files were stored on the drive, which shows up
in Linux as 2 drives (unallocated) and continues to show up in Windows
as 1 drive - but now unallocated.
The original drive was partitioned as a single FAT32 partition for the
whole drive. My guess is that the data is still intact, and could be
recovered if I put the right partition info onto the boot sector.
Is there a simple way to recover this? If I created a new FAT32
partition in the "unallocated" space using Partition Magic in DOS or
Windows, is that likely to recover the data?
First of all, you should use LVM (making two drives appear as one) with
extreme caution. If EITHER of the drives fail there is a good chance you
will loose all your data on both drives.
I believe I did this in hardware, not Windows LVM, but Linux does not
seem to recognize it.
Second, I really can't answer this question regarding how it works in
Windows but I will offer this; when you alter the partition scheme it
doesn't affect any of the data on the drives. Assuming you can put the
partitions back to exactly the way they were everything still be there.
I'm going to try repartitioning in PM under Windows (which sees this as
a single drive), and hope it doesn't do even rudimentary formatting of
my "new" partiiton.
--
-Dan
Dr. Dan Martin, MD, CCFP, BSc, BCSc (Hon)
GP Hospital Practitioner
Computer Science grad student
ummar143@cc.umanitoba.ca
(204) 831-1746
answering machine always on