/l3/users/eb/2009/linux3/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 :21 :22 :23 :24 :25 :26 :27 :28 :29 :30 :31 :32 :33 :34 :35 :36 :37 :38 |
|
#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 |
#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/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. |
#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
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) |
#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/rules.d/
65_dmsetup.rules 70-persistent-cd.rules 70-persistent-net.rules z60_kpartx.rules |
#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" |
#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>. |
#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>. |
#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 |
#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-install --no-floppy --root-directory=/mnt /dev/mapper/loop0p
grub-probe: error: Cannot find a GRUB drive for /dev/loop0. Check your device.map. |
#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
|
#vi /boot/grub/device.map
--- /tmp/l3-saved-4130.26512.8938 2009-05-30 15:06:36.000000000 +0300 +++ /boot/grub/device.map 2009-05-30 15:06:48.000000000 +0300 @@ -1,3 +1,3 @@ -(hd0) /dev/sda +(hd0) /dev/mapper/loop0p (hd1) /dev/sdb (hd2) /dev/sdc |
#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>. |
#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>. |
#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) ... |
#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
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 /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 /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/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 |
#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) |
#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) |
#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
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 --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... |
#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... |
#cat /usr/local/bin/fixcon
#!/bin/sh openvt -c 9 /etc/init.d/console-cyrillic restart |
#cat /usr/local/bin/fixcon
#!/bin/sh openvt -c 9 /etc/init.d/console-cyrillic restart |
#Package configuration
|
#date
Sat May 30 15:35:53 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 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. |
#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) |
#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) |
#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 |
#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 |
#ls /mnt
bin boot debootstrap dev etc home lib lost+found mnt proc root sbin sys tmp usr var |
#!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 |
.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"
#!/bin/sh openvt -c 9 /etc/init.d/console-cyrillic restart
Время первой команды журнала | 14:30:32 2009- 5-30 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 17:00:00 2009- 5-30 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 20.79 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.16 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.45 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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