Linux-Windows file access

Be the first to comment | 4I like it!
March 19, 2001, 05:13 PM —  LinuxWorld.com — 


Anyone who uses both Linux and Windows knows the problem. You need a couple of files that are on the Windows partition, but you forgot to copy them to a floppy or to the server before rebooting to Linux. Wouldn't it be great if you could just access those files from Linux, you think, as you prepare yourself for two more reboots.


As it turns out, there are a number of ways to solve that problem. You can mount your Windows partitions under Linux and you can access your ext2 filesystems under Windows. You can also access Linux (and Unix) servers from Windows via Samba and you can even mount Windows filesystems under Linux using smbmount. We will look at each of these methods below.


But there are more solutions on the horizon. The folks at Caldera have funded me to write a Samba client library. Please see the Resources section for more details. That library allows Linux and Unix systems to access Windows resources from within programs. Parts of the library already are available in the Samba CVS tree, and once the library becomes more generally used, programs like Midnight Commander and others should be able to browse the Windows systems on your network.

Accessing Windows files from Linux

There are plenty of Windows filesystems to worry about. There is the plain old DOS system with its 8,3 filenames. There is the long filename support introduced with Windows 95. There is the FAT32 file system introduced with the latter versions of Windows 95 and Windows 98 (known as VFAT filesystems). Finally, there is the NT filesystem, or NTFS.


Linux has been able to access MS-DOS and VFAT filesystems for quite some time. Read-only access to NTFS partitions has also been available for a while. In the past, you got NTFS support by downloading a driver that provided read-only access to NTFS partitions. Since Linux 2.2.x, however, read-only and read-write NTFS support has been a standard part of the kernel (albeit still considered experimental).


Unfortunately, that means it is not as easy to access Windows partitions under Linux as it is under Windows: You must first mount the partitions in order to access them. For example, if your hard disk is partitioned in the following way:


/dev/hda1 -- Windows 9x filesystem

/dev/hda2 -- Linux swap partition

/dev/hda3 -- Linux root filesystem


and you want to mount the Windows partition under /mnt/windows, use the command mount /dev/hda1 /mnt/windows.


Note that there is no need to specify a filesystem type (such as mount -t vfat /dev/hda1 /mnt/windows) because the mount command tries to mount the filesystem as VFAT before it tries MS-DOS.


After executing the above command, you can explore your Windows partition using any Linux command you want. You can read

I like it!
Post a comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
Resources
White Paper

Symantec Backup Exec 12 and Backup Exec System Recovery 8 deliver industry leading Windows data protection and system recovery. Download this whitepaper to find out the top reasons to upgrade and how to get continuous data protection and complete system recovery.

Webcast

Data and system loss — from a hard drive failure, malicious attack, natural disaster, or simple human error — can happen anytime. Don’t leave your business vulnerable. Make sure you have a secure recovery strategy in place. Symantec's latest backup and system recovery technology can efficiently restore critical applications, individual emails and documents and even restore your entire system in minutes in the event of a loss.

White Paper

Businesses face a growing challenge to ensure that the IT environment is properly protected. Backup Exec 12 integrates with other applications in the Symantec family of products, to complement your current data protection strategy, keep your data securely backed up and make it recoverable when you need it most.

Free stuff

Enterprise 2.0 Implementation
By Aaron C. Newman, Jeremy Thomas
Published by McGraw-Hill
Learn more!

Deploying Cisco Wide Area Application Services
By Zach Seils, Joel Christner
Published by Cisco Press
Learn more!

Featured Sponsor

AISO founders envisioned a Web hosting company that was environmentally friendly. While the company employed energy-efficient innovations like solar panels, its infrastructure produced unacceptable power and cooling requirements. Find out how AISO leveraged AMD technology to overcome their challenge in this case study white paper.

In this whitepaper, Scalar explores the opportunity to change the landscape with respect to mission critical databases built around Oracle. Leveraging technologies such as Linux, high-end commodity processing power and Oracle RAC technology to architect, design, build and maintain database infrastructure that delivers maximum availability, reliability and performance at a fraction of traditional cost.

On a typical day, weather.com, the Web site for The Weather Channel in Atlanta, serves up between 15 million and 20 million page views. But in September 2004, when back-to-back hurricanes ransacked Florida, the peak traffic on one day more than tripled: over 70 million page views by more than 7 million unique visitors. Read the full success story now.

More Resources