[CS-FSLUG] Hard drive won't format - or maybe stay formatted.

Tim Young Tim.Young at LightSys.org
Mon Aug 9 10:01:32 CDT 2010


  The difference in size is usually because GB are calculated two 
main ways.  One is the size divided by 1000, and the other is size 
divided by 1024.  HD vendors always use the more impressive numbers.  
Some tools will report one way or the other.

The du command, for example, has a -h option that says to report the 
device usage (and size) in human readable form (using GB, KB, etc).  
It has an option, --si, which tells it to use the base 1000 instead 
of base 1024.  (see man du)

One of the other oddities of the ext2/3/4 filesystems, are how they 
allocate directory information.  Basically, they pre-assign inodes 
(directory information) during the format.  This space effectively 
disappears, and is shown as unusable.  For standard people (non-root 
users), this space cannot be used for storing files.  But root users 
can use this space.  So this gives you a bit of a buffer, in case a 
user fills the drive with junk, root can still do some things to keep 
functioning.  Anyway, the main reason I mention this is because the 
du command will show you less space available than the partitioning, 
because some of the drive has been preallocated for directory structure.

Yes, I know it is like meeting a 5-foot person who claimed he was 
6-feet tall when you were scheduling a meeting, and then have him 
state it is because he measured himself wearing a tall hat.  One 
would think that you should get 150GB out of a 150GB drive.  (sigh)

You should be able to go through the OS install process on this drive.

     - Tim

