Blaisorblade wrote:
> On Sunday 03 April 2005 13:48, Jan Rychter wrote:
> > I used UML successfully in the past and recently I've tried to revive my
> > UML installation. Unfortunately, I've run into a range of problems
> > (updates required for newer host kernels, non-working hostfs, etc).
> 
> > I am now at a stage where I have linux-2.4.27 patched with
> > uml-2.4.27-bs2-pre7.patch and a host 2.6.10 patched with skas3-v8-rc5.
> >
> > The issue I have is that hostfs doesn't work they way I want it to. What
> > I get is all hostfs files owned by root:root.
> 
> > The semantics I'd like to see are:
> >
> >  -- uid:gid mapping of 1:1 between the host and uml,
> 
> >  -- normal permission checks done on the host for requests done by uml.
> This is the normal situation, but there are some rare exception (i.e. when 
> you 
> boot from hostfs as rootfs, instead of using one UBD). So, please describe 
> exactly your setup (UML command line and boot messages, mount command, and so 
> on).
> 
> Are you using hostfs as your rootfs? From what you say it seems not, but the 
> behaviour you see has been explicitly coded for that case.

No, I am not using it as my rootfs. The semantics that I'd like to
achieve are similar to an NFS-mounted /home filesystem, except that only
the user running the UML should have access to his files.

I mount the hostfs via the fstab entry:

  none /home hostfs /home,rw 0 0

... which gets me all files owned by root. What I'd like to have is
either a full /home or a /home/jwr (my $HOME). As user 501 (my uid)
inside UML I should be able to access files on the host beloging to uid
501, assuming that UML runs under uid 501.

And here are the boot messages from the UML guest:

Checking for the skas3 patch in the host...found
Checking for /proc/mm...found
Checking PROT_EXEC mmap in /tmp...OK
Checking for /dev/anon on the host...Not available (open failed with errno 2)
Linux version 2.4.27-1um ([EMAIL PROTECTED]) (gcc version 3.3.5 (Gentoo Linux 
3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1)) #5 Thu Apr 7 05:51:38 CEST 2
005
On node 0 totalpages: 32768
zone(0): 32768 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: ubda=rootfs ubdb=opt ubdc=var root=/dev/ubda ro 
ubd7=swapfs mem=128m eth0=tuntap,,FE:FD:C0:A8:01:66,10.200.254.1 U
ML_XDISPLAY=10.200.254.1:0.0 devfs=nomount
Calibrating delay loop... 4128.76 BogoMIPS
Memory: 124972k available
Dentry cache hash table entries: 16384 (order: 5, 131072 bytes)
Inode cache hash table entries: 8192 (order: 4, 65536 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 32768 (order: 5, 131072 bytes)
Checking for host processor cmov support...Yes
Checking for host processor xmm support...No
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking that host ptys support output SIGIO...Yes
Checking that host ptys support SIGIO on close...No, enabling workaround
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
VFS: Disk quotas vdquot_6.5.1
Journalled Block Device driver loaded
devfs: v1.12c (20020818) Richard Gooch ([EMAIL PROTECTED])
devfs: boot_options: 0x0
JFFS version 1.0, (C) 1999, 2000  Axis Communications AB
JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.
pty: 256 Unix98 ptys configured
SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256).
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
PPP generic driver version 2.4.2
Universal TUN/TAP device driver 1.5 (C)1999-2002 Maxim Krasnyansky
blkmtd: error: missing `device' name
Initializing software serial port version 1
mconsole (version 2) initialized on /home/jwr/.uml/redhat80/mconsole
Partition check:
 ubda: unknown partition table
 ubdb: unknown partition table
 ubdc: unknown partition table
 ubdh: unknown partition table
Initializing stdio console driver
Netdevice 0 (fe:fd:c0:a8:01:66) : TUN/TAP backend - IP = 10.200.254.1
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 8192 bind 16384)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
VFS: Mounted root (ext2 filesystem) readonly.
INIT: version 2.84 booting

Any help appreciated.

--J.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to