[Lxc-users] udev [SOLVED]
Osvaldo Filho
arquivostcf at gmail.com
Sun Aug 1 16:33:43 UTC 2010
The problem is in file /lib/init/fstab
Before upgrade:
=============
/dev/root / rootfs defaults
0 1
#none /proc proc
nodev,noexec,nosuid 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc
nodev,noexec,nosuid,optional 0 0
#none /sys sysfs
nodev,noexec,nosuid 0 0
none /sys/fs/fuse/connections fusectl optional
0 0
none /sys/kernel/debug debugfs optional
0 0
none /sys/kernel/security securityfs optional
0 0
none /spu spufs
gid=spu,optional 0 0
#none /dev devtmpfs,tmpfs mode=0755
0 0
none /dev/pts devpts
noexec,nosuid,gid=tty,mode=0620 0 0
none /dev/shm tmpfs nosuid,nodev
0 0
none /tmp none defaults
0 0
none /var/run tmpfs
mode=0755,nosuid,showthrough 0 0
none /var/lock tmpfs
nodev,noexec,nosuid,showthrough 0 0
none /lib/init/rw tmpfs
mode=0755,nosuid,optional 0 0
=============
After upgrade:
=============
# <file system> <mount point> <type> <options>
<dump> <pass>
/dev/root / rootfs defaults
0 1
none /proc proc
nodev,noexec,nosuid 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc
nodev,noexec,nosuid,optional 0 0
none /sys sysfs
nodev,noexec,nosuid 0 0
none /sys/fs/fuse/connections fusectl optional
0 0
none /sys/kernel/debug debugfs optional
0 0
none /sys/kernel/security securityfs optional
0 0
none /spu spufs
gid=spu,optional 0 0
none /dev devtmpfs,tmpfs mode=0755
0 0
none /dev/pts devpts
noexec,nosuid,gid=tty,mode=0620 0 0
none /dev/shm tmpfs nosuid,nodev
0 0
none /tmp none defaults
0 0
none /var/run tmpfs
mode=0755,nosuid,showthrough 0 0
none /var/lock tmpfs
nodev,noexec,nosuid,showthrough 0 0
none /lib/init/rw tmpfs
mode=0755,nosuid,optional 0 0
=============
2010/8/1 Osvaldo Filho <arquivostcf at gmail.com>:
> I am using the template from here: http://bodhizazen.fivebean.net/LXC/
>
> The system seems pretty safe and does not impose any kind of change,
> as changes in the way of using udev.
> I did upgrade all the packages and the only problem was with the mountall.
> I will try to resolve keeping the udev and return the result.
> I'll contact the owner of the site where i downloaded the template.
>
> Thank you for the great job.
>
> 2010/7/31 Daniel Lezcano <daniel.lezcano at free.fr>:
>> On 07/31/2010 03:21 PM, Osvaldo Filho wrote:
>>>
>>> The mountall package break lxc-console
>>>
>>
>> The problem may come from the event "start on mounted MOUNTPOINT=/dev"
>> (/etc/init/mouted-dev.conf) triggering the copy of /lib/udev/library. This
>> copy will overwrite the /dev/console and so breaking the "link" between the
>> host and the container with the console.
>>
>> The same should happen with "start on mounted MOUNTPOINT=/var/run"
>> (/etc/init/mouted-varrun.conf) which will break the shutdown / reboot.
>>
>> IMO, this is the consequence, these events should not be generated in the
>> container because we should not mount /dev and /var/run. lxc monitors these
>> directory.
>>
>> The container template "ubuntu" generates fake events for the subsystems
>> because udev is not run. The udev*.conf files in /etc/init are renamed
>> *.conf.orig which result to be ignored at the startup time.
>>
>> The /lib/init/fstab is modified by the lxc template so /dev and /var/run are
>> not mounted, hence no events are generated.
>>
>> I am not sure you are using a "ubuntu" template from lxc, but I suggest:
>>
>> 1 - rename:
>>
>> /etc/lib/udev.conf
>> /etc/lib/udevtrigger.conf
>> /etc/lib/udev-finish.conf
>> /etc/lib/upstart-udev-bridge.conf
>>
>> 2 - reduce the /lib/init/fstab to:
>>
>> # /lib/init/fstab: lxc system fstab
>> none /spu spufs gid=spu,optional
>> 0 0
>> none /tmp none defaults
>> 0 0
>> none /var/lock tmpfs
>> nodev,noexec,nosuid,showthrough 0 0
>> none /lib/init/rw tmpfs
>> mode=0755,nosuid,optional 0 0
>>
>> 3 - add /etc/init/lxc.conf
>>
>> # fake some events needed for correct startup other services
>>
>> description "Container Upstart"
>>
>> start on startup
>>
>> script
>> rm -rf /var/run/*.pid
>> rm -rf /var/run/network/*
>> /sbin/initctl emit stopped JOB=udevtrigger --no-wait
>> /sbin/initctl emit started JOB=udev --no-wait
>> end script
>>
>>
>> With this configuration I was able to upgrade my ubuntu container.
>> I think that will fix your problem with the console.
>>
>> Thanks
>> -- Daniel
>>>
>>> 2010/7/31 Osvaldo Filho<arquivostcf at gmail.com>:
>>>
>>>>
>>>> The others packages:
>>>>
>>>> The following packages will be upgraded:
>>>> apt apt-utils base-files bash bsdutils busybox-initramfs
>>>> console-setup coreutils cpio dash debconf debconf-i18n dpkg e2fslibs
>>>> e2fsprogs findutils
>>>> gcc-4.4-base grep hostname initramfs-tools initramfs-tools-bin
>>>> initscripts iputils-ping kbd klibc-utils language-pack-en
>>>> language-pack-en-base libblkid1
>>>> libc-bin libc6 libcomerr2 libdbus-1-3 libedit2 libgcc1 libglib2.0-0
>>>> libgpm2 libgssapi-krb5-2 libk5crypto3 libklibc libkrb5-3
>>>> libkrb5support0 libncurses5
>>>> libncursesw5 libpam-modules libpam-runtime libpam0g libpcre3
>>>> libplymouth2 libpng12-0 libslang2 libss2 libssl0.9.8 libstdc++6
>>>> libudev0 libuuid1 locales
>>>> lsb-base lzma module-init-tools mount mountall ncurses-base
>>>> ncurses-bin openssh-client openssh-server perl-base python-minimal
>>>> python2.6-minimal
>>>> sensible-utils sudo sysv-rc sysvinit-utils tzdata util-linux xkb-data
>>>>
>>>>
>>>> 2010/7/31 Osvaldo Filho<arquivostcf at gmail.com>:
>>>>
>>>>>
>>>>> I upgrade upstart and udev.
>>>>> lxc-console is ok!
>>>>>
>>>>> The problem is other!
>>>>>
>>>>> 2010/7/31 Serge E. Hallyn<serge.hallyn at canonical.com>:
>>>>>
>>>>>>
>>>>>> Quoting Guillaume ZITTA (lxc at zitta.fr):
>>>>>>
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> You could use dpkg-divert utility to rename files :
>>>>>>> dpkg-divert --rename $f
>>>>>>>
>>>>>>> It will rename $f to $f.distrib and store this fact to the dpkg
>>>>>>> database.
>>>>>>> After, any update from dpkg will go to the renamed file.
>>>>>>>
>>>>>>
>>>>>> I assume you mean for diverting the ppp device to another file?
>>>>>> I think holding the package is much better in this case. Bypassing
>>>>>> the permission problem to let the upgrade succeed caused
>>>>>> /etc/init/udev.conf
>>>>>> to get reinstalled, which stopped him from booting.
>>>>>>
>>>>>> But d pkg-divert is another trick (new to me) that sounds like
>>>>>> it'll come in useful. I'm getting the feeling that container
>>>>>> administration (in debian/ubuntu) is going to require a bit of
>>>>>> a new art :)
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> -serge
>>>>>>
>>
>>
>>
>>
>
More information about the lxc-users
mailing list