|
Device Boot |
Start |
End |
Blocks |
Id |
System |
/dev/hda1 * |
1 |
765 |
6144831 |
b |
W95 FAT32 |
/dev/hda2 |
1250 |
3648 |
19269967+ |
f |
W95 Ext'd (LBA) |
/dev/hda3 |
766 |
1249 |
3887730 |
83 |
Linux |
/dev/hda5 |
1276 |
3648 |
19061091 |
b |
W95 FAT32 |
/dev/hda6 |
1250 |
1275 |
208782 |
82 |
Linux swap / Solaris |
It
should be obvious that hda indicates a hard disk
partition, hda1 being the Windows c: drive, while hda3 is
a 4 GB Linux partition, and hda6 is the Linux swap space.
It's also obvious to me (since this is my machine) that
hda5 is my Windows data drive.
It's this partition that we want to make accessible to
Linux which we do by mounting the volume. However, first
we must create a mount point which we do in the Terminal
window by issuing the command: sudo mkdir
/mnt/windows_data, As the command name suggests,
this makes a new sub-directory named windows_data
under the mnt directory in the Linux
file structure. Now we need to tell Linux about the
details of the data partition such as the format type
(FAT32 or NTFS). In my case, the partition is formatted
as FAT32, so the command to be entered into the Terminal
window is:
sudo mount /dev/hda5 /mnt/windows_data -t vfat -o
iocharset=utf8,umask=000
If your partition is NTFS, then the appropriate command
is of the form:
sudo mount /dev/hda5 /mnt/windows_data -t ntfs -o
nls=utf8,umask=0222
Note that we are specifying the particular device (in my
case /dev/hda5) that is to be mounted, giving it the name
of a pre-defined mount point (/mnt/windows_data), and
setting parameters appropriate to the disk format.
If we now run Nautilus, the Linux file manager (using the
menu sequence Places Computer), we will
find that we have an 18GB volume named /mnt/windows_data
available. And, if we run OpenOffice.org Writer, we will
find that we can load the file linux_06.doc
(this newsletter article on my machine) from this
partition, edit the file in Writer, and then save the
modified version back to the Windows data partition where
it will be available for subsequent processing in Word
next time we boot into Windows.
But, the mount command is rather long and complex to have
to issue every time we log on to Linux. And, knowing the
power of Linux, we can guess that there must be an easier
way. Actually, one way that will work right now, is to
open Terminal and press the up arrow, at which point the
mount command in all its glory appears as if by magic. Of
course, it does so because Linux maintains a command
history and we are merely selecting the last command used
from the buffer. The permanent fix is to edit the /etc/fstab
file and insert an entry for our Windows data partition.
So, in Terminal, let's enter: sudo gedit /etc/fstab
to produce the following listing in the editor's window:
# /etc/fstab:
static file system information.
#
#<file system> |
<mount point> |
<type> |
<options> |
<dump> |
<pass> |
proc |
/proc |
proc |
defaults |
0 |
0 |
/dev/hda3 |
/ |
ext3 |
defaults,errors=remount-ro |
0 |
1 |
/dev/hda6 |
none |
swap |
sw |
0 |
0 |
/dev/hdc |
/media/cdrom0 |
udf,iso9660 |
user,noauto |
0 |
0 |
And, let's add the following new line to the end of this file to specify a permanent entry for the Windows data partition:
/dev/hda5 /mnt/windows_data vfat iocharset=utf8,umask=000 0 0
Save the
file and reboot the computer. If you now check Places
Computer, you will now find that your Windows data
partition has been mounted automatically and is ready for
immediate use.
So, now we have the best of both worlds access to
our working office files from both Windows and
Linux. What more could you want?
Bottom Line:
Ubuntu 6.06 LTS
(Open Source)
http://www.ubuntu.com/
Mounting Windows
Partitions in Ubuntu
http://www.psychocats.net/ubuntu
Click here to view the full OPCUG website with frames.
Copyright and Usage
Ottawa Personal Computer Users' Group (OPCUG), Inc.
3 Thatcher Street, Ottawa, ON K2G 1S6
The
opinions expressed in these reviews do not necessarily
represent the views of the OPCUG or its members.
Send comments or suggestions to the .