LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 10-31-2005, 08:28 AM   #1
beebelo
Member
 
Registered: Mar 2005
Location: USA
Distribution: Ubuntu Studio 13.1, Debian Stable (Wheezy)
Posts: 68

Rep: Reputation: 15
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?
 
Old 10-31-2005, 09:03 AM   #2
TruongAn
Member
 
Registered: Dec 2004
Location: Vietnam (Việt Nam)
Distribution: Gentoo (desktop), Arch linux (laptop)
Posts: 728

Rep: Reputation: 33
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
 
Old 10-31-2005, 09:09 AM   #3
beebelo
Member
 
Registered: Mar 2005
Location: USA
Distribution: Ubuntu Studio 13.1, Debian Stable (Wheezy)
Posts: 68

Original Poster
Rep: Reputation: 15
Sure, I can do that tonight; I am at work today.

Thank you,
 
Old 11-01-2005, 07:09 AM   #4
beebelo
Member
 
Registered: Mar 2005
Location: USA
Distribution: Ubuntu Studio 13.1, Debian Stable (Wheezy)
Posts: 68

Original Poster
Rep: Reputation: 15
Ok, here is the fstab, and partition info.
Code:
 
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/hda5       /               ext3    defaults,errors=remount-ro 0       1
/dev/hdb6       none            swap    sw              0       0
/dev/hda2       /home           ext3    defaults,errors=remount-ro 0       1
/dev/hdc        /media/cdrom0   udf,iso9660 ro,users,noauto  0       0
/dev/fd0        /media/floppy0  auto    rw,users,noauto  0       0
/dev/sda        /media/usb0     vfat    rw,users,noauto  0       0
Root was hda7 before I changed it to hda5. (I also separated /home from the root partition into a partition by itself.)

Here is my partitioning (which I'm still unhappy with, btw...)
Code:
 
Disk /dev/hda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        1437    11542671    c  W95 FAT32 (LBA)
/dev/hda2            1438        2744    10498477+  83  Linux
/dev/hda3            2745        6761    32266552+   f  W95 Ext'd (LBA)
/dev/hda5   *        2745        5167    19462716   83  Linux
/dev/hda6            5168        6251     8707198+   b  W95 FAT32
/dev/hda7            6252        6761     4096543+   7  HPFS/NTFS

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb2   *           2        9729    78140160    f  W95 Ext'd (LBA)
/dev/hdb5               2         261     2088418+   b  W95 FAT32
/dev/hdb6             262         521     2088418+  82  Linux swap/Solaris
/dev/hdb7             522         652     1052226    b  W95 FAT32
/dev/hdb8             653        3263    20972826    b  W95 FAT32
/dev/hdb9            3264        5874    20972826   83  Linux
/dev/hdb10           5875        7833    15735636    b  W95 FAT32
/dev/hdb11           7834        9729    15229588+  83  Linux
Thanks for any insight you can offer on this puzzle...
 
Old 11-01-2005, 07:31 AM   #5
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
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...
 
Old 11-01-2005, 07:51 AM   #6
TruongAn
Member
 
Registered: Dec 2004
Location: Vietnam (Việt Nam)
Distribution: Gentoo (desktop), Arch linux (laptop)
Posts: 728

Rep: Reputation: 33
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???
 
Old 11-01-2005, 10:08 AM   #7
beebelo
Member
 
Registered: Mar 2005
Location: USA
Distribution: Ubuntu Studio 13.1, Debian Stable (Wheezy)
Posts: 68

Original Poster
Rep: Reputation: 15
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.

But that's ok, as everything is working.



Thanks,
 
Old 11-03-2005, 07:23 AM   #8
TruongAn
Member
 
Registered: Dec 2004
Location: Vietnam (Việt Nam)
Distribution: Gentoo (desktop), Arch linux (laptop)
Posts: 728

Rep: Reputation: 33
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?
 
Old 11-03-2005, 08:46 AM   #9
beebelo
Member
 
Registered: Mar 2005
Location: USA
Distribution: Ubuntu Studio 13.1, Debian Stable (Wheezy)
Posts: 68

Original Poster
Rep: Reputation: 15
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...

Thanks for your help!
 
Old 11-03-2005, 03:38 PM   #10
TruongAn
Member
 
Registered: Dec 2004
Location: Vietnam (Việt Nam)
Distribution: Gentoo (desktop), Arch linux (laptop)
Posts: 728

Rep: Reputation: 33
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?
 
Old 11-03-2005, 11:23 PM   #11
beebelo
Member
 
Registered: Mar 2005
Location: USA
Distribution: Ubuntu Studio 13.1, Debian Stable (Wheezy)
Posts: 68

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by TruongAn
Did you specify the root=/dev/hda5 kernel parameter in GRUB?
Yes, I did. After deleting a partition I changed Grub but not fstab.

Thanks,
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 06:15 AM
Please help - fstab problem mickeyboa Fedora 16 02-25-2005 05:12 PM
fstab problem imdeemvp Slackware 3 09-29-2004 03:37 AM
/etc/fstab problem mokojin Slackware 8 08-31-2004 12:34 PM
/etc/fstab problem intraining Linux - General 5 04-28-2003 07:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 09:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration