Each time I change my partitions, I have to do 'it' again. Yes, you know what I mean. Change /etc/fstab to point to the new partitions. Or suppose I insert a USB harddisk with more than one partition. I either have to mount those partitions myself, or edit, yes again, /etc/fstab. But then I reboot without the external drive attached.... "Kernel panic, filesystem not found". That happens automatically when you have a ext2/ext3 filesystem in /etc/fstab that doesn't exist.
Now, you might say "You don't often change your partitions, do you?" Yes, that's true. But think of a newbie. Installs Ubuntu, likes Ubuntu, says "Hey this Linux thing is wicked, lets try uhm... say Mandriva". Good, he installs Mandriva, but what happens? The partitions are messed up, Ubuntu won't boot anymore. In a very bad case, the previous Ubuntu /-partition had the same name as the /-partiton of the other Linux install, resulting in something very messy.
Now, this all can be avoided very easy. Like any problem, solving this problem requires eleminating the root of the problem. Yes. /etc/fstab. But how do we have to eleminate it? Simply removing it isn't an option, since that would result in a kernel panic. So, you say, "Well it's simply impossible to eleminate /etc/fstab". Think again. Mac OS X is a good example of a Unix system that doesn't require /etc/fstab. Even better: /etc/fstab contains a single line: "# This file is present for backwards compatibility. It may be removed all together from future versions." This can become reality for Ubuntu too. How, do you say? Very simple actually. Somewhere in the early boot process, mount -a gets called. As we all know, this will mount everything in /etc/fstab. So remove that. Next we need something to replace it. A daemon that cooperates with hal, udev, ... to check for new devices. Or even merge hal and udev with this daemon. The daemon -- lets call it "mountd" -- will check for any new filesystems. It checks if it can mount it, if it can, it will do so, at a predefined location, such as /media/devname where devname is something like hda1, sdb3, ... This directory will be created if it doesn't exist. It also has to check if a filesystem hasn't been just unmounted by the user, so it won't remount it again. This can be done by patching umount to log the devices it has unmounted.
But how about special mount-points? How about homedirectories? Well, that's solvable, too. In the root of each partition which has to get mounted on a special location, a text file called ".mountpoint" will be created which contains the path where to mount that partition, e.g. /home. Mountd will check for such a file once a partition is mounted, next it will unmount that partition, and remount it on the proper location.
[....]