Журнал лабораторных работ

Содержание

Журнал

Понедельник (03/22/10)

/dev/pts/2
10:44:45
#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.
/dev/pts/3
10:44:45
#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.
/dev/pts/2
10:45:34
##--------------------------------------------

/dev/pts/3
10:45:34
##--------------------------------------------

10:48:46
#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
/dev/pts/2
10:48:46
#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
10:52:49
#cat /proc/ide/hdb/model
cat: /proc/ide/hdb/model: No such file or directory
/dev/pts/3
10:52:49
#cat /proc/ide/hdb/model
cat: /proc/ide/hdb/model: No such file or directory
/dev/pts/2
10:54:07
#cat /proc/ide/
drivers  hda/     ide0/    ide1/
/dev/pts/3
10:54:07
#cat /proc/ide/
drivers  hda/     ide0/    ide1/
/dev/pts/2
10:54:07
#cat /proc/ide/ide0/model
pci
/dev/pts/3
10:54:07
#cat /proc/ide/ide0/model
pci
/dev/pts/2
10:54:38
#cat /proc/ide/ide1/model
pci
/dev/pts/3
10:54:38
#cat /proc/ide/ide1/model
pci
/dev/pts/2
10:54:42
#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/pts/3
10:54:42
#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/pts/2
10:55:05
#file -s /dev/sda1
/dev/sda1: Linux rev 1.0 ext3 filesystem data, UUID=27d22dff-e587-4926-bc48-51d7bf36ca4b (needs journal recovery) (large files)
/dev/pts/3
10:55:05
#file -s /dev/sda1
/dev/sda1: Linux rev 1.0 ext3 filesystem data, UUID=27d22dff-e587-4926-bc48-51d7bf36ca4b (needs journal recovery) (large files)
/dev/pts/2
10:57:35
#file -s /dev/sda1
/dev/sda1: Linux rev 1.0 ext3 filesystem data, UUID=27d22dff-e587-4926-bc48-51d7bf36ca4b (needs journal recovery) (large files)
/dev/pts/3
10:57:35
#file -s /dev/sda1
/dev/sda1: Linux rev 1.0 ext3 filesystem data, UUID=27d22dff-e587-4926-bc48-51d7bf36ca4b (needs journal recovery) (large files)
/dev/pts/2
10:58:36
#cfdisk
/dev/pts/3
10:58:36
#cfdisk
/dev/pts/2
11:06:13
#file -s /dev/sda1

/dev/pts/3
11:06:13
#file -s /dev/sda1

/dev/pts/2
11:06:27
#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) ...
/dev/pts/3
11:06:27
#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) ...
/dev/pts/2
11:06:30
#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
/dev/pts/3
11:06:30
#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
/dev/pts/2
11:06:44
#partprobe
Warning: Unable to open /dev/fd0 read-write (Read-only file system).  /dev/fd0 has been opened read-only.
/dev/pts/3
11:06:44
#partprobe
Warning: Unable to open /dev/fd0 read-write (Read-only file system).  /dev/fd0 has been opened read-only.
/dev/pts/2
11:11:13
#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
/dev/pts/3
11:11:13
#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
/dev/pts/2
11:11:29
#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.
/dev/pts/3
11:11:29
#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.
/dev/pts/2
11:12:59
#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
/dev/pts/3
11:12:59
#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
/dev/pts/2
11:14:57
#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.
/dev/pts/3
11:14:57
#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.
/dev/pts/2
11:16:44
#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.
/dev/pts/3
11:16:44
#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.
11:17:02
#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.
/dev/pts/2
11:17:02
#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.
11:17:35
#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
/dev/pts/3
11:17:35
#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
/dev/pts/2
11:17:45
#ls -l /dev/sda*

/dev/pts/3
11:17:45
#ls -l /dev/sda*

/dev/pts/2
11:17:52
#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
/dev/pts/3
11:17:52
#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
/dev/pts/2
11:17:57
#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
/dev/pts/3
11:17:57
#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
/dev/pts/2
11:18:28
#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
/dev/pts/3
11:18:28
#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
/dev/pts/2
11:19:16
#umount /mnt/
umount: /mnt/: not mounted
/dev/pts/3
11:19:16
#umount /mnt/
umount: /mnt/: not mounted
/dev/pts/2
11:19:32
#mount /dev/sda3 /mnt/

