partitioning hd for ubuntu/xbmc setup

Soldato
Joined
16 Feb 2004
Posts
4,907
Location
London
Hi,

I'm trying out different installs of ubuntu/xbmc/xbmclive on a little ion box for use as a media centre, how's the best way to format my HD?

The ubuntu/xbmclive installers let me setup the HD as OS (15gb) & Swap (5gb) but how do I do the rest as a media partition? I'm wanting to be able to reinstall the OS without loosing the media partition data. I'm still getting my head around the linux FS and was guessing if I did a separate partition as say Home then it will get overwritten with a reinstall?
 
If your media partition is ntfs then ubuntu will be able to read it automatically, you'll just need a boot partition and an os partition.
 
I'm afraid I don't have any experience with xmbc, so I'm going to assume any xmbc derivative of ubuntu uses the same installer.

As a side note by the way, I don't know how much ram you have but a 5gb swap partition is a little on the large side. If you are planning on hibernating it needs to match the size of your ram, otherwise I'd argue with modern hardware you don't need one at all. Neither my laptop (3gb of ram) nor my desktop (4gb of ram) have swap partitions and I've never had an issue. If I were you I'd have a swap partition just to be on the safe side but 5gb seems a little extreme.

Anyway, to your question. I'm not sure how much you know about unix partition management but I'll start from the basics. Apologies if it's a little patronising and you know all this.

In unix based OS's partitions basically work that you have to 'mount' partitions. Mounting is essentially assigning an empty directory somewhere on your computer to contain the data in your partition. It can be any directory on your computer, as long as it's totally empty. So say you have a second partition called /dev/sda2, and you want to mount it to a folder /Data, you assign the mount point to the partition in the installer and hopefully once it's installed all of the information on /dev/sda2 should be in the folder /Data. It's important to note that if you actually navigated to /dev/sda2 you'll find it's not human readable. Partitions must be mounted before you can read them.

As a little side note, this process happens even when you put in removable media. An automated process creates a folder, mounts the media to the folder, and then deletes the empty folder when the user ejects it. Just a little random fact for you :).

Now /home is a little bit special. You can mount this on a separate partition (and at a guess I'd say most people do), but in so doing you also are keeping your personal settings on a separate partition. This means that if you replace the OS and don't format that partition, you can keep all your personal settings as well as whatever media you've put on that partition. It will only get overwritten if you click the 'format' tickbox in the install :)

Personally I don't keep /home on a separate partition, but I'm weird and I like a fresh start when formatting OS's. If you want to do the same as me just tell the partition manager to mount your media partition anywhere (I sometimes use /data, as an example) and it'll create the folder for you and sort everything out.

I hope that helps anyway :)
 
Last edited:
Personally I don't keep /home on a separate partition, but I'm weird and I like a fresh start when formatting OS's.
You're not weird (or at least not alone in being so) - I have /home on the root partition as well, and in the event of a format it gets blown away with everything else (after backing up anything important, obviously). Possibly not necessary, and maybe just a hangover from my Windows habits, but I just like to start with everything fresh on a new installation, particularly after a major distro upgrade.

You can always use hard links in /home to point to stuff on other partitions anyway, if you're so inclined. :)
 
I have to agree on the SWAP front, 2GB RAM here and in Mint i never go over 512MB unless i'm gaming, if i'm lucky my 1.5GB SWAP partition might say something like 0.1% but it's really just for older systems now, it's only used for when you run out of physical RAM and it needs somewhere to store processes while it frees up some space.
 
Cool cheers, it's a Foxconn nt330i with atom 330, ion & 2gb ram. The default installer just set's up a 5gb swap file if left alone so wasn't sure if that was a recommendation.
 
Back
Top Bottom