个人工具

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

来自Ubuntu中文

跳转至: 导航, 搜索
 
(未显示同一用户的2个中间版本)
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/UbuntuLTSP/ClientTroubleshooting}}
 
{{From|https://help.ubuntu.com/community/UbuntuLTSP/ClientTroubleshooting}}
 
{{Languages|UbuntuHelp:UbuntuLTSP/ClientTroubleshooting}}
 
{{Languages|UbuntuHelp:UbuntuLTSP/ClientTroubleshooting}}
'''This wiki page is specific to Ubuntu Version(s): 7.10, 8.04'''
+
{|border="1" cellspacing="0"
 +
|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.
+
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:
 
* First, let's temporarily disable the Ubuntu bootsplash for the chroot environment, so we can see bootup messages scroll by:
 
<pre><nowiki>
 
<pre><nowiki>
 
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 activate the ''root'' account in the chroot, assign a password, and rebuild the chroot NBD image:
+
* 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]].
~-(On the server)-~
+
* ...and now we reboot the thin client, log into the chroot to examine the logs:
<pre><nowiki>
+
sudo chroot /opt/ltsp/i386 passwd -u root
+
sudo chroot /opt/ltsp/i386 passwd
+
sudo ltsp-update-image
+
</nowiki></pre>
+
...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 ==
 +
''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:
 +
<pre><nowiki>
 +
sudo mount --bind /dev /opt/ltsp/i386/dev
 +
sudo mount -t proc none /opt/ltsp/i386/proc
 +
</nowiki></pre>
 +
* 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):
 +
<pre><nowiki>
 +
LTSP_HANDLE_DAEMONS=false
 +
sudo chroot /opt/ltsp/i386 apt-get install openssh-server
 +
</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:
 +
<pre><nowiki>
 +
sudo ltsp-update-image
 +
</nowiki></pre>
 +
Reboot your thin clients, and you should have a functioning client-side SSH server!
 +
== Using remote syslog facilities ==
 
* Alternatively, you can [[UbuntuHelp:UbuntuLTSP/TCSyslogToLTSPServer|Enable|thin-client syslogging to the LTSP/syslog server]].
 
* Alternatively, you can [[UbuntuHelp:UbuntuLTSP/TCSyslogToLTSPServer|Enable|thin-client syslogging to the LTSP/syslog server]].
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

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