LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-10-2003, 07:27 AM   #1
toddydog
LQ Newbie
 
Registered: Aug 2003
Posts: 20

Rep: Reputation: 0
Smile properly mounting FAT32 requires 2 devs in fstab


I've mounted a FAT32 partition so I can listen to my mp3s etc from Linux, but to do it I had to add both of the last 2 lines in fstab - see below. If I only add the dev/hdc1 line the partition shows as being empty.
Do you know why this happens?

Cheers


/dev/hdc5 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hdc7 /home ext3 defaults 1 2
/mnt/cdrom /mnt/cdrom supermount dev=/dev/hdb,fs=iso9660,ro,--,iocharset=iso8859-15 0 0
/mnt/cdrom2 /mnt/cdrom2 supermount dev=/dev/scd0,fs=iso9660,ro,--,iocharset=iso8859-15 0 0
/mnt/floppy /mnt/floppy supermount dev=/dev/fd0,fs=vfat,--,iocharset=iso8859-15,umask=0,sync,codepage=850 0 0
none /proc proc defaults 0 0
/dev/hdc6 swap swap defaults 0 0
/dev/hdc2 /dos/h vfat user,auto,umask=000,rw 0 0
/dev/hdc1 /dos/h vfat user,auto,umask=000,rw 0 0
 
Old 08-10-2003, 07:32 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
what does "fdisk -l /dev/hdc" say?
 
Old 08-10-2003, 07:55 AM   #3
toddydog
LQ Newbie
 
Registered: Aug 2003
Posts: 20

Original Poster
Rep: Reputation: 0
ak, cheers -
I get this - see below. I guess it can't properly recognise the fat32 unless it's mounted the whole drive as an extended partition. Is this right? If it is i'm surprised that i didn't need to mount hdc1 for any of the linux part's to be mountable.

[root@localhost al]# fdisk -l /dev/hdc

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

Device Boot Start End Blocks Id System
/dev/hdc1 * 1 1275 10241406 5 Extended
/dev/hdc2 1276 2433 9301635 c Win95 FAT32 (LBA)
/dev/hdc5 1 446 3582432 83 Linux
/dev/hdc6 447 477 248976 82 Linux swap
/dev/hdc7 478 1275 6409903+ 83 Linux
 
Old 08-10-2003, 07:59 AM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
hdc1 is the container per se. It holds the rest of the volumes of 5,6,7. hdc2 is the only primary partition on the device, partitions 5,6,7 are linux, so those aren't fat .. that's (hdc2) the one that needs to be mounted. hdc1 is nothing more than a container, a box that holds the partitions (bad example I know, but it helps to visually see what I mean).

Cool
 
Old 08-10-2003, 08:08 AM   #5
toddydog
LQ Newbie
 
Registered: Aug 2003
Posts: 20

Original Poster
Rep: Reputation: 0
Cheers to both of you - I've learnt more about my pc in 2 days of using linux that in 5 yrs of windoze!
 
Old 08-10-2003, 10:25 AM   #6
toddydog
LQ Newbie
 
Registered: Aug 2003
Posts: 20

Original Poster
Rep: Reputation: 0
OK - I'm confused again. I've just fully dhut down and rebooted my pc. I go to the FAT 32 partition and it's empty so I check that both hdc1 and hdc2 are mounted - they are. I then unmount hdc1 and can now see the files on hdc2. If i re-mount hdc1 , then hdc2 appears empty again. Not a problem, but whats going on?
 
Old 08-10-2003, 11:01 AM   #7
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
You shouldn't mount hdc1, ever. It's just there holding all the goodies. hdc2 and on are the only mountable partitions. You can only mount/read/see/view/touch/write/locate primary and extended partitions. extended partitions are those which live inside a logical partition. A logical partition is (for simplicity) a box to place your extended partitions in. You don't need the box, just the stuff inside. Primary partitions are those that are all happy by themselves. hdc2 is this type. hdc5 and so on are extended. hdc1 is logical.



Cool
 
Old 08-10-2003, 11:20 AM   #8
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Rep: Reputation: 47
uh... isn't that backwards??
Quote:
extended partitions are those which live inside a logical partition. A logical partition is (for simplicity) a box to place your extended partitions in.
Logical partitions live inside the extended partition.



regards...
 
Old 08-10-2003, 11:25 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
looking at that fdisk stuf... basically your drive is illegal. As hdc2 is 1,2,3 or 4 then that indicates that it is a primary partition (or an extended... which it's clearly not) BUT it IS inside the bounds of an extended partition.... basically that's just gibberish ho on earth did you manage that?

You'd do well to repartition that drive really.... other odd things could well start happening. basically.
 
Old 08-10-2003, 11:27 AM   #10
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Quote:
Originally posted by itsjustme
uh... isn't that backwards??

Logical partitions live inside the extended partition.



regards...
Thanks
 
Old 08-10-2003, 11:40 AM   #11
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Rep: Reputation: 47
Quote:
Originally posted by MasterC
Thanks
I thought I made a mistake the other day.
But, of course, I was mistaken.

 
  


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
fstab, fat32, permissions. isaac_e Slackware 7 02-01-2010 09:13 PM
Cannot write to FAT32 drives properly tharsan Linux - Hardware 2 02-22-2005 08:46 PM
why won't my fat32 partitions show up in fstab lailoken Linux - Newbie 8 04-21-2004 01:44 PM
mounting fat32 in fstab true_atlantis Linux - Newbie 2 01-14-2004 04:46 PM
fstab, mounting a fat32 partition, need help w/ ownership and all that mackstann Linux - General 2 10-15-2001 02:37 PM

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

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