Floyd's Linux Page

I have fooled with linux seriously for a few months now and have it running at home and at work. I have just upgraded to Red Hat 8.0. I plan to add things that I found usefull to this page from time to time. Both to share with people and to use it as a resource if I need to remember later how I did something.


Mounting the DOS/Microsoft partition.

If you have a dual boot machine you might want to access text, image, mp3 or other files on you DOS partition. These bash shell commands mount it temporarily.

$ su
# mkdir /mnt/dos
# /sbin/fdisk -l
# mount -t vfat /dev/hda1 /mnt/dos
# cd /mnt/dos

First, you don't need to reboot as root, you can temporarily act as the super user with su. Then you need to make the directory, mkdir, that the dos partition will be mounted to. I named it dos but it can be named pickles for all the system cares. Then you need to find out which hard drive or partition the dos files reside in. Running fdisk -l lists all the hard drives and their designations, mine happens to be hda1, look for one that has a vfat file format, that would be a good guess for a DOS/microsoft partition. So now you actually mount it to the system, in the process you need to type the file type, vfat, it's location, /dev/hda1, and where it will be accessable, /mnt/dos. Then change directories, cd, over and check it out.

If it works then you can set your system to auto mount dos on bootup. Just edit the fstab, "file system table?", file to mount hda1 as dos on startup. The following command allows you to edit fstab with pico, a command line text editor.

# pico /etc/fstab

then add the following line to the end of the table.

/dev/hda1 /mnt/dos vfat defaults 0 0

save, "ctrl+o" , and exit, "ctrl+x" and thats it.


Floyd's Home | MountainSmoke.com

Copyright: © Floyd A. Reed 1996-2003, all rights reserved.
URL: http://www.mountainsmoke.com/floyd/index.htm
Contact: floyd@mountainsmoke.com
Revised: Sunday February 16, 2003