LinuxQuestions.org
Review your favorite Linux distribution.
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 02-10-2007, 03:03 PM   #1
dtconnor
LQ Newbie
 
Registered: Feb 2004
Posts: 23

Rep: Reputation: 15
Question How to set mount and /etc/fstab for usb HD


I want to configure a USB 100G (Maxtor 3200) HD to my SuSe 10.0 system

When I plug it in it does not mount (my last SuSe system it did mount when I plugged it in) and I do not see it in My Computer. Also I could not find it in the Yast hardware manager.

My Lexar USB jump drive works fine by the way

I ran dmesg (it's output is huge) - dmesg sees the USB hub and it sees the jump drive as well as the USB HD but I really can't tell what the USB HD is defined as i.e. how to define it in fstab

I also want to avoid a problem I have had in the past where I had to remove the USB HD every time I booted the system because if I left it plugged in the system would not boot. I would like it to be pemanent so to speak.
 
Old 02-10-2007, 10:10 PM   #2
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
Try "dmesg | tail" right after you plug in the drive, and then post the output here.

Brian
 
Old 02-11-2007, 02:21 AM   #3
FredGSanford
Senior Member
 
Registered: Nov 2005
Location: USA
Distribution: Mageia 7 - Debian 10 - Artix Linux
Posts: 1,142
Blog Entries: 5

Rep: Reputation: 207Reputation: 207Reputation: 207
Most usb hard drives are listed as /dev/sda or sdb etc...I have one on my system at home and using Debian & Gnome, it is picked up on boot and an icon listed on desktop. What does command as root show, /sbin/fdisk -l?

When I get home I can paste my fstab listing for it. I'm at work now.

Thnx.

Last edited by FredGSanford; 02-11-2007 at 02:22 AM.
 
Old 02-11-2007, 09:02 AM   #4
dtconnor
LQ Newbie
 
Registered: Feb 2004
Posts: 23

Original Poster
Rep: Reputation: 15
Here is dmesg | tail right after I plug theUSB HD in
linux:~ # dmesg | tail
Vendor: Maxtor Model: 3200 Rev: 0341
Type: Direct-Access ANSI SCSI revision: 04
usb-storage: device scan complete
SCSI device sda: 195813072 512-byte hdwr sectors (100256 MB)
sda: assuming drive cache: write through
SCSI device sda: 195813072 512-byte hdwr sectors (100256 MB)
sda: assuming drive cache: write through
sda: unknown partition table
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0, type 0

Also here is fstab (which lets my LEXAR jump drive work fine)

/dev/hdd4 / reiserfs acl,user_xattr 1 1
/dev/hdd2 /boot reiserfs acl,user_xattr 1 2
/dev/md0 /home reiserfs acl,user_xattr 1 2
/dev/hdd1 swap swap defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
/dev/dvd /media/dvd subfs noauto,fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/cdrecorder /media/cdrecorder subfs noauto,fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
none /subdomain subdomainfs noauto 0 0


would this work ? (the problem here is a little knowledge can be dangerous)
/dev/sda /proc/bus/usb sda noauto 0 0
 
Old 02-11-2007, 09:10 AM   #5
dtconnor
LQ Newbie
 
Registered: Feb 2004
Posts: 23

Original Poster
Rep: Reputation: 15
Uh Oh - Disk /dev/sda doesn't contain a valid partition table

How did that happen and how can I fix it?
Even if I put an entry in fstab I need to somehow partion the usb HD.

linux:~ # /sbin/fdisk -l

Disk /dev/hdc: 10.2 GB, 10262568960 bytes
255 heads, 63 sectors/track, 1247 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 1 1246 10008463+ fd Linux raid autodetect

Disk /dev/hdd: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdd1 1 523 4200966 82 Linux swap / Solaris
/dev/hdd2 * 524 654 1052257+ 83 Linux
/dev/hdd3 655 3135 19928632+ fd Linux raid autodetect
/dev/hdd4 3136 4865 13896225 83 Linux

Disk /dev/md0: 30.6 GB, 30655381504 bytes
2 heads, 4 sectors/track, 7484224 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md0 doesn't contain a valid partition table

Disk /dev/sda: 100.2 GB, 100256292864 bytes
255 heads, 63 sectors/track, 12188 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sda doesn't contain a valid partition table
 
Old 02-11-2007, 10:30 AM   #6
dtconnor
LQ Newbie
 
Registered: Feb 2004
Posts: 23

Original Poster
Rep: Reputation: 15
This just gets worse - I found the partioner in YAST and tried to format and create a partion with a mount point /local but no matter what it fails

I keep getting something about setting the disk label /dev/sda to msdos

I used the "expert" (which I am far from and should not be in the partioner in the first place) button in the YAST partioner to delete the disk label but no matter what, every time I try to create a new partition on the USB HD I get the same error about a disk label of msdos (where on earth did that come from? not to mention all the data is gone which really is not a big deal)
 
Old 02-11-2007, 12:20 PM   #7
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
Try "fdisk /dev/sda" from the command line. It is a simple tool for managing partitions.

Brian
 
Old 02-11-2007, 06:00 PM   #8
dtconnor
LQ Newbie
 
Registered: Feb 2004
Posts: 23

Original Poster
Rep: Reputation: 15
Tried fdisk (several times now) creating a new partion(s) and writing to the partion table.
I tried all the commands that I could even expert - I even tried to set a Sun disk label hoping that would replace the msdos disk label and then I could delete the Sun disk label - if you follow that lodgic (if that is lodgical at all) anyway it didn't work.

No matter what I do I get error 1004 that tells me I am trying to set the disk label to msdos.

I am throwing in the towel - I quit - giving up - the usb HD wins
 
Old 02-12-2007, 05:34 AM   #9
FredGSanford
Senior Member
 
Registered: Nov 2005
Location: USA
Distribution: Mageia 7 - Debian 10 - Artix Linux
Posts: 1,142
Blog Entries: 5

Rep: Reputation: 207Reputation: 207Reputation: 207
Here is my fstab file.

cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda7 / ext3 defaults,errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hda1 /media/winxp ntfs ro,user,noauto 0 0
/dev/hda6 /media/vfat vfat rw,users,auto,uid=1000,gid=1000,umask=077 0 0
/dev/scd0 /media/cdrom0 iso9660 ro,user,noauto 0 0
/dev/hdc /media/cdrom1 iso9660 ro,user,noauto 0 0
/dev/sda /media/usb0 auto rw,user,noauto 0 0

Here is my fdisk -l looks like.

Disk /dev/hda: 164.6 GB, 164696555520 bytes
255 heads, 63 sectors/track, 20023 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 4245 34097931 7 HPFS/NTFS
/dev/hda2 4246 17834 109153642+ 5 Extended
/dev/hda5 4246 4383 1108453+ 82 Linux swap / Solaris
/dev/hda6 4384 6295 15358108+ b W95 FAT32
/dev/hda7 * 6296 10276 31977351 83 Linux
/dev/hda8 10277 14199 31511466 83 Linux
/dev/hda9 14200 16010 14546826 83 Linux
/dev/hda10 16011 17834 14651248+ 83 Linux

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 23858 191639353+ c W95 FAT32 (LBA)
/dev/sda2 * 23859 30401 52556647+ 83 Linux

I hope this helps.
 
Old 02-12-2007, 08:43 PM   #10
dtconnor
LQ Newbie
 
Registered: Feb 2004
Posts: 23

Original Poster
Rep: Reputation: 15
Thx much - I understand - the problem is I add a partion in fdisk using the n command no problem.
I do the w command and it writes it to the partition table and syncs up (or so it says).

I go to YAST and the partion is not there - if I create a partition in YAST and "Apply" I get an error that I am trying to set the disk label to msdos.

Even if I delete the disk label using "expert" when I try and create the partition again same thing the error about the msdos disk label.

If I could partition it I think I could play with it in fstab until I got it to do what I wanted.
 
Old 02-12-2007, 11:45 PM   #11
FredGSanford
Senior Member
 
Registered: Nov 2005
Location: USA
Distribution: Mageia 7 - Debian 10 - Artix Linux
Posts: 1,142
Blog Entries: 5

Rep: Reputation: 207Reputation: 207Reputation: 207
After you write the new partition, do you reboot and then continue? Try using a livecd or Sys Rescue to create the partition.

See what happens.
 
Old 02-15-2007, 09:33 PM   #12
dtconnor
LQ Newbie
 
Registered: Feb 2004
Posts: 23

Original Poster
Rep: Reputation: 15
Yep - tried rebooting after using the w command in fdisk - doesn't work

Also tried repair partition tool using the installation dvd - doesn't work

I just cannot find any where how to change/fix/delete the disk label (well I see where you supposedly can delete it - but it gets reset to msdos somehow when I try to partition the usb HD and then the partition fils to be written to the partition table)
 
Old 02-15-2007, 09:53 PM   #13
GamerX
Member
 
Registered: Nov 2006
Location: Vancouver, BC
Distribution: Slackware
Posts: 102

Rep: Reputation: Disabled
Another useful thing:
(If your kernel/distro supports it) My USB stick's partition is labeled USB-DRIVE0 and therefore I can mount the device:
/dev/disk/by-label/USB-DRIVE0

Good thing is, if you have multiple USB drives then they become sda, sdb, sdc, etc depending on the order you plug them in, but the labels remain static.
Code:
mkdosfs -n THE-LABEL /dev/sda1
sets the label of the device, or you can do so from windows (gasp!)

BTW: I'm running the 2.6.17.13 custom kernel, but I can't remember if it's something I included manually.

EDIT: cfdisk /dev/sdX is a much easier on the brain than fdisk =)

Last edited by GamerX; 02-15-2007 at 09:55 PM.
 
Old 02-18-2007, 05:47 PM   #14
dtconnor
LQ Newbie
 
Registered: Feb 2004
Posts: 23

Original Poster
Rep: Reputation: 15
Help me understand this -

First what and where is this? in fstab?
/dev/disk/by-label/USB-DRIVE0

Second - same deal what and where is this?
mkdosfs -n THE-LABEL /dev/sda1
Will this chage my disk label so I can partition it ?

Last - what and where is this? - is this like fdisk but easier?
EDIT: cfdisk /dev/sdX
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 06:15 AM
FSTAB: My Win Share Wont Mount @ Boot, but will when I sudo mount -a...please help! TruANTOlogy Ubuntu 8 06-20-2006 08:00 AM
How do I set exec option on USB drive hot plug mount? dhuseby Linux - Hardware 2 05-30-2006 09:16 AM
usb fstab entry won't mount r/w Kilka Linux - Hardware 4 07-27-2004 11:05 AM

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

All times are GMT -5. The time now is 11:57 AM.

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