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

Re: can't mke2fs hdb, says already mounted, but it isn't



Tom H wrote:
>> Here is a good puzzler.  I got a second ATAPI disk in my machine that I
>> was able to partition with fdisk, but cannot mkfs it.  It says that the
>> device is already mounted but when I try to umount it, it says it is not
>> mounted.  the blkid command I ran on the device contradicts with what df
>> tells me.  You can see the commands and outputs below.

--deleted commands and output--

> 
> Strange because id 83 isn't swap.
> 
> Check "swapon -s" nonetheless.
> 
> If hdb1 is listed, run "swapoff /dev/hdb1" and re-run mkfs.
> 

It sounds like there was something on the disk prior to your
repartitioning, that just happens to be at the partition boundary you
created.

Once you're sure the system isn't really using this as swap, you could
try writing null characters to it to destroy whatever signature is
causing the problem:

  dd if=/dev/zero of=dev/hdb1 bs=1024 count=10

I just chose some arbitrary values for block size and count, probably
bigger than needed, but not harmful either.

Then try the mke2fs again.

If you want to start over completely, you could try the same command but
with of=/dev/hdb (the whole disk), which will destroy partition
information as well as any partition signature.

-- 
Bob McGowan


Reply to: