From: D. J. A. <de...@ra...> - 2002-05-06 06:19:54
|
Inspired by the news that UML is now self-hosting, among other things, I thought I'd try to run UML on its own nice big partition of a new disk, via hostfs, before I clutter the disk up with other stuff. I mount a downloaded root_fs on loopback, and used rsync to copy all of it over to the intended hostfs space, /mnt/uml. I change the ownership of the files similarly to what is suggested by this: http://user-mode-linux.sourceforge.net/UserModeLinux-HOWTO-9.html#ss9.1 find /mnt/uml -uid 0 | xargs chown deejoe I started UML as user 'deejoe' with linux eth0=tuntap,,,192.168.0.97 ubd0=/mnt/uml So far, so good. The host system is Mandrake, but the original root_fs I'm working from is root_fs_debian2.2_small. I'd like to start filling out the debian system with additional packages. With a loopback root filesystem, I've been able to do 'apt-get update'/'apt-get install packagename' or 'apt-get upgrade' just fine and I hoped to be able to do this through hostfs.[1] But, the Debian scripts want to make certain newly-installed files owned by root, apparently, and this kind of error occurs: tar: ./postinst: Cannot change ownership to uid 0, gid 0: Operation not permitted If I go back and reverse the ownership change above: find /mnt/uml/ -user deejoe | xargs chown root and then invoke user-mode-linux at the command line as 'root' on the host system, apt-get works just fine, which makes sense, since everything is uid 0 at that point: the user in uml, the host-context user running uml, and the ownership of the files. What would be really nice, though, would be for the uid=0 from the uml context to be mapped to the unprivileged uid in the host context which executed the instance of uml ('deejoe' in this case). If I'm missing something about how to make this work the way I expect it to (ie, as a loopback filesystem would) or why it would be a Bad Thing for it to work the way I want, I'd appreciate some pointers. Thanks, --Joe [1] I'd rather use hostfs than a loopback filesystem file here, because with loopback I lose the flexibility of having a) enough space to install all the files I want but b) without having to commit up front to a given size for the loopback filesystem. A loopback filesystem pressed into use for non-uml storage is suboptimal, whereas the same disk space used via hostfs in uml is just another filesystem when not used by uml. [2] I'm running the penultimate binary uml rpm, user_mode_linux-2.4.18.2um-0 |