Category Archives: partition


Since it is always a bit of a headache getting the partitions right when upgrading, I am noting down here my partition setup for future reference – though it might change. I’m dual-booting with Ubuntu and Windows 7.

Partitions 500 GB hard disk /dev/sda (Master Boot Record)

  • DellUtility /dev/sda1 (41 MB, Hidden W95 FAT16 (LBA) (0x1e))
  • RECOVERY /dev/sda2 (16 GB, HPFS/NTFS (0x07))
  • OS (Win7) /dev/sda3 (107 GB, HPFS/NTFS (0x07))
  • 377 GB Extended /dev/sda4 (W95 Ext d (LBA) (0x0f))
    • Stuff /dev/sda5 mounted at /media/Stuff (268 GB, HPFS/NTFS (0x07))
    • 10 GB Filesystem /dev/sda6 mounted at /home (10 GB, Linux Ext4 (0x83))
    • 8.2 GB Swap Space /dev/sda7 (8.2 GB, Linux swap (0x82))
    • 90 GB Filesystem /dev/sda8 mounted at / (90 GB, Linux Ext4 (0x83))

Mounting FAT32 partition automatically at boot

In Gutsy, all my partitions would be mounted automatically at boot. At the time I was thinking that I want that for my FAT32 partition, which I store most files on, but not for my NTFS (windows) partition, which I generally don’t need access to.

After installing Hardy, things have changed around and neither of those two partitions are mounted automatically. They mount when I choose them in the “Places” menu. That is good for the NTFS partition, but quite annoying with the FAT32 partition, as I have photos, music files, wallpapers, etc on there. Which means, to play a song I first have to click on the drive to mount it and then load the media player (banshee, or…). Also, my wallpaper doesn’t show up until I have clicked on (i.e. mounted) the partition.

So, after some searching, I found some instructions about how to edit the /etc/fstab file. This page here is quite useful among others:

It seems that the fstab file has changed somewhat with Hardy, and the changes seem pretty difficult to understand for a newbie like me, but I decided to try it out following the somewhat older instructions. This is what I have done:

  • backup fstab: sudo cp /etc/fstab /etc/fstab.backup
  • make a directory to mount the partition in: sudo mkdir /media/fat-partition
  • find out about my partitions: sudo fdisk -l
  • edit fstab: sudo gedit /etc/fstab
    …added the line: /dev/sda3 /media/fat-partition vfat defaults,nosuid,nodev 0 0
  • save and reboot

…I am writing this just before the reboot, so lets see what happens…

UPDATE: at first it seemed to work… but then it didn’t. I have postponed solving this issue until after the Intrepid Ibex upgrade. Perhaps it won’t even be there anymore.

Hardy Heron / Ubuntu 8.04 install

I have just upgraded to Ubuntu 8.04, and thus there are some new things to blog about.

I could not actually upgrade, as I got this error every time I tried:
Could not calculate the upgrade
A unresolvable [sic] problem occurred while calculating the upgrade.

So, guessing that it may be caused by “unofficial software packages not provided by Ubuntu” I uninstalled/disabled the following:
BlueMarine, easyTAG, Firefox add-ons, flashplugin-nonfree, Flock, Gnomad, GQview, gstreamer plugins bad, ugly and ffmpeg, gxine, libdvdread3, LightZone, MPlayer, multiverse sources, NVidia restricted drivers, Picasa, pysdm, Skype, Sun Java, VLC
Still, every time I tried upgrading the same error popped up.

So, instead I did a fresh install of Ubuntu, which went well. I don’t find the partitioning part well done for someone who’d like to keep his existing Windows installation. I chose manual configuration, deleted the existing Ubuntu (7.10) partition, and chose to reformat it as ext3 as root partition… all the while not being sure whether I was doing the right thing…

To-do list

Now that I’ve upgraded to Ubuntu 7.04, here’s a note to myself of things I can think of now that I still need to do:

  • Keep windows in /boot/grub/menu.lst
  • Every time there is a kernel upgrade (or after upgrading to Feisty), the menu.lst file gets changed. That file lists what operating systems choices GRUB lists upon bootup. I dual-boot between Ubuntu and WinXP. After every upgrade, however, WinXP gets deleted from the list. I have learnt to backup the old menu.lst and restore the appropriate lines of code to it afterwards, but it is annoying. So I have to find out how to tell Ubuntu to keep that choice there when upgrading.

  • Does linux keep all the old kernels around? (i.e. there are more and more options in GRUB) Can I get rid of old ones and save disk space?
  • Wireless networking
  • Before the Feisty upgrade NetworkManager has given me all sorts of headaches when trying to connect to wireless networks. Need to investigate situation now and see what needs to be done…

  • Have DVD’s autorun in VLC player instead of gXine.
  • Move the home folde to a different partition… maybe
  • Get rid of the icons for my different partitions on the desktop
  • I can access them through the > Places menu. However, do show icons for inserted media such as CDs or USB sticks. Also, I want to make the “DellUtility” Partition, that presumably is factory installed from Dell, totally disappear from view.

  • Install beagle, tracker, … desktop search?
  • Experiment with desktop effects?

