LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-03-2008, 03:10 PM   #1
phantom_cyph
Senior Member
 
Registered: Feb 2007
Location: The Tropics
Distribution: Slackware & Derivatives
Posts: 2,472
Blog Entries: 1

Rep: Reputation: 128Reputation: 128
Can't mount SATA drive. Slackware 12.


I just got a Western Digital 500Gb 7200rpm drive from Newegg. I hooked it up via SATA, and edited fstab to mount it. I used cfdisk to format it. This is the error I get:

Code:
root#: mount /dev/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

root#:
My fstab looks like:
Code:
/dev/hda5        swap             swap        defaults         0   0
/dev/hda1        /                ext3        defaults         1   1
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
/dev/sda1        /media/extra     vfat        user,fmask=0111,dmask=0000   0   0
Here is fdisk -l output:
Code:
root#: fdisk -l

Disk /dev/hda: 41.1 GB, 41110142976 bytes
255 heads, 63 sectors/track, 4998 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        4966    39889363+  83  Linux
/dev/hda2            4967        4998      257040    5  Extended
/dev/hda5            4967        4998      257008+  82  Linux swap

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       60801   488384001    c  W95 FAT32 (LBA)
root#:
What have I done wrong?
 
Old 05-03-2008, 03:26 PM   #2
mdjenkins
LQ Newbie
 
Registered: Apr 2008
Distribution: Gentoo
Posts: 25

Rep: Reputation: 15
I'm assuming you're using AHCI for your sata drives.
try passing pci=nomsi to your kernel on boot or blacklisting the pata modules for your sata controller.
For some reason AHCI likes to break if you try to enable pata support for your sata controller

Last edited by mdjenkins; 05-03-2008 at 03:30 PM.
 
Old 05-03-2008, 03:27 PM   #3
phantom_cyph
Senior Member
 
Registered: Feb 2007
Location: The Tropics
Distribution: Slackware & Derivatives
Posts: 2,472

Original Poster
Blog Entries: 1

Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by mdjenkins View Post
try passing pci=nomsi to your kernel on boot
Could you say that in english? I've never had to do anything with my kernel..
 
Old 05-03-2008, 03:52 PM   #4
mdjenkins
LQ Newbie
 
Registered: Apr 2008
Distribution: Gentoo
Posts: 25

Rep: Reputation: 15
if you're using grub:
highlight the option to boot your linux install and press 'e' to edit it.
highlight the line that begins with kernel and press 'e' to edit it.
somewhere on this line put pci=nomsi
press enter to save it (it will only save for this boot).
press 'b' to continue booting

if you're using lilo...
 
Old 05-03-2008, 03:56 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,730

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
cfdisk only creates the partition not the filesystem. Did you use mkfs or mkdosfs?
 
Old 05-03-2008, 04:53 PM   #6
phantom_cyph
Senior Member
 
Registered: Feb 2007
Location: The Tropics
Distribution: Slackware & Derivatives
Posts: 2,472

Original Poster
Blog Entries: 1

Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by michaelk View Post
cfdisk only creates the partition not the filesystem. Did you use mkfs or mkdosfs?
No, I did not. (don't do it often...can you tell?) lol
 
Old 05-03-2008, 04:59 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,730

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
Something that is commonly forgotten but most will not admit to doing it.
 
Old 05-03-2008, 06:38 PM   #8
phantom_cyph
Senior Member
 
Registered: Feb 2007
Location: The Tropics
Distribution: Slackware & Derivatives
Posts: 2,472

Original Poster
Blog Entries: 1

Rep: Reputation: 128Reputation: 128
Well, this is what it looks like now. Still have an error unfortunately...

Code:
root#: mkfs /dev/sda1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
61063168 inodes, 122096000 blocks
6104800 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=125829120
3727 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, 71663616, 78675968, 
	102400000

Writing inode tables: done                            
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 29 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
root#: mount /dev/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

root#: fdisk /dev/sda 

The number of cylinders for this disk is set to 60801.
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): q

root#: fdisk -l

Disk /dev/hda: 41.1 GB, 41110142976 bytes
255 heads, 63 sectors/track, 4998 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        4966    39889363+  83  Linux
/dev/hda2            4967        4998      257040    5  Extended
/dev/hda5            4967        4998      257008+  82  Linux swap

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       60801   488384001    c  W95 FAT32 (LBA)
root#: nano /etc/fstab
root#: mount /dev/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

root#:
 
Old 05-03-2008, 07:07 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,730

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
mkfs defaults to ext2.
Check out man pages for mkdosfs, mkfs, mkfs.vfat

mkfs -t vfat -F 32 /dev/sda1
 
Old 05-03-2008, 08:04 PM   #10
phantom_cyph
Senior Member
 
Registered: Feb 2007
Location: The Tropics
Distribution: Slackware & Derivatives
Posts: 2,472

Original Poster
Blog Entries: 1

Rep: Reputation: 128Reputation: 128
Well, this doesn't work so well...


Code:
root#: mkfs -t vfat -F 32 /dev/sda1
mkfs.vfat: No such file or directory
root#: mkfs --help
mkfs.ext2: invalid option -- -
Usage: mkfs.ext2 [-c|-t|-l filename] [-b block-size] [-f fragment-size]
	[-i bytes-per-inode] [-j] [-J journal-options] [-N number-of-inodes]
	[-m reserved-blocks-percentage] [-o creator-os] [-g blocks-per-group]
	[-L volume-label] [-M last-mounted-directory] [-O feature[,...]]
	[-r fs-revision] [-R options] [-qvSV] device [blocks-count]
root#: mkfs -t ext3 -F 32 /dev/sda1
mke2fs 1.39 (29-May-2006)
mkfs.ext3: invalid blocks count - /dev/sda1
root#:

Well, I tried ext3 and ended up with this problem:
Code:
root#: mkfs -t ext3 -F /dev/sda1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
61063168 inodes, 122096000 blocks
6104800 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=125829120
3727 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, 71663616, 78675968, 
	102400000

Writing inode tables: done                            
Creating journal (32768 blocks): 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.
root#: mount /dev/sda 
mount: can't find /dev/sda in /etc/fstab or /etc/mtab
root#: mount /dev/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

root#: nano /etc/fstab
root#: mount /dev/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

root#: nano /etc/fstab
root#: mkdir /mnt/500gb
root#: mount /dev/sda
mount: wrong fs type, bad option, bad superblock on /dev/sda,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

root#:
Here's my fstab now:
Code:
/dev/hda5        swap             swap        defaults         0   0
/dev/hda1        /                ext3        defaults         1   1
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
/dev/sda         /mnt/500gb       ext3        defaults         0   0

Last edited by phantom_cyph; 05-03-2008 at 08:24 PM.
 
Old 05-03-2008, 08:14 PM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,730

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
Try:
mkdosfs -F 32 /dev/sda1

BTW -F 32 is not a valid option for formatting ext3 and besides -F means something completely different.

Do you want ext3 or FAT32?
 
Old 05-03-2008, 08:29 PM   #12
phantom_cyph
Senior Member
 
Registered: Feb 2007
Location: The Tropics
Distribution: Slackware & Derivatives
Posts: 2,472

Original Poster
Blog Entries: 1

Rep: Reputation: 128Reputation: 128
OK, thanks, that did it.

For anyone in the future, this is what everything looks like now:

/etc/fstab file:

Code:
/dev/hda5        swap             swap        defaults         0   0
/dev/hda1        /                ext3        defaults         1   1
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
/dev/sda1        /mnt/500gb       vfat        defaults         0   0
So you use:
Code:
mount /dev/sda1
and you go into it using:
Code:
cd /mnt/500gb
(or whatever you named the folder in which it mounts it)

This is in case anyone gets as confused as I do with this in the future
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Want to mount sata hard drive fedoraman Linux - Newbie 2 02-03-2008 12:22 PM
Installing Slackware 10.2 on SATA drive with a SATA CD-RW drive Voltar Slackware - Installation 19 08-01-2007 04:33 PM
got my ntfs sata drive to mount but cat get to auto mount Jack Daniels Linux - Hardware 3 04-15-2007 10:42 AM
How to mount my SATA drive? Morca007 Linux - Hardware 5 01-27-2007 12:22 AM
Mount SATA drive (not RAID) EcceVery Debian 3 08-31-2004 05:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration