/l3/users/jimmy/nt-scale-2010-03-22/linux3.unix.nt.unix.nt/user :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 |
|
#ps aux|grep l3
root 6548 10.2 0.3 15328 11276 ? Rs 11:35 0:05 l3-agent |
#kill -9 6548
|
#kill -9 6548
|
#kill -9 6548
|
#kill -9 6548
bash: kill: (6548) - No such process |
#kill -9 6548
bash: kill: (6548) - No such process |
#kill -9 6548
bash: kill: (6548) - No such process |
#cd /tmp/
|
#cd /tmp/
|
#cd /tmp/
|
#sh install
Installing dependencies... Ok Downloading l3bashrc... | --2010-03-22 11:36:30-- http://xgu.ru/lilalo/l3bashrc | Resolving xgu.ru... 212.26.146.51 | Connecting to xgu.ru|212.26.146.51|:80... connected. | HTTP request sent, awaiting response... 200 OK | Length: 7709 (7.5K) [text/plain] | Saving to: `l3bashrc' | ... If you use xgu.ru backend, your labs will be available at http://xgu.ru/l3//users/jimmy/nt-scale-2010-03-22/linux3.unix.nt.unix.nt Use commands $ l3cd /users/jimmy/MY-NEW-CONTEXT/linux3.unix.nt.unix.nt/USER $ l3pwd to change and to know your current context. For further information see http://xgu.ru/lilalo/ (in Russian). Thank you gor using LiLaLo. Happy Labbing! (don't forget to restart bash or relogin) |
#sh install
Installing dependencies... Ok Downloading l3bashrc... | --2010-03-22 11:36:30-- http://xgu.ru/lilalo/l3bashrc | Resolving xgu.ru... 212.26.146.51 | Connecting to xgu.ru|212.26.146.51|:80... connected. | HTTP request sent, awaiting response... 200 OK | Length: 7709 (7.5K) [text/plain] | Saving to: `l3bashrc' | ... If you use xgu.ru backend, your labs will be available at http://xgu.ru/l3//users/jimmy/nt-scale-2010-03-22/linux3.unix.nt.unix.nt Use commands $ l3cd /users/jimmy/MY-NEW-CONTEXT/linux3.unix.nt.unix.nt/USER $ l3pwd to change and to know your current context. For further information see http://xgu.ru/lilalo/ (in Russian). Thank you gor using LiLaLo. Happy Labbing! (don't forget to restart bash or relogin) |
#sh install
Installing dependencies... Ok Downloading l3bashrc... | --2010-03-22 11:36:30-- http://xgu.ru/lilalo/l3bashrc | Resolving xgu.ru... 212.26.146.51 | Connecting to xgu.ru|212.26.146.51|:80... connected. | HTTP request sent, awaiting response... 200 OK | Length: 7709 (7.5K) [text/plain] | Saving to: `l3bashrc' | ... If you use xgu.ru backend, your labs will be available at http://xgu.ru/l3//users/jimmy/nt-scale-2010-03-22/linux3.unix.nt.unix.nt Use commands $ l3cd /users/jimmy/MY-NEW-CONTEXT/linux3.unix.nt.unix.nt/USER $ l3pwd to change and to know your current context. For further information see http://xgu.ru/lilalo/ (in Russian). Thank you gor using LiLaLo. Happy Labbing! (don't forget to restart bash or relogin) |
#exit
|
#exit
|
$sudo -s
|
$sudo -s
|
#exit
|
#exit
|
$exit
|
#l3-agent
Removing stale pidfile |
#apt-get upgrade
Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#apt-get upgrade
Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
$rootpass
bash: rootpass: command not found |
$su -
Password: su: Authentication failure |
$su -
Password: su: Authentication failure |
$su -
Password: root@linux3:~# cat /root/.bash_profile l3-agent root@linux3:~# echo '. ~/.bashrc' >> /root/.bash_profile root@linux3:~# logout |
$su -
Password: l3-agent is already running: pid=7446; pidfile=/root/.lilalo/l3-agent.pid |
#apt-get upgrade
Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
##--------------------------------------------
|
#dmesg | grep [hs]d[a-d]
[ 0.000000] Kernel command line: root=/dev/sda1 ro quiet [ 4.518488] sd 1:0:0:0: [sda] 976773168 512-byte hardware sectors (500108 MB) [ 4.518488] sd 1:0:0:0: [sda] Write Protect is off [ 4.518488] sd 1:0:0:0: [sda] Mode Sense: 00 3a 00 00 [ 4.518488] sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 4.518488] sd 1:0:0:0: [sda] 976773168 512-byte hardware sectors (500108 MB) [ 4.518488] sd 1:0:0:0: [sda] Write Protect is off [ 4.518488] sd 1:0:0:0: [sda] Mode Sense: 00 3a 00 00 [ 4.518488] sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 4.518488] sda: sda1 sda2 [ 4.540412] sd 1:0:0:0: [sda] Attached SCSI disk [ 4.892826] hda: TSSTcorpDVD-ROM SH-D162D, ATAPI CD/DVD-ROM drive [ 5.564445] hda: host max PIO5 wanted PIO255(auto-tune) selected PIO4 [ 5.564631] hda: UDMA/33 mode selected [ 6.190207] hda: ATAPI 48X DVD-ROM drive, 198kB Cache [ 9.633914] Adding 4883752k swap on /dev/sda2. Priority:-1 extents:1 across:4883752k [ 9.921225] EXT3 FS on sda1, internal journal |
#cat /proc/ide/hdb/model
cat: /proc/ide/hdb/model: No such file or directory |
#cat /proc/ide/
drivers hda/ ide0/ ide1/ |
#cat /proc/ide/ide0/model
pci |
#cat /proc/ide/ide1/model
pci |
#fdisk -l /dev/sda
Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xb40627c4 Device Boot Start End Blocks Id System /dev/sda1 * 1 2432 19535008+ 83 Linux /dev/sda2 2433 3040 4883760 82 Linux swap / Solaris |
#file -s /dev/sda1
/dev/sda1: Linux rev 1.0 ext3 filesystem data, UUID=27d22dff-e587-4926-bc48-51d7bf36ca4b (needs journal recovery) (large files) |
#file -s /dev/sda1
/dev/sda1: Linux rev 1.0 ext3 filesystem data, UUID=27d22dff-e587-4926-bc48-51d7bf36ca4b (needs journal recovery) (large files) |
#cfdisk
|
#file -s /dev/sda1
|
#apt-get install parted
Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: parted-doc The following NEW packages will be installed: parted 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 64.5kB of archives. After this operation, 176kB of additional disk space will be used. Get:1 http://10.0.35.1 lenny/main parted 1.8.8.git.2008.03.24-11.1 [64.5kB] Fetched 64.5kB in 0s (3610kB/s) Selecting previously deselected package parted. (Reading database ... 90568 files and directories currently installed.) Unpacking parted (from .../parted_1.8.8.git.2008.03.24-11.1_i386.deb) ... Processing triggers for man-db ... Setting up parted (1.8.8.git.2008.03.24-11.1) ... |
#fdisk -l /dev/sda*
Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xb40627c4 Device Boot Start End Blocks Id System /dev/sda1 * 1 2432 19535008+ 83 Linux /dev/sda2 2433 3040 4883760 82 Linux swap / Solaris /dev/sda3 3041 5472 19535040 83 Linux Disk /dev/sda1: 20.0 GB, 20003848704 bytes 255 heads, 63 sectors/track, 2431 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000 Disk /dev/sda1 doesn't contain a valid partition table Disk /dev/sda2: 5000 MB, 5000970240 bytes 255 heads, 63 sectors/track, 608 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000 Disk /dev/sda2 doesn't contain a valid partition table |
#partprobe
Warning: Unable to open /dev/fd0 read-write (Read-only file system). /dev/fd0 has been opened read-only. |
#ls -l /dev/sda*
brw-rw---- 1 root disk 8, 0 2010-03-22 12:06 /dev/sda brw-rw---- 1 root disk 8, 1 2010-03-22 10:33 /dev/sda1 brw-rw---- 1 root disk 8, 2 2010-03-22 10:33 /dev/sda2 brw-rw---- 1 root disk 8, 3 2010-03-22 12:07 /dev/sda3 |
#mkfs.ext3 /dev/sda3
mke2fs 1.41.3 (12-Oct-2008) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 1221600 inodes, 4883760 blocks 244188 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=0 150 block groups 32768 blocks per group, 32768 fragments per group 8144 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000 Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 39 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. |
#fdisk /dev/sda
The number of cylinders for this disk is set to 60801. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): p Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes ... Invalid partition number for type `3' Command action e extended p primary partition (1-4) q Invalid partition number for type `q' Command action e extended p primary partition (1-4) ^C |
#fdisk /dev/sda
The number of cylinders for this disk is set to 60801. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): h h: unknown command Command action a toggle a bootable flag ... /dev/sda1 * 1 2432 19535008+ 83 Linux /dev/sda2 2433 3040 4883760 82 Linux swap / Solaris /dev/sda3 3041 6080 24418800 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 16: Device or resource busy. The kernel still uses the old table. The new table will be used at the next reboot. Syncing disks. |
#mkfs.ext4 /dev/sda3
mke2fs 1.41.3 (12-Oct-2008) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 1221600 inodes, 4883760 blocks 244188 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=0 150 block groups 32768 blocks per group, 32768 fragments per group 8144 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000 Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 22 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. |
#mkfs.ext3 /dev/sda3
mke2fs 1.41.3 (12-Oct-2008) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 1221600 inodes, 4883760 blocks 244188 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=0 150 block groups 32768 blocks per group, 32768 fragments per group 8144 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000 Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 37 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. |
#ls -l /dev/sda*
brw-rw---- 1 root disk 8, 0 2010-03-22 12:16 /dev/sda brw-rw---- 1 root disk 8, 1 2010-03-22 10:33 /dev/sda1 brw-rw---- 1 root disk 8, 2 2010-03-22 10:33 /dev/sda2 brw-rw---- 1 root disk 8, 3 2010-03-22 12:17 /dev/sda3 |
#ls -l /dev/sda*
|
#fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xb40627c4 Device Boot Start End Blocks Id System /dev/sda1 * 1 2432 19535008+ 83 Linux /dev/sda2 2433 3040 4883760 82 Linux swap / Solaris /dev/sda3 3041 6080 24418800 83 Linux |
#fdisk /dev/sda3
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0x882af918. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. The number of cylinders for this disk is set to 2432. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help): ^C |
#df -h
Filesystem Size Used Avail Use% Mounted on /dev/sda1 19G 3.2G 15G 19% / tmpfs 1.5G 0 1.5G 0% /lib/init/rw udev 10M 732K 9.3M 8% /dev tmpfs 1.5G 0 1.5G 0% /dev/shm |
#umount /mnt/
umount: /mnt/: not mounted |
#mount /dev/sda3 /mnt/
|
#dd if=/dev/zero of=disk1.img count=2048 bs=1024k
2048+0 records in 2048+0 records out 2147483648 bytes (2.1 GB) copied, 27.2476 s, 78.8 MB/s |
#dd if=/dev/zero of=disk1.img count=2048 bs=1024k
seek 000 count=1 1+0 records in 1+0 records out 1048576 bytes (1.0 MB) copied, 0.00301514 s, 348 MB/s |
#ls -l disk1.img
-rw-r--r-- 1 root root 20972568576 2010-03-22 12:26 disk1.img |
#echo 20972568576/1024/1024-1 | bc
20000 |
#echo 20972568576/1024/1024 | bc
20001 |
#losetup /dev/lo
log loop0 loop1 loop2 loop3 loop4 loop5 loop6 loop7 |
#losetup /dev/loop1 disk1.img
|
#fdisk /dev/loop1
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0x1da47fa7. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. The number of cylinders for this disk is set to 2549. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 4 First cylinder (1-2549, default 1): d First cylinder (1-2549, default 1): ^C |
#fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xb40627c4 Device Boot Start End Blocks Id System /dev/sda1 * 1 2432 19535008+ 83 Linux /dev/sda2 2433 3040 4883760 82 Linux swap / Solaris /dev/sda3 3041 6080 24418800 83 Linux |
#apt-get install kpartx
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: dmsetup The following NEW packages will be installed: dmsetup kpartx 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 63.1kB of archives. After this operation, 229kB of additional disk space will be used. ... Get:2 http://10.0.35.1 lenny/main kpartx 0.4.8-14+lenny2 [25.3kB] Fetched 63.1kB in 0s (5591kB/s) Selecting previously deselected package dmsetup. (Reading database ... 90576 files and directories currently installed.) Unpacking dmsetup (from .../dmsetup_2%3a1.02.27-4_i386.deb) ... Selecting previously deselected package kpartx. Unpacking kpartx (from .../kpartx_0.4.8-14+lenny2_i386.deb) ... Processing triggers for man-db ... Setting up dmsetup (2:1.02.27-4) ... Setting up kpartx (0.4.8-14+lenny2) ... |
#apt-get install lvm2
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: lvm2 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 354kB of archives. After this operation, 983kB of additional disk space will be used. Get:1 http://10.0.35.1 lenny/main lvm2 2.02.39-7 [354kB] Fetched 354kB in 0s (8840kB/s) Selecting previously deselected package lvm2. (Reading database ... 90594 files and directories currently installed.) Unpacking lvm2 (from .../lvm2_2.02.39-7_i386.deb) ... Processing triggers for man-db ... Setting up lvm2 (2.02.39-7) ... Setting up LVM Volume Groups Reading all physical volumes. This may take a while... . |
#kpartx -a /dev/loop1
|
#/etc/init.d/lvm2 restart
|
#/etc/init.d/lvm2 status
Usage: /etc/init.d/lvm2 {start|stop} |
#/etc/init.d/lvm2 restart
|
#fdisk /dev/loop1
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0xf6b36266. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. The number of cylinders for this disk is set to 2549. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) ... Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. The number of cylinders for this disk is set to 2549. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help): ^C |
#fdisk /dev/loop1
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0x48cde79f. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. The number of cylinders for this disk is set to 2549. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) ... Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-2549, default 2549): Using default value 2549 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/loop1
Disk /dev/loop1: 20.9 GB, 20972568576 bytes 255 heads, 63 sectors/track, 2549 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x48cde79f Device Boot Start End Blocks Id System /dev/loop1p1 1 2549 20474811 83 Linux |
#/etc/init.d/lvm2 start
Setting up LVM Volume Groups Reading all physical volumes. This may take a while... . |
#ls /dev/mapper/
control loop1p1 |
#ls -l /dev/mapper/
total 0 crw-rw---- 1 root root 10, 60 2010-03-22 12:39 control brw-rw---- 1 root disk 254, 0 2010-03-22 12:44 loop1p1 |
#mkfs.ext3 /dev/mapper/
mke2fs 1.41.3 (12-Oct-2008) /dev/mapper/ is not a block special device. Proceed anyway? (y,n) ^C |
#mkfs.ext3 /dev/mapper/loop1p1
mke2fs 1.41.3 (12-Oct-2008) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 1281120 inodes, 5118702 blocks 255935 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=0 157 block groups 32768 blocks per group, 32768 fragments per group 8160 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000 Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 34 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. |
#fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xb40627c4 Device Boot Start End Blocks Id System /dev/sda1 * 1 2432 19535008+ 83 Linux /dev/sda2 2433 3040 4883760 82 Linux swap / Solaris /dev/sda3 3041 6080 24418800 83 Linux Disk /dev/dm-0: 20.9 GB, 20966206464 bytes 255 heads, 63 sectors/track, 2548 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000 Disk /dev/dm-0 doesn't contain a valid partition table |
#fdisk -l /dev/loop1p1
|
#fdisk -l /dev/loop1
Disk /dev/loop1: 20.9 GB, 20972568576 bytes 255 heads, 63 sectors/track, 2549 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x48cde79f Device Boot Start End Blocks Id System /dev/loop1p1 1 2549 20474811 83 Linux |
#mount /dev/mapper/loop1p1 /mnt/
|
#df -h
Filesystem Size Used Avail Use% Mounted on /dev/sda1 19G 5.6G 12G 33% / tmpfs 1.5G 0 1.5G 0% /lib/init/rw udev 10M 740K 9.3M 8% /dev tmpfs 1.5G 0 1.5G 0% /dev/shm /dev/sda3 20G 173M 19G 1% /mnt /dev/mapper/loop1p1 20G 173M 19G 1% /mnt |
#umount /mnt
|
#df -h
Filesystem Size Used Avail Use% Mounted on /dev/sda1 19G 5.6G 12G 33% / tmpfs 1.5G 0 1.5G 0% /lib/init/rw udev 10M 740K 9.3M 8% /dev tmpfs 1.5G 0 1.5G 0% /dev/shm /dev/sda3 19G 173M 18G 1% /mnt |
#umount /mnt
|
#df -h
Filesystem Size Used Avail Use% Mounted on /dev/sda1 19G 5.6G 12G 33% / tmpfs 1.5G 0 1.5G 0% /lib/init/rw udev 10M 740K 9.3M 8% /dev tmpfs 1.5G 0 1.5G 0% /dev/shm |
#mount /dev/mapper/loop1p1 /mnt/
|
#umount /mnt
|
#kpartx -d /dev/loop1
|
#losetup -d /dev/loop1
|
#apt-get install mdadm
│ │ │ Please enter 'all', 'none', or a space-separated list of devices │ │ such as 'md0 md1' or 'md/1 md/d0' (the leading '/dev/' can be │ │ omitted). │ │ │ │ MD arrays needed for the root file system: │ │ │ │ all________________________________________________________________ │ │ │ │ <Ok> │ ... Setting up mdadm (2.6.7.2-3) ... Generating array device nodes... done. Generating mdadm.conf... done. update-initramfs: deferring update (trigger activated) Starting MD monitoring service: mdadm --monitor. Assembling MD arrays...done (no arrays found in config file or automatically). Processing triggers for initramfs-tools ... update-initramfs: Generating /boot/initrd.img-2.6.26-2-686 W: mdadm: /etc/mdadm/mdadm.conf defines no arrays. W: mdadm: no arrays defined in configuration file. |
#rm disk1.img
|
#dd if=/dev/zero of=disk1.img seek=20000 bs=1024k count=1
480 1+0 records in 1+0 records out 1048576 bytes (1.0 MB) copied, 0.0031685 s, 331 MB/s |
#dd if=/dev/zero of=disk2.img seek=20480 bs=1024k count=1
1+0 records in 1+0 records out 1048576 bytes (1.0 MB) copied, 0.00284361 s, 369 MB/s |
#losetup /dev/loop2 disk2.img
|
pci
pci
Время первой команды журнала | 10:36:09 2010- 3-22 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 13:24:43 2010- 3-22 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 14.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 1.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.39 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.20 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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