…I’m sure there will be more.

Editing /boot/grub/menu.lst to change the GRUB boot menu

UPDATE (April 2010): The information in this post is outdated! Most linux distributions, including Ubuntu, are moving to GRUB 2. Because the contents of this post is about the previous version of GRUB, it is fast becoming obsolete. More about GRUB 2 here:

I have an Ubuntu/WinXP dual-boot machine. The GRUB bootloader menu allows me to boot into several Ubuntu options or into WinXP. Unless I have to fix something (which I hope I won’t have to), I only ever choose the main Ubuntu option or WinXP. These options are, however, at either ends of the list. I’d prefer them to be next to each other for quick access.

Here’s a helpful reference. And here’s what I did:

The GRUB boot menu configuration is in the file

1. backup
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst-backup

2. edit
sudo gedit /boot/grub/menu.lst

3. Move the paragraph with the WinXP options up the list.

4. Change default to 1 (was 0)
default 1

5. comment out the lines about “Other operating systems

So now I have the following options when booting:

  • Microsoft Windows XP Professional
  • Ubuntu, kernel 2.6.17-10-generic
  • Ubuntu, kernel 2.6.17-10-generic (recovery mode)
  • Ubuntu, memtest86+

…and the second option is automatically selected and boots-up after 10 seconds if I don’t do anything.

Here is the contents of the resulting file (showing only the uncommented lines)

default 1

timeout 10

title Microsoft Windows XP Professional
root (hd0,1)
chainloader +1

title Ubuntu, kernel 2.6.17-10-generic
root (hd0,4)
kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/sda5 ro quiet splash
initrd /boot/initrd.img-2.6.17-10-generic

title Ubuntu, kernel 2.6.17-10-generic (recovery mode)
root (hd0,4)
kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/sda5 ro single
initrd /boot/initrd.img-2.6.17-10-generic

title Ubuntu, memtest86+
root (hd0,4)
kernel /boot/memtest86+.bin

I should emphasize the importance of the first step, i.e. backing up the original file. I’d like to quote a comment on a relevant website here for future reference:

TuxGirl wrote: As a side note, I think itโ€™s important to mention that, if you do manage to completely mess up your grub.conf [or] file to the point that your machine wonโ€™t boot, you can fix it by booting into a livecd (like the Ubuntu livecd or Knoppix or DSL or *something*), and then copying your backup grub.conf [or] over while in there. In fact, this method is great whenever you do something to your system that makes it temporarily unusable.

Read/write to FAT and NTFS partitions

After initial installation neither my FAT or NTFS partitions would be found and the Ubuntu help is not of much use to me (see here, here and here).

I installed pysdm using Synaptic package manager, after reading above forums. After installing it, it appears as > System > Administration > Storage device manager
confusion: is it called “pysdm” or “storage device manager”?

Decided to make folders for the NTFS and the FAT partitions in /media:

cd /media
sudo mkdir ntfs_windows
sudo mkdir fat_files

Then ran pysdm and chose those folders as mountpoints. Tried it more than once, had to use the “assistant” to mount and make accessible the NTFS partition. Partial success: both partitions are found, NTFS is read only, FAT is read/write.

Looked for info on how to get NTFS write access. Installed ntfs-3g using Synaptic.

Then followed the instructions on that page…
sudo cp /etc/fstab /etc/fstab.bak
gksudo gedit /etc/fstab

…in the fstab file changed the line for the ntfs partition to:
/dev/sda2 /media/ntfs_windows ntfs-3g defaults,locale=en_GB.utf8 0 0
…rebooted computer and had full read/write access to the NTFS partition!! ๐Ÿ™‚ (I needed this to repair a badly damaged windows installation on that partition)

Note: to see what partitions there are: sudo fdisk -l

To make FAT partition writeable, changed line in fstab to:
/dev/sda3 /media/fat_files vfat iocharset=utf8,umask=000 0 0

Plugged in external USB hard drive (Trekstor/FAT): works perfectly. ๐Ÿ™‚

Ubuntu installation

There is very little to say about installing Ubuntu 6.10 Edgy Etch on my Dell Precision M70 laptop: everything seems to “just work” …so far
I have yet to check whether all the hardware is recognised and configured correctly (e.g. graphics-card, wireless, etc.).

Partitions: chose “use largest unallocated space on disk for partitioning” (similar wording?) for partitioning. I had already pre-partitioned the hard drive with an NTFS-partition containing WinXP, a FAT-partition for my documents and files, and free space for linux.