Solved Mounterror due to wrong contents of /etc/fstab file (after installing Ubuntu)

  • Initially i only had windows OS on my hard disk of 1 TB. The size of windows partition was ~300GB. I created two partitions: 150 GB and 450GB.
  • I wanted to install the FreeBSD operating system on 150GB part. I followed instructions from the manual, downloaded the memstick image and prepared a USB for this.
  • I booted into the USB and was able to install the FreeBSD in the 150GB partition successfully.
  • I checked that the Windows, FreeBSD were bootable manually. (In case of FreeBSD i came to the conclusion that everything was ok, as, when i booted i was treated with shell prompt to login and when i logged in, there were no issues -- apart from wifi issues)
  • Now, in the remaining ~450GB i wanted to install Ubuntu GNU/Linux Distribition.
  • While installing the Ubuntu: installer showed an option to install Ubuntu alongside existing Operating systems (i.e windows and freebsd). I selected that option and waited for the installation to complete.
  • Installation was complete and i started checking whether everything works (i.e all OSes boot properly or not).
  • Windows and Ubuntu booted properly but freebsd failed to boot. (It failed with Mounterror)
  • freebsd when trying to boot was showing a mount error (~ failed to boot at ufs:/dev/ada0p9).
  • I didn't understand what the problem was and searched through the web to find out the potential problems that can cause this and didn't find any.
  • I decided to install freebsd again in the slot and mounted the system using freebsd live usb.
  • When i was trying to find the partition which had the freebsd in order to rewrite it and install it there, i found that the partition is at /dev/ada0p6.
  • I then realized that the mount point freebsd trying to mount is wrong.
  • Booted into the live usb freebsd, mounted to the /dev/ada0p6 and changed the fstab file from /etc/fstab. It showed that '/' was at /dev/ada0p9, i changed this using 'edit' to /dev/ada0p6 and the next one to /dev/adap7.
  • After doing this, i was able to boot into freebsd successfully.

What was the reason for this to happen? Did ubuntu installer somehow change
the names of partitions causing problems with contents of fstab?

I am just curious to know the reason behind this problem. TIA!
 
Last edited:
Please look again at the partition names, adaps* doesn't exist, it's wrong. Disks are ada0 or ada1, with GPT partitions are named ada0p1, ada0p2, etc. With MBR you could have slices; ada0s1, ada0s2, etc. Since there can only be 4 slices on a MBR partitioned drive, s9 makes no sense at all. You consistently name partitions adapsX, which makes even less sense, no drive number and both a slice and a partition?

It's imperative you get the names correct.
 
Thanks for the reply.

I have made a mistake while writing the post, It is `ada0p*`. ( I have updated the post)

But my question remains same. Is it possible that when an operating system is installed, there may be changes to the names of the partitions without '/etc/fstab' file getting updated?
 
Is it possible that when an operating system is installed
Only if partitions have been added or removed that are before the FreeBSD partitions. Then the numbers might shift. Partitions are numbered in the order they appear on disk, not in the order they have been created. One simple way of avoiding this is to use labels instead of hard partition names.
 
  • Thanks
Reactions: ymd
Only if partitions have been added or removed that are before the FreeBSD partitions. Then the numbers might shift. Partitions are numbered in the order they appear on disk, not in the order they have been created. One simple way of avoiding this is to use labels instead of hard partition names.
Yes, the Ubuntu partition was added after the FreeBSD partition.

Thanks for the clarification.
 
Back
Top