LinuxQuestions.org
Visit Jeremy's Blog.
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 07-18-2003, 11:41 PM   #1
jmrjohan
LQ Newbie
 
Registered: Jul 2003
Posts: 1

Rep: Reputation: 0
Accessing Hard drives


Hi,

I have two linux partions on my PC. One is HDC5 which is the / drive running the system. I also have another drive HDB5 on another disk, i can't seem and don't know how to access this drive to save files to it. Any advise please on how to do this. Thanks in advance.

jon
 
Old 07-18-2003, 11:50 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
Welcome to LQ

To view/add partitions in linux they must be mounted. To mount a partition means to place the partition on a directory for accessibility. So...

Since we know what partition it is (hdb5) we'll move along quickly. First make an empty directory, preferably in the /mnt directory, so as root type:
mkdir /mnt/hdb5
And then we need to know what filesystem is on the drive. Assuming it's ext3 you would mount it with:
mount -t ext3 /dev/hdb5 /mnt/hdb5

See man mount for more information on that. After you get it mounted to your liking it's time to put it in your /etc/fstab file. So an entry in there might look like this (for an ext3 filesystem):
/dev/hdb5 /mnt/hdb5 ext3 defaults 2 1



So let us know what filesystem is on the drive for more specific info

Cool
 
Old 07-19-2003, 12:02 AM   #3
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
Hi jmrjohan

I'm a little confused by the post - This example might help.

You've got 2 hard drives, one on primary master, the other on primary slave , each with 2 partitions on

1st hard drive - on primary master

/dev/hda1
/dev/hda2 ROOT partition

2nd hard drive - on primary slave

/dev/hdb1
/dev/hdb2 ROOT partition

Now - you want to access files on /dev/hdb2 from /dev/hda2

First create a mount point in the /mnt directory in /dev/hda2

mkdir /mnt/jon

then mount /dev/hdb2 into /dev/hda2

mount -t ext3 -o rw /dev/hdb2 /mnt/jon

You've now temporarily got access to your files on the root partition on the 2nd hard drive while being in the 1st hard drives root partition- remember to put in the relevant filesystem and your chosedn directory name etc.

Its best testing it this way - then when youve got it right make an entry into /etc/fstab to automatically mount it

re post if you still need help then.
 
Old 07-19-2003, 12:04 AM   #4
PionexUser
Member
 
Registered: Jul 2003
Location: Alaska, USA
Distribution: Red Hat 9
Posts: 179

Rep: Reputation: 30
Can Linux view a vfat partiton?
 
Old 07-19-2003, 12:07 AM   #5
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
Hi PionexUser

YES.

Mount the VFAT filesystem into a mount point in your Linux filesystem

as root

mkdir /mnt/pionex

mount -t vfat -o rw /dev/hda1 /mnt/pionex

asssumes windows is on /dev/hda1
 
Old 07-19-2003, 02:24 AM   #6
rikkulinux
Member
 
Registered: Jun 2003
Location: San Diego, CA
Distribution: Debian 3.0rl "Woody"
Posts: 41

Rep: Reputation: 15
Would the same mounting procedure be used to mount a FAT32 partition on the same HDD? What about using samba to do this? Thanks.

-rikkulinux
 
Old 07-19-2003, 08:40 AM   #7
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
Hi RikkuLinux

VFAT covers amongst other things FAT32.

So - YES - if youve got a Windows FAT32 partition and a Linux distribution on one drive then its the same procedure.

The routine is:
  • Create a mount point
  • Test the situation with a temporary mount
  • Put an entry in /etc/fstab when your sure youve got it right

You dont need Samba here.
 
Old 07-19-2003, 08:46 AM   #8
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
# Managing drive devices
Rute guide - Device Mounting
LNAG - Accessing my drives
 
  


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
External Hard Drives/Hard Drives ddrfreak Mandriva 1 12-16-2004 07:12 PM
Accessing CD Drives/Floppy Drives rsearing Linux - Newbie 9 08-13-2004 09:53 PM
Accessing Different Hard Drives in RH9 PhysixstringGuy Linux - Hardware 7 02-13-2004 04:53 PM
Upgrading hard drives on Software raid 1 boot drives. linuxboy123 Linux - General 0 12-11-2003 04:28 PM
Accessing Hard Drives as user Kristic Linux - Newbie 14 09-01-2003 04:06 PM

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

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