LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 09-12-2013, 12:04 AM   #1
abcomp02
LQ Newbie
 
Registered: May 2013
Posts: 20

Rep: Reputation: Disabled
How to month second hardddisk to directory?


How to month second hardddisk to directory?

thank god for help
 
Old 09-12-2013, 12:36 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
I assume you meant mount (instead of month). How did you mount the first hard disk? You need to mount the second exactly the same way (just only the mount point will differ).
 
Old 09-12-2013, 03:29 PM   #3
YellowApple
Member
 
Registered: Mar 2013
Location: Reno, Nevada, United States
Distribution: Slackware, OpenBSD, openSUSE, Android
Posts: 95

Rep: Reputation: 37
Quote:
Originally Posted by abcomp02 View Post
How to month second hardddisk to directory?

thank god for help
Code:
sudo mkdir /mnt/sdb1
sudo mount /dev/sdb1 /mnt/sdb1
The first line creates a new directory in /mnt. The second line mounts the drive (/dev/sdb1) to the new directory (/mnt/sdb1). Replace /dev/sdb1 with the device you're trying to mount; sdb would be the second hard drive, and the number afterward is the partition number (if you're not sure which partition number to use, you can use
Code:
sudo fdisk -l /dev/sdb
to get an overview of the available partitions).
 
Old 09-12-2013, 06:41 PM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Your icon suggests that you posted from a Windows 7 system, and mounting on a Windows OS is different from Linux mounting. Could you tell us which Linux distribution you're using? (You should have specified that when you created your LinuxQuestions account. Then it would be automatically displayed in all you posts, and we wouldn't need to ask. )

On many modern Linux distributions a new drive will automatically be mounted under either /media or /run/media. Each drive partition will be mounted as a separate sub-directory of the sub-directory of media named with the drive's default name - usually the drive brand name and/or model number.

The suggestion by YellowApple, above, will only mount the first partition of the drive, and needs to be done from within a terminal window. And it assumes that your account has been set up so that you can use the sudo command. Not every distribution will have automatically done that.

Again, if you tell use which distribution you're using and which of the many desktop managers offered by most distribution you use, we can offer much more focused advice.
 
Old 09-12-2013, 09:17 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,326
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
Remember, Linux is not Windows and doesn't work like Windows. It's not harder; it's just different.

Because it is different, it seems complicated. It's isn't; it's that the creators of Unix and Linux reached different conclusions as to the best way to accomplish certain tasks.

Say the disk is sdb (SATA or SCSI Drive B). If it has only one partition, that partition might be sdb1. A second partition might be sdb2, and so on.

On Linux, you will not see a disk mounted as a "drive" is on Linux, the way you seem to in Windows. As YellowApple indicated, you don't mount the disk, sdb, you mount the partition sdb1.

And you mount it to a directory in a location specifically intended for mounting partitions, usually in the directory /mnt (mount) or /media. /run/media is a new thing.

If then you want to be able to jump to it directly from, say, your /home/[username] folder, you create a "softlink," similar to a Windows shortcut, for doing that.

Here's a article which is a pretty good explanation. Note that the use of hdX (Hard Disc "X") referred to in the article has been deprecated.

http://www.geekride.com/partition-ha...utility-linux/

Last edited by frankbell; 09-12-2013 at 09:24 PM.
 
Old 09-13-2013, 05:29 AM   #6
YellowApple
Member
 
Registered: Mar 2013
Location: Reno, Nevada, United States
Distribution: Slackware, OpenBSD, openSUSE, Android
Posts: 95

Rep: Reputation: 37
Quote:
Originally Posted by PTrenholme View Post
The suggestion by YellowApple, above, will only mount the first partition of the drive, and needs to be done from within a terminal window. And it assumes that your account has been set up so that you can use the sudo command. Not every distribution will have automatically done that.
I made assumptions because there's little concrete info to go off of other than the OP wanting to "month" a "second harddisk". For all I know, he could be running a minimal Debian box, and this "second harddisk" could very well be a single-partition external USB drive.

That said...

Quote:
Originally Posted by PTrenholme View Post
On many modern Linux distributions a new drive will automatically be mounted under either /media or /run/media. Each drive partition will be mounted as a separate sub-directory of the sub-directory of media named with the drive's default name - usually the drive brand name and/or model number.
If OP happens to be running a distro that lacks sudo access (highly unliklely nowadays), then the likelihood of there being a working /media folder is slim.
 
  


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
[SOLVED] rsnapshot - missing last month on a 3-month cycle. Fedora 15 steve_s Linux - Software 2 02-17-2012 04:51 AM
LXer: CodeWeavers CEO names himself employee of the month for 175TH consecutive month LXer Syndicated Linux News 3 08-13-2010 04:55 PM
transform month number to month name in php ALInux Programming 1 11-09-2005 10:45 AM
Starting day of month, month length chrisk5527 Programming 2 03-03-2004 04:03 PM
Cant mount hardddisk when i changed motherboard praveenk13 Linux - Hardware 2 12-31-2003 02:53 PM

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

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