Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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
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
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.
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?
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.
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>
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.
Distribution: Redhat v8.0 (soon to be Fedora? or maybe I will just go back to Slackware)
Posts: 857
Rep:
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.
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?
Distribution: Redhat v8.0 (soon to be Fedora? or maybe I will just go back to Slackware)
Posts: 857
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.