Author Topic: Question about FAT32 and RedHat Linux  (Read 701 times)

ProdigySim

  • Newbie
  • *
  • Posts: 1
  • Kudos: 0
Question about FAT32 and RedHat Linux
« on: 30 August 2003, 19:52 »
First of all, can RedHat Linux Read/Write on FAT32 partitions?

Secondly, if it can, where do I go to access those partitions?

Fett101

  • VIP
  • Member
  • ***
  • Posts: 1,581
  • Kudos: 85
    • http://fgmma.com
Question about FAT32 and RedHat Linux
« Reply #1 on: 30 August 2003, 20:26 »
Yes. And, I dunno about Red Hat, but in Mandrake it's automatically mounted with the other drives under /mnt/

Stryker

  • VIP
  • Member
  • ***
  • Posts: 1,258
  • Kudos: 41
Question about FAT32 and RedHat Linux
« Reply #2 on: 30 August 2003, 21:37 »
in the control center of kde you can choose to display mounted and unmounted partitions on the desktop, you might want to configure this for easy access to them. otherwise, you'll have to mount them in a folder... typically /mnt/dos or something.

Copperhead

  • Member
  • **
  • Posts: 39
  • Kudos: 0
Question about FAT32 and RedHat Linux
« Reply #3 on: 31 August 2003, 15:09 »
You need to edit a file called /etc/fstab.  In that file, there should be a listing of all devices that you have mounted. Let's use an example:

* Red Hat is on a dual boot with Windows on the primary harddrive

Run this command:

$ cat /etc/fstab

It should return something like this:


#/etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>               <dump>  <pass>
/dev/hdb1       /               ext3    errors=remount-ro       0       1
/dev/hdb3       /media          ext3    auto                    0       0
/dev/hdb4       /home           ext3    auto                    0       0
/dev/hdb5       none            swap    sw                      0       0
proc            /proc           proc    defaults                0       0
/dev/fd0        /floppy         auto    user,noauto             0       0
/dev/cdrom      /cdrom          iso9660 ro,user,noauto          0       0
/dev/hda1       /windows/c      vfat    auto                    0       0
/dev/hda5       /windows/g      vfat    auto                    0       0
/dev/hda6       /windows/d      vfat    auto                    0       0
/dev/scd0       /cdwriter       auto    ro,noauto,user,exec     0       0


In this example, I have two physical harddrives (/dev/hda and /dev/hdb), both of which are partitioned. (/dev/hda1 = "C:" on Windows, whereas /dev/hdb1 is the / directory of my Linux drive). I had to manually input the information into /etc/fstab to make it automount upon the initial, and only, boot of Linux, as specified in the <options> column.  You don't really have to worry about the <dump> and <pass> fields for now. What I have will work, for the time being.  

When setting up /etc/fstab, you have to not only declare the file system type (in this case vfat), and its representation in the /dev directory (in this case /dev/hda1), but you must also specify a mount point (in this case /windows/c).  Basically, what this means, is that  you have to make mountable directories where you would like to access your mounted filesystems. In my case, I ran this command after I editied /etc/fstab:

$ mkdir -p /windows/c # and then all other Windos drives

Once everything was delcared, you can run:

$ mount /windows/c

Then run this command:

$ cd /windows/c; ls -la

You should be able to see the entire DOS tree, the directories, files, and permissions.

After that, you can set up "shortcuts" to your Windows drives on your GNOME/KDE/whatever desktop.


Hope that helps  

Faust

  • Member
  • **
  • Posts: 1,223
  • Kudos: 0
Question about FAT32 and RedHat Linux
« Reply #4 on: 31 August 2003, 15:18 »
If first poster was asking for future reference then I wouldn't worry too much about the info overload, Red Hat will do it all automatically during the install.
Yesterday it worked
Today it is not working
Windows is like that
 -- http://www.gnu.org/fun/jokes/error-haiku.html

Baikonur

  • Member
  • **
  • Posts: 45
  • Kudos: 0
    • http://www.homepage.mac.com/citizensane/Personal1.html
Question about FAT32 and RedHat Linux
« Reply #5 on: 31 August 2003, 17:36 »
What does "grep" mean and how is it used?
"The Freedom of the Individual is the only legitimate object of government." --Frank Lloyd Wright, 1869 - 1959

Stryker

  • VIP
  • Member
  • ***
  • Posts: 1,258
  • Kudos: 41
Question about FAT32 and RedHat Linux
« Reply #6 on: 31 August 2003, 18:18 »
quote:
Originally posted by Xenix God:
What does "grep" mean and how is it used?


easy, lets say i have some files in a directory:

cparty1 cparty2 cparty3 cb1 cb2 cb3

i only want to view the ones with party, so

ls | grep party

i can't think of how to explain it without using an example.

Baikonur

  • Member
  • **
  • Posts: 45
  • Kudos: 0
    • http://www.homepage.mac.com/citizensane/Personal1.html
Question about FAT32 and RedHat Linux
« Reply #7 on: 31 August 2003, 18:24 »
Interesting Unixologism.
"The Freedom of the Individual is the only legitimate object of government." --Frank Lloyd Wright, 1869 - 1959

flap

  • Member
  • **
  • Posts: 1,268
  • Kudos: 137
Question about FAT32 and RedHat Linux
« Reply #8 on: 31 August 2003, 22:14 »
grep searches through specific files or standard input and prints any lines that match a particular pattern. It uses regular expressions so the pattern matching is very powerful.

A simple example:
grep '^fish[^ ]' ./*
will search through all files in the current directory and output any lines that begin with "fish", followed by any character other than a space.
"While envisaging the destruction of imperialism, it is necessary to identify its head, which is none other than the United States of America." - Ernesto Che Guevara

http://counterpunch.org
http://globalresearch.ca


Faust

  • Member
  • **
  • Posts: 1,223
  • Kudos: 0
Question about FAT32 and RedHat Linux
« Reply #9 on: 31 August 2003, 23:04 »
Or for example if I want to find all mp3 files on my hard drive to convert them to ogg files I just:
ls -R /home | grep mp3

ls lists all the files on my home dir with -R.
The pipe redirects that output (my list of files) to grep.
Grep only shows me the ones with the phrase "mp3" in them, so I get list of files which are mp3s.

Or another example:
cat ~/telephonenumbers.txt | grep Fred
Fred Bloggs   60 123 456 789
Yesterday it worked
Today it is not working
Windows is like that
 -- http://www.gnu.org/fun/jokes/error-haiku.html

flap

  • Member
  • **
  • Posts: 1,268
  • Kudos: 137
Question about FAT32 and RedHat Linux
« Reply #10 on: 1 September 2003, 00:03 »
Actually, since both of those examples given refer to finding files, I think it's worth mentioning that the more logical solution would be to use the 'find' command.

e.g.
find /home -name '*.mp3'

And just another small point about this:
cat ~/telephonenumbers.txt | grep Fred

Rather than piping the output of cat into a command, it's preferable to use redirection and do

command < ~/telephonenumbers.txt

as you don't then unnecessarily invoke another process (cat). Although with grep that isn't necessary either, as you could just do

grep Fred ~/telephonenumbers
"While envisaging the destruction of imperialism, it is necessary to identify its head, which is none other than the United States of America." - Ernesto Che Guevara

http://counterpunch.org
http://globalresearch.ca


sure

  • Newbie
  • *
  • Posts: 2
  • Kudos: 0
Question about FAT32 and RedHat Linux
« Reply #11 on: 1 September 2003, 10:12 »
1.get to know the name of your fat partion,such as /dev/hda1 or /dev/sdb1
2.mount it:
mount it to a folder in your linux system .
mount -t vat /dev/hda1 /mnt/fat_partion
3.access it as normal linux partion.
cd /mnt/fat_partion, and you will see all the files on your fat partion.