Shrinking a disk partition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I've got a box with two drives in it.  Hda is dedicated to
Windows and hdb is currently running RH 8.0.

I want to shrink the hdb2 partition to make room for a new
/boot and root to install RH 9.0.  I know I need to convert
the ext3 filesys to ext2, shrink it to about 20GB and then
reduce the partition size without making it smaller than the
reduced filesystem.  I want to use the same swap partition
for both RH 8.0 and RH 9.0.

But I'm somewhat confused - mostly by the differences in the
Start and End values indicated by parted, fdisk and sfdisk.

Is what I want to do reasonable?  And if so, can anyone shed
some light on why the values seem somewhat different and how
I should choose new values for parted and fdisk?

'parted' says,
    Using /dev/hdb
    Error: The partition table on /dev/hdb is inconsistent.  There are
    many reasons why this might be the case.  However, the most likely
    reason is that Linux detected the BIOS geometry for /dev/hdb
    incorrectly.  GNU Parted suspects the real geometry should be
    79656/16/63 (not 4998/255/63).  You should check with your BIOS
    first, as this may not be correct.  You can inform Linux by adding
    the parameter hdb=79656,16,63 to the command line.  See the LILO or
    GRUB documentation for more information.  If you think Parted's
    suggested geometry is correct, you may select Ignore to continue
    (and fix Linux later).  Otherwise, select Cancel (and fix Linux
    and/or the BIOS now).
    Ignore Cancel ? i
    Information: The operating system thinks the geometry on /dev/hdb
    is 79656/16/63.  Therefore, cylinder 1024 ends at 503.999M.

'Parted's 'print' command says:
    Disk geometry for /dev/hdb: 0.000-39205.687 megabytes
    Disk label type: msdos
    Minor    Start       End     Type      Filesystem  Flags
    1          0.031     99.914  primary   ext3        boot
    2         99.914  38181.937  primary   ext3
    3      38181.938  39205.687  primary   linux-swap

The 'p' command in 'fdisk /dev/hdb' says:
    Disk /dev/hdb: 16 heads, 63 sectors, 79656 cylinders
    Units = cylinders of 1008 * 512 bytes

       Device Boot    Start       End    Blocks   Id  System
    /dev/hdb1   *         1       203    102280+  83  Linux
    /dev/hdb2           204     77576  38995992   83  Linux
    /dev/hdb3         77577     79656   1048320   82  Linux swap

And, the cmd 'sfdisk --no-reread /dev/hdb' generates this output:
    Disk /dev/hdb: 4998 cylinders, 255 heads, 63 sectors/track
    Old situation:
    Warning: The partition table looks like it was made
      for C/H/S=*/16/63 (instead of 4998/255/63).
    For this listing I'll assume that geometry.
    Units = cylinders of 516096 bytes, blocks of 1024 bytes,
      counting from 0

       Device Boot Start     End   #cyls    #blocks   Id  System
    /dev/hdb1   *      0+    202     203-    102280+  83  Linux
    /dev/hdb2        203   77575   77373   38995992   83  Linux
    /dev/hdb3      77576   79655    2080    1048320   82  Linux swap
    /dev/hdb4          0       -       0          0    0  Empty

Thanks,
Doug Wyatt


-- Psyche-list mailing list Psyche-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux