/l3/users/eb/2009/linux3/user :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 |
|
#mount
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) procbususb on /proc/bus/usb type usbfs (rw) 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) rootfs on / type rootfs (rw) /dev/sdb1 on /root/mnt1 type ext3 (rw) /dev/sdc1 on /media/flash type vfat (rw,noexec,nosuid,nodev,iocharset=utf8,codepage=866) |
#ls -l /media/flash/
total 36 drwxr-xr-x 5 root root 4096 2009-05-22 21:48 Dead Kennedys drwxr-xr-x 3 root root 4096 2009-05-22 21:48 Djivan Gasparayan drwxr-xr-x 3 root root 4096 2009-05-22 21:47 Harold Budd drwxr-xr-x 12 root root 4096 2009-05-22 21:22 Аквариум drwxr-xr-x 8 root root 4096 2009-05-22 21:21 Гражданская оборона drwxr-xr-x 5 root root 4096 2009-05-22 21:22 Псой Короленко drwxr-xr-x 4 root root 4096 2009-05-22 21:21 Рада и Терновник drwxr-xr-x 9 root root 4096 2009-05-22 21:22 Фёдоров и Ко drwxr-xr-x 6 root root 4096 2009-05-22 21:44 Янка |
$mount
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) procbususb on /proc/bus/usb type usbfs (rw) 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) rootfs on / type rootfs (rw) /dev/sdb1 on /root/mnt1 type ext3 (rw) /dev/sdc1 on /media/flash type vfat (rw,noexec,nosuid,nodev,iocharset=utf8,codepage=866) |
$ls -l /media/flash/
total 36 drwxr-xr-x 5 root root 4096 2009-05-22 21:48 Dead Kennedys drwxr-xr-x 3 root root 4096 2009-05-22 21:48 Djivan Gasparayan drwxr-xr-x 3 root root 4096 2009-05-22 21:47 Harold Budd drwxr-xr-x 12 root root 4096 2009-05-22 21:22 Аквариум drwxr-xr-x 8 root root 4096 2009-05-22 21:21 Гражданская оборона drwxr-xr-x 5 root root 4096 2009-05-22 21:22 Псой Короленко drwxr-xr-x 4 root root 4096 2009-05-22 21:21 Рада и Терновник drwxr-xr-x 9 root root 4096 2009-05-22 21:22 Фёдоров и Ко drwxr-xr-x 6 root root 4096 2009-05-22 21:44 Янка |
$ls -l /media/flash/Аквариум/
total 40 drwxr-xr-x 2 root root 4096 2009-05-22 21:23 1981 - Треугольник drwxr-xr-x 2 root root 4096 2009-05-22 21:23 1984 - Ихтиология drwxr-xr-x 2 root root 4096 2009-05-22 21:23 1994 - Кострома mon amour drwxr-xr-x 2 root root 4096 2009-05-22 21:23 1995 - Навигатор drwxr-xr-x 2 root root 4096 2009-05-22 21:23 1996 - Снежный лев drwxr-xr-x 2 root root 4096 2009-05-22 21:24 2002 - Сестра Хаос drwxr-xr-x 2 root root 4096 2009-05-22 21:24 2003 - Песни рыбака drwxr-xr-x 2 root root 4096 2009-05-22 21:24 2005 - Zoom Zoom Zoom drwxr-xr-x 2 root root 4096 2009-05-22 21:25 2006 - Беспечный русский бродяга drwxr-xr-x 2 root root 4096 2009-05-22 21:22 _pictures |
$sudo dpkg-reconfigure console-cyrillic
|
#вdd if=/dev/zero of=/root/hdddisk.img count 200 bs=1024
dd: unrecognized operand `count' Try `dd --help' for more information. |
#apt-file search dd
addresses.framework: /usr/share/doc/addresses.framework/NEWS.gz addresses.framework: /usr/share/doc/addresses.framework/README.gz addresses.framework: /usr/share/doc/addresses.framework/THANKS addresses.framework: /usr/share/doc/addresses.framework/TODO addresses.framework: /usr/share/doc/addresses.framework/changelog.Debian.gz addresses.framework: /usr/share/doc/addresses.framework/copyright addressmanager.app: /usr/bin/AddressManager addressmanager.app: /usr/lib/GNUstep/Applications/AddressManager.app/AddressManager addressmanager.app: /usr/lib/GNUstep/Applications/AddressManager.app/Resources/AddressManager.desktop addressmanager.app: /usr/lib/GNUstep/Applications/AddressManager.app/Resources/AddressManager.tiff ... album-data: /usr/share/album-data/Themes/Eddie_Bauer/Bar_R.gif album-data: /usr/share/album-data/Themes/Eddie_Bauer/Bord_B.gif album-data: /usr/share/album-data/Themes/Eddie_Bauer/Bord_L.gif album-data: /usr/share/album-data/Themes/Eddie_Bauer/Bord_R.gif album-data: /usr/share/album-data/Themes/Eddie_Bauer/Bord_T.gif album-data: /usr/share/album-data/Themes/Eddie_Bauer/CREDIT album-data: /usr/share/album-data/Themes/Eddie_Bauer/Font.old album-data: /usr/share/album-data/Themes/Eddie_Bauer/Icon.gif album-data: /usr/share/album-data/Themes/Eddie_Bauer/Locked.gif album-data: /usr/share/album-data/Themes/Eddie_Bauer/Null.gif |
#apt-file search dd | grep bin/dd
coreutils: /bin/dd ddccontrol: /usr/bin/ddccontrol ddccontrol: /usr/bin/ddcpci ddclient: /usr/sbin/ddclient ddd: /usr/bin/ddd ddns3-client: /usr/bin/ddns3 ddns3-client: /usr/bin/ddns3-client ddrescue: /bin/dd_rescue dds2tar: /usr/bin/dds-dd dds2tar: /usr/bin/dds2index ... djvulibre-bin: /usr/bin/ddjvu djvulibre-dbg: /usr/lib/debug/usr/bin/ddjvu gddrescue: /sbin/ddrescue gworkspace.app: /usr/bin/ddbd i2c-tools: /usr/bin/ddcmon klibc-utils: /usr/lib/klibc/bin/dd ltp-disc-test: /usr/lib/debian-test/tests/linux/testcases/bin/dd_file ncbi-tools-x11: /usr/bin/ddv util-linux: /usr/bin/ddate xresprobe: /usr/sbin/ddcprobe |
#apt-get install coreutils
Reading package lists... Done Building dependency tree Reading state information... Done coreutils is already the newest version. The following packages were automatically installed and are no longer required: portmap Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 20 not upgraded. |
#dd if=/dev/zero of=/root/hdddisk.img count 200 bs=1024k
dd: unrecognized operand `count' Try `dd --help' for more information. |
#dd if=/dev/zero of=/root/hdddisk.img count=200 bs=1024k
200+0 records in 200+0 records out 209715200 bytes (210 MB) copied, 2.64245 s, 79.4 MB/s |
#modprobe loop
|
$dd if=/dev/zero of=/home/user/hdddisk.img count=200 bs=1024k
200+0 records in 200+0 records out 209715200 bytes (210 MB) copied, 3.08671 s, 67.9 MB/s |
$кrm hdddisk.img
|
#cat /proc/filesystems
nodev sysfs nodev rootfs nodev bdev nodev proc nodev cgroup nodev cpuset nodev debugfs nodev securityfs nodev sockfs nodev pipefs ... nodev ramfs nodev hugetlbfs nodev mqueue nodev usbfs ext3 ntfs nodev fuse fuseblk nodev fusectl vfat |
#lsmod loop
Usage: lsmod |
#lsmod | grep loop
loop 12988 0 |
#lsmod
Module Size Used by loop 12988 0 nls_cp866 4744 0 nls_cp437 5304 0 vfat 8672 0 fat 41688 1 vfat usb_storage 83552 0 aoe 22316 0 fuse 48352 0 nls_utf8 1472 0 ... scsi_mod 132076 3 usb_storage,sd_mod,libata ehci_hcd 29936 0 usbcore 124912 5 usb_storage,usbhid,uhci_hcd,ehci_hcd e1000 101696 0 intel_agp 22548 1 agpgart 30624 1 intel_agp thermal 15092 0 processor 39540 1 thermal fan 4104 0 thermal_sys 10272 3 thermal,processor,fan |
#losetup /dev/loop0 /root/hdddisk.img
|
#echo ';' | sfdisk /dev/loop0
Checking that no-one is using this disk right now ... BLKRRPART: Invalid argument OK Disk /dev/loop0: cannot get geometry Disk /dev/loop0: 25 cylinders, 255 heads, 63 sectors/track sfdisk: ERROR: sector 0 does not have an msdos signature /dev/loop0: unrecognized partition table type Old situation: No partitions found New situation: ... /dev/loop0p3 0 - 0 0 0 Empty /dev/loop0p4 0 - 0 0 0 Empty Warning: no primary partition is marked bootable (active) This does not matter for LILO, but the DOS MBR will not boot this disk. Successfully wrote the new partition table Re-reading the partition table ... BLKRRPART: Invalid argument If you created or changed a DOS partition, /dev/foo7, say, then use dd(1) to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1 (See fdisk(8).) |
#fdisk -l /dev/loop0
Disk /dev/loop0: 209 MB, 209715200 bytes 255 heads, 63 sectors/track, 25 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/loop0p1 1 25 200812 83 Linux |
#kpartx /dev/loop0
/proc/misc: No entry for device-mapper found Is device-mapper driver missing from kernel? Failure to communicate with kernel device-mapper driver. loop0p1 : 0 401624 /dev/loop0 1 |
#kpartx -a /dev/loop0
/proc/misc: No entry for device-mapper found Is device-mapper driver missing from kernel? Failure to communicate with kernel device-mapper driver. device mapper prerequisites not met |
#modprobe dm-m
dm-mirror dm-mod dm-multipath |
#modprobe dm-mod
|
#kpartx -a /dev/loop0
|
#mkfs.ext3 /dev/loop0p1
mke2fs 1.41.5 (23-Apr-2009) Could not stat /dev/loop0p1 --- No such file or directory The device apparently does not exist; did you specify it correctly? |
#fdisk /dev/loop0
Command (m for help): p Disk /dev/loop0: 209 MB, 209715200 bytes 255 heads, 63 sectors/track, 25 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/loop0p1 1 25 200812 83 Linux Command (m for help): m Command action a toggle a bootable flag ... o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only) Command (m for help): quit |
#ls /dev
adsp1 full MAKEDEV ram12 sdb1 tty13 tty30 tty48 tty8 vcs agpgart fuse mapper ram13 sdb2 tty14 tty31 tty49 tty9 vcs1 audio hdd mem ram14 sdb3 tty15 tty32 tty5 ttyS0 vcs2 audio1 hidraw0 mixer ram15 sdb5 tty16 tty33 tty50 ttyS1 vcs3 block hpet mixer1 ram2 sdb6 tty17 tty34 tty51 ttyS2 vcs4 bsg hwrng net ram3 sdb7 tty18 tty35 tty52 ttyS3 vcs5 bus initctl network_latency ram4 shm tty19 tty36 tty53 urandom vcs6 cdrom1 input network_throughput ram5 snapshot tty2 tty37 tty54 usbdev1.1_ep00 vcs7 char kmem null ram6 snd tty20 tty38 tty55 usbdev1.1_ep81 vcsa console kmsg port ram7 sndstat tty21 tty39 tty56 usbdev2.1_ep00 vcsa1 core log ppp ram8 stderr tty22 tty4 tty57 usbdev2.1_ep81 vcsa2 cpu_dma_latency loop0 printer ram9 stdin tty23 tty40 tty58 usbdev2.2_ep00 vcsa3 disk loop1 psaux random stdout tty24 tty41 tty59 usbdev2.2_ep81 vcsa4 dm-0 loop2 ptmx root tty tty25 tty42 tty6 usbdev3.1_ep00 vcsa5 dsp loop3 pts rtc tty0 tty26 tty43 tty60 usbdev3.1_ep81 vcsa6 dsp1 loop4 ram0 rtc0 tty1 tty27 tty44 tty61 usbdev4.1_ep00 vcsa7 dvd1 loop5 ram1 sda tty10 tty28 tty45 tty62 usbdev4.1_ep81 xconsole etherd loop6 ram10 sda1 tty11 tty29 tty46 tty63 usbdev5.1_ep00 zero fd loop7 ram11 sdb tty12 tty3 tty47 tty7 usbdev5.1_ep81 |
#fdisk /dev/loop0
Command (m for help): p Disk /dev/loop0: 209 MB, 209715200 bytes 255 heads, 63 sectors/track, 25 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/loop0p1 1 25 200812 83 Linux Command (m for help): m Command action a toggle a bootable flag ... Device Boot Start End Blocks Id System /dev/loop0p1 1 13 104391 83 Linux /dev/loop0p2 14 25 96390 83 Linux Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 22: Invalid argument. The kernel still uses the old table. The new table will be used at the next reboot. Syncing disks. |
#fdisk -l /dev/loop0
Disk /dev/loop0: 209 MB, 209715200 bytes 255 heads, 63 sectors/track, 25 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/loop0p1 1 13 104391 83 Linux /dev/loop0p2 14 25 96390 83 Linux |
#kpartx -a /dev/mapper/
control loop0p1 loop0p2 |
#mkfs.ext3 /dev/mapper/loop0p1
mke2fs 1.41.5 (23-Apr-2009) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) 26104 inodes, 104388 blocks 5219 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=67371008 13 block groups 8192 blocks per group, 8192 fragments per group 2008 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 31 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. |
#mkfs.ext3 /dev/mapper/loop0p2
mke2fs 1.41.5 (23-Apr-2009) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) 24192 inodes, 96388 blocks 4819 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=67371008 12 block groups 8192 blocks per group, 8192 fragments per group 2016 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 38 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. |
#mount /dev/mapper/loop0p1 /mnt
|
#mount
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) procbususb on /proc/bus/usb type usbfs (rw) 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) rootfs on / type rootfs (rw) /dev/sdb1 on /root/mnt1 type ext3 (rw) /dev/mapper/loop0p1 on /mnt type ext3 (rw) |
#cat /etc/udev/
.dev/ links.conf rules.d/ udev.conf |
#cat /etc/udev/rules.d/
65_dmsetup.rules 70-persistent-cd.rules 70-persistent-net.rules z60_kpartx.rules |
#cat /etc/udev/rules.d/65_dmsetup.rules
SUBSYSTEM!="block", GOTO="device_mapper_end" KERNEL!="dm-*", GOTO="device_mapper_end" ACTION!="add|change", GOTO="device_mapper_end" # Obtain device status IMPORT{program}="/sbin/dmsetup export -j $major -m $minor" ENV{DM_NAME}!="?*", GOTO="device_mapper_end" # these are temporary devices created by cryptsetup, we want to ignore them # and also hide them from HAL ENV{DM_NAME}=="temporary-cryptsetup-*", OPTIONS="ignore_device" SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}" ... ENV{DM_TARGET_TYPES}=="|*error*", GOTO="device_mapper_end" IMPORT{program}="vol_id --export $tempnode" OPTIONS+="link_priority=-100" ENV{DM_UUID}=="DMRAID-*", OPTIONS="link_priority=100" ENV{DM_TARGET_TYPES}=="*snapshot-origin*", OPTIONS+="link_priority=-90" ENV{ID_FS_UUID_ENC}=="?*", ENV{ID_FS_USAGE}=="filesystem|other|crypto", \ SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" ENV{ID_FS_LABEL_ENC}=="?*", ENV{ID_FS_USAGE}=="filesystem|other", \ SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" LABEL="device_mapper_end" |
#grub-install --no-floppy --root-directory=/mnt /dep/loop0
Format of install_device not recognized. Usage: grub-install [OPTION] install_device Install GRUB on your drive. -h, --help print this message and exit -v, --version print the version information and exit --root-directory=DIR install GRUB images under the directory DIR instead of the root directory --grub-shell=FILE use FILE as the grub shell --no-floppy do not probe any floppy drive --force-lba force GRUB to use LBA mode even for a buggy BIOS --recheck probe a device map even if it already exists INSTALL_DEVICE can be a GRUB device name or a system device filename. grub-install copies GRUB images into the DIR/boot directory specfied by --root-directory, and uses the grub shell to install grub into the boot sector. Report bugs to <bug-grub@gnu.org>. |
#mkdir -p /mnt/boot/grub
|
#cp /usr/lib/grub/i386-pc/* /mnt/boot/grub
|
#umount /mnt
|
#grub
Probing devices to guess BIOS drives. This may take a long time. |
#ls -l /dev/mapper/loop*
lrwxrwxrwx 1 root root 10 2009-05-30 14:55 /dev/mapper/loop0p -> /dev/loop0 brw-rw---- 1 root disk 254, 0 2009-05-30 14:34 /dev/mapper/loop0p1 brw-rw---- 1 root disk 254, 1 2009-05-30 14:35 /dev/mapper/loop0p2 |
#grub
Probing devices to guess BIOS drives. This may take a long time. |
#grub-install --no-floppy --root-directory=/mnt /dev/mapper/loop0p
grub-probe: error: Cannot find a GRUB drive for /dev/loop0. Check your device.map. |
#vi /boot/grub/device.map
|
#mount /dev/mapper/loop0p1 /mnt
|
#grub-install --no-floppy --root-directory=/mnt --device-map=/boot/grub/device.map /dev/mapper/loop0p
Unrecognized option `--device-map=/boot/grub/device.map' Usage: grub-install [OPTION] install_device Install GRUB on your drive. -h, --help print this message and exit -v, --version print the version information and exit --root-directory=DIR install GRUB images under the directory DIR instead of the root directory --grub-shell=FILE use FILE as the grub shell --no-floppy do not probe any floppy drive --force-lba force GRUB to use LBA mode even for a buggy BIOS --recheck probe a device map even if it already exists INSTALL_DEVICE can be a GRUB device name or a system device filename. grub-install copies GRUB images into the DIR/boot directory specfied by --root-directory, and uses the grub shell to install grub into the boot sector. Report bugs to <bug-grub@gnu.org>. |
#umount /mnt
|
#apt-get install qemu
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: portmap Use 'apt-get autoremove' to remove them. The following extra packages will be installed: bochsbios esound-clients esound-common libasyncns0 libaudiofile0 libbluetooth3 libbrlapi0.5 libesd-alsa0 libpulse0 libsdl1.2debian libsdl1.2debian-alsa libsvga1 libvdemgmt0 libvdeplug2 openbios-ppc openbios-sparc openhackware sharutils vde2 vgabios ... Setting up libvdeplug2 (2.2.2-3) ... Setting up openhackware (0.4.1-4) ... Setting up libbrlapi0.5 (4.0-6) ... Setting up vgabios (0.6c-1) ... Setting up bochsbios (2.3.7+20090416-1) ... Setting up openbios-ppc (1.0-3) ... Setting up openbios-sparc (1.0-1) ... Setting up qemu (0.10.5-1) ... Setting up sharutils (1:4.6.3-1) ... Setting up vde2 (2.2.2-3) ... |
#qemu --help
QEMU PC emulator version 0.10.5, Copyright (c) 2003-2008 Fabrice Bellard usage: qemu [options] [disk_image] 'disk_image' is a raw hard image image for IDE hard disk 0 Standard options: -h or -help display this help and exit -M machine select emulated machine (-M ? for list) -cpu cpu select CPU (-cpu ? for list) -smp n set the number of CPUs to 'n' [default=1] -fda/-fdb file use 'file' as floppy disk 0/1 image -hda/-hdb file use 'file' as IDE hard disk 0/1 image ... -show-cursor show cursor -tb-size n set TB size -incoming p prepare for incoming migration, listen on port p -chroot dir Chroot to dir just before starting the VM. -runas user Change to user id user just before starting the VM. During emulation, the following keys are useful: ctrl-alt-f toggle full screen ctrl-alt-n switch to virtual console 'n' ctrl-alt toggle mouse and keyboard grab When using -nographic, press 'ctrl-a h' to get some help. |
#qemu --help | more
|
#qemu /root/hdddisk.img
Could not open '/dev/kqemu' - QEMU acceleration layer not activated: No such file or directory commandline read: qemu commandline read: /root/hdddisk.img ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.2.7 |~~~~~~~~~~~~~~~~~~~~~~~~~~ (c) 2001-2008 The world wide DirectFB Open Source Community (c) 2000-2004 Convergence (integrated media) GmbH ---------------------------------------------------------------- (*) DirectFB/Core: Single Application Core. (2009-03-09 17:25) (!) Direct/Util: opening '/dev/fb0' and '/dev/fb/0' failed --> No such file or directory (!) DirectFB/FBDev: Error opening framebuffer device! (!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER environment variable. (!) DirectFB/Core: Could not initialize 'system_core' core! --> Initialization error! Could not initialize SDL - exiting |
#qemu /dev/loop0
Could not open '/dev/kqemu' - QEMU acceleration layer not activated: No such file or directory commandline read: qemu commandline read: /dev/loop0 ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.2.7 |~~~~~~~~~~~~~~~~~~~~~~~~~~ (c) 2001-2008 The world wide DirectFB Open Source Community (c) 2000-2004 Convergence (integrated media) GmbH ---------------------------------------------------------------- (*) DirectFB/Core: Single Application Core. (2009-03-09 17:25) (!) Direct/Util: opening '/dev/fb0' and '/dev/fb/0' failed --> No such file or directory (!) DirectFB/FBDev: Error opening framebuffer device! (!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER environment variable. (!) DirectFB/Core: Could not initialize 'system_core' core! --> Initialization error! Could not initialize SDL - exiting |
#qemu /dev/mapper/loop0p
Could not open '/dev/kqemu' - QEMU acceleration layer not activated: No such file or directory commandline read: qemu commandline read: /dev/mapper/loop0p ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.2.7 |~~~~~~~~~~~~~~~~~~~~~~~~~~ (c) 2001-2008 The world wide DirectFB Open Source Community (c) 2000-2004 Convergence (integrated media) GmbH ---------------------------------------------------------------- (*) DirectFB/Core: Single Application Core. (2009-03-09 17:25) (!) Direct/Util: opening '/dev/fb0' and '/dev/fb/0' failed --> No such file or directory (!) DirectFB/FBDev: Error opening framebuffer device! (!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER environment variable. (!) DirectFB/Core: Could not initialize 'system_core' core! --> Initialization error! Could not initialize SDL - exiting |
#mount
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) procbususb on /proc/bus/usb type usbfs (rw) 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) rootfs on / type rootfs (rw) /dev/sdb1 on /root/mnt1 type ext3 (rw) |
#grub
Probing devices to guess BIOS drives. This may take a long time. |
#debootstrap
1 .bashrc .l3rc mnt1/ screen.png .ssh/ .vim/ .bash_history .gqview/ .lesshst .profile .screenrc .swp .viminfo .bash_profile hdddisk.img .lilalo/ screen.dot .sendxmpprc t1.txt |
#debootstrap
1 .bashrc .l3rc mnt1/ screen.png .ssh/ .vim/ .bash_history .gqview/ .lesshst .profile .screenrc .swp .viminfo .bash_profile hdddisk.img .lilalo/ screen.dot .sendxmpprc t1.txt |
#debootstrap --help
Usage: debootstrap [OPTION]... <suite> <target> [<mirror> [<script>]] Bootstrap Debian base system. --help display this help and exit --version display version information and exit --verbose don't turn off the output of wget --download-only download packages, but don't perform installation --print-debs print the packages to be installed, and exit --arch=A set the target architecture (use if no dpkg) [ --arch=powerpc ] --include=A,B,C adds specified names to the list of base packages ... --keyring=K check Release files against keyring K --no-resolve-deps don't try to resolve dependencies automatically --unpack-tarball=T acquire .debs from a tarball instead of http --make-tarball=T download .debs and create a tarball (tgz format) --second-stage-target=DIR Run second stage in a subdirectory instead of root (can be used to create a foreign chroot) (requires --second-stage) --boot-floppies used for internal purposes by boot-floppies --debian-installer used for internal purposes by debian-installer |
#debootstrap lenny /mnt
I: Retrieving libncurses5 I: Validating libncurses5 I: Retrieving libncursesw5 I: Validating libncursesw5 I: Retrieving libnewt0.52 I: Validating libnewt0.52 I: Retrieving libpam-modules I: Validating libpam-modules I: Retrieving libpam-runtime I: Validating libpam-runtime ... I: Extracting gcc-4.2-base... I: Extracting gcc-4.3-base... I: Extracting grep... I: Extracting gzip... I: Extracting hostname... I: Extracting initscripts... I: Extracting libacl1... I: Extracting libattr1... I: Extracting libblkid1... I: Extracting libc6... |
$fix
fixcon fixmacps fixpsditps fixtpps fixwwps fixdlsrps fixnt fixpspps fixwfwps fixfmps fixps fixscribeps fixwpps |
$fix
fixcon fixmacps fixpsditps fixtpps fixwwps fixdlsrps fixnt fixpspps fixwfwps fixfmps fixps fixscribeps fixwpps |
$fixcon
Couldn't get a file descriptor referring to the console |
$echo $LANG
en_US.UTF-8 |
$LANG=ru_UA.UTF8 date
Суб Май 30 15:32:53 EEST 2009 |
$su - root
Password: l3-agent is already running: pid=3795; pidfile=/root/.lilalo/l3-agent.pid |
#cat fixcon
cat: fixcon: No such file or directory |
#cat /usr/local/bin/fixcon
#!/bin/sh openvt -c 9 /etc/init.d/console-cyrillic restart |
#export LANG=C
|
#date
Sat May 30 15:34:53 EEST 2009 |
#dpkg-reconfigure console-cyrillic
|
#Package configuration
|
#date
Sat May 30 15:35:53 EEST 2009 |
#LANG=ru_UA.UTF8 date
Суб Май 30 15:36:34 EEST 2009 |
#export LANG=ru_UA.UTF8
|
#date
Суб Май 30 15:37:03 EEST 2009 |
#date
Суб Май 30 15:38:48 EEST 2009 |
#date
Суб Май 30 15:39:05 EEST 2009 |
#ssh -l quiz 10.0.35.100
-----------------------------------------------------------------[40/40]----- У вас есть сто пакетов в текущем каталоге, которые вы хотите добавить в кэш approx. Можно ли это как-то сделать? 1. Да, для этого просто достаточно скопировать все пакеты в кэш 2. Да, для этого есть специальная программа approx-import 3. Нет, нельзя 4. Эти пакеты уже всё равно обновились, и вообще, что за вопросы? Вы в кэш сквида картинки тоже добавляете? --------------------------------------------------------------------------- 2 Your score: 33.5 Broadcast Message from root@linux0 (/dev/pts/8) at 18:04 ... test Connection to 10.0.35.100 closed. |
$ssh -l root 10.0.35.100
root@10.0.35.100's password: Linux linux0 2.6.18-6-xen-686 #1 SMP Sun Feb 10 22:43:13 UTC 2008 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Sat May 30 17:33:41 2009 from linux8.unix.nt l3-agent is already running: pid=1851; pidfile=/root/.lilalo/l3-agent.pid |
$su - root
Password: l3-agent is already running: pid=3795; pidfile=/root/.lilalo/l3-agent.pid |
#mount
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) procbususb on /proc/bus/usb type usbfs (rw) 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) rootfs on / type rootfs (rw) /dev/sdb1 on /root/mnt1 type ext3 (rw) /dev/mapper/loop0p1 on /mnt type ext3 (rw) |
$ls -l
total 40 -rw-r--r-- 1 user user 82 2009-05-28 14:53 11.txt drwxr-xr-x 2 user user 4096 2009-05-26 15:38 a drwxr-xr-x 2 user user 4096 2009-05-29 17:47 Desktop drwxr-xr-x 2 user user 4096 2009-05-25 09:36 Documents drwxr-xr-x 2 user user 4096 2009-05-25 09:36 Download drwxr-xr-x 2 user user 4096 2009-05-25 09:36 Music drwxr-xr-x 2 user user 4096 2009-05-25 09:36 Pictures drwxr-xr-x 2 user user 4096 2009-05-25 09:36 Public drwxr-xr-x 2 user user 4096 2009-05-25 09:36 Templates drwxr-xr-x 2 user user 4096 2009-05-25 09:36 Videos |
$su - root
Password: l3-agent is already running: pid=3795; pidfile=/root/.lilalo/l3-agent.pid |
#lsmod
Module Size Used by dm_mod 48856 4 loop 12988 2 nls_cp866 4744 0 nls_cp437 5304 0 vfat 8672 0 fat 41688 1 vfat usb_storage 83552 0 aoe 22316 1 fuse 48352 0 ... scsi_mod 132076 3 usb_storage,sd_mod,libata ehci_hcd 29936 0 usbcore 124912 5 usb_storage,usbhid,uhci_hcd,ehci_hcd e1000 101696 0 intel_agp 22548 1 agpgart 30624 1 intel_agp thermal 15092 0 processor 39540 1 thermal fan 4104 0 thermal_sys 10272 3 thermal,processor,fan |
#ls /mnt
bin boot debootstrap dev etc home lib lost+found mnt proc root sbin sys tmp usr var |
#!quem
bash: !quem: event not found |
#!qem
qemu /dev/loop0 Could not open '/dev/kqemu' - QEMU acceleration layer not activated: No such file or directory commandline read: qemu commandline read: /dev/loop0 ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.2.7 |~~~~~~~~~~~~~~~~~~~~~~~~~~ (c) 2001-2008 The world wide DirectFB Open Source Community (c) 2000-2004 Convergence (integrated media) GmbH ---------------------------------------------------------------- (*) DirectFB/Core: Single Application Core. (2009-03-09 17:25) (!) Direct/Util: opening '/dev/fb0' and '/dev/fb/0' failed --> No such file or directory (!) DirectFB/FBDev: Error opening framebuffer device! (!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER environment variable. (!) DirectFB/Core: Could not initialize 'system_core' core! --> Initialization error! Could not initialize SDL - exiting |
#umount /mnt
|
#qemu /root/hdddisk.img
Could not open '/dev/kqemu' - QEMU acceleration layer not activated: No such file or directory commandline read: qemu commandline read: /root/hdddisk.img ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.2.7 |~~~~~~~~~~~~~~~~~~~~~~~~~~ (c) 2001-2008 The world wide DirectFB Open Source Community (c) 2000-2004 Convergence (integrated media) GmbH ---------------------------------------------------------------- (*) DirectFB/Core: Single Application Core. (2009-03-09 17:25) (!) Direct/Util: opening '/dev/fb0' and '/dev/fb/0' failed --> No such file or directory (!) DirectFB/FBDev: Error opening framebuffer device! (!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER environment variable. (!) DirectFB/Core: Could not initialize 'system_core' core! --> Initialization error! Could not initialize SDL - exiting |
#fdisk -l /dev/sdb
Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xce5cf3c1 Device Boot Start End Blocks Id System /dev/sdb1 1 1217 9775521 83 Linux /dev/sdb2 1218 2434 9775552+ 83 Linux /dev/sdb3 2435 38913 293017567+ 5 Extended /dev/sdb5 2435 3651 9775521 83 Linux /dev/sdb6 3652 4867 9767488+ 83 Linux /dev/sdb7 4868 38913 273474463+ 83 Linux |
#дмы --рудз
bash: дмы: command not found |
#lvs --help
bash: lvs: command not found |
#apt-cache search lvm
autopkgtest - automatic as-installed testing for Debian packages autopkgtest-xenlvm - Xen/LVM2 based testbed snapshot system bootcd - run your system from cd without need for disks clvm - Cluster LVM Daemon for lvm2 dmsetup - The Linux Kernel Device Mapper userspace library gpart - Guess PC disk partition table, find lost partitions initramfs-tools - tools for generating an initramfs libdevmapper-dev - The Linux Kernel Device Mapper header files libdevmapper1.02.1 - The Linux Kernel Device Mapper userspace library liblinux-lvm-perl - module to access LVM status information in perl scripts ... llvm-gcc-4.2 - C/C++ front end for LLVM compiler lvm2 - The Linux Logical Volume Manager mondo - powerful disaster recovery suite mondo-doc - manual for Mondo, a powerful disaster recovery suite mylvmbackup - quickly creating backups of MySQL server's data files parted - The GNU Parted disk partition resizing program schroot - Execute commands in a chroot environment system-config-lvm - A utility for graphically configuring Logical Volumes testdisk - Partition scanner and disk recovery tool vbackup - A modular backup utility |
#apt-cache install lmv2
E: Invalid operation install |
.dev/ links.conf rules.d/ udev.conf
65_dmsetup.rules 70-persistent-cd.rules 70-persistent-net.rules z60_kpartx.rules
SUBSYSTEM!="block", GOTO="device_mapper_end" KERNEL!="dm-*", GOTO="device_mapper_end" ACTION!="add|change", GOTO="device_mapper_end" # Obtain device status IMPORT{program}="/sbin/dmsetup export -j $major -m $minor" ENV{DM_NAME}!="?*", GOTO="device_mapper_end" # these are temporary devices created by cryptsetup, we want to ignore them # and also hide them from HAL ENV{DM_NAME}=="temporary-cryptsetup-*", OPTIONS="ignore_device" SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}" ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}" ENV{DM_STATE_ACTIVE}!="?*", GOTO="device_mapper_end" ENV{DM_TARGET_TYPES}=="|*error*", GOTO="device_mapper_end" IMPORT{program}="vol_id --export $tempnode" OPTIONS+="link_priority=-100" ENV{DM_UUID}=="DMRAID-*", OPTIONS="link_priority=100" ENV{DM_TARGET_TYPES}=="*snapshot-origin*", OPTIONS+="link_priority=-90" ENV{ID_FS_UUID_ENC}=="?*", ENV{ID_FS_USAGE}=="filesystem|other|crypto", \ SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" ENV{ID_FS_LABEL_ENC}=="?*", ENV{ID_FS_USAGE}=="filesystem|other", \ SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" LABEL="device_mapper_end"
nodev sysfs nodev rootfs nodev bdev nodev proc nodev cgroup nodev cpuset nodev debugfs nodev securityfs nodev sockfs nodev pipefs nodev anon_inodefs nodev tmpfs nodev inotifyfs nodev devpts nodev ramfs nodev hugetlbfs nodev mqueue nodev usbfs ext3 ntfs nodev fuse fuseblk nodev fusectl vfat
#!/bin/sh openvt -c 9 /etc/init.d/console-cyrillic restart
Время первой команды журнала | 12:52:35 2009- 5-30 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 17:48:52 2009- 5-30 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 16.83 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 1.98 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.56 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.66 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc find: /home/devi-orig/.gnome2: Keine Berechtigung find: /home/devi-orig/.gnome2_private: Keine Berechtigung find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung find: /home/devi-orig/.metacity: Keine Berechtigung find: /home/devi-orig/.inkscape: Keine Berechtigung ^C |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008