Cannot Mount File System
Hello,
My first post so please go easy on me :D I installed RH9 with 2 hard drives: 80 Gig (Master) and 160 Gig (Slave). During the install I tried to format the Slave drive but it failed (don't remeber the exact error). So I formatted the Master and installed RH9. Now I would like to format and use the Slave drive. Steps performed: FDISK /dev/hdb --> This works Create new partition (used different sizes) --> Ok Wrote using the "w" switch -->Ok Exited FDISK mkfs /dev/hdb1 -->Ok no errors Now the question: How do I mount, say, /music on my new partition? I do not want to automount on bootup, well at least not yet. I once edited my fstab and ended up learning how to use the RedHat Emergency Boot Disk :D Thanks in advance |
mkdir /music
mount /dev/hdb1 /music -K |
Ok, I did that and get this:
mount: you must specify the filesystem type BTW that was a quick response... This is the output from mkfs: [root@RH1 root]# mkfs /dev/hdb mke2fs 1.32 (09-Nov-2002) /dev/hdb is entire device, not just one partition! Proceed anyway? (y,n) n [root@RH1 root]# mkfs /dev/hdb1 mke2fs 1.32 (09-Nov-2002) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 20021248 inodes, 40019915 blocks 2000995 blocks (5.00%) reserved for the super user First data block=0 1222 block groups 32768 blocks per group, 32768 fragments per group 16384 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872 Writing inode tables: done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 39 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. |
What happens if you do:
mount -t ext2 /dev/hdb1 /music |
I get this:
[root@RH1 root]# mount -t ext2 /dev/hdb1 /music mount: wrong fs type, bad option, bad superblock on /dev/hdb1, or too many mounted file systems slappy |
I don't know why it would matter but I usually call "mke2fs" directly instead of with "mkfs".
mke2fs /dev/hdb1 And you did "mkdir /music" right? -K |
I reformated /dev/hdb1 with mke2fs /dev/hdb1 -->Ok
Then I ran this: [root@RH1 root]# mount /dev/hdb1 /music And got this: mount: you must specify the filesystem type Even when I installed RH9 and tried to format this drive it failed but I KNOW the drive is good. Would it matter if it's a 160 Gig drive? Macro$haft XP liked it. Slappy |
Can you have mke2fs check for bad blocks while creating the filesystem. Like this.
mke2fs -c -c /dev/hdb1 Also, what shows up in /var/log/messages when you try to mount the drive? What kind of drive is this? Have you tried making smaller partitions and seeing if that makes a difference? |
That suckers been going all day long! With 160 gigs to chew through, it's going to take awhile...
I let you know. :o |
Sweet! Found some bad blocks.
Output: [root@RH1 root]# mke2fs -c -c /dev/hdb1 mke2fs 1.32 (09-Nov-2002) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 20021248 inodes, 40019915 blocks 2000995 blocks (5.00%) reserved for the super user First data block=0 1222 block groups 32768 blocks per group, 32768 fragments per group 16384 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872 Writing pattern 0xaaaaaaaa: done Reading and comparing: done Writing pattern 0x55555555: done Reading and comparing: done Writing pattern 0xffffffff: done Reading and comparing: done Writing pattern 0x00000000: done Reading and comparing: done Warning: the backup superblock/group descriptors at block 33554432 contain bad blocks. Writing inode tables: done Writing superblocks and filesystem accounting information: done Not sure what to do about the bad blocks though. Any ideas?:confused: |
Ok, I got silly and ran:
FSCK /dev/hdb1 Output: [root@RH1 root]# fsck /dev/hdb1 fsck 1.32 (09-Nov-2002) e2fsck 1.32 (09-Nov-2002) Group descriptors look bad... trying backup blocks... fsck.ext2: Bad magic number in super-block while trying to open /dev/hdb1 The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 <device> What the hell does all that mean? :scratch: |
It looks like you have a hardware problem here. The drive may be bad, the cable could be bad (or not plugged in quite all the way), etc. Whatever it is, the filesystem information that is being written is being corrupted bad enough that Linux can't even get it mounted. I don't have the necessary filesystem voodoo to know how to get this to work.
|
the "superblock" is a special block on the filesystem that contains important information, like metadata.
The information on this block is duplicated on several other blocks on the system in case things go "bad". Try "e2fsck -b 8193 /dev/hdb1" and see where that gets you. You may also want to try "mke2fs -S" which will make superblocks and file descriptors only. -K |
Well I seem to be getting somewhere. I executed mks2fs -S and then mounted /dev/hdb1 /music and was greeted with no errors.
I copied some data into the folder and (kde) went to hardware explorer, where it shows the drive and some data in the drive! Hey, not bad. (thank you very much!) In /music it shows a folder called lost+found. Not to bad I guess. How dependable do you guys think this drive is? Think I should still reseat/switch IDE cable and/or check the hardware? thanks |
I think that if you can run a full fsck on it with no errors and if you can mount the drive then you might be okay.
Hard drives do fail however and if this one is starting to go, eventually it will just die. If you can't afford to replace it, use it. But I would try to back data up on CD on something if possible. -K |
All times are GMT -5. The time now is 06:13 AM. |