个人工具

UbuntuHelp:UbuntuLTSP/LTSPWithoutNFS

来自Ubuntu中文

Wikibot讨论 | 贡献2008年4月23日 (三) 12:00的版本

跳转至: 导航, 搜索

This page describes the new changes we made to LTSP in the ubuntu gutsy release to speed up the boot process.

Things we dropped

  • NFS
  • bind/move mounting single dirs and files into a ramfs to make them writeable
  • detecting the Xorg configuration through debconf with the xserver-xorg maintainer scripts

Things we added instead

  • NBD
  • Instead of a readonly exported NFS root we now export a squashfs image via NBD
  • Using a squashfs we can now merge that together in a unionfs to get writeable access which is a lot faster during bootup
  • introduces a new tool called nbdrootd, started by inetd
  • forces the rebuilding of the squashfs if you made changes inside the chroot (for example adding packages or changing defaults) we added the tool ltsp-update-image for this.
  • X detection
  • Xorg 7.3 (used in gutsy) is well capable of running completely without config file so we dropped it in early stages of gutsy development.
  • the above brought up problems with mouse and keyboard configurations so we had to reintroduce some kind of config file but it was clear that we didnt want to use debconf for it as we did before.
  • a new script was introduced, calling Xorg -configure (which produces the exact same setup Xorg uses without config for driver and monitor) and replacing mouse and keyboard setup with the needed values. this method takes only about 10% of the time the old one did.
  • lts.conf
  • due to the squashfs image being static you would need to run ltsp-update-image after every change to the config file if it would reside inside the image (i.e. /opt/ltsp/i386/etc/lts.conf) indeed you can still do it that way if you prefer to but dont forget to rebuild the image ;).
  • we moved the lts.conf out of the image into the tftp root and read it from there during boot (/var/lib/tftpboot/ltsp/i386/lts.conf on i386 systems for example) if the file exists in the tftp dir, it will override anything inside the image.

More and minor changes in the gutsy release will be listed in the release notes of the final release, stay tuned :)

Reverting to NFS if you want to

If you are not concerned about bootspeed or want to use nfs for any other reason, its easy to revert to it: First, install NFS and configure it :

sudo su -
apt-get install nfs-kernel-server
echo '/opt/ltsp/i386     *(ro)' >> /etc/exports
/etc/init.d/nfs-kernel-server restart

Then, the client root must be configured : sudo chroot /opt/ltsp/i386 Now edit /etc/default/ltsp-client-setup and change the value of the root_write_method variable to use bind mounts instead of unionfs, it should look like that afterwards: root_write_method="bind_mounts" Next you create the file /etc/initramfs-tools/conf.d/ltsp and add the following line (set the value of the BOOT variable to nfs): BOOT=nfs Regenerate the initramfs: update-initramfs -u Hit CTRL-D to exit the chroot now. Make sure ltsp uses the new initramfs to boot: sudo ltsp-update-kernels Note : there is a bug with Gutsy that prevent NFS to be used. One script have to be fixed, otherwise the thin-client will only display a blank screen. See https://bugs.launchpad.net/ubuntu/+source/ltsp/+bug/156229