Re: freespace left after partitioning

From: Trevor Hemsley (Trevor-Hemsley_at_no.spam.dial.pipex.com)
Date: 08/17/04


Date: 17 Aug 2004 08:38:09 GMT

On Tue, 17 Aug 2004 02:57:18 UTC in comp.os.linux.hardware, Haines Brown
<brownh@teufel.hartford-hwp.com> wrote:

> I just partitioned a disk and it struck me as handy if I knew, in
> megabytes, just how much freespace was left on a disk outside its
> partitions.
>
> Yes, I could run fdisk on the disk, and with the p command display the
> total cylinders on the disk, subtract from it the end cylinder of the
> last partition, and multiply the difference by number of megabytes per
> cylinder as displayed by fdisk.
>
> But there's gotta be an easier way.

libretto:/tmp # fdisk /dev/hda

The number of cylinders for this disk is set to 2432.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): v
144833 unallocated sectors

-- 
Trevor Hemsley, Brighton, UK.
Trevor-Hemsley@dial.pipex.com


Relevant Pages

  • Re: Got two copies of WinXP on my computer.
    ... fdisk, and it does not seem as daunting as it did half an hour ago. ... I read that it should work with a Win95B disk, ... delete all the partitions, it is a quick and easy way to do it. ... the computer with a Windows 98 boot disk and use fdisk to remove all the ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: howmany partitions per disk possible?
    ... Windows's fdisk continually spits out dire warnings, ... disk till you engage the magic "w" function. ... Given my partitions were peculiar anyway (one ... extended containing two logicals, no primaries at all), it ...
    (Ubuntu)
  • Re: dual booting (installed ubuntu then windows 2003 serv)
    ... The number of cylinders for this disk is set to 14593. ... (e.g., DOS FDISK, OS/2 FDISK) ... hda2 that there's reference to /dev/hda1 in grub menu.lst, ...
    (comp.os.linux.misc)
  • Re: [PATCH] make kernel ignore bogus partitions
    ... valid partition table that lists partitions larger than the single disk ... (since the partitions span both disks). ... This causes the kernel to ... a disk because it has a slightly different notion of cylinders that I ...
    (Linux-Kernel)
  • Re: [RFH] Partion table recovery
    ... partion, but there are many partitions after that, which I hope should ... it's got a backup copy of the ptable at then end of the disk;-) ... Then comes fdisk. ... your approximate partitions size will help too. ...
    (Linux-Kernel)