Partitions for a Dual-booting OQO model 01+

This is part 2 of my write-up about installing Ubuntu GNU/Linux to dual-boot with Windoze XP on my OQO model 01+. The home page of this write-up can be found here.

Partitions

I started from the postition of having an essentially "blank" hard drive with no operating system installed, but I assume that most people reading this will have Windoze XP already installed from the factory. The major difference this makes is that I can do the first stage of my hard drive partitioning as part of the XP install process (see below) whereas most people will probably have to reduce the size of their existing XP partition to make room for GNU/Linux. There are several ways of doing the latter, but since I didn't do it myself, I can't really recommend any particular method.
UPDATE: After installing Windoze and playing with it for a while, I decided that I will only be using it when there is no alternative whatsoever. I therefore changed my mind about the partition sizes I wanted and resized my Windows partition. I used GPartEd, which you can find from the first link below. I chose GPartEd because it's free software (as in "free beer" as well as "free speech") and because without Linux installed yet, it seemed to be the option requiring the smallest download and simplest set-up to run. More details are below under the heading "GPartEd".
Here are some links that might help you to find something that works for you.

For anyone who is installing to a replacement hard drive like I did, I will now describe what I (initially) did.

(Re)installing XP in a new partition
First I borrowed a USB external CD-ROM drive (I have actually purchased one for myself, but it hadn't arrived yet when I was doing this), then I used it to boot up the OQO from its "reinstallation" CD as follows.

  1. Shut down the OQO if it is turned on, or on standby/suspend, or even hibernating.
  2. Hook-up the CD-ROM drive and insert the OQO reinstallation CD. Note that the OQO will not provide sufficient power to the CD-ROM drive so you will need to use a drive that can draw power from another source. The one I used came with a second USB cable that I hooked up to my laptop. Others (such as my new one that has now arrived) have cables that can take power from PS/2 keyboard/mouse connectors and some even have their own independent AC adaptors.
  3. Turn the OQO on.
  4. When the splash screen appears (or the BIOS screen if you've disabled the splash screen), press the 'FN' key repeatedly until its LED lights up (flashing or solid, it doesn't matter) then press the '2' key. This should get you into the OQO's BIOS setup screen.
  5. Set up to boot from CD-ROM. Open the "Startup" menu by pressing the down arrow, then press the down arrow a few more times to go down to "Boot device", and then press 'Enter'. Use the left and/or right arrow key(s) to move to the first little list of possible boot devices, then use the down arrow to change the selection from the hard drive to the CD-ROM drive. Now use left/right to move back to the 'OK' button and press 'Enter'.
  6. [optional] Turn off the splash screen ("Splash Boot Logo" in the "Startup" menu). This allows you to see the details of what's going on during boot up.
  7. Go to the 'Exit' menu and select the 'Save and exit' option. This will re-boot the OQO. Leave the OQO to boot up normally this time. If all is well it should find the CD-ROM drive and boot up into the Windows Setup program.
The setup program takes its time sorting itself out. Eventually you should come to a screen showing you the partitions that are currently set up on the hard drive (if any) and asking you where to install XP. I'm not sure if this screen appears when you already have one Windoze partition filling the whole drive. If not, then I guess you'll be stuck with resizing the partition, as discussed above.

Partition sizes
The Windows Setup on-screen instructions made it a simple matter to delete the existing partitions left over from the hard drive's previous use. Then I had to decide what size to make the Windoze partiton (or to put it another way, how much space to leave for GNU/Linux). There are a few considerations here

  • Linux can read both NTFS and FAT filesystems, and can write to FAT filesystems (and to NTFS filesystems but with limitations). If you install XP on a FAT filesystem then both Windoze and Linux can store files on that partition. However, native Linux filesystems provide extra features and better security, so you should generally only store non-critical data files on an XP partition from Linux.
  • Generally speaking, Windoze chews up more resources to achieve a given end than GNU/Linux does. This includes hard drive space. If you expect to use Windoze as your main operating system and only "play with" GNU/Linux then you should probably give Windoze the lion's share of the hard drive space (perhaps two thirds for Windoze and one third for Linux).
  • Linux tends to be more flexible about using filesystems on other storage such as USB RAM keys, etc.
having said that, I (initially) just opted for a simple 50/50 split because I don't think I'll need more than 10GB for either O.S.

If you plan to share your Windoze partition with Linux, then you should set up Windoze on a FAT filesystem. Otherwise NTFS is probably the way to go. Once you've set up a partition for Windoze, just leave the rest of the drive as "free space", and go on with the rest of the Windoze install as usual, following the on-screen instructions.

GPartEd
As I mentioned in the update above, I found Windoze XP to be little better than any of Micro$oft's previous so-called "operating systems", so I don't expect to use it except on the increasingly rare occasions when driver availability (or lack thereof) and similar issues leave me with no alternative. To that end, I decided to shrink my Windoze partition after all. Since I had not yet installed Linux and the whole point of this exersize was to make more room for the Linux install, I wanted something that would run on a Windoze-only system. I chose GPartEd because it's free software, it only requires a 30-odd megabyte download, and it's easy to get it going. However, I ran it from a bootable "live" CD, so if you don't have access to a USB CD-ROM drive then this option is not for you.

I downloaded the latest version of GPartEd (0.2.2-1 at the time of this writing) from http://sourceforge.net/project/showfiles.php?group_id=115843&package_id=173828, which I reached from the GPartEd Live CD page. The downloaded file is just an .iso image file ready for burning directly to CD. To boot your OQO with your freshly burnt live CD, just follow the instructions under the heading "(Re)installing XP in a new partition" above, but use the live CD instead of the OQO reinstallation CD. This version of the GPartEd live CD has a minor bug in the boot-up configuration. After it prints an error message followed by the "boot:" prompt, you need to enter the following and then press 'Enter'.
linux initrd=initrd.gz root=/dev/ram0 init=/linuxrc ramdrive_size=16384

Select your language and keyboard layout when prompted (most users will just press 'Enter' for the defaults), and select 640x480 resolution (the OQO screen is 800x480, so the bottom will be cut off if you select 800x600) and colour depth 24. After a short delay while the X Window System server starts up and GPartEd examines your hard drive, you should finally see the GPartEd screen. Click on your Windoze partition (almost certainly /dev/hda1) and then click on the "Resize/Move" button. In the dialog box that appears, enter the new size for the partition in the "New Size" text box and click on the "Resize" button. Now select "Apply" from the "Edit" menu and click on the "Apply button in the confirmation dialog box. Another dialog box appears telling you that the resize is being performed. Once it's finished, click on the "Close" button to return to the main GPartEd screen, which should update itself to show your now smaller Windoze partition and some "unallocated" space where you can install GNU/Linux.

Partitions for GNU/Linux
At the outset I had intended to set up the partitions for Linux using the Linux installer, but since I was already using GPartEd anyway, I decided it would be quicker and easier to use it for the Linux partitions too. If you don't have access to a USB CD-ROM drive, or if you have some other reason not to use GPartEd, then you can just leave the Linux partitioning for now and use the installer to do it later.

There are a number of different configurations you can use when setting up the hard drive partitions and filesystems for Linux. I won't attempt to explain all the different possibilities here because it would bog things down too much. I will just explain how I set up my own system and leave further research as an exersize for the reader.

I am using a 20GB hard drive with 5GB set aside for Windoze. If you have a bigger drive you might want to scale up all these partition sizes, or you can just throw all your extra space into the "main" partition (see below). First, I set up a partition for my backup system. I always do this as a fallback in case anything catastrophic happens to my main system (or in case I make a stupid mistake that makes my main system unbootable or something). You can think of this as being similar to "safe mode" and/or a system restore/rollback under Windoze. In actual fact, I install GNU/Linux on this backup partition first. Once I'm happy that the basic system is stable, I copy the whole system to the main partition(s) and that copy then becomes the main GNU/Linux system, leaving the originally installed system as my backup. Two gigabytes is probably enough for this backup system, but I made my partition 2.5GB just to be on the safe side. [I tried this with two different 20GB hard drives, and each one produced exactly the same errors in exactly the same place on the drive. However, when I shrank this partition back to 2GB I didn't get any errors on the following partitions that now had the "error producing" blocks in them. If you use a 20GB drive and you get error messages too, please let me know about it through Handtops.com]

  1. Click on the "unallocated" line underneath the line for your Windoze partition.
  2. Click on the "New" button.
  3. Enter 2560 [2048] in the "New Size" text box
  4. Click on the "Add" button
I usually use the "ext2" filesystem for the backup partition because it's a sort of lowest common denominator.

Next I set up a little "boot" partition. Among other things, this is a simple way of making the same kernel(s) available to both the main system and the backup system. (The kernel is the "core" of the operating system that does all the low level stuff like booting up the system and dealing directly with the hardware. Technically it is the kernel that IS Linux -- the rest of the operating system is the "GNU" part). This partition only needs to be very small. I usually make it 16MB, which is really overkill, but allows you to keep a couple of old kernels hanging around. The procedure is the same as for the backup partition, except the size is 16MB instead of 2560 [2048]. I use ext2 for this partition too.

I now had three partions. The hard drive's "master boot record" only has room for four partitions, and I still want to add two more. Fortunately, there's such a thing as an "extended" partition which can be subdivided into as many "logical" partitions as you like (well, there must be some upper limit, but it's a lot). Bring up the "Create new Partition" dialog as before, but leave the "New Size" at the maximum. Change the "Create as" selection from "Primary Partition" to "Extended Partition" and click on the "Add" button.

Next we want some swap space. Swap space is kind of like an extension to RAM: when some program wants more memory than is available, the kernel will try to "swap" inactive program(s) or data out to the swap space on the hard drive. When the swapped out program or data is needed again, it is reloaded from the swap space into RAM, possibly causing something else to be swapped out to make room. This system has its limitations and is nowhere near as good as having more actual RAM, but it's worth using unless you have more RAM than you ever expect to use.

  1. Bring up the "Create new Partition" dialog as before (click on the unallocated space line underneath the extended partition line, then click on the "New" button). This time the "Create as" selection should default to "Logical Partition", which is what we want.
  2. Enter 1024 in the "New Size" text box. This will give you 1GB of swap space (twice the amount of RAM in a model 01+), which should be plenty for most users.
  3. Change the "Filesystem" to "linux-swap"
  4. Click on the "Add" button

Finally, we come to the main partition. You can actually split your main filesystem across multiple partitions, and I often do, but on a drive this size I didn't think it was a good idea. I currently use the Reiser filesystem (reiserfs) for my main filesystem, but you might like to try ext3 or Reiser4. All the other settings in the "Create new Partition" dialog should be correct by default, so just select your filesystem and click on the "Add" button.

We're all done, so select "Apply" from the "Edit" menu and click on the "Apply" button in the confirmation dialog. Applying the changes will take a little while, so if you need a toilet break or want to make a cup of tea, here's your (first) chance. Once the changes have been applied, GPartEd updates the main screen. You may notice that some of your fresh new partitions already have numbers in the "Used" column. This is because the filesystems themselves use a little space and they may reserve some space for the "superuser". You can now exit the GPartEd program, but the live CD I used just sits there looking at you when you exit GPartEd. Ctrl+Alt+Backspace will terminate the X Window System server, but that just leaves you looking at a different coloured blank screen. I tried Ctrl+Alt+Del (Del = FN+Backspace), which caused some activity on the CD, but didn't seem to do much beyond that. In the end I just switched off the OQO by holding down the power button, ejected the CD (which required disconnecting the CD-ROM drive from the power and then reconnecting it because the live CD have left the drive in a locked state), and turned the OQO back on again.

< Previous
Home
Home Next >
Setting up the GNU/Linux installer from Windows