Build your own PC Part III

Although somewhat belatedly, here is a brief discussion on what has happened since I finished building Lobsang.

The system has been very stable and reliable. It is quiet. And it performs well.  There have been a couple of niggles with the software installation that I would like to mention and also briefly I wanted to cover partitioning as a reader requested it.

Software

As with most of my computers I installed Ubuntu Linux on this one. Due to some kind of incompatibility with the BIOS and my shiny new graphics card, I ended up installing the pre-release (Alpha 5) of Ubuntu Intrepid Ibex, the 8.10 version. It’s been very stable throughout the time I have been using it but the graphics card has been problematic.

Initially I had quite a few difficulties using this new NVIDIA 9500GT card which made me simply drop back to using the default and OSS “nv” driver instead. That was fine as I needed the machine for work so I was quite happy to wait for eye-candy support. When 8.10 was actually released I re-enabled the NVIDIA binary drivers for my hardware. Initially it seemed OK and worked but I was limited to a maximum resolution 768×1024. My monitor can handle quite a bit more than that.

It turns out that one of the big changes in 8.10 is with Xorg. The configuration file /etc/X11/xorg.conf is basically empty and everything is auto-configured. This is fine as long as the detection process works. My monitor is connected to the VGA port of the graphics card, via a Belkin KVM switch. I think this is preventing the monitor from being detected and hence I am left with a minimal option for configuring my monitor.

Using the nvidia-settings application allows me to change the screen resolution to something more sensible but the changes I make are not persistent, even when I have run it as root. I have tried to “hard-code” the relevant settings in my xorg.conf but on each reboot the monitor has defaulted back to the standard 1024×768 resolution. It is a tad annoying, but hopefully there will be a fix shortly – or if I get a new shiny TFT for Christmas the problem will probably go away anyway.

Partitioning

Here is the partition table I am using on Lobsang:

Partition Flags Part Type FS Type Size MB
sda1 Boot Primary Linux ext2 526.42
sda5 Logical Linux ext3 15726.74
sda6 Logical Linux ext3 15726.74
sda7 Logical Linux ext3 15726.74
sda8 Logical Linux XFS 268168.81
sda9 Logical Linux swap / Solaris 4194.90

As you can see I have split my disk into 6 partitions.

  • sda1 is a small boot partition so that I can have multiple OS’s kernels and a common grub to load them all (Linux distributions, not that “other” legacy operating system.) in one location.
  • sda5, sda6 and sda7 are each 15GB partitions that I have for the operating system’s / file system. I could have, for example, Ubuntu 8.10 on sda5, Kubuntu on sda6 and Fedora on sda7. 15GB should be more than ample for most installations. My current Intrepid installation – with lots of space hungry apps installed – is only using 4GB.
  • sda8 is my /home partition. All 270GB can be used (shared) by any of the OSs and it also makes re-installing an OS a breeze as all my settings and data are stored on a separate and OS independent partition*.
  • sda9 is the swap partition. Typically it is made to be about twice the size of the available RAM. I recall reading somewhere quite some time ago that it is advantageous to have it at the “end” of the disk although I can’t recall why. Maybe it is at the fastest part of the disk or something…

Also note I am using the XFS filesystem for the home partition. There are two reasons for this. The first is it has better performance for very large files, like all those ISOs I keep downloading and virtual machine images etc. And also it is more efficient space wise. I probably gained about 4-5GB of space over the more traditional ext3 filesystem on a disk this size.

* Adrian over at Mercian Labels posed a question about this very subject on his blog recently. I suggested using a separate partition for /home for these very reasons.

Tags: , ,

