[Celinux-dev] mount error when I mount ext2 block file in Ubuntu 6.06

chenggh chenggh04 at st.lzu.edu.cn
Sat Sep 16 19:00:03 PDT 2006


On Saturday 16 September 2006 23:19, Paolo Giarrusso wrote:
> On 9/16/06, chenggh <chenggh04 at st.lzu.edu.cn> wrote:
> > Hi:
> >         Maybe I find what the problem is ^_^. It is very strange. Please
> > look at as something as following:
> >
> >         If I set the file with 4M it failed when I mount it.
>
> No, it fails when you format it - as reported by:
> # file rootfs
> rootfs: data
> above.
>
> The problem is that this command, while being correct, fails for a bug
> due to the filename - it is likely that your /etc/mtab is a symlink to
> /proc/mounts.
>
> On any modern Linux system:
> $ head -n 1 /proc/mounts
> rootfs / rootfs rw 0 0
>
> Here, rootfs does not refer to your file but to a "fake" mount.
>
> After seeing the output of this command, you can see that mkfs does
> not understand this simple fact:
>
> # mkfs.ext2 rootfs
> mke2fs 1.38 (30-Jun-2005)
> rootfs is not a block special device.
> Proceed anyway? (y,n) y
> rootfs is mounted; will not make a filesystem here!
>
> What you did not note is that it did not format it then.
>
> You could make it complete the format anyway, despite its wrong answer
> to "is this mounted?", with the "force" option (I do not remember the
> syntax). Or simply by not using "rootfs" as filename.

	Thank you. I am unlucky to use the rootfs as my file name. ^_^
								chenggh


More information about the Celinux-dev mailing list