/l3/users/tigor/nt-scale/linux3.unix.nt/root :1 :2 :3 :4 :5 :6 |
|
#apt-get install debootstrap
![]() Reading package lists... Done Building dependency tree Reading state information... Done debootstrap is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded. |
#apt-get install debootstrap
Reading package lists... Done Building dependency tree Reading state information... Done debootstrap is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded. |
#mount
/dev/sda1 on / type ext3 (rw,errors=remount-ro) tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) fusectl on /sys/fs/fuse/connections type fusectl (rw) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev) xenfs on /proc/xen type xenfs (rw) /dev/mapper/NEWVG-debian1 on /mnt type ext3 (rw) |
#apt-cache search live cd debian
autorun4linuxcd - Menu for Debian Live under Windows live-magic - GUI frontend to create Debian LiveCDs, netboot images, etc. |
#apt-cache search live cd
autorun4linuxcd - Menu for Debian Live under Windows gcdmaster - GNOME GUI for cdrdao crash - kernel debugging utility, allowing gdb like syntax ezgo-accessories - EzGo Accessories ezgo-education - EzGo Education ezgo-games - EzGo Games ezgo-imaging - EzGo imaging ezgo-multimedia - EzGo multimedia ezgo-network - EzGo network ezgo-office - EzGo Office ... complearn-tools - complearn machine-learning command-line utilities browser-plugin-parole - multimedia plugin for web browsers based on Parole media player parole-dev - development files for Parole media player parole - media player based on GStreamer framework python-django-dmigrations - Database migration tool for Django projects qtemu - graphical user interface for QEMU texlive-base - TeX Live: Essential programs and files texlive-font-utils - TeX Live: TeX and Outline font utilities texlive-latex-extra - TeX Live: LaTeX supplementary packages texlive-publishers - TeX Live: Support for publishers, theses, standards, conferences, etc. |
#apt-cache search yum
bouncy - eat the yummy veggies in the garden - game for small kids createrepo - generates the metadata necessary for a RPM package repository vfdata-morisawa5 - Font files for Morisawa Basic-5 type faces for pTeX python-smartpm - Python library of the Smart Package Manager smartpm-core - An alternative package manager that works with dpkg/rpm smartpm - An alternative package manager that works with dpkg/rpm python-sqlitecachec - A fast metadata parser for YUM yum - Advanced front-end for rpm |
#apt-cache search unet
gnunet-fuse - secure, trust-based peer-to-peer framework (fuse filesystem client) gnunet-gtk-dbg - secure, trust-based peer-to-peer framework (GTK+ client debug) gnunet-gtk-dev - secure, trust-based peer-to-peer framework (GTK+ client development) gnunet-gtk - secure, trust-based peer-to-peer framework (GTK+ client) gnunet-qt-dbg - secure, trust-based peer-to-peer framework (Qt client debug) gnunet-qt - secure, trust-based peer-to-peer framework (Qt client) gnunet-client - secure, trust-based peer-to-peer framework (client) gnunet-common - secure, trust-based peer-to-peer framework (common) gnunet-dbg - secure, trust-based peer-to-peer framework (debug) gnunet-dev - secure, trust-based peer-to-peer framework (development) gnunet-server - secure, trust-based peer-to-peer framework (server) gnunet-tools - secure, trust-based peer-to-peer framework (tools) gnunet - secure, trust-based peer-to-peer framework (meta) libmicrohttpd5 - library embedding HTTP server functionality postal - SMTP benchmark - the mad postman. unetbootin-translations - translations for unetbootin distribution installer unetbootin - installer of Linux/BSD distributions to a partition or USB drive |
#apt-get install unetbootin
![]() Читання переліків пакетів... Виконано Побудова дерева залежностей Reading state information... Виконано Будуть встановлені наступні додаткові пакунки: libaudio2 libcrypt-passwdmd5-perl libdigest-sha1-perl libmysqlclient16 libqt4-dbus libqt4-designer libqt4-network libqt4-qt3support libqt4-script libqt4-sql libqt4-sql-mysql libqt4-xml libqtcore4 libqtgui4 mysql-common qt4-qtconfig syslinux syslinux-common unetbootin-translations Пропоновані пакунки: nas libqt4-dev НОВІ пакунки, які будуть встановлені: libaudio2 libcrypt-passwdmd5-perl libdigest-sha1-perl libmysqlclient16 libqt4-dbus libqt4-designer libqt4-network libqt4-qt3support libqt4-script libqt4-sql libqt4-sql-mysql libqt4-xml libqtcore4 libqtgui4 mysql-common qt4-qtconfig syslinux syslinux-common unetbootin unetbootin-translations оновлено 0, встановлено 20 нових пакунків, для видалення відмічено 0 пакунків, і 10 пакунків не оновлено. Необхідно завантажити 21,1 MB архівів. After this operation, 51,8 MB of additional disk space will be used. Бажаєте продовжити [Т/н]? n Перервано. |
#apt-get install unetbootin
Читання переліків пакетів... Виконано Побудова дерева залежностей Reading state information... Виконано Будуть встановлені наступні додаткові пакунки: libaudio2 libcrypt-passwdmd5-perl libdigest-sha1-perl libmysqlclient16 libqt4-dbus libqt4-designer libqt4-network libqt4-qt3support libqt4-script libqt4-sql libqt4-sql-mysql libqt4-xml libqtcore4 libqtgui4 mysql-common qt4-qtconfig syslinux syslinux-common unetbootin-translations Пропоновані пакунки: nas libqt4-dev ... Setting up libqt4-sql (4:4.6.3-4) ... Setting up libqt4-qt3support (4:4.6.3-4) ... Setting up libqt4-sql-mysql (4:4.6.3-4) ... Setting up qt4-qtconfig (4:4.6.3-4) ... update-alternatives: using /usr/bin/qtconfig-qt4 to provide /usr/bin/qtconfig (qtconfig) in auto mode. Setting up syslinux-common (2:4.02+dfsg-7) ... Setting up syslinux (2:4.02+dfsg-7) ... Setting up unetbootin (471-2) ... Setting up unetbootin-translations (471-2) ... Processing triggers for menu ... |
#unetbootin
![]() unetbootin: cannot connect to X server |
#man unetbootin
|
#lvs -a
![]() LV VG Attr LSize Origin Snap% Move Log Copy% Convert vm-linux3 NEWVG -wi-ao 10.00g |
#lvs -a
LV VG Attr LSize Origin Snap% Move Log Copy% Convert vm-linux3 NEWVG -wi-ao 10.00g |
#dpkg -L unetbootin
/. /usr /usr/bin /usr/bin/unetbootin /usr/share /usr/share/applications /usr/share/applications/unetbootin.desktop /usr/share/doc /usr/share/doc/unetbootin /usr/share/doc/unetbootin/copyright /usr/share/doc/unetbootin/changelog.Debian.gz /usr/share/man /usr/share/man/man1 /usr/share/man/man1/unetbootin.1.gz |
#apt-get autoremove
ЧиÑÐ°Ð½Ð½Ñ Ð¿ÐµÑелÑкÑв пакеÑÑв... Ðиконано ÐобÑдова деÑева залежноÑÑей Reading state information... Ðиконано ÐакÑнки, ÑÐºÑ Ð±ÑдÑÑÑ ÐÐÐÐÐ ibaudio2 libcrypt-passwdmd5-perl libdigest-sha1-perl libmysqlclient16 libqt4-dbus libqt4-designer libqt4-network libqt4-qt3support libqt4-script libqt4-sql libqt4-sql-mysql libqt4-xml libqtcore4 libqtgui4 mysql-common qt4-qtconfig syslinux syslinux-common unetbootin-translations оновлено 0, вÑÑановлено 0 Ð½Ð¾Ð²Ð¸Ñ Ð¿Ð°ÐºÑнкÑв, Ð´Ð»Ñ Ð²Ð¸Ð´Ð°Ð»ÐµÐ½Ð½Ñ Ð²ÑдмÑÑено 19 пакÑнкÑв, Ñ 10 пакÑнкÑв не оновлено. After this operation, 51,0 MB disk space will be freed. ... Removing libqt4-xml ... Removing libqtcore4 ... Removing mysql-common ... Removing syslinux ... Removing syslinux-common ... Removing unetbootin-translations ... Processing triggers for menu ... Processing triggers for man-db ... Processing triggers for desktop-file-utils ... Processing triggers for gnome-menus ... |
#aptitude
|
#echo $$
14737 |
#ls -l /proc/14737/
загалом 0 dr-xr-xr-x 2 root root 0 лют 25 09:47 attr -r-------- 1 root root 0 лют 25 09:47 auxv -r--r--r-- 1 root root 0 лют 25 09:47 cgroup --w------- 1 root root 0 лют 25 09:47 clear_refs -r--r--r-- 1 root root 0 лют 25 09:24 cmdline -rw-r--r-- 1 root root 0 лют 25 09:47 coredump_filter -r--r--r-- 1 root root 0 лют 25 09:47 cpuset lrwxrwxrwx 1 root root 0 лют 25 09:47 cwd -> /root -r-------- 1 root root 0 лют 25 09:47 environ ... -rw-r--r-- 1 root root 0 лют 25 09:47 sched -r--r--r-- 1 root root 0 лют 25 09:47 sessionid -r--r--r-- 1 root root 0 лют 25 09:47 smaps -r-------- 1 root root 0 лют 25 09:47 stack -r--r--r-- 1 root root 0 лют 25 09:24 stat -r--r--r-- 1 root root 0 лют 25 09:47 statm -r--r--r-- 1 root root 0 лют 25 09:24 status -r-------- 1 root root 0 лют 25 09:47 syscall dr-xr-xr-x 3 root root 0 лют 25 09:47 task -r--r--r-- 1 root root 0 лют 25 09:47 wchan |
#mkdir /tmp/root
|
#mkdir /tmp/root/bin/
|
#cp /bin/bash /tmp/root/bin/
|
#chroot /tmp/root/ /bin/bash
![]() chroot: failed to run command `/bin/bash': No such file or directory |
#ldd /bin/bash
linux-vdso.so.1 => (0x00007fff39bff000) libncurses.so.5 => /lib/libncurses.so.5 (0x00007f4498930000) libdl.so.2 => /lib/libdl.so.2 (0x00007f449872c000) libc.so.6 => /lib/libc.so.6 (0x00007f44983ca000) /lib64/ld-linux-x86-64.so.2 (0x00007f4498b87000) |
#mkdir /tmp/root/lib/
|
#find /lib -name linux-vdso.so.1
|
#find /usr/lib -name linux-vdso.so.1
|
#ldd /bin/cp
linux-vdso.so.1 => (0x00007fffdedf1000) libselinux.so.1 => /lib/libselinux.so.1 (0x00007f0391b55000) librt.so.1 => /lib/librt.so.1 (0x00007f039194d000) libacl.so.1 => /lib/libacl.so.1 (0x00007f0391745000) libattr.so.1 => /lib/libattr.so.1 (0x00007f0391541000) libc.so.6 => /lib/libc.so.6 (0x00007f03911e0000) libdl.so.2 => /lib/libdl.so.2 (0x00007f0390fdb000) /lib64/ld-linux-x86-64.so.2 (0x00007f0391d84000) libpthread.so.0 => /lib/libpthread.so.0 (0x00007f0390dbf000) |
#chroot /mnt
root@linux3:/# exit exit |
#chroot /mnt /bin/bash
root@linux3:/# ldd /bin/bash linux-vdso.so.1 => (0x00007ffffebe7000) libncurses.so.5 => /lib/libncurses.so.5 (0x00007f9c8dae7000) libdl.so.2 => /lib/libdl.so.2 (0x00007f9c8d8e3000) libc.so.6 => /lib/libc.so.6 (0x00007f9c8d581000) /lib64/ld-linux-x86-64.so.2 (0x00007f9c8dd31000) root@linux3:/# apt-get install ssh Reading package lists... Done Building dependency tree... Done The following extra packages will be installed: ... ~ ~ ~ ~ ~ ~ ~ ~ root@linux3:/# exit exit |
#cp /etc/network/interfaces /mnt/etc/network/
|
#vim /mnt/etc/network/interfaces
--- /tmp/l3-saved-14737.10914.2896 2011-02-25 10:29:29.000000000 +0200 +++ /mnt/etc/network/interfaces 2011-02-25 10:29:36.000000000 +0200 @@ -8,7 +8,7 @@ # The primary network interface allow-hotplug eth0 iface eth0 inet static - address 192.168.15.3 + address 192.168.15.103 netmask 255.255.255.0 network 192.168.15.0 broadcast 192.168.15.255 |
#umount /mnt
|
#ls /usr/share/doc/xen
![]() xen-hypervisor-4.0-amd64/ xenstore-utils/ xen-linux-system-2.6.32-5-xen-amd64/ xen-utils-4.0/ xen-linux-system-2.6-xen-amd64/ xen-utils-common/ |
#ls /usr/share/doc/xen-utils-common/
changelog.Debian.gz changelog.gz copyright examples README.Debian |
#ls /usr/share/doc/xen-utils-common/examples/
xm-config.xml xmexample3.gz xmexample.nbd xmexample1.gz xmexample.hvm.gz xmexample.pv-grub.gz xmexample2.gz xmexample.hvm-stubdom.gz xmexample.vti.gz |
#vim /etc/xen/vm-linux3
|
#memory = 64
ls /boot/ config-2.6.32-5-amd64 initrd.img-2.6.32-5-xen-amd64 vmlinuz-2.6.32-5-xen-amd64 config-2.6.32-5-xen-amd64 System.map-2.6.32-5-amd64 xen-4.0-amd64.gz grub System.map-2.6.32-5-xen-amd64 initrd.img-2.6.32-5-amd64 vmlinuz-2.6.32-5-amd64 |
#vim /etc/xen/vm-linux3
--- /tmp/l3-saved-14737.23834.2182 2011-02-25 10:34:18.000000000 +0200 +++ /etc/xen/vm-linux3 2011-02-25 10:34:28.000000000 +0200 @@ -8,10 +8,10 @@ #---------------------------------------------------------------------------- # Kernel image file. -kernel = "/boot/vmlinuz-2.6.10-xenU" +kernel = "/boot/vmlinuz-2.6.32-5-xen-amd64" # Optional ramdisk. -#ramdisk = "/boot/initrd.gz" +ramdisk = "/boot/initrd.gz" # The domain build function. Default is 'linux'. #builder='linux' |
#vim /etc/xen/vm-linux3
--- /tmp/l3-saved-14737.17680.16448 2011-02-25 10:34:34.000000000 +0200 +++ /etc/xen/vm-linux3 2011-02-25 10:37:11.000000000 +0200 @@ -11,7 +11,7 @@ kernel = "/boot/vmlinuz-2.6.32-5-xen-amd64" # Optional ramdisk. -ramdisk = "/boot/initrd.gz" +ramdisk = "/boot/initrd.img-2.6.32-5-xen-amd64" # The domain build function. Default is 'linux'. #builder='linux' @@ -21,10 +21,10 @@ # WARNING: Creating a domain with insufficient memory may cause out of # memory errors. The domain needs enough memory to boot kernel # and modules. Allocating less than 32MBs is not recommended. -memory = 64 +memory = 128 # A name for your domain. All domains must have different names. -name = "ExampleDomain" +name = "vm-linux3" # 128-bit UUID for the domain. The default behavior is to generate a new UUID # on each call to 'xm create'. @@ -55,7 +55,7 @@ # # vif = [ '', 'bridge=xenbr1' ] -vif = [ '' ] +vif = [ 'bridge=br0' ] #---------------------------------------------------------------------------- # Define the disk devices you want the domain to have access to, and @@ -64,7 +64,7 @@ # where UNAME is the device, DEV is the device name the domain will see, # and MODE is r for read-only, w for read-write. -disk = [ 'phy:hda1,hda1,w' ] +disk = [ 'phy:NEWVG/vm-linux3,hda1,w' ] #---------------------------------------------------------------------------- # Define frame buffer device. |
#grep -v ^# /etc/xen/vm-linux3 | grep -vx ''
kernel = "/boot/vmlinuz-2.6.32-5-xen-amd64" ramdisk = "/boot/initrd.img-2.6.32-5-xen-amd64" memory = 128 name = "vm-linux3" vif = [ 'bridge=br0' ] disk = [ 'phy:NEWVG/vm-linux3,hda1,w' ] root = "/dev/hda1 ro" extra = "4" |
#lvrename /dev/NEWVG/debian1 /dev/NEWVG/vm-linux3
Renamed "debian1" to "vm-linux3" in volume group "NEWVG" |
#mount /dev/NEWVG/vm-linux3 /mnt
|
#chroot /mnt /bin/bash
root@linux3:/# apt-cache search linux modules 2.6.32 xen linux-headers-2.6.32-5-common-xen - Common header files for Linux 2.6.32-5-xen linux-headers-2.6.32-5-xen-amd64 - Header files for Linux 2.6.32-5-xen-amd64 linux-image-2.6.32-5-amd64 - Linux 2.6.32 for 64-bit PCs linux-image-2.6.32-5-openvz-amd64 - Linux 2.6.32 for 64-bit PCs, OpenVZ support linux-image-2.6.32-5-vserver-amd64 - Linux 2.6.32 for 64-bit PCs, Linux-VServer support linux-image-2.6.32-5-xen-amd64-dbg - Debugging infos for Linux 2.6.32-5-xen-amd64 linux-image-2.6.32-5-xen-amd64 - Linux 2.6.32 for 64-bit PCs, Xen dom0 support linux-image-2.6-xen-amd64 - Linux 2.6 for 64-bit PCs (meta-package), Xen dom0 support linux-image-xen-amd64 - Linux for 64-bit PCs (meta-package), Xen dom0 support ... linux-headers-2.6.32-5-xen-amd64 - Header files for Linux 2.6.32-5-xen-amd64 linux-image-2.6.32-5-amd64 - Linux 2.6.32 for 64-bit PCs linux-image-2.6.32-5-openvz-amd64 - Linux 2.6.32 for 64-bit PCs, OpenVZ support linux-image-2.6.32-5-vserver-amd64 - Linux 2.6.32 for 64-bit PCs, Linux-VServer support linux-image-2.6.32-5-xen-amd64-dbg - Debugging infos for Linux 2.6.32-5-xen-amd64 linux-image-2.6.32-5-xen-amd64 - Linux 2.6.32 for 64-bit PCs, Xen dom0 support linux-image-2.6-xen-amd64 - Linux 2.6 for 64-bit PCs (meta-package), Xen dom0 support linux-image-xen-amd64 - Linux for 64-bit PCs (meta-package), Xen dom0 support root@linux3:/# exit exit |
#dpkg -S /lib/modules/2.6.32-5-xen-amd64/
linux-image-2.6.32-5-xen-amd64: /lib/modules/2.6.32-5-xen-amd64 |
#cp -R /lib/modules/2.6.32-5-xen-amd64 /mnt/lib/modules/
|
#umount /mnt
|
#xm create -c vm-linux3
![]() Using config file "/etc/xen/vm-linux3". Error: Device 0 (vif) could not be connected. Could not find bridge device br0 |
#brctl show
bridge name bridge id STP enabled interfaces eth0 8000.001bfc7dbb37 no peth0 pan0 8000.000000000000 no |
#listxm
![]() bash: listxm: command not found |
#xm list
Name ID Mem VCPUs State Time(s) Domain-0 0 5894 2 r----- 3202.9 vm-linux3 2 128 1 -b---- 1.4 |
#ping 192.168.15.103
PING 192.168.15.103 (192.168.15.103) 56(84) bytes of data. 64 bytes from 192.168.15.103: icmp_req=1 ttl=64 time=1.92 ms ^C --- 192.168.15.103 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 1.924/1.924/1.924/0.000 ms |
#ssh root@192.168.15.103
![]() # Example how to put a getty on a modem line. # #T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3 "/etc/inittab" 69 lines, 2008 characters written root@vm-linux3:~# reboot Broadcast message from root@vm-linux3 (pts/0) (Fri Feb 25 08:48:37 2011): The system is going down for reboot NOW! root@vm-linux3:~# Connection to 192.168.15.103 closed by remote host. Connection to 192.168.15.103 closed. |
#ls -l /etc/xen/vm-linux3
-rw-r--r-- 1 root root 7560 лют 25 10:46 /etc/xen/vm-linux3 |
#lvs -a
LV VG Attr LSize Origin Snap% Move Log Copy% Convert vm-linux3 NEWVG -wi-ao 10,00g |
#ping 192.168.15.103
![]() PING 192.168.15.103 (192.168.15.103) 56(84) bytes of data. 64 bytes from 192.168.15.103: icmp_req=1 ttl=64 time=5.14 ms 64 bytes from 192.168.15.103: icmp_req=2 ttl=64 time=0.107 ms 64 bytes from 192.168.15.103: icmp_req=3 ttl=64 time=0.112 ms ^C --- 192.168.15.103 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2000ms rtt min/avg/max/mdev = 0.107/1.787/5.144/2.373 ms |
#ping 192.168.15.103
PING 192.168.15.103 (192.168.15.103) 56(84) bytes of data. 64 bytes from 192.168.15.103: icmp_req=1 ttl=64 time=5.14 ms 64 bytes from 192.168.15.103: icmp_req=2 ttl=64 time=0.107 ms 64 bytes from 192.168.15.103: icmp_req=3 ttl=64 time=0.112 ms ^C --- 192.168.15.103 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2000ms rtt min/avg/max/mdev = 0.107/1.787/5.144/2.373 ms |
#ssh user@192.168.15.103
![]() user@192.168.15.103's password: Permission denied, please try again. user@192.168.15.103's password: Permission denied, please try again. user@192.168.15.103's password: |