[prev in list] [next in list] [prev in thread] [next in thread] 

List:       user-mode-linux-user
Subject:    [uml-user] Trouble creating/mounting an ext2 file system
From:       Jan Ploski <jpljpl () gmx ! de>
Date:       2002-11-25 21:28:53
[Download RAW message or body]

Hello,

I am running into problems while trying to create (or mount) an ext2
file system in UML. I installed UML from the Debian/testing distribution
(2.4.19.17um-1) and downloaded the Debian-3.0r0.ext2 root file system.
This file system is very small, so in order to install additional software,
I need to create another one. I followed instructions in the HOWTO, i.e.

dd if=/dev/zero of=user_fs seek=100 count=1 bs=1M

and started the UML kernel with ubd1=/correct/absolute/path/to/user_fs
on the command line. Then I tried mke2fs:

(none):~# mke2fs /dev/ubd1
mke2fs 1.27 (8-Mar-2002)
mke2fs: Device size reported to be zero.  Invalid partition specified, or
        partition table wasn't reread after running fdisk, due to
        a modified partition being busy and in use.  You may need to reboot
        to re-read your partition table.

Ok, this did not work. So I created the file system in the user_fs file
using the host. I booted UML again as mentioned above and tried:

(none):~# mkdir /mnt/x
(none):~# mount /dev/ubd1 /mnt/x
mount: error while guessing filesystem type
mount: you must specify the filesystem type

Does not work. But I know it is an empty ext2 file system, so:

(none):~# mount -t ext2 /dev/ubd1 /mnt/x

Seemed to work. Now comes the big surprise:

(none):~# ls -l /mnt/x
total 60
drwxr-xr-x    2 root     root         2048 Jul 28 01:12 bin
drwxr-xr-x    2 root     root         1024 Jul 28 01:11 boot
drwxr-xr-x    2 root     root         1024 Jul 28 01:09 cdrom
drwxr-xr-x    9 root     root        25600 Nov 25 21:13 dev
drwxr-xr-x   35 root     root         2048 Nov 25 21:13 etc
drwxr-xr-x    2 root     root         1024 Jul 28 01:09 floppy
drwxrwsr-x    2 root     staff        1024 Feb  8  2002 home
drwxr-xr-x    2 root     root         1024 Jul 28 01:09 initrd
drwxr-xr-x    5 root     root         4096 Jul 28 01:12 lib
drwx------    2 root     root        12288 Jul 28 01:08 lost+found
drwxr-xr-x    4 root     root         1024 Nov 25 21:15 mnt
drwxr-xr-x    2 root     root         1024 Jul 28 01:09 opt
drwxr-xr-x    2 root     root         1024 Feb  8  2002 proc
drwxr-xr-x    2 root     root         1024 Nov 23 05:02 root
drwxr-xr-x    2 root     root         2048 Jul 28 01:12 sbin
drwxrwxrwt    2 root     root         1024 Nov 23 05:00 tmp
drwxr-xr-x   12 root     root         1024 Jul 28 01:09 usr
drwxr-xr-x   13 root     root         1024 Jul 28 01:09 var

It is showing me the contents of the root file system (or something
similiar)! Creating a file under /mnt/x does not make it visible
under /, though. What is going on here? It is supposed to be an
empty ext2 file system (and mounting it on the host works okay).

As a side note, the same thing happens when I use /dev/ubd3,
/dev/ubd4 or /dev/ubd?? in the mount command above, regardless
of what ubd?? parameter I booted UML with. My guess would be
that the mapping between /dev/ubd1 and the file system file
does not work at all, but I am sure that the path specified
on the UML command line is correct.

Running dmesg in the UML reveals these two lines:

Partition check:
 ubda: unknown partition table
 ubdb: unknown partition table

The HOWTO contains instructions for ReiserFS -- I have not tried
that yet. Is creating/mounting an ext2fs unsupported by UML?
If this looks like a bug, I'd be happy to provide more information.

Best regards -
Jan Ploski

P.S. The exact same problem is described in this message:
http://list.ftech.net/pipermail/gllug/2002-May/023179.html
I contacted the author, and he told me that he has found no solution.



-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic