CLI wins where PartitionMagic and QTparted failed

C M Reinehr cmr
Wed Jan 17 09:46:31 PST 2007


On Wednesday 17 January 2007 11:20, Matthew Carpenter wrote:
> I recently had some odd events lead me to undesirable partitioning of my
> new HP laptop 80GB drive.  You may remember my quandary about whether to
> wipe a 10GB recovery partition.  I had issues resizing the NTFS partition
> on install, so I wiped that 10 gigger and installed there.
>
> Since then, I have had very little luck with partitioning.
> QTparted couldn't resize the NTFS partition, mentioning an unclean
> partition. Scandisked the partition but still no joy.
> PartitionMagic complained about the "Media" partition being in a
> "hibernate" state.  I ended up using fdisk to change the partition type.
> PartitionMagic then resized the NTFS partition, but I had 4 primary
> partitions and could not create my new "home" partition.
> PartitionMagic wanted nothing to do with resizing my EXT3 partitions.
> QTparted wanted nothing to do with that either.
> I deleted my SWAP partition, giving me only three primary partitions, but
> the 1GB of freespace was *after* my main EXT3 partition and all the other
> freespace was before.  I could have done LVM at this point, but didn't
> think about it at the time.
> Again, neither PQMAGIC or QTparted wanted to move or resize my EXT3
> partition.
>
> So, I did the following:
> * Booted to a Kubuntu install CD
> * Used sfdisk -d /dev/sda > sda.partitions
> * Edited sda.partitions to make the EXT3 partition include the freespace
> following it
> * Mounted the partition and copied off ext2resize into the local ramdisk
> * umounted it
> * Used ext2resize /dev/sda2 <size in blocks according to sfdisk>b
> 	(the 'b' signifies that the number is in 512b blocks, not EXT's 1k 2k or
> 4k blocksize)
> * Created my new home directory and swap partition on a Extended partition
> created from the newly realized freespace from the NTFS partition.
>
> All because I was too stupid to remember that "there can only be 4"

You've really got to admire someone brave enough to edit their partition table 
manually! ;-)

cmr
-- 
Debian 'Etch' - Registered Linux User #241964
--------
"More laws, less justice." -- Marcus Tullius Ciceroca, 42 BC



More information about the Linux-users mailing list