From: Victor Wagner Date: Thu, 8 Nov 2007 21:10:19 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=f3d1d0f999f83859f0956a6b3e38e5676f77b419;p=sites%2Fhome_page.git *** empty log message *** --- diff --git a/hints/etch-x-term.html b/hints/etch-x-term.html new file mode 100644 index 0000000..b781e7d --- /dev/null +++ b/hints/etch-x-term.html @@ -0,0 +1,242 @@ + + + +Creating diskless X-terminal with Debian etch + +

óÏÚÄÁÎÉÅ ÂÅÚÄÉÓËÏ×ÏÇÏ X-ÔÅÒÍÉÎÁÌÁ Ó ÐÏÍÏÝØÀ Debian etch

+

+÷ ÓÏÓÔÁ× Debian etch ×ÈÏÄÑÔ ÐÁËÅÔÙ ltsp-server É ltsp-utils, ÓÐÅÃÉÁÌØÎÏ +ÐÒÅÄÎÁÚÎÁÞÅÎÎÙÅ ÄÌÑ ÓÏÚÄÁÎÉÑ ÔÏÎËÉÈ ËÌÉÅÎÔÏ×. îÏ ÍÎÅ ÞÔÏ-ÔÏ ÐÏÌÕÞÉ×ÛÁÑÓÑ +"ÔÏÎËÏÓÔØ" ÎÅ ÐÏÎÒÁ×ÉÌÁÓØ. +

+

+ðÏÜÔÏÍÕ Ñ ÐÏÛÅÌ ÄÒÕÇÉÍ ÐÕÔÅÍ +

+

+óÎÁÞÁÌÁ Ñ ÞÅÓÔÎÏ ÐÏÐÙÔÁÌÓÑ ×ÏÓÐÏÌØÚÏ×ÁÔØÓÑ debootstrap, ÎÏ ËÁË +×ÙÑÓÎÉÌÏÓØ, ÚÁ×ÉÓÉÍÏÓÔÉ Õ ÔÒÅÂÕÅÍÙÈ ÄÌÑ X-ÔÅÒÍÉÎÁÌÁ ÐÁËÅÔÏ× ÔÁËÉÅ, +ÞÔÏ ÏÊ. ðÏÌÕÞÉÔÓÑ ÎÅ ÍÅÎØÛÅ, ÞÅÍ Õ ltsp. +

+

+á ÍÎÅ × ÉÔÏÇÅ ÕÄÁÌÏÓØ ÕÌÏÖÉÔØÓÑ × 28íÂ. ôÏÖÅ ÍÎÏÇÏ, ÎÏ ÕÖÅ ÅÓÌÉ +ÚÁÈÏÞÅÔÓÑ, ÍÏÖÎÏ ×ÍÅÓÔÏ ÓÅÔÅ×ÏÊ ÚÁÇÒÕÚËÉ ÎÅÎÕÖÎÕÀ 32í CF-ËÕ ÎÁ IDE +ÐÒÉÃÅÐÉÔØ. +

+

ðÏÓÔÁÎÏ×ËÁ ÚÁÄÁÞÉ

+

+éÍÅÅÔÓÑ ÓÉÓÔÅÍÁ, ÓÏÄÅÒÖÁÝÁÑ ×ÉÄÅÏËÁÒÔÕ, ÓÅÔÅ×ÕÀ ËÁÒÔÕ Ó PXE-bootrom, +Ú×ÕËÏ×ÕÀ ËÁÒÔÕ, ÆÌÏÐÏ×ÏÄ É ÎÅÍÎÏÖËÏ ÐÁÍÑÔÉ (Õ ÍÅÎÑ - 64 ÍÂ). +èÏÞÅÔÓÑ ÞÔÏÂÙ ÜÔÁ ÛÔÕËÁ ÐÒÅ×ÒÁÔÉÌÁÓØ × ÐÏÌÎÏÃÅÎÎÏÅ ÒÁÂÏÞÅÅ ÍÅÓÔÏ, ÇÄÅ +ÍÏÖÎÏ ÒÁÂÏÔÁÔØ Ó ÐÒÉÌÏÖÅÎÉÑÍÉ, × ÔÏÍ ÞÉÓÌÅ É ÒÁÂÏÔÁÀÝÉÍÉ ÓÏ Ú×ÕËÏÍ, +ÞÉÔÁÔØ ÄÉÓËÅÔÙ É USB-ÆÌÜÛËÉ. +

+

+äÌÑ ÜÔÏÇÏ ÎÁÍ ÎÕÖÎÏ ÞÔÏÂÙ ÎÁ ÜÔÏÊ ÓÉÓÔÅÍÅ ÚÁÐÕÓÔÉÌÉÓØ X-ÓÅÒ×ÅÒ, nasd +(ÖÅÌÁÀÝÉÅ ÍÏÇÕÔ ÒÁÚÒÁÂÏÔÁÔØ ×ÁÒÉÁÎÔ Ó PulseAudio ÉÌÉ esd), É Ä×Á floppyd +- ÏÄÉÎ ÎÁ ÄÉÓËÏ×ÏÄ, ÄÒÕÇÏÊ ÎÁ ÕÓÔÒÏÊÓÔ×Ï /dev/sda1. +

+ +

ðÏÓÌÅÄÏ×ÁÔÅÌØÎÏÓÔØ ÄÅÊÓÔ×ÉÊ:

+

+óÎÁÞÁÌÁ ÓÏÂÉÒÁÅÍ ÑÄÒÏ Ó ÐÏÍÏÝØÀ kernel-package. ÷ ÐÁËÅÔ. ñÄÒÏ ÓÏÂÉÒÁÅÍ +ÂÅÚ initrd, ÓÏ ×ÓÅÍÉ ÎÕÖÎÙÍÉ ÍÏÄÕÌÑÍÉ ÓÅÔÅ×ÙÈ ËÁÒÔ É ÐÏÄÄÅÒÖËÏÊ NFS-root +×ÎÕÔÒÉ. ú×ÕË É ÐÏÄÄÅÒÖËÕ USB ÍÏÖÎÏ ÍÏÄÕÌÑÍÉ. USB ÎÁÍ ÎÕÖÎÁ ÒÁÄÉ +usb-storage, ÞÔÏÂÙ ÍÏÖÎÏ ÂÙÌÏ ×ÔÙËÁÔØ ÆÌÜÛËÉ × ÔÅÒÍÉÎÁÌ É ÉÈ ÞÉÔÁÔØ Ó +ÐÏÍÏÝØÀ mtools +

+

+âÅÒÅÍ ÎÁÂÏÒ ÓÌÅÄÕÀÝÉÊ ÐÁËÅÔÏ× (ÎÅËÏÔÏÒÙÅ ÚÁ×ÉÓÉÍÏÓÔÉ ÂÕÄÕÔ +ÎÅÕÄÏ×ÌÅÔ×ÏÒÅÎÙ, ÎÏ ÄÌÑ ÎÕÖÎÏÊ ÎÁÍ ÆÕÎËÃÉÏÎÁÌØÎÏÓÔÉ È×ÁÔÉÔ) +

+
+libc6
+busybox
+modutils (ÜÔÏ ÅÓÌÉ Ó ÑÄÒÏÍ 2.4. åÓÌÉ 2.6, ÔÏ module-init-tools)
+libwrap0
+portmap
+nfs-common
+x11-common
+libxt6
+libice6
+libsm6
+libx11-6
+libaudio2
+libxau6
+nas
+floppyd
+libfontenc1
+libgcc1
+libxfont1
+zlib1g
+libfreetype6
+xserver-xorg-core
+xserver-xorg-video-ati (ÜÔÏ Õ ÍÅÎÑ ati. õ ×ÁÓ ÍÏÖÅÔ ÂÙÔØ ÄÒÕÇÏÅ. ÷
+ÐÒÉÎÃÉÐÅ, installed-size Õ ÄÒÁÊ×ÅÒÏ× ÍÁÌÅÎØËÉÊ, ÍÏÖÅÔÅ ÈÏÔØ ×ÓÅ
+ÚÁÓÏÂÁÞÉÔØ)
+xserver-xorg-input-kbd
+xserver-xorg-input-mouse
+xserver-xorg-input-evdev
+
+

+÷ÙÂÉÒÁÅÍ ÎÅËÏÔÏÒÕÀ ÄÉÒÅËÔÏÒÉÀ (Õ ÍÅÎÑ /var/diskless), ÏÔËÕÄÁ ÜÔÏ ÄÅÌÏ +ÂÕÄÅÔ ÒÁÚÄÁ×ÁÔØÓÑ ÐÏ NFS. +

+

+òÁÓÐÁËÏ×Ù×ÁÅÍ ÔÕÄÁ ÐÅÒÅÞÉÓÌÅÎÙÎÎÙÅ ÐÁËÅÔÙ c ÐÏÍÏÝØÀ +

+
+dpkg-deb -X ÐÁËÅÔ ÄÉÒÅËÔÏÒÉÑ
+
+

+îÉËÁËÉÅ postinst ÓËÒÉÐÔÙ ÎÅ ×ÙÐÏÌÎÑÀÔÓÑ, ÎÏ × ÄÁÎÎÏÍ ÓÌÕÞÁÅ +ÎÅÔÒÉ×ÉÁÌØÎÙÈ postinst-ÓËÒÉÐÔÏ× É ÎÅÔ. ÷ÍÅÓÔÏ ÜÔÏÇÏ ÄÅÌÁÅÍ ÓÌÅÄÕÀÝÅÅ +

+
+# chroot /var/diskless /bin/busybox sh
+/ #  mount -t proc none /proc
+/ #  busybox --install
+/ #  ldconfig
+/ #  exit
+
+

+÷Ù, ÎÁ×ÅÒÎÏÅ, ÕÄÉ×ÉÔÅÓØ: "á ÇÄÅ ÖÅ ÐÁËÅÔ xkb-data". á ÎÅÔÕ. íÙ ÂÕÄÅÍ ÚÁÐÕÓËÁÔØ xkbcomp Ó ÈÏÓÔÁ, ÐÒÉ ÌÏÇÉÎÅ ÉÚ .xsession. ôÁËÉÍ ÏÂÒÁÚÏÍ Õ ËÁÖÄÏÇÏ ÀÚÅÒÁ ÍÏÖÅÔ ÂÙÔØ ÓÏÂÓÔ×ÅÎÎÁÑ ÒÁÓËÌÁÄËÁ ËÌÁ×ÉÁÔÕÒÙ. +

+ +ôÅÐÅÒØ ÎÁÄÏ ÄÏÐÏÌÎÉÔÅÌØÎÏ ÓÏÚÄÁÔØ ÆÁÊÌ +/var/diskless/etc/X11/Xwrapper.config +(Ñ ÎÅ ÍÕÄÒÓÔ×ÕÑ ÌÕËÁ×Ï ÓËÏÐÉÒÏ×ÁÌ ÅÇÏ Ó ÈÏÓÔÁ), +ÓÏÚÄÁÔØ ÓÉÍÌÉÎË /var/diskless/etc/X11/X, ×ÅÄÕÝÉÊ ÎÁ +/usr/bin/Xorg (ÁÇÁ, +ÉÍÅÎÎÏ ÓÏ ÓÌÜÛÏÍ ×ÎÁÞÁÌÅ). âÏÌØÛÉÅ ÜÓÔÅÔÙ ÍÏÇÕÔ ÓÏÚÄÁ×ÁÔØ ÅÇÏ ÚÁÊÄÑ × +chroot É ÚÁÐÕÓÔÉ× ÔÁÍ busybox-Ï×ÓËÉÊ ÛÅÌÌ, ÎÏ Ñ É ÔÁË ÏÂÏÛÅÌÓÑ, +ÓÏÚÄÁÔØ ÄÉÒÅËÔÏÒÉÉ /dev /tmp É /var/log É ÎÁÓÅÌÉÔØ dev ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÉÍÉ +ÓÐÅÃÉÁÌØÎÙÍÉ ÆÁÊÌÁÍÉ. õ ÍÅÎÑ ÔÁÍ +
+audio    dsp0  mem     port    sda1   sda13  sda3  sda7  tty1  tty5
+audio0   fd0   mixer   psaux   sda10  sda14  sda4  sda8  tty2  tty6
+console  full  mixer0  random  sda11  sda15  sda5  sda9  tty3  urandom
+dsp      kmem  null    sda     sda12  sda2   sda6  tty0  tty4  zero
+
+

+÷ ÐÒÉÎÃÉÐÅ, ÞÁÓÔØ tty ÍÏÖÎÏ ÐÏÏÔÒÙ×ÁÔØ, ÄÁ É ÒÁÚÄÅÌÙ sda ËÒÏÍÅ sda1 ÎÅ +ÎÕÖÎÙ. +

+

+ëÌÁÄÅÍ xorg.conf × /etc/X11 (Õ ÎÅÇÏ ÄÏÌÖÅÎ ÂÙÔØ ÅÄÉÎÓÔ×ÅÎÎÙÊ ÜÌÅÍÅÎÔ +font-path, ÕËÁÚÙ×ÁÀÝÉÊ ÎÁ ÆÏÎÔ-ÓÅÒ×ÅÒ) É ÉÍÅÅÍ ÐÒÁËÔÉÞÅÓËÉ ÇÏÔÏ×ÕÀ +ÓÉÓÔÅÍÕ, ÚÁ ÉÓËÌÀÞÅÎÉÅÍ init. +

+

+÷ÍÅÓÔÏ init ËÌÁÄÅÍ ÛÅÌÌÏ×ÓËÉÊ ÓËÒÉÐÔ ÓÌÅÄÕÀÝÅÇÏ ÓÏÄÅÒÖÁÎÉÑ: +

+ + +#!/bin/sh
+PATH=/bin:/sbin:/usr/bin:/usr/sbin
+export PATH
+respawn() {
+    (while true; do
+        $1
+        sleep 5
+    done)  &
+}
+echo -n loading modules
+for i in usbcore uhci usb-storage opl3sa2; do
+    modprobe $i && echo -n " $i"
+done
+echo "."
+echo starting portmapper
+/sbin/portmap -v -d &
+/sbin/rpc.statd
+/sbin/rpc.lockd
+echo mounting all filesystems
+mount /proc
+mount /proc/bus/usb
+echo clearing /tmp
+cd /tmp&& rm -rf * .sockets .X0-lock
+
+echo -n starting floppyd
+floppyd -r root -d /dev/fd0&& echo -n " floppy" 
+floppyd -r root -s 5704 /dev/sda1&& echo -n " flash"
+echo .
+
+respawn "nasd -aa"
+respawn "X -query wagner.wagner.home"
+wait
+
+ +ôÅÐÅÒØ ÐÏÌÕÞÉ×ÛÕÀÓÑ ÄÉÒÅËÔÏÒÉÀ ÎÁÄÏ ÒÁÚÄÁÔØ ÐÏ NFS Ó ÏÐÃÉÑÍÉ +rw,no_root_squash +É ÍÏÖÎÏ ÎÁÓÔÒÁÉ×ÁÔØ ÓÏÂÓÔ×ÅÎÎÏ ÚÁÇÒÕÚËÕ. + +

îÁÓÔÒÏÊÒËÁ ÚÁÇÒÕÚËÉ

+

+óÔÁ×ÉÍ ÎÁ ÈÏÓÔ ÐÁËÅÔÙ syslinux, dhcp3-server É tftp-hpa. ÷ ËÏÍÁÎÄÎÕÀ ÓÔÒÏËÕ +tftp-hpa ÎÕÖÎÏ ÄÏÂÁ×ÉÔØ ÏÐÃÉÀ -r blksize, ÐÏÔÏÍÕ ÞÔÏ Õ ÎÅËÏÔÏÒÙÈ PXEboot +ROM ÐÒÏÂÌÅÍÙ Ó ÜÔÏÊ ÏÐÃÉÅÊ. +

+

+/usr/lib/pxelinux.0 É ÑÄÒÏ ÉÚ /var/diskless/boot ËÏÐÉÒÕÅÍ × +/var/lib/tftpboot. +

+

+óÏÚÄÁÅÍ ÄÉÒÅËÔÏÒÉÀ /var/lib/ftpboot/pxelinux.cfg É ÐÏÍÅÝÁÅÍ ÔÕÄÁ ÆÁÊÌ +default ÓÌÅÄÕÀÝÅÇÏ ÓÏÄÅÒÖÁÎÉÑ: +

+DEFAULT term root=/dev/nfs ip=192.168.217.5:192.168.217.1:192.168.217.1:255.255.255.0:xterm3:eth0:dhcp nfsroot=192.168.217.1:/var/diskless rw
+LABEL term
+KERNEL vmlinuz-2.4.27-terminals
+
+