/dev/pts/3
11:19:32
#mount /dev/sda3 /mnt/

/dev/pts/2
11:20:54
#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
/dev/pts/3
11:20:54
#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
/dev/pts/2
11:25:08
#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
/dev/pts/3
11:25:08
#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
/dev/pts/2
11:26:41
#ls -l disk1.img
-rw-r--r-- 1 root root 20972568576 2010-03-22 12:26 disk1.img
/dev/pts/3
11:26:41
#ls -l disk1.img
-rw-r--r-- 1 root root 20972568576 2010-03-22 12:26 disk1.img
/dev/pts/2
11:27:16
#echo 20972568576/1024/1024-1 | bc
20000
/dev/pts/3
11:27:16
#echo 20972568576/1024/1024-1 | bc
20000
/dev/pts/2
11:27:50
#echo 20972568576/1024/1024 | bc
20001
/dev/pts/3
11:27:50
#echo 20972568576/1024/1024 | bc
20001
/dev/pts/2
11:27:59
#losetup /dev/lo
log    loop0  loop1  loop2  loop3  loop4  loop5  loop6  loop7
/dev/pts/3
11:27:59
#losetup /dev/lo
log    loop0  loop1  loop2  loop3  loop4  loop5  loop6  loop7
/dev/pts/2
11:27:59
#losetup /dev/loop1 disk1.img

/dev/pts/3
11:27:59
#losetup /dev/loop1 disk1.img

/dev/pts/2
11:34:55
#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
/dev/pts/3
11:34:55
#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
/dev/pts/2
11:38:22
#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
/dev/pts/3
11:38:22
#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
/dev/pts/2
11:38:34
#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) ...
/dev/pts/3
11:38:34
#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) ...
/dev/pts/2
11:38:58
#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...
.
/dev/pts/3
11:38:58
#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...
.
/dev/pts/2
11:39:15
#kpartx -a /dev/loop1

/dev/pts/3
11:39:15
#kpartx -a /dev/loop1

/dev/pts/2
11:39:32
#/etc/init.d/lvm2 restart

/dev/pts/3
11:39:32
#/etc/init.d/lvm2 restart

/dev/pts/2
11:39:54
#/etc/init.d/lvm2 status
Usage: /etc/init.d/lvm2 {start|stop}
/dev/pts/3
11:39:54
#/etc/init.d/lvm2 status
Usage: /etc/init.d/lvm2 {start|stop}
/dev/pts/2
11:40:00
#/etc/init.d/lvm2 restart

/dev/pts/3
11:40:00
#/etc/init.d/lvm2 restart

/dev/pts/2
11:42:42
#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
/dev/pts/3
11:42:42
#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
/dev/pts/2
11:43:24
#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.
/dev/pts/3
11:43:24
#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.
/dev/pts/2
11:44:05
#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
/dev/pts/3
11:44:05
#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
/dev/pts/2
11:44:30
#/etc/init.d/lvm2 start
Setting up LVM Volume Groups  Reading all physical volumes.  This may take a while...
.
/dev/pts/3
11:44:30
#/etc/init.d/lvm2 start
Setting up LVM Volume Groups  Reading all physical volumes.  This may take a while...
.
/dev/pts/2
11:44:46
#ls /dev/mapper/
control  loop1p1
/dev/pts/3
11:44:46
#ls /dev/mapper/
control  loop1p1
/dev/pts/2
11:44:59
#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
/dev/pts/3
11:44:59
#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
/dev/pts/2
11:45:21
#mkfs.ext3 /dev/mapper/
mke2fs 1.41.3 (12-Oct-2008)
/dev/mapper/ is not a block special device.
Proceed anyway? (y,n) ^C
/dev/pts/3
11:45:21
#mkfs.ext3 /dev/mapper/
mke2fs 1.41.3 (12-Oct-2008)
/dev/mapper/ is not a block special device.
Proceed anyway? (y,n) ^C

