UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Ubuntu Studio 13.1, Debian Stable (Wheezy)
Posts: 68
Rep:
The fstab problem that should have been
Ok, I think this is strange, but maybe I just need more education.
I month or so ago I deleted a partition that resided before my root partition, which shifted the numbering and broke Grub. I fixed Grub and everything was back to normal. (Ubuntu was installed into one partition plus a swap--the default--which I couldn't figure out how to change at the time...). After fixing Grub, I totally forgot about changing the mapping to / in my fstab.
Several weeks went by, and I did various things including some software updates and installs. Every was fine. The other day, I finally got around to to moving /home into one of the empty partitions I had created. When I went to edit the fstab, I discovered that all this time it had been mapping root to the wrong partition, which was actually an NTFS partition.
So I am wondering, why didn't this break my operating system?
Distribution: Gentoo (desktop), Arch linux (laptop)
Posts: 728
Rep:
What a strange things (are your computer haunted?).
Would you mind to post your fstab file and describe your hard disk partition please?
It is such a strange problem that I wonder I could help you but I may know somethings not useless
As I understand you, nothing is actually wrong or corrupted - at least not that you know of! - you're just qurious as to why the system worked?
So am I
... but it has happened to me a few times too!
What is happening is that in your grub.conf (or similar) the root-partition is specified, it has to be a valid partition or you can't boot.
Then /etc/fstab states some other partition is / - and you end up with two partitions mounted on / !
It happens, system works - can't tell you why it works though...
Distribution: Gentoo (desktop), Arch linux (laptop)
Posts: 728
Rep:
Forgive me but your system seems to be OK.
You changed the root partition to /dev/hda5 and fstab mount /dev/hda5 as / . It is OK.
/dev/hda2 is mounted as your /home directory, nothing wrong with this.
The only strange things is why didn't you mount partiton from other disk.
Would you mind repeat your problem with more details please, what are you suffering???
Distribution: Ubuntu Studio 13.1, Debian Stable (Wheezy)
Posts: 68
Original Poster
Rep:
Pingu --
Yes it's correct that nothing was ever wrong; everything was working fine. I just wanted to know *why* it was working fine when I was mounting the wrong partition. Thanks for the explanation!
TruongAn --
I'm not sure what you meant by this question:
> The only strange things is why didn't you mount partiton from other disk.
Distribution: Gentoo (desktop), Arch linux (laptop)
Posts: 728
Rep:
You said you mount the wrong partition but I don't see any wrong partition? Please be more clearly, Which partition do you think was wrongly mounted?
You have a lot of partition, why don't you mount them all?
Distribution: Ubuntu Studio 13.1, Debian Stable (Wheezy)
Posts: 68
Original Poster
Rep:
Hello TruongAn,
Sorry about the confusion. If you look at my partitions you'll see that hda7 is NTFS. *Before* I fixed fstab, it was trying to mount the NTFS partition as the / partition. At the same time, Grub was booting hda5, which is the correct one. So it looks as though Grub saved me from my error, since the system was working fine.
When I discovered my error, I changed the fstab. What you see in my post as hda5 was hda7 before I fixed it...
Distribution: Gentoo (desktop), Arch linux (laptop)
Posts: 728
Rep:
Quote:
Originally posted by beebelo Hello TruongAn,
At the same time, Grub was booting hda5, which is the correct one. So it looks as though Grub saved me from my error, since the system was working fine.
I think so, Did you specify the root=/dev/hda5 kernel parameter in GRUB?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.