LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-22-2016, 11:39 AM   #1
thyme4jb
LQ Newbie
 
Registered: Dec 2016
Posts: 6

Rep: Reputation: Disabled
Question how to install new external hard drive


I have Ubuntu 16.04. New computer System 76. I'm trying to install (mount?) an external hard drive. What do I put into the terminal? Isn't that where I start?

I tried "fdisk -l" (without the quotes) but it says Permission denied for all files in the list

Last edited by thyme4jb; 12-22-2016 at 12:15 PM.
 
Old 12-22-2016, 12:59 PM   #2
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by thyme4jb View Post
I have Ubuntu 16.04. New computer System 76. I'm trying to install (mount?) an external hard drive. What do I put into the terminal? Isn't that where I start?

I tried "fdisk -l" (without the quotes) but it says Permission denied for all files in the list
... I'm kind of surprised it doesn't automatically mount when you plug it in - especially if you're using a distro like Ubuntu ... Do you know how your external drive is formatted ? It may be a simple question of making sure you have the proper file system driver installed (ntfs, fat32, etc. ..). I'm assuming it's using a USB interface ? Should auto-mount ... Check the format .... :

$ lsblk -f.

Last edited by Rickkkk; 12-22-2016 at 03:18 PM.
 
Old 12-22-2016, 01:45 PM   #3
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,518

Rep: Reputation: Disabled
To mount a disk from the terminal, first check what the system names it, use
Quote:
dmesg | tail
Then use that with the mount command, (as the root user or sudo)
Quote:
sudo mount /dev/sdb1 /mnt
(That should be able to mount any of the common filesystems.)
Quote:
ls /mnt
will show you what is on the disk, in the future when you've put files on it.

Edit: Don't forget to unmount it, before removing it, or you may corrupt the filesystem.
Quote:
sudo umount /mnt

Last edited by fatmac; 12-22-2016 at 01:49 PM.
 
Old 12-22-2016, 01:55 PM   #4
thyme4jb
LQ Newbie
 
Registered: Dec 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
It has USB interface. I don't know how the ex. hard drive is formatted. All I know is, when it is plugged in an icon shows up labeling it as Toshiba EXT. When I open it there are 4 folders and 5 files: Folders are autorun, MacDriver, NTI, and Pogoplug PC. The files are autorun.inf, Declaration of Conformity.pdf, Quick Reference Guide.pdf; setup.exe, and Warranty.pdf.

I figured out how to get permission to see the list of fdisk. I have to be in root. Once I did that I put in some commands someone listed on another site and here it is what it looks like:

root@thyme4jb-Lemur:/home/thyme4jb# mkdir /mnt/usbdrive
root@thyme4jb-Lemur:/home/thyme4jb# mount -t /dev/sdb1 /mnt/usbdrive
mount: can't find /mnt/usbdrive in /etc/fstab
root@thyme4jb-Lemur:/home/thyme4jb#

I tried another Toshiba HD and it worked automatically. Didn't have to do anything. I don't know what is wrong here. I don't know anything about "having proper file system installed."
 
Old 12-22-2016, 02:01 PM   #5
thyme4jb
LQ Newbie
 
Registered: Dec 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
When I put in dmesg | tail here is what came up:

root@thyme4jb-Lemur:/home/thyme4jb# dmesg | tail
[ 9040.621190] usb-storage 2-1:1.0: USB Mass Storage device detected
[ 9040.624466] scsi host8: usb-storage 2-1:1.0
[ 9042.389700] scsi 8:0:0:0: Direct-Access TOSHIBA External USB 3.0 5438 PQ: 0 ANSI: 6
[ 9042.390281] sd 8:0:0:0: Attached scsi generic sg0 type 0
[ 9042.392987] sd 8:0:0:0: [sda] 976773164 512-byte logical blocks: (500 GB/466 GiB)
[ 9042.393347] sd 8:0:0:0: [sda] Write Protect is off
[ 9042.393352] sd 8:0:0:0: [sda] Mode Sense: 23 00 00 00
[ 9042.393692] sd 8:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 9042.403069] sda: sda1
[ 9042.407924] sd 8:0:0:0: [sda] Attached SCSI disk
root@thyme4jb-Lemur:/home/thyme4jb# sudo mount /dev/sdb1 /mnt
mount: special device /dev/sdb1 does not exist
 
Old 12-22-2016, 02:09 PM   #6
thyme4jb
LQ Newbie
 
Registered: Dec 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
I just tried sudo mount/dev/sda1 /mnt and here is what shows up:

root@thyme4jb-Lemur:/home/thyme4jb# sudo mount /dev/sda1 /mnt
Mount is denied because the NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may use it which
could be identified for example by the help of the 'fuser' command.
 
Old 12-22-2016, 02:10 PM   #7
thyme4jb
LQ Newbie
 
Registered: Dec 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hope I'm not ****ing up this new computer.
 
Old 12-22-2016, 02:33 PM   #8
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by thyme4jb View Post
Hope I'm not ****ing up this new computer.
... don't worry :-) ... extremely unlikely. However, you just tried to mount either your system disk or some other active partition (/dev/sda1), which is already by definition mounted since you're using it (equivalent of trying to mount the C: drive in Windows ...). You need to figure out which device name your USB drive is known as. I again suggest you simply query the block devices by running the command lsblk -f (the -f switch lists the file system each device is using).

Once we know that, it'll be easier to figure out what's happening.

Cheers,
 
Old 12-23-2016, 06:49 AM   #9
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,518

Rep: Reputation: Disabled
Quote:
Originally Posted by thyme4jb View Post
I just tried sudo mount/dev/sda1 /mnt and here is what shows up:

root@thyme4jb-Lemur:/home/thyme4jb# sudo mount /dev/sda1 /mnt
Mount is denied because the NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may use it which
could be identified for example by the help of the 'fuser' command.
That should have been sdb1 - you just tried to mount your first hard drive which is where your O/S is - & it looks like you've got MSWindows/NTFS as your first partition on it!?, so is this a dual boot machine? These things matter to be able to help you.
 
Old 12-23-2016, 06:51 AM   #10
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,518

Rep: Reputation: Disabled
Quote:
Originally Posted by thyme4jb View Post
When I put in dmesg | tail here is what came up:

root@thyme4jb-Lemur:/home/thyme4jb# dmesg | tail
[ 9040.621190] usb-storage 2-1:1.0: USB Mass Storage device detected
[ 9040.624466] scsi host8: usb-storage 2-1:1.0
[ 9042.389700] scsi 8:0:0:0: Direct-Access TOSHIBA External USB 3.0 5438 PQ: 0 ANSI: 6
[ 9042.390281] sd 8:0:0:0: Attached scsi generic sg0 type 0
[ 9042.392987] sd 8:0:0:0: [sda] 976773164 512-byte logical blocks: (500 GB/466 GiB)
[ 9042.393347] sd 8:0:0:0: [sda] Write Protect is off
[ 9042.393352] sd 8:0:0:0: [sda] Mode Sense: 23 00 00 00
[ 9042.393692] sd 8:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 9042.403069] sda: sda1
[ 9042.407924] sd 8:0:0:0: [sda] Attached SCSI disk
root@thyme4jb-Lemur:/home/thyme4jb# sudo mount /dev/sdb1 /mnt
mount: special device /dev/sdb1 does not exist
Looks like you didn't plug in your USB drive......& switch it on if it has a power switch.

Last edited by fatmac; 12-23-2016 at 06:53 AM.
 
Old 12-23-2016, 07:31 AM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,781

Rep: Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935Reputation: 5935
Code:
[ 9040.621190] usb-storage 2-1:1.0: USB Mass Storage device detected
[ 9040.624466] scsi host8: usb-storage 2-1:1.0
[ 9042.389700] scsi 8:0:0:0: Direct-Access TOSHIBA External USB 3.0 5438 PQ: 0 ANSI: 6
[ 9042.390281] sd 8:0:0:0: Attached scsi generic sg0 type 0
[ 9042.392987] sd 8:0:0:0: [sda] 976773164 512-byte logical blocks: (500 GB/466 GiB)
Would indicate a USB drive is being detected and assigned /dev/sda. From the other posts the drive is formatted as NTFS and is mounted which makes sense. The OP has not provided enough information. We assume that since it is a new system that Ubuntu is already installed and therefore the USB drive should be /sdb.
Ubuntu could be running from a live DVD.

Post the output of the command:
lsblk
 
Old 12-23-2016, 10:42 AM   #12
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,518

Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
The OP has not provided enough information. We assume that since it is a new system that Ubuntu is already installed and therefore the USB drive should be /sdb.
Ubuntu could be running from a live DVD.

Post the output of the command:
lsblk
Yes indeed, good thinking, & therefore also could be running from one external drive & the OP wants to connect yet another.
 
Old 12-23-2016, 10:57 AM   #13
thyme4jb
LQ Newbie
 
Registered: Dec 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thank you for all your suggestions. After trying and failing for hours, I gave up for the day. I re-visited this today and looked at the System 76 Support page and low and behold, there was the answer front and center. It didn't involve the terminal at all but creating a home folder, labeling it, going to the drives, selecting the correct one, formating it, setting the drive mount options, then saving and restarting. Worked like a charm. Again, thanks for your input. I always learn something new when I make mistakes first! The lessons stick with me, also.
 
Old 12-23-2016, 10:59 AM   #14
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by michaelk View Post
[code] ... Post the output of the command:
lsblk
... Absolutely - I've suggested lsblk -f several times already. Posting the contents of /etc/fstab might also be illuminating.

Help us help you, thyme4jb ... ;-)
 
  


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
ubuntu installed on external hard drive, can't startup without external hard drive. Vanostaajen Linux - Software 23 01-20-2009 09:59 AM
install to external hard drive android6011 Linux - General 2 07-16-2007 08:36 AM
external enclosure for an internal hard drive vs external USB hard drive powah Linux - Hardware 1 03-10-2006 09:03 AM
Install to external hard drive leofwine SUSE / openSUSE 11 09-19-2005 11:03 AM
External Hard Drive Install lbooker Linux - Hardware 4 03-20-2005 12:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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