On 8/7/2010 7:08 PM, davidm at hisfeet.net wrote:
> Thanks for being patient with me, and plain and simple.  Tese directions
> coupled with your previous directions about mounting the disk and leaving
> a message, and the rebooting to read it worked.  So lookslike the disk
> itself may be OK. Here's the reading from fdisk -l on that disk now (after
> several reboots. and the message is readable):
> # fdisk -l
>
> Disk /dev/sda: 250.0 GB, 250059350016 bytes
> 255 heads, 63 sectors/track, 30401 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
>
>   Device Boot      Start         End      Blocks   Id  System
> /dev/sda1               1       30401   244196001   83  Linux
>
> Bur Gparted still sees it as 238.88 GiB.  That seems like a big difference
> to me. And I'm wondering what to do next toward the notion of actually
> installing a distro on it.  And wondering why the trouble in the first
> place and if there's a probability of it going bad again, or if there are
> preventive measures I should take.
>
>>    Hi there,
>> fdisk does not format a drive, it only partitions it.
>> Before you can mount it, you need to use mke2fs to format the drive
>> man mke2fs
>>
>> the command will be:
>> mke2fs -j /dev/sda1
>>
>> The "p" option at the end says that the partition is prepared to be a
>> linux filesystem, but it does not mean that the partition has been
>> formatted as such.
>>
>>       - Tim
>>
>> On 8/7/2010 1:17 AM, davidm at hisfeet.net wrote:
>>> Below (marked by: ****++++****++++) is the procedure that I went
>>> through,
>>> working from Puppy 5 in the CDrom. As you can see at the end the disk
>>> does
>>> seem to be properly formatted as ext3 /dev/sda1.  But I could not mount
>>> the disk.  When I tried I got a message that said I must identify the
>>> type
>>> of disk, SI tried that, and got the message that it could not mount
>>> because it could not be found in fstab or mtab.  Working in puppu I
>>> couldn't figure out how to find fstab or modify it. The structure seems
>>> quite different.
>>>
>>> I checked with gparted to see how it saw the disk, and it identified it
>>> as
>>> sda1, but unknown file type, and only 232 GiB in size. I did not attempt
>>> to modify it in gparted.
>>>
>>> Then I rebooted and checked it with fdisk -l again, and it appeared to
>>> have retained it's format. But I still could not mount it.  I did find
>>> fstab and entered a line for sda1: " /dev/sda1  /mnt/sda1  ext2,ext3
>>> noauto  0  0 " and a dir as /mnt/sda1 but still could not mount, even
>>> after another reboot.
>>>
>>> Here is the message I got, together with the dmesg | tail:
>>> # ls
>>> cdrom  data  dvd  flash  floppy  home  msdos  ram1  sda1  swap  zip
>>> # mount /mnt/sda1
>>> mount: wrong fs type, bad option, bad superblock on /dev/sda1,
>>>          missing codepage or other error
>>>          In some cases useful info is found in syslog - try
>>>          dmesg | tail  or so
>>>
>>> # dmesg | tail
>>> mac80211-phy0: failed to remove key (0, 00:24:7b:62:86:e2) from hardware
>>> (-22)
>>> wlan0: direct probe to AP 00:24:7b:62:86:e2 (try 1)
>>> wlan0: direct probe responded
>>> wlan0: authenticate with AP 00:24:7b:62:86:e2 (try 1)
>>> wlan0: authenticated
>>> wlan0: associate with AP 00:24:7b:62:86:e2 (try 1)
>>> wlan0: RX AssocResp from 00:24:7b:62:86:e2 (capab=0x411 status=0 aid=1)
>>> wlan0: associated
>>> EXT2-fs (sda1): error: can't find an ext2 filesystem on dev sda1.
>>> EXT3-fs (sda1): error: can't find ext3 filesystem on dev sda1.
>>> #
>>> So it appears that in spite of the last few lines on this page that the
>>> format may not be recognizable.
>>>
>>>
>>>
>>> ****++++****++++
>>> # fdisk -l
>>>
>>> Disk /dev/sda: 250.0 GB, 250059350016 bytes
>>> 255 heads, 63 sectors/track, 30401 cylinders
>>> Units = cylinders of 16065 * 512 = 8225280 bytes
>>>
>>> Disk /dev/sda doesn't contain a valid partition table
>>> # fdisk /dev/sda
>>> Device contains neither a valid DOS partition table, nor Sun, SGI or OSF
>>> disklabel
>>> Building a new DOS disklabel. Changes will remain in memory only,
>>> until you decide to write them. After that, of course, the previous
>>> content won't be recoverable.
>>>
>>>
>>> The number of cylinders for this disk is set to 30401.
>>> 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)
>>> Warning: invalid flag 0x0000 of partition table 4 will be corrected by
>>> w(rite)
>>>
>>> ******************8
>>>
>>> Command (m for help): W
>>> The partition table has been altered!
>>>
>>> Calling ioctl() to re-read partition table.
>>> Syncing disks.
>>> # p
>>> bash: p: command not found
>>> # fdisk /dev/sda
>>>
>>> The number of cylinders for this disk is set to 30401.
>>> 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): p
>>>
>>> Disk /dev/sda: 250.0 GB, 250059350016 bytes
>>> 255 heads, 63 sectors/track, 30401 cylinders
>>> Units = cylinders of 16065 * 512 = 8225280 bytes
>>>
>>>      Device Boot      Start         End      Blocks   Id  System
>>>
>>> **********************************
>>> Command (m for help): n
>>> Command action
>>>      e   extended
>>>      p   primary partition (1-4)
>>> p
>>> Partition number (1-4): 1
>>> First cylinder (1-30401, default 1):
>>> Using default value 1
>>> Last cylinder or +size or +sizeM or +sizeK (1-30401, default 30401):
>>> Using default value 30401
>>>
>>> Command (m for help): p
>>>
>>> Disk /dev/sda: 250.0 GB, 250059350016 bytes
>>> 255 heads, 63 sectors/track, 30401 cylinders
>>> Units = cylinders of 16065 * 512 = 8225280 bytes
>>>
>>>      Device Boot      Start         End      Blocks   Id  System
>>> /dev/sda1               1       30401   244196001   83  Linux
>>>
>>> Command (m for help): W
>>> The partition table has been altered!
>>>
>>> Calling ioctl() to re-read partition table.
>>> Syncing disks.
>>> # p
>>> bash: p: command not found
>>> # fdisk /dev/sda
>>>
>>> The number of cylinders for this disk is set to 30401.
>>> 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): p
>>>
>>> Disk /dev/sda: 250.0 GB, 250059350016 bytes
>>> 255 heads, 63 sectors/track, 30401 cylinders
>>> Units = cylinders of 16065 * 512 = 8225280 bytes
>>>
>>>      Device Boot      Start         End      Blocks   Id  System
>>> /dev/sda1               1       30401   244196001   83  Linux
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> ChristianSource FSLUG mailing list
>>> Christiansource at ofb.biz
>>> http://cs.uninetsolutions.com
>>>
>> _______________________________________________
>> ChristianSource FSLUG mailing list
>> Christiansource at ofb.biz
>> http://cs.uninetsolutions.com
>>
>
>
> _______________________________________________
> ChristianSource FSLUG mailing list
> Christiansource at ofb.biz
> http://cs.uninetsolutions.com
>




More information about the Christiansource mailing list