[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
parted: problem with BR on /dev/hda3
From: |
buchal |
Subject: |
parted: problem with BR on /dev/hda3 |
Date: |
Sun, 26 Nov 2000 12:46:32 +0100 |
User-agent: |
Mutt/1.2.5i |
sorry, it is me again.
I tried all your hints, but all without success:
My problem was/is:
I want to copy a FAT partition which is in /dev/hda1
but all partition tools have a problem with /dev/hda3.
--> parted refuses to do any operation with /dev/hda.
( my last mail with the complete description is at the end )
[but: I work since 2 years without any problems on this partition.]
Your hints were:
1) # parted /dev/hda1 cp /dev/hde 2
results in the following error
|--------------------------------------------------------------------------------
|Warning: Device /dev/hda1 is neither a SCSI nor IDE drive.
|Ignore Cancel ? ignore
| cp MINOR [DEVICE] MINOR copy filesystem to another partition
|
| MINOR is the partition number used by Linux. The primary partitions
| number from 1-4, and logical partitions are 5 onwards.
| DEVICE is usually /dev/hda or /dev/sda
|--------------------------------------------------------------------------------
2) using gpart
a) gpart -E -c -W /dev/hda -l present_hda.log dev/hda
gives me correctly:
|------------------------------------------------------------
|Primary partition(3)
| type: 131(0x83)(Linux ext2 filesystem)
| size: 960mb #s(1967616) s(2265984-4233599)
| chs: (281/0/1)-(524/127/63)d (281/0/1)-(524/127/63)r
^ ^
|------------------------------------------------------------
(the above command should also install this correct guess at /dev/hda)
but when I save afterwards the partition table again to file
and run "gpart -vdg file"
I get again 523. ( also with fdisk x p )
I have still an old backup which I saved when I installed Lilo
the first time. (/boot/boot.0300).
gpart -vdg /boot/boot.0300 gives me correctly 524.
I also installed this MBR again using
dd if=/boot/boot.0300 of=/dev/hda bs=446 count=1
but fdisk x p gave again 523.
History:
I had originally lilo installed in /dev/hda and changed this a few
month ago to /dev/hda3.
(installing the original /boot/boot.0300 again)
Is it possible that these missleading numbers are caused by
my lilo installation ?
I.e. additional bootrecord on first block in /dev/hda3.
(This is recommended in the howtos.)
It seems to me that exactly the one block which is missing on
/dev/hda3 is the block, which is used as bootrecord.
???? Is there really no way to ignore /dev/hda3 when I only want to
copy /dev/hda1 ??
yours tobias
###########################################################################
yours last answer:
The problem is: your partitions don't start at the beginning of
cylinder boundaries. Parted can't manipulate partition tables like
this (yet).
However, if you want to copy a partition, you don't have to use
the partition table (!).
Eg: # parted /dev/hda1 cp /dev/hde 2
.......
###########################################################################
To: address@hidden
Subject: parted Error: Unable to align partition
I get the following error message from parted
|--------------------------------------------------------------------------------
|(bash) parted /dev/hda
|Using /dev/hda
|Warning: The operating system thinks the geometry on /dev/hda is 525/128/63.
|You should check that this matches the BIOS geometry before using this
program.
|(parted) print
|Warning: The partition table on /dev/hda is inconsistent. There are many
|reasons why this might be the case. Often, the reason is that Linux detected
|the BIOS geometry incorrectly. However, this does not appear to be the case
|here.
|Ignore Cancel ? Ignore
|Error: Unable to align partition.
|(parted) cp 1 /dev/hde 2
|Error: Unable to align partition.
|--------------------------------------------------------------------------------
I am using:
-----------
Debian 2.0 with ( libc 2.0.7, Kernel 2.033 )
tried parted versions:
from parted_1.2.8
up to parted_1.4.0_pre2 (the error message shown above is the one
of version 1.4.0_pre2 )
./configure --without-readline --disable-nls --disable-shared
I had to comment in libparted/device.c:233 ff
[ BLKSSZGET is unknown to kernel 2.033 )
|----------------------------------------------------------------------
|/*
|if (_get_linux_version() < 0x203) /* BLKSSZGET is broken < 2.3.x
*/
|
| return 512;
|/*
|if (ioctl (dev->fd, BLKSSZGET, §or_size))
| return 512;
| */
|----------------------------------------------------------------------
# fdisk /dev/hda
: x
: p
: q
results in: (commented)
|------------------------------------------------------------
|Disk /dev/hda: 128 heads, 63 sectors, 525 cylinders
|
|Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID
| 1 00 1 1 0 127 63 267 63 2161089 06
^^^^^^^=(267+1)*63*128- 63
| 2 00 0 1 268 127 63 280 2161152 104832 82
^^^^^^ = 128 *63*(280-268+1)
| 3 80 0 1 281 127 63 523 2265984 1967616 83
^^^^^^^^^^^^^^^^^^^^^^^^ phys ^^^^^^^ logical size
128 *63*(524-281+2) =1967616
^^^^WRONG = 128 *63*(523-281+1) =1959552
|Partition 3 has different physical/logical endings:
| phys=(523, 127, 63) logical=(524, 127, 63)
| 4 00 0 0 0 0 0 0 0 0 00
|------------------------------------------------------------
I attached the partition table
(dd if=/dev/hda of=parttable bs=512 count=1)
[ not this time ]
a) The disk itself has 525 Cylinders (= Cylinder 0-524)
--> it should be possible to correct/resize the number this error
in the partition table.
(which space is really used by the OS ?
if physical: lower logical space
if logical : increase number of heads
??? is there a tool which allows savly to correct the
partition table while using this partition ?
b) I only want to copy the first partition.
So partition 3 should not be affected.
??? --> why can parted not ignore this error ?
yours
tobias
- parted: problem with BR on /dev/hda3,
buchal <=