Skip to contentSkip to conversation

root userid remapping? ... no UID / GID variables set in NFS root?

Qemu-devel Christopher Friedt 3 participants 3 messages May 31, 2007 – Jun 1, 2007

lore
Share & tools
lore
#0 lore raw

Hi everyone,

I've just gotten qemu emulating an arm system on my laptop, which I'm hoping to use for cross-compilation. I don't have a disk image to use (is there any way to create a disk image from a directory tree??), so I'm using NFS instead.

The strange thing is, is that although I specify no_root_squash in my /etc/exports (and I've been using NFS for quite a long time successfully with other machines), only when I'm using Qemu does the user id of the 'init' process [0] get remapped to some completely absurd value of 4294967295.

Has anyone heard of this happening before?

Thanks in advance for any and all responses.

~/Chris

#1 lore raw
Quoted 1 line · On Fri, 01 Jun 2007 00:06:43 +0200 Christopher Friedt…

(is there any way to create a disk image from a directory tree??)

http://www.hohnstaedt.de/e2fsimage/

If you use this, you will get a raw e2fs filesystem image. It will not have a partition table, which means you will want to mount it directly as /dev/hda (or /dev/sda), not /dev/hda1 (or /dev/sda1).

Quoted 5 lines

The strange thing is, is that although I specify no_root_squash in my /etc/exports (and I've been using NFS for quite a long time successfully with other machines), only when I'm using Qemu does the user id of the 'init' process [0] get remapped to some completely absurd value of 4294967295.

4294967295 is decimal for 0xffffffff, also known as -1. Maybe some kind of bug?

Mark

#2 lore raw
In reply to Christopher Friedt
Quoted 7 lines · Christopher Friedt

Hi everyone,

I've just gotten qemu emulating an arm system on my laptop, which I'm hoping to use for cross-compilation. I don't have a disk image to use (is there any way to create a disk image from a directory tree??), so I'm using NFS instead.

Quoted 5 lines

The strange thing is, is that although I specify no_root_squash in my /etc/exports (and I've been using NFS for quite a long time successfully with other machines), only when I'm using Qemu does the user id of the 'init' process [0] get remapped to some completely absurd value of 4294967295.

You disabled CONFIG_UID16 in the EMBEDDED menu, so you don't have the legacy system calls to query 16 bit user ids, but your program is using the old ones rather than the new ones. So the attempt to make said syscall is returning -EPERM, I.E. -1.

Nothing to do with qemu, this is your kernel .config. I'm guessing you built a different kernel for qemu than for your host system?

Rob