“UbuntuHelp:UbuntuLTSP/UpdatingChroot”的版本间的差异
来自Ubuntu中文
小 |
小 |
||
第1行: | 第1行: | ||
{{From|https://help.ubuntu.com/community/UbuntuLTSP/UpdatingChroot}} | {{From|https://help.ubuntu.com/community/UbuntuLTSP/UpdatingChroot}} | ||
{{Languages|UbuntuHelp:UbuntuLTSP/UpdatingChroot}} | {{Languages|UbuntuHelp:UbuntuLTSP/UpdatingChroot}} | ||
− | + | {|border="1" cellspacing="0" | |
+ | |This page is specific to Ubuntu versions 8.04 | ||
+ | |} | ||
+ | ''If you find this information applicable to additional versions/releases, '''''please''''' edit this page and modify this header to reflect that. Please also include any necessary modifications for this information to apply to the additional versions.'' | ||
+ | ---- | ||
=== Updating the Ubuntu LTSP client chroot === | === Updating the Ubuntu LTSP client chroot === | ||
By default, the 'ltsp-build-client' command in Ubuntu Hardy/8.04.1 will pull packages from 2 Ubuntu repositories, as well as generate a chroot sources.list file within the newly created chroot with the same 2 repositories, shown below: | By default, the 'ltsp-build-client' command in Ubuntu Hardy/8.04.1 will pull packages from 2 Ubuntu repositories, as well as generate a chroot sources.list file within the newly created chroot with the same 2 repositories, shown below: | ||
第9行: | 第13行: | ||
</nowiki></pre> | </nowiki></pre> | ||
Over time, packages that make up the LTSP chroot are updated with (sometimes major) bugfixes. By Ubuntu's packaging standards, a SRU is performed for packages that are deemed stable enough for people who utilize the "Recommended Updates" repositories (Check out System -> Administration -> Synaptic Package Manager, under Settings -> Repositories -> Updates). A default LTSP chroot will not inherit them, however, without extra ltsp-build-client options (such as —copy-sourceslist on a server with the hardy-updates repository already enabled in its own sources.list). Chrooting to /opt/ltsp/i386 and performing an 'apt-get update && dist-upgrade' won't upgrade to new packages in hardy-updates, since the sources.list file doesn't contain the hardy-updates repository. Even building a new chroot from scratch using ltsp-build-client won't help as it doesn't, by default, pull packages from hardy-updates. | Over time, packages that make up the LTSP chroot are updated with (sometimes major) bugfixes. By Ubuntu's packaging standards, a SRU is performed for packages that are deemed stable enough for people who utilize the "Recommended Updates" repositories (Check out System -> Administration -> Synaptic Package Manager, under Settings -> Repositories -> Updates). A default LTSP chroot will not inherit them, however, without extra ltsp-build-client options (such as —copy-sourceslist on a server with the hardy-updates repository already enabled in its own sources.list). Chrooting to /opt/ltsp/i386 and performing an 'apt-get update && dist-upgrade' won't upgrade to new packages in hardy-updates, since the sources.list file doesn't contain the hardy-updates repository. Even building a new chroot from scratch using ltsp-build-client won't help as it doesn't, by default, pull packages from hardy-updates. | ||
− | ''Note for upgrading across releases:'' If you have upgraded the LTSP server to a new release (such as Hardy -> Intrepid), it is recommended to build a new client chroot from scratch, as the ''ltsp-build-client'' script does things a normal ''apt-get'' upgrade will not. | + | ''Note for upgrading across releases:'' If you have upgraded the LTSP server to a new release (such as Hardy -> Intrepid), it is recommended to build a new client chroot from scratch (you must also re-install any packages you had installed previously.), as the ''ltsp-build-client'' script does things a normal ''apt-get'' upgrade will not. You can do this (including a backup) by following commands:'' |
− | + | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo cp -a /opt/ltsp /opt/ltsp-orig | sudo cp -a /opt/ltsp /opt/ltsp-orig | ||
+ | sudo rm -Rf /opt/ltsp/* | ||
+ | sudo ltsp-build-client | ||
</nowiki></pre> | </nowiki></pre> | ||
To upgrade your live chroot, we need to modify our existing /opt/ltsp/arch/etc/apt/sources.list file to include our ''hardy-updates'' repository as well, and then do an upgrade inside the chroot. | To upgrade your live chroot, we need to modify our existing /opt/ltsp/arch/etc/apt/sources.list file to include our ''hardy-updates'' repository as well, and then do an upgrade inside the chroot. | ||
第18行: | 第23行: | ||
<pre><nowiki> | <pre><nowiki> | ||
echo "deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates main restricted" | sudo tee -a /opt/ltsp/i386/etc/apt/sources.list | echo "deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates main restricted" | sudo tee -a /opt/ltsp/i386/etc/apt/sources.list | ||
+ | </nowiki></pre> | ||
+ | * Let's make sure the variable LTSP_HANDLE_DAEMONS=false is active. This will prevent the server from restarting its own daemons when upgrading the chroot: | ||
+ | <pre><nowiki> | ||
+ | export LTSP_HANDLE_DAEMONS=false | ||
</nowiki></pre> | </nowiki></pre> | ||
* Now let's chroot into the LTSP client chroot directory, mount /proc and do a update/dist-upgrade to pull down all updated packages in hardy-updates: | * Now let's chroot into the LTSP client chroot directory, mount /proc and do a update/dist-upgrade to pull down all updated packages in hardy-updates: | ||
第25行: | 第34行: | ||
apt-get update && apt-get dist-upgrade | apt-get update && apt-get dist-upgrade | ||
</nowiki></pre> | </nowiki></pre> | ||
− | * Follow any directions/instructions while upgrading packages. Make sure you tend to any errors while upgrading, as packages that fail to install correctly could potentially cause thin-clients to not boot correctly. | + | * Follow any directions/instructions while upgrading packages. Make sure you tend to any errors while upgrading, as packages that fail to install correctly could potentially cause thin-clients to not boot correctly. Also, if you get any errors that look similar to: '''Can not write log, openpty() failed (/dev/pts not mounted?)''', disregard them as they are purely cosmetic. See [https://bugs.launchpad.net/ubuntu/+source/ltsp/+bug/330194 LP Bug 330194] for updates on this. |
* Lastly, let's exit the chroot, unmount /proc, run ltsp-update-kernels (in case there was a kernel upgrade in the chroot) and rebuild our NBD thin-client image: | * Lastly, let's exit the chroot, unmount /proc, run ltsp-update-kernels (in case there was a kernel upgrade in the chroot) and rebuild our NBD thin-client image: | ||
<pre><nowiki> | <pre><nowiki> |
2009年5月12日 (二) 19:14的版本
点击翻译: |
English |
请不要直接编辑翻译本页,本页将定期与来源同步。 |
This page is specific to Ubuntu versions 8.04 |
If you find this information applicable to additional versions/releases, please edit this page and modify this header to reflect that. Please also include any necessary modifications for this information to apply to the additional versions.
Updating the Ubuntu LTSP client chroot
By default, the 'ltsp-build-client' command in Ubuntu Hardy/8.04.1 will pull packages from 2 Ubuntu repositories, as well as generate a chroot sources.list file within the newly created chroot with the same 2 repositories, shown below:
deb http://archive.ubuntu.com/ubuntu hardy main restricted deb http://security.ubuntu.com//ubuntu hardy main restricted
Over time, packages that make up the LTSP chroot are updated with (sometimes major) bugfixes. By Ubuntu's packaging standards, a SRU is performed for packages that are deemed stable enough for people who utilize the "Recommended Updates" repositories (Check out System -> Administration -> Synaptic Package Manager, under Settings -> Repositories -> Updates). A default LTSP chroot will not inherit them, however, without extra ltsp-build-client options (such as —copy-sourceslist on a server with the hardy-updates repository already enabled in its own sources.list). Chrooting to /opt/ltsp/i386 and performing an 'apt-get update && dist-upgrade' won't upgrade to new packages in hardy-updates, since the sources.list file doesn't contain the hardy-updates repository. Even building a new chroot from scratch using ltsp-build-client won't help as it doesn't, by default, pull packages from hardy-updates. Note for upgrading across releases: If you have upgraded the LTSP server to a new release (such as Hardy -> Intrepid), it is recommended to build a new client chroot from scratch (you must also re-install any packages you had installed previously.), as the ltsp-build-client script does things a normal apt-get upgrade will not. You can do this (including a backup) by following commands:
sudo cp -a /opt/ltsp /opt/ltsp-orig sudo rm -Rf /opt/ltsp/* sudo ltsp-build-client
To upgrade your live chroot, we need to modify our existing /opt/ltsp/arch/etc/apt/sources.list file to include our hardy-updates repository as well, and then do an upgrade inside the chroot.
- First, let's modify our LTSP chroot sources.list (assuming we're using i386-based chroot on an Ubuntu Hardy installation):
echo "deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates main restricted" | sudo tee -a /opt/ltsp/i386/etc/apt/sources.list
- Let's make sure the variable LTSP_HANDLE_DAEMONS=false is active. This will prevent the server from restarting its own daemons when upgrading the chroot:
export LTSP_HANDLE_DAEMONS=false
- Now let's chroot into the LTSP client chroot directory, mount /proc and do a update/dist-upgrade to pull down all updated packages in hardy-updates:
sudo chroot /opt/ltsp/i386 mount -t proc proc /proc apt-get update && apt-get dist-upgrade
- Follow any directions/instructions while upgrading packages. Make sure you tend to any errors while upgrading, as packages that fail to install correctly could potentially cause thin-clients to not boot correctly. Also, if you get any errors that look similar to: Can not write log, openpty() failed (/dev/pts not mounted?), disregard them as they are purely cosmetic. See LP Bug 330194 for updates on this.
- Lastly, let's exit the chroot, unmount /proc, run ltsp-update-kernels (in case there was a kernel upgrade in the chroot) and rebuild our NBD thin-client image:
exit sudo ltsp-update-kernels sudo umount /opt/ltsp/i386/proc sudo ltsp-update-image
- Obviously you'll have to reboot any thin-clients for the new image to apply and for you to enjoy fresh, bug-fixed packages.
Notes: Ubuntu bug #277331 reported for including *-updates when using 'ltsp-build-client'