个人工具

“UbuntuHelp:UbuntuLTSP/ClientTroubleshooting”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
 
(未显示同一用户的1个中间版本)
第2行: 第2行:
 
{{Languages|UbuntuHelp:UbuntuLTSP/ClientTroubleshooting}}
 
{{Languages|UbuntuHelp:UbuntuLTSP/ClientTroubleshooting}}
 
{|border="1" cellspacing="0"
 
{|border="1" cellspacing="0"
|This page is specific to Ubuntu versions 7.10, 8.04
+
|This page is specific to Ubuntu versions 8.04, 8.10, 9.04, 9.10, 10.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.''
 
''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.''
 
----
 
----
Sometimes you need to troubleshoot the thin-client boot process. This is fairly easy if you understand the concepts behind LTSP and the boot process of a thin-client.
+
Sometimes you need to troubleshoot the thin client boot process. This is fairly easy if you understand the concepts behind LTSP and the boot process of a thin-client.
 
== Troubleshooting at the client itself ==
 
== Troubleshooting at the client itself ==
 
* First, let's temporarily disable the Ubuntu bootsplash for the chroot environment, so we can see bootup messages scroll by:
 
* First, let's temporarily disable the Ubuntu bootsplash for the chroot environment, so we can see bootup messages scroll by:
第12行: 第12行:
 
sudo vim /var/lib/tftpboot/ltsp/i386/pxelinux.cfg/default
 
sudo vim /var/lib/tftpboot/ltsp/i386/pxelinux.cfg/default
 
</nowiki></pre>
 
</nowiki></pre>
Remove the ''quiet'' stanza, and change ''splash'' to ''nosplash''. Save and exit, and reboot the thin-client. You should now see all bootup messages instead of the Ubuntu graphical bootsplash.
+
Remove the word ''quiet'' and ''splash''. Save and exit, and reboot the thin-client. You should now see all bootup messages instead of the Ubuntu graphical bootsplash.
* In the case of X not launching, and nothing valuable in dmesg, you want to be able to log into the chroot environment to examine the logs contained in /var/log (you can't do this on the server as /var/log on the client is stored in RAM). Let's [[UbuntuHelp:UbuntuLTSP/UnlockChrootRootAcct|activate|the ''root'' account in the chroot]].
+
* In the case of X not launching, and nothing valuable in dmesg, you want to be able to log into the chroot environment to examine the logs contained in /var/log (you can't do this on the server as /var/log on the client is stored in RAM). Let's [[UbuntuHelp:UbuntuLTSP/UnlockChrootRootAcct|activate|the ''root'' account in the chroot]].  To create an administrative user account in the chroot that can sudo to root, see [[UbuntuHelp:UbuntuLTSP/CreateChrootAdminAcct|create|an ''admin'' account in the chroot]].
 
* ...and now we reboot the thin client, log into the chroot to examine the logs:
 
* ...and now we reboot the thin client, log into the chroot to examine the logs:
 
~-(On the thin-client)-~
 
~-(On the thin-client)-~
 
* CTRL+ALT+F1 will get you to a TTY to log in, even if X is giving you a blank screen.
 
* CTRL+ALT+F1 will get you to a TTY to log in, even if X is giving you a blank screen.
 
* Log in with your newly unlocked ''root'' account, navigate to /var/log, and check out Xorg.6.log (amongst others that might pertain to your situation).
 
* Log in with your newly unlocked ''root'' account, navigate to /var/log, and check out Xorg.6.log (amongst others that might pertain to your situation).
 +
== Using a shell SCREEN ==
 +
Instead of unlocking the root account and updating the image, there's a quicker way to get local root access to an LTSP client. Open or create the lts.conf settings file, by running
 +
<pre><nowiki>
 +
sudo gedit /var/lib/tftpboot/ltsp/i386/lts.conf
 +
</nowiki></pre>
 +
Then, paste the following into it:
 +
<pre><nowiki>
 +
[Default]
 +
SCREEN_02=shell
 +
SCREEN_07=ldm
 +
</nowiki></pre>
 +
As soon as the client is rebooted you'll be able to press Ctrl+Alt+F2 to get to a local root prompt, while Ctrl+Alt+F7 will get you back to the LDM display manager.
 
== Troubleshooting via SSH ==
 
== Troubleshooting via SSH ==
 
''Shamelessly ripped off from https://help.ubuntu.com/community/HowToSetupLTSPDevelEnvironment''
 
''Shamelessly ripped off from https://help.ubuntu.com/community/HowToSetupLTSPDevelEnvironment''
第29行: 第41行:
 
<pre><nowiki>
 
<pre><nowiki>
 
LTSP_HANDLE_DAEMONS=false
 
LTSP_HANDLE_DAEMONS=false
sudo chroot /opt/ltsp/i386 apt-get install ssh
+
sudo chroot /opt/ltsp/i386 apt-get install openssh-server
</nowiki></pre>
+
* If you haven't already, unlock the root account and set a password:
+
<pre><nowiki>
+
sudo chroot /opt/ltsp/i386 passwd -u root
+
sudo chroot /opt/ltsp/i386 passwd
+
 
</nowiki></pre>
 
</nowiki></pre>
 +
* If you want to unlock the root account and set a password:
 +
See [[UbuntuHelp:UbuntuLTSP/UnlockChrootRootAcct|activate|the ''root'' account in the chroot]].
 +
* To create an administrative user account in the chroot that can sudo to root:
 +
See [[UbuntuHelp:UbuntuLTSP/CreateChrootAdminAcct|create|an ''admin'' account in the chroot]]
 
* Lastly, rebuild the client image:
 
* Lastly, rebuild the client image:
 
<pre><nowiki>
 
<pre><nowiki>

2010年5月20日 (四) 00:28的最新版本

This page is specific to Ubuntu versions 8.04, 8.10, 9.04, 9.10, 10.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.


Sometimes you need to troubleshoot the thin client boot process. This is fairly easy if you understand the concepts behind LTSP and the boot process of a thin-client.

Troubleshooting at the client itself

  • First, let's temporarily disable the Ubuntu bootsplash for the chroot environment, so we can see bootup messages scroll by:
sudo vim /var/lib/tftpboot/ltsp/i386/pxelinux.cfg/default

Remove the word quiet and splash. Save and exit, and reboot the thin-client. You should now see all bootup messages instead of the Ubuntu graphical bootsplash.

  • In the case of X not launching, and nothing valuable in dmesg, you want to be able to log into the chroot environment to examine the logs contained in /var/log (you can't do this on the server as /var/log on the client is stored in RAM). Let's activate|the root account in the chroot. To create an administrative user account in the chroot that can sudo to root, see create|an admin account in the chroot.
  • ...and now we reboot the thin client, log into the chroot to examine the logs:

~-(On the thin-client)-~

  • CTRL+ALT+F1 will get you to a TTY to log in, even if X is giving you a blank screen.
  • Log in with your newly unlocked root account, navigate to /var/log, and check out Xorg.6.log (amongst others that might pertain to your situation).

Using a shell SCREEN

Instead of unlocking the root account and updating the image, there's a quicker way to get local root access to an LTSP client. Open or create the lts.conf settings file, by running

sudo gedit /var/lib/tftpboot/ltsp/i386/lts.conf

Then, paste the following into it:

[Default]
SCREEN_02=shell
SCREEN_07=ldm

As soon as the client is rebooted you'll be able to press Ctrl+Alt+F2 to get to a local root prompt, while Ctrl+Alt+F7 will get you back to the LDM display manager.

Troubleshooting via SSH

Shamelessly ripped off from https://help.ubuntu.com/community/HowToSetupLTSPDevelEnvironment It's really useful to be able to start a shell on a thin-client when debugging or development. Let's install openssh-server into the chroot,

  • SSH needs /dev/random and proc interface, so mount them:
sudo mount --bind /dev /opt/ltsp/i386/dev
sudo mount -t proc none /opt/ltsp/i386/proc
  • Now, install the SSH server in the chroot, telling the server not to handle the start/stop of the daemon (since we're working in the client filesystem):
LTSP_HANDLE_DAEMONS=false
sudo chroot /opt/ltsp/i386 apt-get install openssh-server
  • If you want to unlock the root account and set a password:

See activate|the root account in the chroot.

  • To create an administrative user account in the chroot that can sudo to root:

See create|an admin account in the chroot

  • Lastly, rebuild the client image:
sudo ltsp-update-image

Reboot your thin clients, and you should have a functioning client-side SSH server!

Using remote syslog facilities