How do I correct FSTAB?

Alan McKinnon alan at
Mon Sep 18 14:19:35 UTC 2006

On Monday 18 September 2006 15:36, Ted Quick wrote:
> I just installed Kubuntu Edgy in a partition that had my
> first (somewhat flawed) copy of Kubuntu Dapper in it. I have
> another (better working) copy of Dapper in a different
> partition.
> Now I can start the new Edgy partition, but have no way to
> start the earlier Dapper partition since it doesn't appear in
> the new fstab file. I tried editing the fstab file in Edgy by
> copying the Dapper fstab into it.

No, don't do this, you can't just copy fstab from one system 
into another one and hope it'll work - the layout of the 
partitions are different between systems and it's a certain way 
to screw things up royally, as you just found out.

> THEN all I got for a while was a terminal screen when I tried
> booting up. Seemed to stop there, but then this morning I
> just waited and it finally loaded the EDGY gui.
> So right now the Egdy fstab file reads:
> # /etc/fstab: static file system information.
> #
> # <file system> <mount point>   <type>  <options>      
> <dump>  <pass> proc /proc proc defaults 0 0
> /dev/hda3 / ext3
> nouser,defaults,errors=remount-ro,atime,auto,rw,dev,exec,suid

remove this line above, it's the relevant entry for Dapper. You 
also have a $ at the end of the line, that doesn't belong 
there - remove it and replace it with '0 1'

> $ /dev/hda1 / ext3
> nouser,defaults,errors=remount-ro,atime,auto,rw,dev,exec,suid 

This line is correct

> $ /dev/hda6 none swap sw 0 0

this line is correct

> /dev/hdb /media/cdrom0 udf,iso9660
> user,atime,noauto,rw,dev,exec,suid 0 0
> #Added by diskmounter utility
> /dev/hdc1 /media/hdc1 vfat rw,user,fmask=0111,dmask=0000 0 0
> #Added by diskmounter utility
> /dev/hdc5 /media/hdc5 vfat rw,user,fmask=0111,dmask=0000 0 0

These all seem OK
> This is a direct copy of the earlier Dapper file. Dapper is
> on hda3, Edgy on hda1 BTW.
> I also tried to change the Active partition using Qparted, at
> whichpoint it stopped booting up as easily.

This is a meaningless concept under Linux. It means something to 
some of Microsoft's stuff, but grub completely ignores it.

> HOW do I change the FSTAB file to get the 3 way boot
> capability that I had before back?

Make the changes above to the /etc/fstab file on hda1. Reboot to 
make sure it works. Then you need to edit and fix the 
corresponding file for dapper which is on a different 
partition. Easiest way is to mount /dev/hda3 at some convenient 
place like /mnt/hda3 and you can edit it from there. Reboot 
into dapper and check that it works.

I highly advise you to be very familiar with the structure 
of /etc/fstab, different partitions and how the system first 
boots up. There's no substitute for knowing how this works. 
Luckily there's full complete information in the Ubuntu docs 
and on the web site.

If you still get stuck, ask here again but we'll need more info:

Which partition has your boot loader
The output of 'sudo fdisk -l' (plus a description of what is 
what in there)
Contents of /boot/grub/grub.conf
Contents of /etc/fstab for each installed system


More information about the ubuntu-users mailing list