[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to non-destructively make ext2 filesystem recognized by parted?
From: |
Ole Bøssing Christensen |
Subject: |
How to non-destructively make ext2 filesystem recognized by parted? |
Date: |
Thu, 19 Apr 2001 13:15:20 +0200 |
Dear all,
After some failed runs with parted it does not
recognize my root partition as an ext2 filesystem anymore, though
fdisk and the system do. Once in a while it is identified as swap,
mostly it is blank. I would very much like to fix this in order to
enlarge the partition without
having to reinstall my system. Any clues will be appreciated.
Thanks in advance! /Ole
My story: I run RedHat 6.2 on a 60GB disk partitioned as shown below. As
preparation to upgrading to RedHat 7.1 I wanted to enlarge the root
partition and thus had to move stuff around.
I booted from tomsrtbt, ran parted 1.4.11 from a floppy and tried to
resize the existing very large (55GB) data partition, 24% full, to a
smaller size as part of moving stuff around. After a very long time the
program crashed with a register dump. Booting the system after that
did not show any change in the partitions, though the system was a bit
flaky with fsck to be used occasionally. Then I downloaded the boot
image with parted from gnu.org, retried the resize, but after an hour's
disk activity the program froze w/o disk activity and I reset the
computer. All this is
OK, I can backup my data and recreate the big partition if needed. My
problem is that something happened to the file type of my root partition
in the mean time...
The system boots and runs fine; fdisk, sfdisk, and cfdisk recognize the
root partition as ext2, but parted does not recognize any file system
type and refuses to manipulate (enlarge) this partition.
I found a thread a few months back with the advice to reset the first 1k
of the disk:
# dd if=/dev/zero of=/dev/hda5 bs=1k count=1
I did that, and it makes no difference to the behavior.
I have now realized that I could get around all this by creating a new
partition for /usr or such, but I am not happy to have some partition
table error lurking around.
Details:
--------------------------------
# parted /dev/hda print
Disk geometry for /dev/hda: 0.000-58644.140 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 23.532 primary ext2 boot
2 23.533 58643.525 extended
5 23.563 3027.875 logical
6 3027.907 3545.595 logical linux-swap
7 3545.626 58643.525 logical ext2
--------------------------------
# fdisk /dev/hda -l
Disk /dev/hda: 255 heads, 63 sectors, 7476 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 3 24066 83 Linux
/dev/hda2 4 7476 60026872+ 5 Extended
/dev/hda5 4 386 3076416 83 Linux
/dev/hda6 387 452 530113+ 82 Linux swap
/dev/hda7 453 7476 56420248+ 83 Linux
# fdisk /dev/hda
(truncated)
Command (m for help): p
Disk /dev/hda: 255 heads, 63 sectors, 7476 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 3 24066 83 Linux
/dev/hda2 4 7476 60026872+ 5 Extended
/dev/hda5 4 386 3076416 83 Linux
/dev/hda6 387 452 530113+ 82 Linux swap
/dev/hda7 453 7476 56420248+ 83 Linux
Command (m for help): x
Expert command (m for help): p
Disk /dev/hda: 255 heads, 63 sectors, 7476 cylinders
Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID
1 80 1 1 0 254 63 2 63 48132 83
2 00 0 1 3 254 63 1023 48195120053745 05
3 00 0 0 0 0 0 0 0 0 00
4 00 0 0 0 0 0 0 0 0 00
5 00 1 1 3 254 63 385 63 6152832 83
6 00 1 1 386 254 63 451 63 1060227 82
7 00 1 1 452 254 63 1023 63112840497 83
# df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hda5 3028080 1077976 1796284 38% /
/dev/hda1 23302 2442 19657 11% /boot
/dev/hda7 55533852 14046980 38665860 27% /priv_1
(truncated)
---------------------------------------------------------------
--
Ole Bøssing Christensen, PhD
http://www.dmi.dk/f+u/klima/klimasektion/obc.html
Climate Res. Div./Danish Climate Center Phone : (+45) 39 15 74 26
Danish Meteorological Institute Fax: (+45) 39 15 74 60
Lyngbyvej 100, DK-2100 Copenhagen Ø, Denmark E-mail: mailto:address@hidden
- How to non-destructively make ext2 filesystem recognized by parted?,
Ole Bøssing Christensen <=