[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /boot partition changes when it should not



On Tue, 9 Mar 2010 14:02:48 -0500 (EST), thib wrote:
> Bob McGowan wrote:
>> On further consideration, there are other places where things could be
>> happening, before the "system" is fully started, meaning before the
>> 'mount' options you're using would have any effect.
>> 
>> These don't necessarily do anything (in the "write" sense ;), but are
>> places to consider checking:  BIOS, grub/lilo/other boot loader, kernel
>> and kernel options for startup, initrd.
> 
> The BIOS should be completely fs-agnostic, but yes, actually, the first 
> stage of the boot loader most certainly doesn't care about the fstab, and if 
> it's a good boy, then it *might* increment the count.

Clive, are you using grub (versions 1 or 2) as your boot loader?  These boot
loaders understand the filesystem and can read the kernel image and its initial
RAM disk image via the filesystem.  It is *possible* that grub may be
incrementing the mount count.  grub would certainly ignore the /etc/fstab
options when it "mounts" the filesystem, as thib has said.  On the other hand,
the lilo boot loader does not understand the filesystem.  It reads the kernel
image and its initial RAM disk image via BIOS calls and a list of sectors which
is written to the boot record when the "lilo" command is issued.  The boot
code of lilo has no knowledge of the filesystem.  Therefore, it *cannot*
update the mount count.  It doesn't even *know* where the mount count is stored.

That is good in some ways and bad in others.  The bad news is that the code
which writes out the boot record has to be run more often.  If anything
changes in the list of sectors to be read, the boot record has to be
rewritten.  For example, if you rebuild the initial RAM disk image, the
list of sectors to be read for the initial RAM disk image will of course
change, and therefore the boot record must be rewritten.  The good news
is that this makes the boot loader filesystem agnostic, and you don't have
to have support in the boot loader for a bunch of different file systems.

You might try switching to lilo as your boot loader and see if that
solves your problem.  I use lilo as my boot loader and have for a long
time.  I may be able to assist you if you have difficulty.


Reply to: