LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mount a partition (https://www.linuxquestions.org/questions/linux-newbie-8/mount-a-partition-66415/)

KptnKrill 06-18-2003 03:33 PM

mount a partition
 
Hi.
Here's the deal
I have 2 harddrives. Hda has all of my Windows XP stuff on it. Hdb has all of my linux partitions and a fat32 partition. When I installed redhat 8 I created another fat32 partition so that I could share information between my linux and windows drives. I can access the drive from windows no problem, just open up my computer and boom. There it is. But I'm a little confused as to how to do this on linux. I searched around google and found the "mount" command. A little more research and I was able to come up with "mount /mnt/(partition you want to mount)". So I typed:

# mount /mnt/hdb2

The result was something like.... "No entry found in fstab blah blah blah". Anyone know what the problem is or more importantly, how to fix this? This is really important.
Thanks in advance.

------------------
Kyle

acid_kewpie 06-18-2003 04:03 PM

well there's no "problem" you're just not using the command correctly. What you're doing there is to rely on an entry in /etc/fstab which details what where and how to mount a partition. All you're doing there is saying the "what" part, which is fine IF the rest of the info is in /etc/fstab, but it's not there yet for you, you'll need to add it. e.g.
Code:

/dev/hdb2    /mnt/share  vfat    defaults
you can see similar examples nio your existing file. alternatively just run the full one off mount command
Code:

mount -t vfat /dev/hdb2 /mnt/share

jailbait 06-18-2003 04:06 PM

mount command
 
You need to create an empty directory (say /win2) to serve as a mount point.
Then issue a mount command similar to the following:

mount /dev/hdb2 /win2

If you want to have the second fat32 partition automatically mounted at boot then create an entry in for the partition in /etc/fstab.

The command:
man mount
is a good source of information about your problem.

KptnKrill 06-18-2003 04:34 PM

I added an entry into my fstab file like acid_kwepie said and on boot got an error, "/mnt/share Mount Point Not Defined". Any suggestions, and thanks for the advice thusfar :)

-------------
Kyle

manthram 06-18-2003 04:40 PM

you need to create the directory before you can try to mount to it;)

acid_kewpie 06-18-2003 04:43 PM

that'll be "mkdir /mnt/share" of course you understand you can a ) call it whatever and b) put it wherever you like....

KptnKrill 06-18-2003 04:46 PM

Thanks!! :D

linusunis 06-15-2008 09:50 AM

what to give in place of /dev/hdb2 if we want to mount a cd drive or
a usb flash drive

Nylex 06-15-2008 09:54 AM

Quote:

Originally Posted by linusunis (Post 3185331)
what to give in place of /dev/hdb2 if we want to mount a cd drive or
a usb flash drive

It depends what your system is calling your devices. For CD drives, you'll usually have an entry in /etc/fstab. It may be called /dev/cdrom. For USB devices, you should run dmesg and look at the output to determine what to use. You really shouldn't drag up old threads like this and this question would have been suitable in your other thread.

linusunis 06-15-2008 10:22 AM

in fstab there is no such entry
& i am not able to understand the output of dmesg at all
Please help
Tell me if should start some new thread or what
I am a newbie that's why i did not know that

Nylex 06-15-2008 10:27 AM

Quote:

Originally Posted by linusunis (Post 3185352)
in fstab there is no such entry

Show us your fstab.

Quote:

i am not able to understand the output of dmesg at all
After you plug your device in, you should see some output like the following:

sd 2:0:0:0: [sdb] Mode Sense: 23 00 00 00
sd 2:0:0:0: [sdb] Assuming drive cache: write through
sd 2:0:0:0: [sdb] 499712 512-byte hardware sectors (256 MB)
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Mode Sense: 23 00 00 00
sd 2:0:0:0: [sdb] Assuming drive cache: write through
sdb: sdb1
sd 2:0:0:0: [sdb] Attached SCSI removable disk
sd 2:0:0:0: Attached scsi generic sg1 type 0
usb-storage: device scan complete

The bit in bold tells me the kernel is calling my device /dev/sdb and that there's one partition on it, sdb1. So I would mount /dev/sdb1. Some distros may mount your devices automatically, too.

linusunis 06-15-2008 10:36 AM

HERE THIS IS MY fstab








/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
LABEL=SWAP-sda8 swap swap defaults 0 0

Nylex 06-15-2008 10:38 AM

Ok, do you have a /dev/cdrom? Where is your CD drive in your system (i.e. master/slave on first or second IDE channel, or elsewhere)?

linusunis 06-15-2008 10:41 AM

i have a /dev/cdrom
for the rest i'll have to see

pixellany 06-15-2008 10:41 AM

As the man said:
Quote:

this question would have been suitable in your other thread.
But, now that we're here, let's continue.

To find the device name in dmesg, it is easier to do some filtering. For example, this tells me where my CD drives are:
Code:

dmesg|grep CD
hda: DVD-ROM DDU1622, ATAPI CD/DVD-ROM drive
hdc: SONY CD-RW CRX220E1, ATAPI CD/DVD-ROM drive
hdd: PLEXTOR DVDR PX-712A, ATAPI CD/DVD-ROM drive
Uniform CD-ROM driver Revision: 3.20
hdc: ATAPI 52X CD-ROM CD-R/RW drive, 2048kB Cache, UDMA(33)
hdd: ATAPI 40X DVD-ROM DVD-R CD-R/RW drive, 8192kB Cache, UDMA(33)



All times are GMT -5. The time now is 04:56 PM.