lkml.org 
[lkml]   [2001]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Ramdisk (and other) problems with 2.4.2
On Fri, 9 Mar 2001, Alexander Viro wrote:

>
>
> On Fri, 9 Mar 2001, Mike Galbraith wrote:
>
> > I think I've figured it out.. at least I've found a way to reproduce
> > the exact errors to the last detail and some pretty nasty corruption
> > to go with it. The operator must help though.. a lot ;-)
> >
> > If you do mount -o remount /dev/somedisk / thinking that that will get
> > rid of your /dev/ram0 root, that isn't the case, and you will corrupt
> > the device you remounted (I did it to a scratch monkey) very badly when
> > you write to the still mounted ramdisk.
>

Mount was not executed.


> Ugh. mount -o remount ignores dev_name argument. It will change the
> flags of fs mounted from /dev/ram0 and will not even touch a /dev/somedisk.
> If you write to device you have mounted... Well, don't expect it to be pretty.
[Snipped wonderful explaination of how to change flags using `mount`]

> Cheers,
> Al
> (fully expecting a long rant from Richard declaring that -o remount had
> _always_ been used to mount a different fs and both ANSI C standard and
> X-files fan guide mention it somewhere ;-)
>

Nope. I didn't have anything to do with the way an
initial ramdisk is implemented either. However, here
is the point at which the root file system gets changed
from the initrd file-system to the real root.

This is `dmesg` stripped down:

sda: sda1 sda2 < sda5 >
SCSI device sdb: 4406960 512-byte hdwr sectors (2256 MB)
sdb: sdb1 sdb2
SCSI device sdc: 17783240 512-byte hdwr sectors (9105 MB)
sdc: sdc1 sdc2 sdc3
VFS: Mounted root (ext2 filesystem) readonly.
change_root: old root has d_count=3 < ============= Note the count!
Freeing unused kernel memory: 80k freed
At one time d_count meant something. Then there were changes.
Then more changes. This might have something to do with the
dangling references that can kill.

The `mount` command, nor its internal mount(2) doesn't enter into
this at all. There were no command-scripts that executed the
change_root. This is all part of the built-in initial RAM Disk
capabilites.

The problem is, simply, once you have booted a system using the
RAM Disk, don't expect to ever use the RAM disk again. Writes
to this, even though not currently mounted, can (will) make a mess
of your file-systems, even those which are not mounted.
This is simply a bug that should be fixed. It's not somebody
trying to do something for which the system was not designed.


Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:29    [from the cache]
©2003-2011 Jasper Spaans