The Ultimate Linux/Windows System

Use cross-platform applications and shared data for the ultimate Linux/Windows system.

I recently converted my Toshiba notebook computer into a dual-boot system, running Windows XP Pro and Ubuntu Linux. I was hoping I'd be able to use cross-platform applications such as Mozilla Firefox, Mozilla Thunderbird, AbiWord, Gnumeric and SciTE transparently, no matter which operating system was currently booted. This article describes the steps I took to make this possible.

Dual-Boot Computer Configuration for Shared Application Data

In what follows, I assume you already have a dual-boot computer that has a working Linux and Windows operating system installed. You also must have an adequately sized additional disk partition for storing shared application data. This partition must be readable and writable by both operating systems. FAT32 (VFAT) is the logical choice.

My notebook came with Windows XP Pro installed on a 30GB hard drive. The computer was well used, its disk nearly filled, before I decided to convert it to a dual-boot system. I offloaded lots of data, and used the Windows defragment program to reduce my total Windows size below 15GB. Then, I used utilities on the Linux System Rescue CD to resize the original Windows partition and make new partitions as follows:

  • Partition 1: Windows NTFS primary partition, 18.5GB.

  • Partition 2: Linux ext3 primary partition, 5GB.

  • Partition 3: Linux swap partition, 1GB.

  • Partition 4: FAT32 partition for shared application data, 5GB.

Making a dual-boot system with only 30GB of total disk space is not ideal. My shared application data partition was 80% full once I loaded my archived e-mail, working documents and various ongoing cross-platform software development projects. For a more ideal setup, I recommend at least 60–80GB of disk space. In that case, I'd allocate 20GB for Windows, 10GB for Linux, 1–2GB for Linux swap and make the remainder the FAT32 shared partition.

Configuring and Accessing the Shared Disk Partition

Windows views a FAT32 partition as a separate disk drive and assigns it a drive letter. The letter assigned depends on what storage devices are connected to the system—for example, floppy or CD/DVD drives. On my system, Windows identifies the FAT32 partition as drive E:. Use Windows Explorer to verify the Windows drive letter for your FAT32 partition.

When I installed Ubuntu Linux, I selected mounting the FAT32 partition at boot time, using the mountpoint /share. After Linux boots, you can verify that the FAT32 partition is mounted with the UNIX df command (Listing 1).

Although the /share partition is mounted, there is a problem. By default, the the root user owns the /share partition. A standard user will not have read or write permission, and will not be able to run programs that access the shared data. Fortunately, the UNIX mount command provides options for a partition to be mounted with ownership set to a user other than root. This is one method for enabling you to read and write the shared partition using your normal login.

If only one person uses the computer, or only one user needs access to the shared partition, the best plan is to mount the /share partition at boot time, but with your login provided with ownership and full access rights. To configure this, you need to know your user ID and group ID. The /etc/passwd file stores this information. Here's the entry for my user name (kevin) in my /etc/passwd file:

kevin@lyratoshibaubuntu:~$
cat /etc/passwd | grep kevin
kevin:x:1000:1000:kevin,,,:/home/kevin:/bin/bash

The user ID is the number after the second colon. The group ID is the number after the third colon. The example shows that user kevin is assigned user ID 1000 and group ID 1000 on my system.

Now, you must edit the /etc/fstab file. This filesystem table identifies the filesystems the booting Linux system can expect to see, and instructs Linux on what actions to take for each filesystem. You need to switch to the root user account to edit the file.

First, make a backup copy of the current working /etc/fstab file, so you can revert to that version if something goes wrong. Next, bring the fstab file into an editor, such as vi, emacs, gedit or scite. Find the line for the /share file system, and change the data in the <options> column to defaults,uid=uuuu,gid=gggg where uuuu and gggg are your user ID and group ID from /etc/passwd.

Your finished /etc/fstab file should look something like Listing 2.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Dual Boot - Win and Linux

Toronto's picture

another very good option is Vmware.

Great Tutorial and Time Saver

seo toronto's picture

Thanks a lot for putting together a clear way to partition disk space. I like to demo various OS uses for my friends and clients. With this method I was able to run Ubuntu and Joli cloud. Very cool.

It is also a great way to compare and contrast OS versions for the end user.

Portable Thunderbird

V's picture

It works with
Path=/media/sda5/Tmail/Data/profile
not with
Path=/media/sda5/Tmail/Data/profile/ Mail
like here
Path=/share/users/kevin/Firefox/Profiles/ z9qffpsf.default
with portable Thunderbird

otherwise I was getting this:

"Thunderbird is still running, but is not responding. To open a new window, you must firs close the existing Thunderbird process, or restart your system [OK]"

Thanks for the article!

Dual Boot

Frantz's picture

Thank for this great tutorial. Unfortunately, I tried it on my 30 gig drive but it fails everytime. i just don't see how 30 gig would be enough. I think that I will swap it with another 80 gig that I have in a non-working laptop.

Thanks

Dear Kevin,

Roberto's picture

Dear Kevin,

You can modify easily the thunderbird/firefox profiles using the command line "-p" option . Thus, you will create a new profile with the profile location address that you to want.

Best regards,

Roberto

great tutorial

SEO Toronto's picture

This is simply the most thorough tutorial I've seen on Linux/Windows co-existence I've seen yet! I love the idea of the shared Firefox profile!

I was reading about a mod to

Anonymous's picture

I was reading about a mod to run the apple operating system on a pc

Absolute workable

fnielsen's picture

I have been using a setup similar to the one described here full-time for more than three years. My setup is slightly different:

Currently I run Fedora 5 with Windows 2000. Previously I have used Fedora 3 + WinXP and Fedora 4+WinXP

My shared data partition is Ext2 and is accessed under Windows with “Ext2 Installable File System for Windows “ (http://www.fs-driver.org/).

I often use other computers so I keep my data on a USB Flash drive. On the Flash drive I use:

Firefox; and
Thunderbird versions from Portable Apps (http://portableapps.com/);
Rainlendar (http://www.rainlendar.net) calendar with portable setup; and
LUKS for encrypted data storage.

Because most computers I use have only USB 1.1 ports it is convenient to launch the applications from the harddisk whenever that is possible so the standard versions of Firefox, Thunderbird and Rainlendar are installed on the computers, using the data directories on the flash drive.

The LUKS encrypted containers are created under Linux with FAT32 file system. Under Windows they are accessed with FreeOTFE (http://www.freeotfe.org).

As mentioned I am using the setup full-time. The following problems have been observed:

1) --------
Under Windows moving files on the shared data partition (Ext2) regularly result in a crash. This happens both under Windows 2000 and XP and on different computers. I guess it is a problem with the Ext2 driver. The solution is simply to do a copy + delete instead.

2) --------
I am not aware of a method for checking the shared Ext2 data partition from Windows. Therefore a crash in Windows requires booting into Linux to check the partition. A small inconvenience.

3) --------
LUKS/FreeOTFE, Firefox and Rainlendar have given no problems so far.

4) --------
I have experienced massive loss of email in Thunderbird several times. It appears to happen when the Linux and Windows versions are not closely matched.

For backup of the data on the memory stick I use simple bash scripts and batch files.

VirtualBox

domintheattic's picture

I have a Linux/Windows setup on my wireless laptop using VirtualBox and parprouted: I have Windows XP running as a guest OS hosted under Kubuntu Dapper. I simply fire up the WinXP guest whenever I want to run one of those pesky 32-bit Windows apps. The performance isn't too bad either. Now I can Alt-Tab between lovely Linux and wobbly Windows at will; in this way I do not have to reboot!

another use

jwillar's picture

Great article. Another use for this process is giving access to mail and firefox from multiple Window login accounts. I've been stumped by that one for a long time. Planning to now work on the KUBUNTU access now. Thanks on many levels.

John

i cant help

sohebt's picture

i cant help

WARNING WARNING

Roshan PV's picture

WARNING
If you by any chance like me love to hibernate both your dual booting operating systems then don't dare try this technique it corrupts your file system.
This is because when you hibernate certain file in the memory cache are stored in memory only and when boot into the other systems, the other system sees and inconsistent file system............
Reuslt you will end up corrupting the File system....
I tried doing this is just didn'w work for me
I suggest you use true crpt which encapsulates the entire file system in a file and you can copy paste the file and mount the file when ever needed

Mozilla Firefox bookmarks across platforms

linuxiac's picture

Save bookmarks to install and use in Firefox, across all platforms, on any computers, anywhere!

I have 2 Mb of bookmarks. Probably more than a few of you have.

Wouldn't want to try to rebuild it all, so, I save and transport it.

I open the bookmark tab, click on Manage, and first go to View, and A-Z Sort them. One click does it.

Next, over to File, down to Export.

A window opens, and displays bookmarks.html which I insert the date, so it is bookmarks03312007.html and hit the save button.

Next, close the Manage page. Open an email compose page, to write an email, to send to my many email addresses, and attach bookmarks03312007.html so it will be in all my email ISPs and I can import it to any system in the world, when I install Mozilla Firefox.

Also, can save it to a folder on my USBstick and external drives, that I call /home/myName/bookmarks.

And, I particularly like http://pclinuxos.com and other liveCDroms at http://livecdlist.com but, I don't dual boot.

I convert all systems I encounter to a single GNU/Linux or *BSD box. It runs upto 50X fster in most processes, in concurrent multi-tasking on upto 200 open 'windows' on 20 desktops, on multiple monitors.

Felon Microsoft is still a crook by anyone's description, on all the continents, and for good reason, Microsoft takes customer's money in fraudulent schemes and promotions that never work. That taints one's integrity and reputation!

HTH!

What about using the gid of the "users" group.

Polarbearpartit42's picture

Why not use the gid of the users group, or add another group f.ex shared, and used that gid when mounting at boot time, then adding all the users that should be able to connect to the shared file system to the appropriate group.
Maybe I've been using Linux for way to long, don't have a vfat partition to test if this will work

Thanks for the article

SomeoneReading's picture

I'm now making a stronger move into linux debian, and this problem of dual-booting with sincronous email and browser was one of the things that I was looking forward to change: it shortens the gap of transition from one OS to another, and so promotes an easier switch.

Just writting to recognize your effort, explaining it gradually with an example and comments. Very usefull, it helps me. Hope to be able to retribute back to the "community" soon :)

sspring88

Paulo

newb question

Anonymous's picture

Great article! Just what I was looking for. Works great!

One little problem : I had 2 dictionaries in Windows (English and French). In Linux I ended up having only the English (I was expecting both on the shared data, since it works fine in Windows). I guess the dictionary location/setup must be different in both systems.

I tried to install the French dictionary in Linux following the Thunderbird Web site instruction for extentions. The installation completes normaly, but the newly installed dictionary cannot be seen or found - only the English remains.

I tried to Google an answer, but couldn't find anything. Any ideas?

Thanks.

Nic

Issue solved

Anonymous's picture

Since dictionaries are not stored in the user space (in version 1.5.0.4), but on /usr/lib/mozilla-thunderbird/components/myspell, the installation of a second dictionary can only be done as root, following normal instructions.

Found the answer through http://forums.mozillazine.org/

Does this really work?

Average Joe's picture

I haven't tried this solution myself, but does this really work for sharing email? In my Thunderbird configuration file (prefs.js) there is an absolute path to my mail folders, like E:\blahblah\Mail\... So if the same configuration file will be used for Linux it will not work, because it should be referred to as /shared/blahblah/Mail...

I would also like to point out that this will never work for multiple users, since the fat32 partition is mounted in fstab for a single user (kevin). The author even explicitly shows that only user kevin has write access to the fat32 partition.

Just wanted to say I really

Anon's picture

Just wanted to say I really appreciate the article! Found it when googling the subject.

Funny it was the ext2 route that turned me off to looking into ways of do this eariler. Wasn't until recently did I have a 'duh' though of just using the Fat32 data swapping partition I already had setup.

Thanks again! I'm a Tux subscriber...I may have to go Linux Journal soon. :)

Insane people like you with

Anonymous's picture

Insane people like you with your inane comments must be taken out and shot!!!

use ext2 as the common partition ?

rdeschene's picture

I don't know if the author tried it or not, but there are more than a few ext2 drivers for Windows out there as well. I haven't honestly worked with these very much, as I haven't had reason to, but they're worth mentioning as an alternative. Backup often until you gain confidence with it though.

My experience with running fsck on an ext2 partition has been FAR better than my experience of running recovery tools on a FAT32 partition.

The data on this shared partition is, really, the most important stuff on the entire HD. Re-installing an OS or apps is easy. Definitely, definitely place a high priority on backing up that shared partition and use the most stable FS you can.

http://sourceforge.net/projects/winext2fsd

Rick D.
Brockville, Canada

@most stable FS you can.

macdet's picture

thx for the tipp.

so i will try it and change the type too!

use ext2, I second

tyante's picture

I was currently setting up my laptop for a dual boot and came back to this article. I decided to use an ext2 partition for my shared information. I've been using a similar one on my desktop with XP and FreeBSD. This time I'm going with XP and Slackware. The windows driver for the ext2 reading and writing I use is found at http://www.fs-driver.org/ I've been using this for a few months without a problem and am using it again in this project.

smoke on

jr_ewing's picture

keep smoking whatever you're smoking dude .. this is a Linux Journal .. maybe you should be at the Atlantic monthly website .. get lost

Link Spam

Anonymous's picture

The poster of that garbage does not care what this forum's purpose is. He just wants to create a link to his drug-pushing web site.

Linux Journal needs to take measures to prevent such "link spam".

I use have only USB 1.1

Anonymous's picture

I use have only USB 1.1 ports it is convenient to launch the applications from the harddisk whenever that is possible so the standard versions of Firefox, Thunderbird and Rainlendar are installed on the computers, using the data directories on the flash drive.mirc mirc Chat chat

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState