Netbook Partitioning

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? :-D 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?

Be Sociable, Share!

Customary Drivel, Ubuntu / Linux, Unsolicited Commentary

Hit JapanSoc.com today for the best social news about Japan!
Loading...
  • http://i-cjw.com Chris (i-cjw.com)

    I use Wubi (http://wubi-installer.org/) – no partitioning required – not sure how it gets on with sharing windows files though…

  • http://www.rockinginhakata.com Deas

    From what I can gather, Wubi installs Ubuntu in Windows. (Otherwise you
    couldn't uninstall it like it's a Windows program.) That makes me think it's
    self-encapsulated, and can't really share storage particularly well…but I
    haven't any experience with it. Sounds like you've never had the need to try
    it yourself, though, huh?

  • Graham

    I like what you've got going there, but why not EXT4? On my 1000H, I've currently only got 9.04, but this weekend I was planning on initiating a triple boot for WinXP/Win7RC/9.04 with a large portion shared folder like you have above.
    I'm not a linux newbie, but I'm a linux noobie. I've been using for years now, and I love it, but I'm not always well versed in how everything works.
    In short, screw Microsoft.

  • http://www.rockinginhakata.com Deas

    Hey Graham – thanks for the comment! Um, the simple answer is tentativeness
    combined with laziness. I thought that I'd have had to reformat the Home
    partition (and lose all the stuff I had there), and I wasn't sure if the
    Ubuntu reinstall would keep any setting on the Ubuntu directory. So I just
    left it alone when I upgraded. Ha ha. Like most folks, I'm timid about
    messing with things that I don't fully comprehend. (And I'm not honestly
    even sure what the benefits of Ext4 over Ext3 are, if any, in the first
    place…) I mean, I could have also made Windows capable of reading Ext3 and
    formatted the shared partition that way instead of FAT32. But I stick with
    what I'm familiar with as I tiptoe slowly out of my comfort zone. Ha ha.

  • http://i-cjw.com Chris (i-cjw.com)

    Yes, Wubi installs directly into Windows – it works fine with Samba to access windows files on my server, but I've never had call to try and browse any local windows files with it. I'll give it a shot this evening though – looks like it might be possible..

  • Literati

    Yum, Linux. :]

    Although I'd THOUGHT I'd remembered installing Ubuntu via Wubi a long while back, I…apparently didn't, seeing as there's a complete lack of any evidence of me doing so. I'm just doing a nice dual boot, but don't think I've got my whole setup like yours is (thought it looks nice, and I think I'll get into it right after I install and fiddle with the Windows 7 RC).

    All I've really done with my Ubuntu install is extensively skinned it like a Mac, and then shown it off in school to some kid who's in love with his Mac and hates my HP tx2500. He had no idea what Linux was, and refused to believe I got it for free. Haha.

  • http://www.rockinginhakata.com Deas

    Oooh…I relish moments like that, Literati. Ha ha ha. I love showing stuff
    off and having people flip out about how it can't be free. Sometimes it's a
    little scary though, what the ignorance of free / alternative software can
    bring about. Did you see <a href=”
    http://linuxlock.blogspot.com/2008/12/linux-sto
    little ditty about teacher ignorance? Or how about the one where it was
    determined by campus police that “'using prompt commands' may be a sign of
    criminal activity?” The <a href=”
    http://www.eff.org/deeplinks/2009/04/boston-col
    application is kinda sad… Then again, the flipside is being able to
    screw with friends. Ha ha.

  • Literati

    Yeah, his first response when I told him it was free was disbelief, but when I finally explained the whole free as-in-beer and as-in-freedom idea to him, he said something along the lines of, “Well, if it's free, it must suck!” I just shook my head and walked away.

    That teacher story is outrageous; I've never seen so many assumptions in one letter. And speaking of prompt commands, there's some kid at my school who thinks I'm a crazy hacker thanks to them. I was working in Terminal for some reason or another, and the kid came by, and was like “WHOOOAAA! Are you a HACKER or something?!”And I just explained it was called Terminal, and it's the interface you don't get to see with GUIs, but all the terminology was too much for him to handle. He just spurted out, “YEAAH! You're a hacker! Oh my god! THAT IS SO COOL!”

  • John

    Ugh, why dual boot? Install Ubuntu (on the whole drive), then go get VirtualBox http://www.virtualbox.org/ and install it. Then install XP as a guest OS if you really still need it. With time you'll eventually ween yourself away from Windows young padawan.

    Can you post the fstab line that you are trying to use to auto-mount your XP partition?

  • http://www.nicolecleary.com Nicole

    Okay, this is *completely* not on topic (don't hate me for it), but I don't have a youtube account so couldn't leave a comment on it. I just stumbled upon your “shortening Japanese” response video. So freaking hilariously wonderful. I can't believe you sat in the chair as Shin cut your hair and recorded all that. What a good sport he is. Very, very fun stuff, dude. Learned a lot. Enjoy how it jumps around to basically all the interesting parts of Imabari :P
    I miss you dude! Hair cutting part? Easily my favorite.

  • http://www.rockinginhakata.com Deas

    I'll ween myself off of it as you say, I know. But the familiarity is nice. It's my security blanket. Ha ha. Plus, at at least one school that I visit I use the wireless connection – Ubuntu's is shaky at best even with the Eee PC specific kernel. The XP driver blows it away in usability. A virtual box understands hardware indirectly if I remember correctly, which means the flawed wireless would become a problem for a virtual machine running XP. Until the Ubuntu team can lick the connectivity problem, I'm keeping XP around.

  • http://www.rockinginhakata.com Deas

    :-D You made my week! Thanks, Chuck! I miss you too. Hope NYC's treating you well.

    Shin was a really good sport, you're right. I asked him if I could record and he agreed but was worried about what I might ask him on tape so I explained the shot while he shampooed me. Ha ha. I'll be going to him tomorrow, actually, if timing permits. It's time to get another haircut. Ha ha. No videos this time, though. (At least I'm not planning any..)

    Also – OFF TOPIC?!? I HATE YOU!!!11!1! :-P

  • Andrew

    one of the options you might want to try is using Wubi (Windows UBuntu Installer) to install Ubuntu.
    This will create a virtual partition inside your windows partition (no partitioning at all) and sets up a dual boot.
    You also can do the entire install using windows since Wubi is and .exe program that is executed inside windows.
    This is the website: http://wubi-installer.org/
    This is Linux Journal's Youtube video explaining the install: http://www.youtube.com/watch?v=n5x9iJWXbUY
    And Tom Merritt from CNET explaining it as well: http://www.youtube.com/watch?v=3iILE007CMw

  • http://www.rockinginhakata.com Deas

    Err…thanks, Andrew…but Chris (i,cjw) already mentioned this above. And I'm quite happy with my dual boot partitioning job. I've no need to install Ubuntu inside Windows using Wubi, but it's a cool option for people who want to try it out. Anyhoo, thanks for the comment!

  • http://mistersanity.blogspot.com Jonadab

    Yeah, I always keep a FAT32 partition for data as well — well, I have done ever since my collection of data outgrew the 1GB FAT16 partition I kept it on previously. Data is just more accessible on a partition that a wide variety of operating systems can all read. If my workstation becomes unbootable due to hardware failure (which, yeah, has happened more than once), I can take the disk and plug it into pretty much any computer, irrespective of what OS it runs, and at least have access to my data. It's no substitute for backups (I mean, the disk itself can always go bad), but it tends to create significant convenience at moments when said convenience is really nice to have.

    The main downside is, FAT filesystems don't support symlinks, which is admittedly an unfortunate limitation. Also, foreign-language characters aren't necessarily preserved correctly in plain text files (but they're fine in files that provide their own charset infrastructure, e.g., ODF).

    And yeah, I haven't messed with ext4 yet either. I'm not sure I really see the point. If I could have an improvement to ext3, the only thing I'd really want is automatic versioning (like VMS has). But ext4 doesn't even attempt to go there. Mostly it's just perf tweaks, and that's all well and good, but for me it's just not compelling enough to move to something so new and untested.

    I dual-booted for a while as well, and then subsequently for a few more years I kept a working Windows partition around even though I never used it, “just in case”… but eventually I lost interest in putting for the effort to maintain it across hardware updates. I actually still have a copy of that whole partition sitting around, but there's no way it would be bootable on any hardware I have now. (The Pentium II motherboard died in a failed BIOS flash years ago…) I also used VMWare Workstation for a while, to keep the Windows option open, but I recently discovered that it won't even install on a modern Linux distribution. I suppose there's QEMU, but that sounds like a lot of bother just to run a twelve-year-old operating system that I never liked very much in the first place.

  • http://mistersanity.blogspot.com Jonadab

    Yeah, I always keep a FAT32 partition for data as well — well, I have done ever since my collection of data outgrew the 1GB FAT16 partition I kept it on previously. Data are just more accessible on a partition that a wide variety of operating systems can all read. If my workstation becomes unbootable due to hardware failure (which, yeah, has happened more than once), I can take the disk and plug it into pretty much any computer, irrespective of what OS it runs, and at least have access to my data. It's no substitute for backups (I mean, the disk itself can always go bad), but it tends to create significant convenience at moments when said convenience is really nice to have.

    The main downside is, FAT filesystems don't support symlinks, which is admittedly an unfortunate limitation. Also, foreign-language characters aren't necessarily preserved correctly in plain text files (but they're fine in files that provide their own charset infrastructure, e.g., ODF).

    And yeah, I haven't messed with ext4 yet either. I'm not sure I really see the point. If I could have an improvement to ext3, the only thing I'd really want is automatic versioning (like VMS has). But ext4 doesn't even attempt to go there. Mostly it's just perf tweaks, and that's all well and good, but for me it's just not compelling enough to move to something so new and untested.

    I dual-booted for a while as well, and then subsequently for a few more years I kept a working Windows partition around even though I never used it, “just in case”… but eventually I lost interest in putting forth the effort to maintain it across hardware updates. I actually still have a copy of that whole partition sitting around, but there's no way it would be bootable on any hardware I have now. (The Pentium II motherboard died in a failed BIOS flash years ago…) I also used VMWare Workstation for a while, to keep the Windows option open, but I recently discovered that it won't even install on a modern Linux distribution. I suppose there's QEMU, but that sounds like a lot of bother just to run a twelve-year-old operating system that I never liked very much in the first place.