Results 1 to 7 of 7
I am trying to mount a hard drive it shows up as /dev/sda1
I can click it and mount it via the GUI but I need it mounted for this ...
- 07-23-2010 #1Just Joined!
- Join Date
- Jul 2010
- Posts
- 11
[SOLVED] Hard Drive Won't Mount
I am trying to mount a hard drive it shows up as /dev/sda1
I can click it and mount it via the GUI but I need it mounted for this script and do not want to have an extra step of doing it manually
I have tried (also tried sda vs sda1, no differance)
sudo mount /dev/sda1
sudo mount -t ntfs/dev/sda1
sudo mount -t ntfs-3g/dev/sda1
I know the drive is sda the only partition on it being sda1, but either I get an error saying it couldn't be found or I simply get no response depending on how I alter the code
Thanks for you help and suggestions
Oh also the drive shows hpfs/ntfs 0x07 in the disk utility
- 07-23-2010 #2Linux Newbie
- Join Date
- Mar 2010
- Posts
- 121
Try this command:
Then this:Code:man man
Code:man mount
P.S. This may come off as sarcastic to some - it's merely intended to be succinct.
- 07-23-2010 #3Just Joined!
- Join Date
- Jul 2010
- Posts
- 11
read the information on mount in there
tried -U and the uuid for the drive which I have being saved as a variable
tried -a from what I understand is supposed to mount all partitions available
the main problem is that I do not know all of the syntax for bash yet as this is my first bash script
I do not mean to sound like one of the people who expect to post a question and have other people write the code fro them piece by piece, I am just new to this and I got stuck here at the end on the UUID (other post) and this mounting problem. I never expected mount to become and issue as it seems pretty straight forward, but as I keep getting errors something has to be wrong
- 07-23-2010 #4Linux Newbie
- Join Date
- Mar 2010
- Posts
- 121
Sorry, I thought it'd be clearer on the man page - looking at it, the one for mount is quite complicated, they're usually more straightforward!
Anyway, the major thing you seem to be missing is that you need somewhere to mount a file system - you're specifying what you want to mount, but not where to mount it. For example, if you have a directory (an empty directory) at /mnt/sda1-mount/, you can mount /dev/sda1 there with the following command:
You'd only omit the directory if /dev/sda1 is in your fstab (see "man fstab").Code:sudo mount /dev/sda1 /mnt/sda1-mount/
If it gives you an error about "unknown filesystem type" or something like that, that's when you want to start giving it "-t ntfs" and such.
- 07-26-2010 #5Just Joined!
- Join Date
- Jul 2010
- Posts
- 11
- 07-26-2010 #6
You must first create the mountpoint directory. In your case, you tried to use '/mnt/sda1-mount', and that directory does not exist. Choose a mountpoint that suits your requirements, create that mountpoint directory (a one-time-only command), and then mount the drive on that directory. Thereafter, you can access the filesystem of the mounted drive with the root of the partition at the mountpoint.
Read the ntfs section of the mount manpage for more details. Your distribution may use the ntfs-3g filesystem type. If so, use that instead of ntfs.Code:# # Make a mountpoint mkdir -p /some/directory/of/your/choice # # Mount the NTFS partition at the created mountpoint mount -t ntfs /dev/sda1 /some/directory/of/your/choice # # See what is in the NTFS partition root ls -las /some/directory/of/your/choice
--- rod.Last edited by theNbomr; 07-26-2010 at 03:09 PM.
Stuff happens. Then stays happened.
- 07-26-2010 #7Just Joined!
- Join Date
- Jul 2010
- Posts
- 11
Problem Solved, Thank You



