LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Mounting a new internal hard drive (https://www.linuxquestions.org/questions/linux-hardware-18/mounting-a-new-internal-hard-drive-707369/)

Graham1941 02-25-2009 04:21 AM

Mounting a new internal hard drive
 
I am having a problem mounting a recently acquired 1TB internal hard drive. With help from a colleague it has been successfully installed into a Dell 370 desktop. This is in addition to the main HDD.

Booting into Windows allows me access but I can find no way of 'seeing' it in Linux.

The following is the mount command:-

/dev/sdb6 on / type ext3 (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/sdb7 on /home type ext3 (rw,acl,user_xattr)
/dev/sdb1 on /windows/C type fuseblk (rw,noexec,nosuid,nodev,noatime,allow_other,default_permissions,blksize=4096)
securityfs on /sys/kernel/security type securityfs (rw)
/dev/sdc8 on /media/disk-2 type reiserfs (rw,nosuid,nodev)
/dev/sdc7 on /media/disk-3 type reiserfs (rw,nosuid,nodev)
/dev/sdc6 on /media/disk-4 type reiserfs (rw,nosuid,nodev)
/dev/sdc1 on /media/HARDDRIVE type vfat (rw,nosuid,nodev,noatime,flush,uid=1000,utf8,shortname=lower)

The HARDRIVE on /dev/sdc1 is a 70gb external usb drive.

The following is a listing of the
/dev/disk/by-id directory:-

lrwxrwxrwx 1 root root 10 2009-02-25 11:25 scsi-SFUJITSU_MAT3073NP_AAS3P5400DYS-part7 -> ../../sdb7
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 scsi-SFUJITSU_MAT3073NP_AAS3P5400DYS-part6 -> ../../sdb6
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 scsi-SFUJITSU_MAT3073NP_AAS3P5400DYS-part5 -> ../../sdb5
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 scsi-SFUJITSU_MAT3073NP_AAS3P5400DYS-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 scsi-SFUJITSU_MAT3073NP_AAS3P5400DYS-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 9 2009-02-25 11:25 scsi-SFUJITSU_MAT3073NP_AAS3P5400DYS -> ../../sdb
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 scsi-SATA_SAMSUNG_HD103UJS13PJ9BQC23695-part1 -> ../../sda1
lrwxrwxrwx 1 root root 9 2009-02-25 11:25 scsi-SATA_SAMSUNG_HD103UJS13PJ9BQC23695 -> ../../sda
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 edd-int13_dev81-part1 -> ../../sda1
lrwxrwxrwx 1 root root 9 2009-02-25 11:25 edd-int13_dev81 -> ../../sda
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 edd-int13_dev80-part7 -> ../../sdb7
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 edd-int13_dev80-part6 -> ../../sdb6
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 edd-int13_dev80-part5 -> ../../sdb5
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 edd-int13_dev80-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 edd-int13_dev80-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 9 2009-02-25 11:25 edd-int13_dev80 -> ../../sdb
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 ata-SAMSUNG_HD103UJ_S13PJ9BQC23695-part1 -> ../../sda1
lrwxrwxrwx 1 root root 9 2009-02-25 11:25 ata-SAMSUNG_HD103UJ_S13PJ9BQC23695 -> ../../sda
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 usb-SAMSUNG_SP2014N_DEF10AE1E1C9-0:0-part7 -> ../../sdc7
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 usb-SAMSUNG_SP2014N_DEF10AE1E1C9-0:0-part6 -> ../../sdc6
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 usb-SAMSUNG_SP2014N_DEF10AE1E1C9-0:0-part5 -> ../../sdc5
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 usb-SAMSUNG_SP2014N_DEF10AE1E1C9-0:0-part2 -> ../../sdc2
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 usb-SAMSUNG_SP2014N_DEF10AE1E1C9-0:0-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 9 2009-02-25 11:25 usb-SAMSUNG_SP2014N_DEF10AE1E1C9-0:0 -> ../../sdc
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 edd-int13_dev82-part7 -> ../../sdc7
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 edd-int13_dev82-part6 -> ../../sdc6
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 edd-int13_dev82-part5 -> ../../sdc5
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 edd-int13_dev82-part2 -> ../../sdc2
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 edd-int13_dev82-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 9 2009-02-25 11:25 edd-int13_dev82 -> ../../sdc
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 usb-SAMSUNG_SP2014N_DEF10AE1E1C9-0:0-part8 -> ../../sdc8
lrwxrwxrwx 1 root root 10 2009-02-25 11:25 edd-int13_dev82-part8 -> ../../sdc8

The new internal hard drive is a Samsung SpinPoint F1 Desktop Class HD103UJ - hard drive - 1 TB – SATA-300. It has been formatted as NTFS.

If I try to mount it: mount -t ntfs /dev/sda / I get the error:-

mount: wrong fs type, bad option, bad superblock on /dev/sda,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

I have some experience of UNIX/Linux but this area is a bit of a black art for me!
Any help would be gratefully received.
Thank you in anticipation.
Graham Benney

Thank you both for your help.
I am using openSUSE 10.3 on Linux 2.6.22.19-0.2

The output from fdisk -l is:
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0000e233

Device Boot Start End Blocks Id System
/dev/sda1 1 121602 976759808 7 HPFS/NTFS

Disk /dev/sdb: 73.4 GB, 73407820800 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf6f9f6f9

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 3246 26065462 7 HPFS/NTFS
/dev/sdb2 3246 8924 45616536+ f W95 Ext'd (LBA)
/dev/sdb5 3246 3439 1558273+ 82 Linux swap / Solaris
/dev/sdb6 3440 5641 17687533+ 83 Linux
/dev/sdb7 5642 8924 26370666 83 Linux

Disk /dev/sdc: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x84d98746

Device Boot Start End Blocks Id System
/dev/sdc1 1 10009 80389260 c W95 FAT32 (LBA)
/dev/sdc2 10009 24321 114969141 f W95 Ext'd (LBA)
/dev/sdc5 10009 10270 2104452 82 Linux swap / Solaris
/dev/sdc6 10271 12881 20972826 83 Linux
/dev/sdc7 12882 15492 20972826 83 Linux
/dev/sdc8 15493 24321 70918911 83 Linux

When I do mount /dev/sdb1 /mnt
I get:
mount: /dev/sdb1 already mounted or /mnt busy
mount: according to mtab, /dev/sdb1 is mounted on /windows/C

The /mnt drive is empty and I cannot find anything like an additional drive on the /windows/C directory.
Thanks again
Graham Benney

tredegar 02-25-2009 08:15 AM

A couple of Qs:
- What linux distro are you running?
- What is the output of the command
Code:

fdisk  -l
(and that's "minus ell" not "minus one") in a terminal? (You'll need to be root for this command to run)

Welcome to LQ!

Randux 02-25-2009 08:24 AM

Hello Graham,

As you can see from the output you posted, Linux refers to the drive with a letter as well as a partition number. You don't normally build a file system in a drive without partitioning it, so a /dev/sda isn't a good reference.

There are a lot of questions here, but what is your intention for this drive? If you want to use it from both Winbloze and Linux then it's best to use a filesystem with well-established support on both. FAT32 would be an obvious choice rather than NTFS. Linux does have r/w NTFS drivers nowadays, but I prefer not to use it.

First, let's have a look at your drive.

As root:

fdisk -l

This a read-only command that will print out all the drives Linux can see as well as what the partition table says. I'll wager it shows you new drive as /dev/sda1 with a type of NTFS.

If so, you can get access to it like this (also as root): Anything after the # sign I'm typing here is comments for you, don't type it.

Code:

mkdir /mnt/name-of-drive            # this creates a directory
mount /dev/sda1 /mnt/name-of-drive  # this mounts the partition on a directory so you can use it

If you wanted to call your new drive Samsung you could do:

Code:

mkdir /mnt/Samsung                  # create directory Samsung on /mnt
mount /dev/sda1 /mnt/Samsung        # mount the NTFS fs on Samsung

What Linux distribution are you using?

Graham1941 02-25-2009 10:25 AM

Hi all
Sorry, not use to this. I've put my answer as an edit to my original question!!!
Thank you for you help.
graham

tredegar 02-25-2009 10:50 AM

Quote:

I've put my answer as an edit to my original question!!!
Please don't do this, it makes the thread read in a non-sensical way.

Now... You are running OpenSuse 10.3 - are you using gnome or KDE as your windowmanager ? (probably KDE)

Code:

The output from fdisk -l is:
 Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
 255 heads, 63 sectors/track, 121601 cylinders
 Units = cylinders of 16065 * 512 = 8225280 bytes
 Disk identifier: 0x0000e233
 
 Device Boot Start End Blocks Id System
 /dev/sda1 1 121602 976759808 7 HPFS/NTFS

So /dev/sda is your 1TB disk, it has one partition /dev/sda1 which is formatted as ntfs

Now we have the information, we can mount the disk.
Create the mountpount (as root), and we'll backup your fstab whilst we are at it
Code:

mkdir  /mnt/1TB
cp  /etc/fstab  /etc/fstab.bak

again as root, edit the file /etc/fstab maybe like this:
Code:

nano  /etc/fstab
add a line at the end which reads exactly like this

Code:

/dev/sda1      /mnt/1TB        ntfs-3g  auto,users,umask=000
Note there are no spaces in this bit: auto,users,umask=000
Where there are spaces in that line, it doesn't matter how many, but there must be at least one. Your fstab might be prettily formatted, with columns that line up, if so, it's nice to keep it that way.

Then make sure there is one blank line after that last line. Do NOT change anything else. If you make a mistake you always have your backup file.
Save the changes.
Now, as root, give the following command
Code:

mount  -a
The drive should be mounted and readable / writable by all users. This will happen at each boot.

Graham1941 02-26-2009 11:02 AM

Hi
Thank you very much tredegar, that worked!

Whilst on the subject my mount command is :-

/dev/sdb6 on / type ext3 (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/sdb7 on /home type ext3 (rw,acl,user_xattr)
/dev/sdb1 on /windows/C type fuseblk (rw,noexec,nosuid,nodev,noatime,allow_other,default_permissions,blksize=4096)
/dev/sda1 on /mnt/BackUp type fuseblk (rw,noexec,nosuid,nodev,noatime,allow_other,blksize=4096)
securityfs on /sys/kernel/security type securityfs (rw)
/dev/sdc8 on /media/disk-2 type reiserfs (rw,nosuid,nodev)
/dev/sdc7 on /media/disk-3 type reiserfs (rw,nosuid,nodev)
/dev/sdc6 on /media/disk-4 type reiserfs (rw,nosuid,nodev)
/dev/sdc1 on /media/HARDDRIVE type vfat (rw,nosuid,nodev,noatime,flush,uid=1000,utf8,shortname=lower)

as you can see the HARDDRIVE /dev/sdc1 is mounted on /media This correct as it is a USB device.
However the other sdc (6,7,8) partitions are also mounted on /media as USB devices. This is not correct as they are main disk partitions. I don't normally have a problem with this as I know where they are, but when the HARDDRIVE stops (It gets hot in the summer here!) it drops the other items on the /media directory. Any suggestions?

Thanks again

Kind Regards
Graham Benney

tredegar 02-26-2009 12:00 PM

Pleased that worked for you.

Now, as to the mounting of
Code:

/dev/sdc8 on /media/disk-2 type reiserfs (rw,nosuid,nodev)
/dev/sdc7 on /media/disk-3 type reiserfs (rw,nosuid,nodev)
/dev/sdc6 on /media/disk-4 type reiserfs (rw,nosuid,nodev)

Please confirm that when you refer to /dev/sdc you are referring to a disk that is internal to your PC and connected with an IDE, PATA, SCSI or SATA interface, ie it's NOT an unpluggable usb or firewire disk.

If you want those partitions mounted somewhere else, you just have to create the mountpoints (as you did for /mnt/BackUp but mountpoints can be anywhere eg /home/me/MyPictures if that is more appropriate) then just change the mountpoints in /etc/fstab the same as you did for /dev/sda1 your Backup drive.

Note: If you change an entry in /etc/fstab whilst the device that entry refers to is mounted, you may encounter problems (think about it).
Best to do it like this (all as root, so be very careful with your typing):

Backup your current, working, fstab (you already did this, I hope, now do it again as the new one is, errr, new)
Unmount the partitions you want to mount elsewhere
Code:

umount /dev/sdc6
umount /dev/sdc7
umount /dev/sdc8
mkdir /path/to/new/mountpoint1
mkdir /path/to/new/mountpoint2
mkdir /path/to/new/mountpoint3

Now time to edit fstab
Code:

nano /etc/fstab
and change /media/disk-4 to /path/to/new/mountpoint1
same for disk-5 and disk-6

Save the changes. Exit your editor.

Code:

mount -a
to re-read fstab and mount everything in the new places.
OK?
If so, it is now safe to
Code:

cd /media
rm disk-2
rm disk-3
rm disk-4

Quote:

...but when the HARDDRIVE stops (It gets hot in the summer here!) it drops the other items on the /media directory.
I don't understand what you are trying to say here.

Graham1941 02-27-2009 03:52 AM

Hi Tredegar
Thank you for you reply.
My fstab file looks like this:

/dev/disk/by-id/scsi-SFUJITSU_MAT3073NP_AAS3P5400DYS-part6 / ext3 acl,user_xattr 1 1
/dev/disk/by-id/scsi-SFUJITSU_MAT3073NP_AAS3P5400DYS-part7 /home ext3 acl,user_xattr 1 2
/dev/disk/by-id/scsi-SFUJITSU_MAT3073NP_AAS3P5400DYS-part1 /windows/C ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_GB.UTF-8 0 0
/dev/disk/by-id/scsi-SFUJITSU_MAT3073NP_AAS3P5400DYS-part5 swap swap defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
#/dev/fd0 /media/floppy auto noauto,user,sync 0 0
/dev/sda1 /mnt/BackUp ntfs-3g auto,users,umask000


What do I change?
The last part of my reply to you refers to fact that /dev/sdc6,7, and 8 are mounted on a 'removable' directory.
Th HARDDRIVE is is removable (a USB connection) but the other partitions are not, being on the main internal drive.
When the external HARDDRIVE stops due to overheating, the whole of the /media directory becomes inaccessible. This is why I want to mount these partitions elsewhere.

Thanks again
graham

tredegar 02-27-2009 06:30 AM

From your post #6

Code:

/dev/sdc8 on /media/disk-2 type reiserfs (rw,nosuid,nodev)
/dev/sdc7 on /media/disk-3 type reiserfs (rw,nosuid,nodev)
/dev/sdc6 on /media/disk-4 type reiserfs (rw,nosuid,nodev)
/dev/sdc1 on /media/HARDDRIVE type vfat (rw,nosuid,nodev,noatime,flush,uid=1000,utf8,shortname=lower)

So, /dev/sdc is a removable USB disk because you tell me now:

Quote:

The HARDDRIVE is removable (a USB connection) but the other partitions are not, being on the main internal drive.
You are mistaken here.

The partition /dev/sdc1 is the first partition on the device /dev/sdc (and is HARDDRIVE)
The partition /dev/sdc6 is the sixth partition on the device /dev/sdc (and is /media/disk-4)
and so on....

So, what you refer to as HARDDRIVE and /media/disk-4 are separate partitions on the same same (removable) physical device, so an overheating fault with one will affect the others too, that's why " when the HARDDRIVE stops (It gets hot in the summer here!) it drops the other items on the /media directory ".

Quote:

When the external HARDDRIVE stops due to overheating, the whole of the /media directory becomes inaccessible. This is why I want to mount these partitions elsewhere.
Mounting them elsewhere will not help, for the reasons I have given above.


All times are GMT -5. The time now is 06:26 PM.