8 Comments

  • […] I have just written up a Part III which does discuss the partitioning scheme I employed on this […]

  • menek says:

    Wow, very informative. I didn’t know it is possible to share a boot partition between different distributions/releases. It would be great if you explain it in more detail in another post.

    Thanks!!

  • Scott Wegner says:

    Very informative writeup indeed. I also keep my /home directory on a separate partition for ease of backup / reinstallation, but have always been weary about sharing it between OS’s. The benefit, of course, is that your settings and data are available to shared programs on separate OS’s. But what if two distros have different versions of a particular program, and the later version uses a newer dot-file format. The newer version would sensibly upgrade the settings format automatically, but leave the older version with something it doesn’t understand.

    I don’t have a concrete example of this, but with all of the various programs I use on a regular basis, surely it’s a possibility in some of them (perhaps the latest version of program-a has migrated to gconf, and thus converts all settings..). Have you run into any such troubles?

  • Guillaume Muller says:

    Hi,

    A few words about your blog.

    I like it very much! I find there many interesting infos (and in relation with education, which is my field ;)). Also, I must admit that usually hate Unbuntu and Ubuntu fans, because it/they focus/es more on eye-candy than in making things that works. What I like very much reading you is that you’re very practical and never try “evangilizing” people to use it. You’re simply tolerent and open (minded) 😉

    OK. Now about this particular post.

    About putting the swap at the end, I don’t see any reason, but I’m not an hardware expert. In the OpenBSD FAQ there is:
    “(sparc/sparc64) Don’t put swap at the very beginning of your disk.”
    As you can see it is only for sparc machines. Maybe this is something like that that you read?

    Also, I read somewhere (OpenBSD FAQ?) that if using the rule of thumb of “swap = 2 * RAM” was OK in the 90s, it is deprecated with the recent machines. The swap is almost never used now thanks to the HUGE amount of RAM that we have now (my first machine had 32M, but I’m sure you guys had experiences with less ;)).

    For Scott Wegner, about sharing /home. Yes that can create troubles. For instance I wanted to do it because I use Slackware on one slice and OpenBSD on another slice of my disk. I finally didn’t do it (based on the same fears as you express). Unfortunately, just as an example to confrim your fear, I managed to share the .firefox and .thunderbird dirs. I discovered, that Firefox 2 (oBSD) and Firefox 3 (Slack) are not using the same way of storing bookmarks, so I’ve a “Frankensystem” now with 90% of the config shared and 10% not shared. Idem, aMule (2.1 in OBSD and 2.3 in Slack) seems to have troubles hashing the file correctly at start and I lost some almost finished downloads (to be confirmed, however).

    My 2 cents 😉

    GM

  • Guillaume Muller says:

    I was right, OpenBSD FAQ!
    http://www.cyberciti.biz/tips/linux-swap-space.html
    There are some interesting explanations. About why swap = 2 * RAM is a non-sense.

    Also linux 2.6 (and OpenBSD) allow swapping to a file. So reserving a partition of a fixed size is not needed anymore 😉

    Some more thinking about the “do not put swap partition at the beginning” rule: maybe it is because swapping is disk-intensive, therefore it is better not to f*ck up the disks heads of the beginning sectors, otherwise the disk becomes useless (sector 0 is needed for boot)??? But I’d like the actual reason if one of you have it.

    Cheers

  • Alan Lord says:

    @Menek, Hi and thanks for the compliment. The separate boot partition just serves as a place for all the kernels and your menu.lst. It isn’t trivial to manage as some distros like to “own” the boot partition so sometimes you have to stop them from overwriting your menu.lst file but in the main, when you install a distro, use the manual partitioning option and just tell it where the /boot partition is and to not format it.

    @Scott, Hi and thanks for the compliment too! You are right. Some applications will conflict and cause you headaches. I had a problem a while ago where I was trying Kubuntu on a different partition and each time I booted Ubuntu instead it caused GDM to ask me every time if I wanted KDE as the default WM (or something like that). So it’s can be bit of a pain, but for backup/restore purposes it is worth it. For handling multiple OSs you could always create different user accounts for each OS. Their details (passwd,group,home-dir etc) are stored in /etc so each OS will only “know” about it’s own user accounts although you will still have access to all the accounts via sudo…

    @Guillaume, many thanks for your kind words. I’m glad you like my blog.

    Thanks for that link. That makes a lot of sense. As I only have 2G of RAM and a 320GB HDD using 4G for swap doesn’t seem like a big deal. I guess for servers the needs will vary dramatically but that’s a good article.

    As for where to put the swap, I really can’t recall where I read it and it was quite a while ago (i.e. several years). I’m sure there will e pros and cons to putting at the end, but it is just they way I have become used to doing it. If I find time I will try and do a little research and see if there is any decent analysis of this. Thanks again.

  • […] said that, I took the opportunity yesterday to migrate my main desktop PC from Ubuntu 8.10 Intrepid to the soon-to-be-released 9.04 Jaunty Jakalope and I also upgraded my […]

  • Juan G says:

    Hi, thank you very much for the detailed explanation.
    I am implementing a multi-boot Linux using your partitioning scheme.

    I have a couple of questions:

    1. What tools do you use to backup? I understand /home or / and other distro root partitions can be simply copied to an external hdd with cp -Rf /home /media/exthdd for example (?). However, I am concerned that this may not work with the /boot partition and the MBR?

    Also I would rather use a simple tool to backup the entire hard drive, as I do with Acronis True Image on Windows. Do you know of any open source tool for that?

    (I have tried Clonezilla. It mounted the external HDD fine when I had only 2 partitions on my PC, but now that I have 7, it does not allow me to select the external HDD as image repository)

    2. When I install the second (3rd, 4th) linux OS, what is the best way to make sure the MBR and /boot have the right configuration to boot all the installed OS.

    The reason I am asking is that I have had a problem regarding this: I first installed Fedora 11, then when I installed CentOS 5.3 the installer re-wrote erased the /boot partition and Fedora was linked with chainloader, which did not work, of course. So I went in and modified the /boot/grub/grub.conf file. I managed to get it working after much trial and error, but all this time I had the feeling that there must be a better way to do it and maybe I should ask you.

    After CentOS gave me some other problems (not related to multibooting) I decided to start again from scratch and now I have your partition scheme and only Fedora installed on with root in /dev/sda5 (ext3), /boot mounted on /dev/sda1 (ext2) and /home mounted on /dev/sda9 (xfs).

    I am going to install UBUNTU. How should I do it so that it does not destroy my current grub configuration.

    Thanks!

    JG

Leave a Reply

XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>