-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hello,

I'm trying to use hostfs for my root file system.

I think providing hostfs access for root file system is great. It will
help especially for the near future because the current linux file
systems are still catching up on block discard.

I have almost been able to finish my uml setup. But I have one major glitch.

Warning: unable to open an initial console.
Not activating Mandatory Access Control now since /sbin/tomoyo-init
doesn't exist.
Failed to open console 0, err = -19
Failed to open console 0, err = -19
Failed to open console 0, err = -19
Failed to open console 0, err = -19
Failed to open console 0, err = -19
IRQ 13/xterm: IRQF_DISABLED is not guaranteed on shared IRQs
IRQ 2/console: IRQF_DISABLED is not guaranteed on shared IRQs
IRQ 3/console-write: IRQF_DISABLED is not guaranteed on shared IRQs
IRQ 10/winch: IRQF_DISABLED is not guaranteed on shared IRQs
r...@champaran:~# dpkg --configure -a
dpkg: unable to sync directory '/var/lib/dpkg': Invalid argument
r...@champaran:~# cat /proc/cmdline
root=/dev/root rootflags=/var/tmp/chroot/uml-debian rootfstype=hostfs
mem=512m eth0=daemon eth1=daemon con0=fd0,fd1,fd2 con=xterm


In the snippet above, you can notice that the dpkg command fails. I am
not sure what is the real cause.

r...@champaran:~# ls -l /var/lib/dpkg/
total 476
drwxr-xr-x 2 1000 1000   4096 Dec 11 12:12 alternatives
- -rw-r--r-- 1 1000 1000 114163 Dec 11 12:12 available
- -rw-r--r-- 1 1000 1000 114163 Dec 11 12:12 available-old
- -rw-r--r-- 1 1000 1000      8 Dec 11 12:10 cmethopt
- -rw-r--r-- 1 1000 1000     98 Dec 11 12:07 diversions
- -rw-r--r-- 1 1000 1000     29 Dec 11 12:07 diversions-old
drwxr-xr-x 2 1000 1000  20480 Dec 11 12:12 info
- -rw-r----- 1 1000 1000      0 Dec 11 12:12 lock
drwxr-xr-x 2 1000 1000   4096 Nov 25 06:32 parts
- -rw-r--r-- 1 1000 1000     35 Dec 11 12:12 statoverride
- -rw-r--r-- 1 1000 1000      0 Dec 11 12:06 statoverride-old
- -rw-r--r-- 1 1000 1000  98944 Dec 11 15:30 status
- -rw-r--r-- 1 1000 1000  98944 Dec 11 15:04 status-old
drwxr-xr-x 2 1000 1000   4096 Dec 11 12:12 triggers
drwxr-xr-x 2 1000 1000   4096 Dec 11 14:19 updates

id 1000 maps to the user id on the host, that executed the uml application.

I did this file ownership change because the guides mentioned it. I do
have read/write access to these files/directories, but dpkg fails to
proceed. It cannot install a package. `apt-get update` does work though.

Here's the listing of:
r...@champaran:~# ls /var/lib/apt/lists/ -l
total 32660
- -rw-r--r-- 1 1000 1000   103733 Dec 11 08:10
ftp.us.debian.org_debian_dists_sid_Release
- -rw-r--r-- 1 1000 1000 33330762 Dec 11 08:02
ftp.us.debian.org_debian_dists_sid_main_binary-amd64_Packages
drwxr-xr-x 2 1000 1000     4096 Dec 11 11:56 partial

These files are written during the "apt-get update" operation.


Since the `apt-get update` operation succeeds, is this more of a dpkg
bug than UML's ?


PS: Even running UML as root does not help. I can log in, do apt-get
update, but as soon as I try to install, it fails.
Here's an apt-get install failure example:

r...@champaran:~# apt-get install psmisc
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
  psmisc
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/124 kB of archives.
After this operation, 733 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  psmisc
Install these packages without verification [y/N]? y
tar: ./control: Cannot change ownership to uid 0, gid 0: Operation not
permitted
tar: ./md5sums: Cannot change ownership to uid 0, gid 0: Operation not
permitted
tar: ./postrm: Cannot change ownership to uid 0, gid 0: Operation not
permitted
tar: ./postinst: Cannot change ownership to uid 0, gid 0: Operation not
permitted
tar: .: Cannot change ownership to uid 0, gid 0: Operation not permitted
tar: Exiting with failure status due to previous errors
dpkg-deb: subprocess tar returned error exit status 2
dpkg: error processing /var/cache/apt/archives/psmisc_22.13-1_amd64.deb
(--unpack):
 subprocess dpkg-deb --control returned error exit status 2
configured to not write apport reports
                                      dpkg: unable to sync directory
'/var/lib/dpkg': Invalid argument
E: Sub-process /usr/bin/dpkg returned an error code (2)



BTW, this is pretty interesting. I do have read/write access to these
files, but I can't change their ownership.

r...@champaran:/var/lib/dpkg# ls -l
total 476
drwxr-xr-x 2 1000 1000   4096 Dec 11 12:12 alternatives
- -rw-r--r-- 1 1000 1000 114163 Dec 11 12:12 available
- -rw-r--r-- 1 1000 1000 114163 Dec 11 12:12 available-old
- -rw-r--r-- 1 1000 1000      8 Dec 11 12:10 cmethopt
- -rw-r--r-- 1 1000 1000     98 Dec 11 12:07 diversions
- -rw-r--r-- 1 1000 1000     29 Dec 11 12:07 diversions-old
drwxr-xr-x 2 1000 1000  20480 Dec 11 12:12 info
- -rw-r----- 1 1000 1000      0 Dec 11 12:12 lock
drwxr-xr-x 2 1000 1000   4096 Nov 25 06:32 parts
- -rw-r--r-- 1 1000 1000     35 Dec 11 12:12 statoverride
- -rw-r--r-- 1 1000 1000      0 Dec 11 12:06 statoverride-old
- -rw-r--r-- 1 1000 1000  98944 Dec 11 15:38 status
- -rw-r--r-- 1 1000 1000  98944 Dec 11 15:38 status-old
drwxr-xr-x 2 1000 1000   4096 Dec 11 12:12 triggers
drwxr-xr-x 2 1000 1000   4096 Dec 11 14:19 updates
r...@champaran:/var/lib/dpkg# mv updates/ foo
r...@champaran:/var/lib/dpkg# mv foo updates
r...@champaran:/var/lib/dpkg# id
uid=0(root) gid=0(root) groups=0(root)
r...@champaran:/var/lib/dpkg# chown root *
chown: changing ownership of `alternatives': Operation not permitted
chown: changing ownership of `available': Operation not permitted
chown: changing ownership of `available-old': Operation not permitted
chown: changing ownership of `cmethopt': Operation not permitted
chown: changing ownership of `diversions': Operation not permitted
chown: changing ownership of `diversions-old': Operation not permitted
chown: changing ownership of `info': Operation not permitted
chown: changing ownership of `lock': Operation not permitted
chown: changing ownership of `parts': Operation not permitted
chown: changing ownership of `statoverride': Operation not permitted
chown: changing ownership of `statoverride-old': Operation not permitted
chown: changing ownership of `status': Operation not permitted
chown: changing ownership of `status-old': Operation not permitted
chown: changing ownership of `triggers': Operation not permitted
chown: changing ownership of `updates': Operation not permitted

- -- 
Given the large number of mailing lists I follow, I request you to CC me
in replies for quicker response
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBCgAGBQJNA5uSAAoJEKY6WKPy4XVphRkP/i2jld7uBqxMV2trMm+78id+
WcMN2BqcvhxLdINp2irTBoSR7d255dUHmGh7kF4A9H+cc15TAeGWB0OqDHLqm9Oc
NoPNQNXmgsj5RRtyN82sypoti32lhJkyCHT0gq6tEfOe9YPCCS9CtA6nrAOHQ5KS
G6+WXfxTTsmf496GSf9IVrR3GG0rpfmpxLHNGvBVj1PuDcXKUQQfucV7oPggfutk
vrMfIDIQ3W2zMZ6831/gq60gw6y7MJ9AFmMNTAfZpFQJ0gLMKArW0qRJtzwAT1sL
k5I6zZ8U8XxZ+gM8HbIrR/G1KOuHYdlCOuN6C0Mb9hdyuLiXdq/gXWuVh+VllHfV
fWVRFyPqhytW7i496Ta2ZZpiWajJbBMxnUn3JhuX4/qHP031qcVyo6q4WqCwY5TL
z4pFS4UCuGUSlTjivGIe8WtZqlMOu5DV8UPa3Y8D/7P6a0SB1CO1D3TnI9PeqGOZ
KtUldxYJhAWh6wuhVfwurS0yKdt5fHnyFWNCX2pHzFShqPOoSrDeCkSxlOUMSjMd
bT/zU/QJ3AXQhIzrciM1SGCuRIVSlvnqH/kHXjIdIVzlPp2B5ySF0dMB2q1tu0Ne
2Fm+bUMWiNeTUmxH0vLYo3vXn2EYVUZHxnC0t9WMW1+5sP9MeaISQvHoyGHZb3BP
I9N11cBenq8+vsZxF/lv
=9cR2
-----END PGP SIGNATURE-----


------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages, 
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev 
_______________________________________________
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