LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-06-2008, 05:12 PM   #1
rkfb
Member
 
Registered: Oct 2003
Location: Guildford, England
Distribution: Slackware64 15.0 running i3
Posts: 494

Rep: Reputation: 174Reputation: 174
Mount external drive


If I plugin my 250gb external drive I get:

usb 1-6: new high speed USB device using ehci_hcd and address 7
usb 1-6: configuration #1 chosen from 1 choice
scsi7 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 7
usb-storage: waiting for device to settle before scanning
kobject_add failed for usb_storage with -EEXIST, don't try to register things with the same name in the same directory.
[<c03e8717>] kobject_shadow_add+0x117/0x1a0
[<c013fba4>] mod_sysfs_setup+0x24/0xb0
[<c0141458>] sys_init_module+0x1648/0x1940
[<c0102ae8>] syscall_call+0x7/0xb
=======================
scsi 7:0:0:0: Direct-Access WD 2500JB External 0108 PQ: 0 ANSI: 0
SCSI device sdb: 488397168 512-byte hdwr sectors (250059 MB)
sdb: Write Protect is off
sdb: Mode Sense: 03 00 00 00
sdb: assuming drive cache: write through
SCSI device sdb: 488397168 512-byte hdwr sectors (250059 MB)
sdb: Write Protect is off
sdb: Mode Sense: 03 00 00 00
sdb: assuming drive cache: write through
sdb: sdb1
sd 7:0:0:0: Attached scsi disk sdb
sd 7:0:0:0: Attached scsi generic sg1 type 0
usb-storage: device scan complete

and

# fdisk -l
Disk /dev/hdc: 80.0 GB, 80026361856 bytes
16 heads, 63 sectors/track, 155061 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 * 1 152779 77000584+ 83 Linux
/dev/hdc2 152780 155061 1150128 82 Linux swap

Disk /dev/hdd: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdd1 1 19457 156288321 83 Linux

Disk /dev/sdb: 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/sdb1 * 1 30401 244196001 83 Linux

but no window pops up to ask what I want to do with it.

# fdisk /dev/sdb

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

Disk /dev/sdb: 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/sdb1 * 1 30401 244196001 83 Linux

Command (m for help):

It was working fine 'til a neighbour borrowed it and plugged it in to a windows machine. It came back blank with just one big ntfs partition which I deleted and then created the linux partition, but I don't seem to be able to access the drive in any way that I know.

# mount /dev/sdb /mnt/disk
mount: No such file or directory

# mount /dev/sdb1 /mnt/disk
mount: No such file or directory


cat /etc/fstab
/dev/hdc2 swap swap defaults 0 0
/dev/hdc1 / ext3 defaults 1 1
/dev/hdd1 /home ext3 defaults 1 2
#/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/sdb /mnt/disk ext3 defaults 0 0

I wonder if anyone has any suggestions?

Last edited by rkfb; 03-06-2008 at 05:14 PM. Reason: spelling error
 
Old 03-06-2008, 05:26 PM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Yu created the partition, but did you also create a filesystem on that partition (i.e. formatted it by running "mkfs.ext3 /dev/sdb1")?

Eric
 
Old 03-06-2008, 05:27 PM   #3
raconteur
Member
 
Registered: Dec 2007
Location: Slightly left of center
Distribution: slackware
Posts: 276
Blog Entries: 2

Rep: Reputation: 44
In addition to Alien Bob's advice above, and this may be a bit obvious, but does /mnt/disk exist and is it readable by the current user?

Your fstab entry isn't quite correct, you do want to mount the partition on the device (sdb1) and not the root device itself (sdb), just as on the command line. I recommend getting the mount command working before making the fstab entry, though no real harm is done if it fails.

Last edited by raconteur; 03-06-2008 at 05:28 PM.
 
Old 03-06-2008, 05:32 PM   #4
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,443

Rep: Reputation: 73
Your /etc/fstab should have /dev/sdb1 and not /dev/sdb

I'm assuming that you actually formatted the partition as ext3. If not, then you know what you need to do first. I'm also assuming that /mnt/disk actually exists. If not, then create that directory.

If you have an entry in fstab then you only need to
Code:
mount /mnt/disk
If you have no entry in fstab for it then you can
Code:
mount -t ext3 /dev/sdb1 /mnt/disk
 
Old 03-07-2008, 08:05 AM   #5
rkfb
Member
 
Registered: Oct 2003
Location: Guildford, England
Distribution: Slackware64 15.0 running i3
Posts: 494

Original Poster
Rep: Reputation: 174Reputation: 174
It was the mkfs.ext3 /dev/sdb1 that I hadn't done and all now is fine. I mistakenly believed that fdisk did all that when you created a partition. I also deleted the entry in fstab altogether and it now just pops up on the desktop when I plug it in, as it did before.

Thanks to all for the helpful replies.
 
  


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
How to mount external hard drive vitalstrike82 SUSE / openSUSE 3 02-17-2008 12:27 AM
can not un-mount external drive, please help mhg Linux - Newbie 5 07-23-2007 01:29 AM
Cannot mount external hard drive thisObject Linux - Software 4 12-06-2006 11:53 PM
Can't mount external firewire drive jackconstantine Linux - Hardware 3 01-25-2006 11:19 AM
cant mount external scsi drive jmarsh Linux - Hardware 2 12-17-2003 06:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:47 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