Файлы

  • /proc/ide/ide0/model
  • /proc/ide/ide1/model
  • /proc/ide/ide0/model
    >
    pci
    
    /proc/ide/ide1/model
    >
    pci
    

    Статистика

    Время первой команды журнала10:44:45 2010- 3-22
    Время последней команды журнала11:45:21 2010- 3-22
    Количество командных строк в журнале100
    Процент команд с ненулевым кодом завершения, %18.00
    Процент синтаксически неверно набранных команд, % 0.00
    Суммарное время работы с терминалом *, час 1.01
    Количество командных строк в единицу времени, команда/мин 1.65
    Частота использования команд
    fdisk22|====================| 20.75%
    ls12|===========| 11.32%
    /etc/init.d/lvm28|=======| 7.55%
    cat8|=======| 7.55%
    apt-get8|=======| 7.55%
    mkfs.ext36|=====| 5.66%
    file6|=====| 5.66%
    losetup4|===| 3.77%
    dd4|===| 3.77%
    echo4|===| 3.77%
    bc4|===| 3.77%
    cfdisk2|=| 1.89%
    umount2|=| 1.89%
    mount2|=| 1.89%
    dmesg2|=| 1.89%
    mkfs.ext42|=| 1.89%
    df2|=| 1.89%
    partprobe2|=| 1.89%
    grep2|=| 1.89%
    #--------------------------------------------2|=| 1.89%
    kpartx2|=| 1.89%
    ____
    *) Интервалы неактивности длительностью 30 минут и более не учитываются

    Справка

    Для того чтобы использовать LiLaLo, не нужно знать ничего особенного: всё происходит само собой. Однако, чтобы ведение и последующее использование журналов было как можно более эффективным, желательно иметь в виду следующее:
    1. В журнал автоматически попадают все команды, данные в любом терминале системы.

    2. Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.

    3. Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
      $ l s-l
      bash: l: command not found
      

    4. Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
      $ test 5 -lt 4
      Обратите внимание на то, что код завершения команды может быть отличен от нуля не только в тех случаях, когда команда была выполнена с ошибкой. Многие команды используют код завершения, например, для того чтобы показать результаты проверки

    5. Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
      $ 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
      

    6. Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
      # id
      uid=0(root) gid=0(root) Gruppen=0(root)
      

    7. Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
      $ vi ~/.bashrc
      2a3,5
      >    if [ -f /usr/local/etc/bash_completion ]; then
      >         . /usr/local/etc/bash_completion
      >        fi
      

    8. Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
      $ patch ~/.bashrc
      В данном случае изменения применяются к файлу ~/.bashrc

    9. Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.

      Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.

    10. Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.

    11. Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора

    12. Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.

    13. Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.

    14. Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:

      $ whoami
      
      user
      
      $ #^ Интересно, кто я?
      
      в журнале это будет выглядеть так:
      $ whoami
      
      user
      
      Интересно, кто я?

    15. Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:

      $ whoami
      
      user
      
      $ cat > /dev/null #^ Интересно, кто я?
      
      Программа whoami выводит имя пользователя, под которым 
      мы зарегистрировались в системе.
      -
      Она не может ответить на вопрос о нашем назначении 
      в этом мире.
      
      В журнале это будет выглядеть так:
      $ whoami
      user
      
      Интересно, кто я?
      Программа whoami выводит имя пользователя, под которым
      мы зарегистрировались в системе.

      Она не может ответить на вопрос о нашем назначении
      в этом мире.
      Для разделения нескольких абзацев между собой используйте символ "-", один в строке.

    16. Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=

    17. Содержимое файла может быть показано в журнале. Для этого его нужно вывести с помощью программы cat. Если вывод команды отметить симоволами #!, содержимое файла будет показано в журнале в специально отведённой для этого секции.
    18. Для того чтобы вставить скриншот интересующего вас окна в журнал, нужно воспользоваться командой l3shot. После того как команда вызвана, нужно с помощью мыши выбрать окно, которое должно быть в журнале.
    19. Команды в журнале расположены в хронологическом порядке. Если две команды давались одна за другой, но на разных терминалах, в журнале они будут рядом, даже если они не имеют друг к другу никакого отношения.
      1
          2
      3   
          4
      
      Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.

    О программе

    LiLaLo (L3) расшифровывается как Live Lab Log.
    Программа разработана для повышения эффективности обучения Unix/Linux-системам.
    (c) Игорь Чубин, 2004-2008

    $Id$