Mounting Problem with another hardisk

Rick Stevens rstevens at vitalstream.com
Thu Jul 20 00:47:50 UTC 2006


On Tue, 2006-07-18 at 11:05 -0400, SoftNet Technologies wrote:
> Hi Guys,
>  
> I hope you will reply as soon as possible. I have attached a new
> hardisk on my comp. New hardisk was initially formated under linux. I
> am facing problem in mounting this second harddisk.
>  
> I run fdisk -l command this is the output:
> 
> Disk /dev/hda: 4223 MB, 4223729664 bytes
> 128 heads, 63 sectors/track, 1023 cylinders
> Units = cylinders of 8064 * 512 = 4128768 bytes
>    Device Boot    Start       End    Blocks   Id  System
> /dev/hda1   *         1       762   3072352+  83  Linux
> /dev/hda2           763       889    512064   82  Linux swap
> /dev/hda3           890      1023    540288    5  Extended
> /dev/hda5           890       900     44320+   b  Win95 FAT32
> /dev/hda6           901       950    201568+  83  Linux
> /dev/hda7           951      1000    201568+  83  Linux
> /dev/hda8          1001      1023     92704+  83  Linux
> Disk /dev/hdb: 4303 MB, 4303272960 bytes
> 255 heads, 63 sectors/track, 523 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
>    Device Boot    Start       End    Blocks   Id  System
> /dev/hdb1   *         1         3     24066   83  Linux
> /dev/hdb2             4       523   4176900    5  Extended
> /dev/hdb5             4        93    722893+  83  Linux
> /dev/hdb6            94       157    514048+  83  Linux
> /dev/hdb7           158       465   2473978+  83  Linux
> /dev/hdb8           466       497    257008+  82  Linux swap
> /dev/hdb9           498       523    208813+  8e  Linux LVM
> 
> I tried to run mount /dev/hdb1 /w and then system gave the following
> message:
> FAT: bogus logical sector size 0
> VFS: Can't find a valid FAT filesystem on dev 03:41.
> mount: you must specify the filesystem type

Now THAT's strange.  It looks like the first block got stomped on,
since fdisk sees /dev/hdb1 as a Linux partition, but mount thinks
it's a VFAT partition.

> 
> then
> I tried mount -t ext2 /dev/hdb1 /w and mount -t ext3 /dev/hdb1 /w but
> all in wain
> It replied with the following message:
> mount: wrong fs type, bad option, bad superblock on /dev/hdb1,
>        or too many mounted file systems

Yeah, if block 0 of the partition is screwed, you'll have trouble.
You can try to fix the filesystem by first running (as root):

	# mke2fs -F -n /dev/hdb1

(don't worry, the "-n" does NOT actually create a filesystem...it just
shows you what it WOULD have done had "-n" not been specified).  Make a
note where the superblock backups are.  Here's an example off one of my
partitions:

---------------------------- CUT HERE -------------------------------
[root at prophead ~]# mke2fs -F -n /dev/hda2
mke2fs 1.38 (30-Jun-2005)
/dev/hda2 is mounted; mke2fs forced anyway.  Hope /etc/mtab is
incorrect.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
5248992 inodes, 10486428 blocks
524321 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=12582912
321 block groups
32768 blocks per group, 32768 fragments per group
16352 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632,
	2654208, 4096000, 7962624
---------------------------- CUT HERE -------------------------------

Armed with that info, try:

	# e2fsck -b one-of-the-super-blocks /dev/hdb1

Using the example above:

	# e2fsck -b 32768 /dev/hdb1

That should rebuild the primary superblock.  When it completes, try
mounting the partition again.  If it does, congratulations!  If not,
try the e2fsck command again, but try one of the other superblock
backups.  If none of those work, you may need to delete and recreate
the partition in fdisk.  If you're VERY careful, you won't stomp on
any data, but you may need to run the e2fsck again.

> My question is that Is there any provision in linux to lock partition
> for not to mount with other linux operating systems. If it is there
> how can I access this partition.

Nothing will automount unless told to by specifying "auto" in its
/etc/fstab entry or you have enabled automount for removable media.

----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-        God is real...........unless declared integer or long       -
----------------------------------------------------------------------




More information about the Redhat-install-list mailing list