LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-30-2003, 09:31 PM   #1
rmd3boy
LQ Newbie
 
Registered: Jun 2003
Posts: 18

Rep: Reputation: 0
Mounting a HD...


Hey all, I'm kinda new to Linux, but I finally got fed up with Windows... and I'm switching over to Linux... I am currently running RedHat 9.0... anyways... I want to mount a spare HD that I have because I have all of my files on it... its a storage HD... I have my Mp3s, and other important files... how would I go about mounting it... there isnt an OS on it... just files... its a FAT32 drive... if you could list any steps I would need to take... or what I would type at terminal.... I'd really appricate it! BTW its listed at "hdh" Thanks ALL in advance!
 
Old 06-30-2003, 09:41 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
First figure out what device it's listed as:
fdisk -l (FDISK -L lowercase)
Find the "fat" listing, then:
mkdir /mnt/fat32 (as root, for all of this)
mount -t vfat /dev/hdx /mnt/fat32 -o users,umask=002,uid=500,gid=500,noexec,rw

If it all works out and you can list the files in /mnt/fat32 as a user, then add this to your /etc/fstab:
/dev/hdx /mnt/fat32 vfat users,umask=002,uid=500,gid=500,noexec,rw 0 0

Where /dev/hdx is the device you found from the fdisk command above.



Cool
 
Old 06-30-2003, 09:42 PM   #3
contrasutra
LQ Guru
 
Registered: Mar 2003
Location: New Jersey
Distribution: Arch Linux
Posts: 1,445

Rep: Reputation: 47
Add this to your /etc/fstab (as root):

/dev/hda3 /mnt/windows vfat auto,defaults,umask=000 0 0

replacing /hda1 with hdh1 (or whatever # partition it is) , and replace /mnt/windwos with whatever directory you want to mount it to.

Make sure you manually create that mount directory and give it proper permissions (like not "read-only" or something)


PS. Could you write in seperate sentances, and not with ".....", thanks.



EDIT:\\ MasterC beat me to it.
 
Old 06-30-2003, 09:46 PM   #4
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
# Managing drives
LNAG - Accessing my drives
Rute - Device Mounting
 
Old 06-30-2003, 09:46 PM   #5
rmd3boy
LQ Newbie
 
Registered: Jun 2003
Posts: 18

Original Poster
Rep: Reputation: 0
Isn't fdisk to format or something?
 
Old 06-30-2003, 09:51 PM   #6
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
fdisk is a partitioning tool and the command given is "list the partitions ya' got on that sucker".
Code:
fancy@tinwhistle $ su -
Password: 

root@tinwhistle # fdisk -l

Disk /dev/hda: 255 heads, 63 sectors, 4865 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1      1217   9772056    c  Win95 FAT32 (LBA)
/dev/hda2   *      1217      1229     99855   83  Linux
/dev/hda3          1230      1656   3429877+  83  Linux
/dev/hda4          1657      4865  25776292+   5  Extended
/dev/hda5          1657      1719    506016   82  Linux swap
/dev/hda6          1720      2146   3429846   83  Linux
/dev/hda7          2147      2573   3429846   83  Linux
/dev/hda8          2574      3719   9205213+  83  Linux
/dev/hda9          3720      4865   9205213+  83  Linux

Disk /dev/hdb: 255 heads, 63 sectors, 9729 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdb1   *         1      1218   9778072+   c  Win95 FAT32 (LBA)
/dev/hdb2          1218      9729  68370088+  83  Linux
root@tinwhistle #
mkfs is to format

Last edited by fancypiper; 06-30-2003 at 09:55 PM.
 
Old 07-01-2003, 06:47 AM   #7
Sparky
Member
 
Registered: Feb 2003
Location: Denver
Posts: 68

Rep: Reputation: 15
I hope I can clear it up a little. In case it's not obvious, Linux treats EVERYTHING as a directory (stating the obvious usually gets a "duh" response so I hope this isn't too insulting). As such, you need to make a "dummy" directory somewhere so that you can later mount your hard drive to it. It's kind of a waste of a directory name, but as long as you have the "dummy" directory created somewhere on your current Linux system it really can't hurt too much except for the pittance of space the name takes up (or wastes). I believe the suggestion was to make the directory named /mnt/fat32, but you can really call it anything you like and you can even put the dummy directory anywhere you like. However, there is a good reason these "dummy" directories are placed in the /mnt directory and making your "dummy's" name in the /mnt is not a bad habit to get into too (there's also a good reason for this, but it's not a critical one; however, it is getting off topic). The important thing here is to mount your hard drive with the right syntax since mounting it as a reiserfs type file system if it's a FAT32 will almost surely result in an error or worse! Using the Linux fdisk or cfdisk utility will help you find out what Linux sees it as -- just make sure you don't change or delete anything |-I ! Once you mount your hard drive you access it by logging to that "dummy" directory. When mounted correctly, that dummy directory will actually have all the data on your hard drive! :-D

Other key factors to remember are how your BIOS see's your drive (is it IDE master or slave and on what controller?), if the drive is partitioned (does Windows or any other OS see it as 2 or more drives even though it's really one physical drive?), and if the drive data is compressed or not (if it is compressed then it would be a matter of whether or not Linux has the tools to deal with it, but it would be more work!). The Linux tools fdisk and cfdisk can tell you quite a lot without destroying any data -- unless you want it to (by making changes and writing those changes before exiting fdisk/cfdisk). The previous suggestions "should" work if all assumptions are correct. By writing this out I hope it makes more sense since it's pretty easy to give syntax and shorthand on skills that not everyone has (yet). ;-) L8R
 
Old 07-01-2003, 08:20 AM   #8
mayankjohri
Member
 
Registered: Mar 2002
Location: INDIA
Distribution: Mandrake Linux 9.2, Knoppix 3.0
Posts: 158

Rep: Reputation: 30
hello sharky is it directory or file. I think linux treats every thing as file.
 
Old 07-01-2003, 04:08 PM   #9
Sparky
Member
 
Registered: Feb 2003
Location: Denver
Posts: 68

Rep: Reputation: 15
The thing you make that is "bogus" is a directory. You might like to think of it as "fake" or "bogus" since without linking a drive (or something) to it that the empty directory really serves no purpose. However, even directory "names" take up space on your Linux system's hard drive even if they are empty -- and some folks are VERY particular about every single byte of hard drive space. So you see, Linux doesn't exactly treat "everything" as a file (nor does DOS/Windows). To see that, you should know about the ls -l command and the little tiny "d" that shows up when you have a directory. It's much more obvious when you use a GUI like KDE or Gnome, but the principal is the same -- there are directories and there are files and to link a drive to your system you need to use a directory. I'm NOT an expert, but this I do know. L8R...
 
Old 07-02-2003, 04:53 AM   #10
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
# Linux filesystem structure
Directory Navigation Help File
Filesystems, Directories, and Devices Help File
Proper Filesystem Layout
 
  


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
Mounting an ISO image from a CD different than mounting from HD? NoTiG Linux - Software 4 08-03-2005 04:40 PM
Gnome 2.6 Right click mounting and the mounting system Acetylcholine Linux - Hardware 0 07-25-2004 07:34 AM
Mounting HDD vs. Mounting Filesystem snailophone Linux - Hardware 4 08-12-2003 11:00 AM
Mounting mounting extended partition and its Logical drives desbyleo Linux - Newbie 10 02-18-2002 03:13 PM
mounting Cybergod1983 Linux - General 1 10-08-2001 03:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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