Outils pour utilisateurs

Outils du site


tof:computer:vserver:upstart_ubuntu_lucid

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
Dernière révisionLes deux révisions suivantes
tof:computer:vserver:upstart_ubuntu_lucid [09/06/2010 12:57] – créée Christophe Boyaniquetof:computer:vserver:upstart_ubuntu_lucid [12/07/2010 17:18] Christophe Boyanique
Ligne 1: Ligne 1:
 ====== Fix for running Ubuntu Lucid in vserver ====== ====== Fix for running Ubuntu Lucid in vserver ======
  
-This tweak is inspired by http://linux-vserver.org/Upstart_issues+This tweak is inspired by [[http://linux-vserver.org/Upstart_issues]]. 
 + 
 +<code> 
 +19:57 <@Bertl> well, regarding console: you probably don't want 'the console' created inside a guest, because that means that  
 +               upstart (from the guest) will write on your host console (and can read stuff from there too) 
 +19:58 <@Bertl> what you want is to put a tty or pts there instead of the console, or if you like to see the output on the  
 +               current tty just tty 
 +19:59 <@Bertl> regarding the stop: your guest seems to ignore the 'normal' init signalling which is done when a guest is shut  
 +               down 
 +19:59 <@Bertl> thus, after a given (configureable) timeout, the guest is killed instead 
 +20:00 <@Bertl> util-vserver does not execute stuff inside the guest, it simply sends a signal to init (inside the guest) 
 +20:01 <@Bertl> (the singnal is SIGINT, and this equals to the CTRL-ALT-DEL action) 
 +</code>
  
 ===== Choose plain init style ===== ===== Choose plain init style =====
Ligne 27: Ligne 39:
 <code> <code>
 # mkdir /etc/vservers/<vservername>/vdir/root/init.disabled  # mkdir /etc/vservers/<vservername>/vdir/root/init.disabled 
-# for srv in console-setup control-alt-delete dmesg failsafe-x hostname hwclock-save hwclock module-init-tools \+# for srv in console-setup dmesg failsafe-x hostname hwclock-save hwclock module-init-tools \
   mountall-net mountall-reboot mountall-shell mountall network-interface network-interface-security networking \   mountall-net mountall-reboot mountall-shell mountall network-interface network-interface-security networking \
   plymouth-log plymouth-splash plymouth-stop plymouth procps rcS rsyslog-kmsg tty1 tty2 tty3 tty4 tty5 tty6 \   plymouth-log plymouth-splash plymouth-stop plymouth procps rcS rsyslog-kmsg tty1 tty2 tty3 tty4 tty5 tty6 \
   upstart-udev-bridge ureadahead-other ureadahead; do mv /etc/vservers/<vservername>/vdir/etc/init/${srv}.conf \   upstart-udev-bridge ureadahead-other ureadahead; do mv /etc/vservers/<vservername>/vdir/etc/init/${srv}.conf \
   /etc/vservers/<vservername>/vdir/root/init.disabled/; done   /etc/vservers/<vservername>/vdir/root/init.disabled/; done
 +</code>
 +
 +===== Add vserver init task =====
 +
 +Create the file ''/etc/init/vserver.conf'':
 +<code>
 +description     "Vserver init"
 +
 +start on startup
 +
 +console output
 +task
 +
 +pre-start script
 +       touch /var/run/utmp
 +       chown root:utmp /var/run/utmp
 +       chmod 664 /var/run/utmp
 +end script
 +
 +script
 +       initctl emit virtual-filesystems --no-wait
 +       initctl emit local-filesystems --no-wait
 +       initctl emit remote-filesystems --no-wait
 +       initctl emit all-swaps --no-wait
 +       initctl emit filesystem --no-wait
 +       initctl emit mounting --no-wait
 +       initctl emit mounted MOUNTPOINT=/dev --no-wait
 +       initctl emit mounted MOUNTPOINT=/var/run --no-wait
 +       initctl emit mounted MOUNTPOINT=/tmp --no-wait
 +       initctl emit net-device-up IFACE=lo --no-wait
 +end script
 +</code>
 +
 +
 +===== Tweak sysinit configuration =====
 +
 +In ''/etc/init/rc-sysinit.conf'' replace the following line:
 +
 +<code>
 +start on filesystem and net-device-up IFACE=lo
 +</code>
 +
 +by:
 +
 +<code>
 +start on filesystem
 </code> </code>
  
Ligne 63: Ligne 121:
 #        *.=debug;*.=info;\ #        *.=debug;*.=info;\
 #        *.=notice;*.=warn       |/dev/xconsole #        *.=notice;*.=warn       |/dev/xconsole
 +</code>
 +
 +===== Create the console device =====
 +
 +Missing of ''/dev/console'' makes all scripts with ''console output'' fail:
 +<code>
 +# mknod --mode=600 /etc/vservers/<vservername>/vdir/dev/console c 5 1
 </code> </code>
  
tof/computer/vserver/upstart_ubuntu_lucid.txt · Dernière modification : 13/07/2010 11:58 de Christophe Boyanique

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki