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.
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.
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).
Listing 1. UNIX df Command Showing Mounted /share Partition
kevin@lyratoshibaubuntu:~$ df -k Filesystem 1K-blocks Used Available Use% Mounted on /dev/hda2 5036316 1748816 3031668 37% tmpfs /dev/shm 184936 0 184936 0% tmpfs /dev/hda1 184936 12588 172348 7% /lib/modules/2.6.12-9-386/volatile /dev/hda1 18427896 9955608 8472288 55% /media/hda1 /dev/hda4 4713876 417898 4295978 9% /share
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.
Practical Task Scheduling Deployment
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.View Now!
|The Firebird Project's Firebird Relational Database||Jul 29, 2016|
|Stunnel Security for Oracle||Jul 28, 2016|
|SUSE LLC's SUSE Manager||Jul 21, 2016|
|My +1 Sword of Productivity||Jul 20, 2016|
|Non-Linux FOSS: Caffeine!||Jul 19, 2016|
|Murat Yener and Onur Dundar's Expert Android Studio (Wrox)||Jul 18, 2016|
- The Firebird Project's Firebird Relational Database
- Stunnel Security for Oracle
- My +1 Sword of Productivity
- SUSE LLC's SUSE Manager
- Non-Linux FOSS: Caffeine!
- Managing Linux Using Puppet
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Parsing an RSS News Feed with a Bash Script
- Google's SwiftShader Released
- Doing for User Space What We Did for Kernel Space
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide