Some of you may have recently noticed that I’m a fan of Ubuntu, thanks to the countdown to version 9.04 and OS logo at the bottom of my sidebar and my post about the Ubuntu Manga PR. I’m a complete newcomer to the world of Linux, but I now use Ubuntu on my Asus Eee PC 1000HA netbook, installed alongside Windows XP. They’re set up so that I share a large chunk of space for files accessible from either OS. I thought I’d briefly explain how I did that in case anyone out there is curious. (Short version: this is a geek post.) Read more if you’re still interested! Normal posts will resume soon for the non-geeks, so don’t worry. I’m just in tinkering mode lately.
As I mentioned, I’m a complete newbie at this stuff – so seasoned folks may giggle as they read my words. But my fresh eyes might be appreciated by other new-to-Linux folks, so here goes. I started searching around for partition schemes as I awaited delivery of my netbook, and found that this page on Psychocats was really helpful. I modeled my partition scheme after it. The original version is above, my specific version is below. Click on them for larger versions (and visit Psychocats for some excellent pre-ext4 format alternative partitioning schemes). The Psychocats method works well if you’ve got full control of your hard drive. But I had a recovery partition and a physical extension that I didn’t want to delete on my Asus Eee PC 1000HA.
I needed to plan out the partitioning – my hard drive had three partitions from the get-go, upon unboxing – the Windows XP installation, the recovery partition (handy since I have no optical drive), and the Physical Extension (which I believe enables a speedier boot when using the factory settings). That means I could only expand my options by resizing the Windows installation and adding one new partition. How to fit four into the space of one? Well, I just used extended partitioning! If you look at the image above, you’ll see that my second partition is really just an umbrella for the shared space, the home directory, the Ubuntu installation, and the Swap space. (I couldn’t put a swap partition at the end of the drive. So I simply dropped it at the end of the second partition instead.)
Look confusing? It’s not, but it takes some analysis for a beginner like me. Let’s take a quick gander at how I keep it all straight. Ok? First – once you’ve repartitioned, install Ubuntu. You should specify the Home directory partition if you want to try that out. (It lets you do fresh installs without losing your settings for most stuff, in theory. Worked about 75% for me during the last upgrade I did.) Ubuntu will automatically install the GRUB boot menu – a boring screen that will pop up when you turn your computer on to let you choose from the OSes you’ve got installed. So you can choose whether to enter Windows or Ubuntu. Easy.
Once you’re in Ubuntu, you’ll want to be able to access your files. I am using the shared partition as my primary storage area. I set up my fstab file (located at /etc/fstab) to automatically mount the shared partition upon startup. You can tell it to mount partitions anywhere you want – it’s kind of awesome, actually. For instance, first I created a Music folder on the shared partition, then I remapped the Windows XP “My Music” folder to point at the new folder on the shared partition. Similarly, I set up fstab to auto-mount the shared partition (as /mnt/disk), and then I created a shortcut to the shared music folder (/mnt/disk/Music) in my Home folder so that I can access it from all my menus. Do this for the other folders on the shared drive and the result is that I can access any file from both OSes. The coolest implementation so far is that I installed ScummVM on both OSes and left all the ROMs on the shared partition – I can access not only the ROMs, but also all my saved games from both sides of my system. You can’t tell me that’s not cool. (Well, you can, but you’d be wrong. So there.) You might remember ScummVM from my ongoing Loom posts.
Here’s the relevant line that I added to my fstab file, for those who are trying to duplicate my setup or augment their own. You can see above that /dev/sda5 is the shared chunk of space. If you’re thinking of playing around with fstab, BACK IT UP first. Always, always, always.
/dev/sda5 /mnt/disk vfat defaults,utf8,umask=007,gid=46 0 2
Voila, shared space. If I can figure out a good way to record my setup, I’ll try to put up a screencast eventually. I’m really loving how it works for me at present. I imagine that I’ll only become further enchanted with it as I learn how to customize it more and more to my liking. I also mount the Physical Extension, just so it doesn’t show up on the drop down Places list as external media every time I start up. Ha ha. I can’t figure out how to auto-mount the Windows partition, though. That’s my only current hangup. It winds up sitting there, visible (and mountable) as a 30 GB drive…but it refuses to auto-mount when I put it in fstab. I’m not sure why. Maybe someone can give me some pointers?
Do you dual boot? What’s your setup? Remember all you Linux pros, I’m a newbie. Please use language I can understand. Ha ha. My to-do list for the rest of the day includes attempting to customize the GRUB menu, see if I can’t get those cool Compiz screenlets that I saw Bobby H running, fiddle with screen capture, try installing some Microsoft fonts for Roman and Japanese characters (including Meiryo!), and sort out whether letting Nautilus draw one wallpaper to avoid the super slow fade in as Compiz starts up after login (I’m doing the 4 different wallpapers / no desktop icons trick…but there’s got to be a better way…). Any other tweaks that you recommend out there?