+åÓÌÉ ÐÏÞÉÔÁÔØ ÐÏÌÕÞÛÅ ÄÏËÕÍÅÎÔÁÃÉÀ ÎÁ ÏÐÃÉÀ nfsroot × ÑÄÒÅ, ÍÏÖÅÔ ÂÙÔØ +ÕÄÁÓÔÓÑ ÏÂÏÊÔÉÓØ ÂÅÚ ËÏÍÁÎÄÙ ip, ËÏÔÏÒÁÑ ÆÁËÔØÞÅÓËÉ ÐÒÉ×ÏÄÉÔ Ë +ÎÅÏÂÈÏÄÉÍÏÓÔÉ ÎÁÌÉÞÉÑ ÏÔÄÅÌØÎÏÇÏ ËÏÎÆÉÇÕÒÁÃÉÏÎÎÏÇÏ ÆÁÊÌÁ ÄÌÑ ËÁÖÄÏÇÏ +ÔÅÒÍÉÎÁÌÁ. îÏ Ñ ÐÏËÁ ÎÅ ÓÔÁÌ Ó ÜÔÉÍ ÚÁÍÏÒÁÞÉ×ÁÔÓØÑ, ÐÏÔÏÍÕ ÞÔÏ pxelinux +ÐÏÚ×ÏÌÑÅÔ ÉÓËÁÔØ ËÏÎÆÉÇÕÒÁÃÉÏÎÎÙÊ ÆÁÊÌ ÐÏ IP-ÁÄÒÅÓÕ ÉÌÉ mac-ÁÄÒÅÓÕ, Á +ÞÅÒÅÚ ÜÔÏÔ ÆÁÊÌ ÍÏÖÎÏ (× ×ÉÄÅ ÎÅÐÏÎÉÍÁÅÍÙÈ ÑÄÒÏÍ ÏÐÃÉÊ ËÏÍÁÎÄÎÏÊ ÓÔÒÏËÉ, +ËÏÔÏÒÙÅ ÐÏÔÏÍ ÍÏÖÎÏ ÓËÒÉÐÔÏÍ ÉÚ×ÌÅÞØ ÉÚ /proc/cmdline) ÐÅÒÅÄÁÔØ ÍÎÏÇÏ +ÔÁËÏÇÏ, ÞÔÏ ÎÅ ×ÐÉÓÙ×ÁÅÔÓÑ × DHCP. +

+

+÷ dhcpd.conf ÐÉÛÅÍ ÒÁÚÄÅÌ host ÄÌÑ ÔÅÒÍÉÎÁÌÁ. (ÅÓÌÉ ÔÅÒÍÉÎÁÌÏ× ÍÎÏÇÏ, +ÍÏÖÎÏ ÎÁÐÉÓÁÔØ ÏÄÉÎ ÒÁÚÄÅÌ group, ÎÏ ÜÔÏ ÕÖ ÞÉÔÁÊÔÅ ÄÏËÕÍÅÎÔÁÃÉÀ ÎÁ +pxelinux É dhcpd ÓÁÍÉ) +

+
+      host xterm3 {
+         hardware ethernet xx:xx:xx:xx:xx:xx;
+         fixed-address 192.168.217.5;
+         option host-name "xterm3";
+         next-server 192.168.217.1;
+        option domain-name "wagner.home";
+         filename "pxelinux.0";
+        option root-path "wagner.wagner,home:/var/diskless/";
+
+      }
+
+

+çÌÁ×ÎÏÅ, ÎÅ ÚÁÂÙÔØ ËÏÍÁÎÄÕ next-server, ÐÏÔÏÍÕ ÞÔÏ ÅÓÌÉ PXE BootRom ÐÒÅËÒÁÓÎÏ ÏÂÈÏÄÉÔÓÑ ÂÅÚ ÎÅ£, ÔÏ pxelinux ÐÏÞÅÍÕ-ÔÏ ÎÁÞÉÎÁÅÔ ÔÁÝÉÔØ Ó×ÏÊ ÆÁÊÌ ËÏÎÆÉÇÕÒÁÃÉÉ É ÑÄÒÏ Ó ÁÄÒÅÓÁ 0.0.0.0. +

+

+ôÅÐÅÒØ ÓÔÁ×ÉÍ xfs, ÏÔÒÙ×ÁÅÍ Õ ÎÅÇÏ ÉÚ ËÏÎÆÉÇÁ no-listen = tcp, +É ÒÁÚÒÅÛÁÅÍ ÏÂÓÌÕÖÉ×ÁÎÉÅ ÔÅÒÍÉÎÁÌÏ× × display manager. ÷ xdm ÄÌÑ ÜÔÏÇÏ ÎÅÏÂÈÏÄÉÍÏ ÚÁËÏÍÅÎÔÁÒÉÔØ ÓÔÒÏÞËÕ +

+DisplayManager.requestPort: 0 
+
+× xdm-config É ÒÁÓËÏÍÅÎÔÁÒÉÔØ ÓÔÒÏÞËÕ +
+* # any host can get a login window
+
+× Xaccess. +

+

+çÏÔÏ×Ï, ÍÏÖÎÏ ÇÒÕÚÉÔØÓÑ. +

+

TBD

+îÁÕÞÉÔØÓÑ ÐÏÌÕÞÁÔØ aÄÒÅÓ ÆÏÎÔ-ÓÅÒ×ÅÒÁ É ÁÄÒÅÓ ÈÏÓÔÁ, ÐÅÒÅÄÁ×ÁÅÍÏÇÏ × ÏÐÃÉÀ query ÐÏ dhcp (ÏÐÃÉÉ font-server É x-display-manager) + + + +