среда, 26 декабря 2012 г.

Классификация ИСПДн согласно изменениям постановления от 01.11.2012

Всвязи с выходом постановления от 1 ноября 2012 г. № 1119 "ОБ УТВЕРЖДЕНИИ ТРЕБОВАНИЙ К ЗАЩИТЕ ПЕРСОНАЛЬНЫХ ДАННЫХ ПРИ ИХ ОБРАБОТКЕ В ИНФОРМАЦИОННЫХ СИСТЕМАХ ПЕРСОНАЛЬНЫХ ДАННЫХ" потребовалось вывести классификацию ИСПДн в более наглядном виде.

Я сделал это в таком виде:


Условные обозначения:
"-"  субъекты НЕ являются сотрудниками оператора
"+" субъекты являются сотрудниками оператора

воскресенье, 4 ноября 2012 г.

LVM

Используется два диска: sdb был автоматически размечен при установке с опцией разметки LVM, а второй - подключен позже и отформатирован ntfs. Отщипнем 15 Гб от второго для экспериментов.
Изначально:

test@testpc:~$ df -h
Файловая система Разм Исп Дост Исп% смонтирована на
/dev/mapper/netshara-root
322M 108M 198M 36% /
tmpfs 251M 0 251M 0% /lib/init/rw
udev 246M 160K 246M 1% /dev
tmpfs 251M 0 251M 0% /dev/shm
/dev/sdb1 228M 15M 202M 7% /boot
/dev/mapper/netshara-home
134G 124G 3,3G 98% /home
/dev/mapper/netshara-tmp
368M 11M 339M 3% /tmp
/dev/mapper/netshara-usr
8,3G 715M 7,2G 9% /usr
/dev/mapper/netshara-var
2,8G 614M 2,1G 23% /var
/dev/sda1 150G 40G 110G 27% /media/hdd

Отмонтируем /media/hdd перед изменением раздела:

test@testpc:~$ sudo umount /media/hdd/
test@testpc:~$ sudo fdisk -l /dev/sda

Disk /dev/sda: 160.0 GB, 160040803840 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009e367

Device Boot Start End Blocks Id System
/dev/sda1 1 19458 156288000 7 HPFS/NTFS

Узнаем, сколько минимум можно отпилить:

test@testpc:~$ sudo ntfsresize -i /dev/sda1
ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/sda1
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 160038908416 bytes (160039 MB)
Current device size: 160038912000 bytes (160039 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use : 42107 MB (26,3%)
Collecting resizing constraints ...
You might resize at 42106085376 bytes or 42107 MB (freeing 117932 MB).
Please make a test run using both the -n and -s options before real resizing!

Обращаем внимание, что советуют запускать прогу сначала в режиме симуляции (-n):

test@testpc:~$ sudo ntfsresize -n -s140G /dev/sda1
ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/sda1
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 160038908416 bytes (160039 MB)
Current device size: 160038912000 bytes (160039 MB)
New volume size : 139999994368 bytes (140000 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use : 42107 MB (26,3%)
Collecting resizing constraints ...
Needed relocations : 345223 (1415 MB)
Schedule chkdsk for NTFS consistency check at Windows boot time ...
Resetting $LogFile ... (this might take a while)
Relocating needed data ...
100.00 percent completed
Updating $BadClust file ...
Updating $Bitmap file ...
Updating Boot record ...
The read-only test run ended successfully.

Все ОК, значит, режем:

test@testpc:~$ sudo ntfsresize -s140G /dev/sda1
ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/sda1
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 160038908416 bytes (160039 MB)
Current device size: 160038912000 bytes (160039 MB)
New volume size : 139999994368 bytes (140000 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use : 42107 MB (26,3%)
Collecting resizing constraints ...
Needed relocations : 345223 (1415 MB)
WARNING: Every sanity check passed and only the dangerous operations left.
Make sure that important data has been backed up! Power outage or computer
crash may result major data loss!
Are you sure you want to proceed (y/[n])? y
Schedule chkdsk for NTFS consistency check at Windows boot time ...
Resetting $LogFile ... (this might take a while)
Relocating needed data ...
100.00 percent completed
Updating $BadClust file ...
Updating $Bitmap file ...
Updating Boot record ...
Syncing device ...
Successfully resized NTFS on device '/dev/sda1'.
You can go on to shrink the device for example with Linux fdisk.
IMPORTANT: When recreating the partition, make sure that you
1) create it at the same disk sector (use sector as the unit!)
2) create it with the same partition type (usually 7, HPFS/NTFS)
3) do not make it smaller than the new NTFS filesystem size
4) set the bootable flag for the partition if it existed before
Otherwise you won't be able to access NTFS or can't boot from the disk!
If you make a mistake and don't have a partition table backup then you
can recover the partition table by TestDisk or Parted's rescue mode.

Создаем разделы на освободившемся месте:

test@testpc:~$ sudo fdisk /dev/sda

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): p

Disk /dev/sda: 160.0 GB, 160040803840 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009e367

Device Boot Start End Blocks Id System
/dev/sda1 1 19458 156288000 7 HPFS/NTFS
Command (m for help): d
Selected partition 1

Command (m for help): d
No partition is defined yet!

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-19457, default 1): 1
Last cylinder, +cylinders or +size{K,M,G} (1-19457, default 19457): +140G

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 7
Changed system type of partition 1 to 7 (HPFS/NTFS)

Command (m for help): p

Disk /dev/sda: 160.0 GB, 160040803840 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009e367

Device Boot Start End Blocks Id System
/dev/sda1 1 18277 146809971 7 HPFS/NTFS

Command (m for help): v
Remaining 18959752 unallocated 512-byte sectors

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Создаем linux-разделы

test@testpc:~$ sudo fdisk /dev/sda

Command (m for help): p

Disk /dev/sda: 160.0 GB, 160040803840 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009e367

Device Boot Start End Blocks Id System
/dev/sda1 1 18277 146809971 7 HPFS/NTFS

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (18278-19457, default 18278):
Using default value 18278
Last cylinder, +cylinders or +size{K,M,G} (18278-19457, default 19457): +3G

Command (m for help): v
Remaining 12646207 unallocated 512-byte sectors

Command (m for help): p

Disk /dev/sda: 160.0 GB, 160040803840 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009e367

Device Boot Start End Blocks Id System
/dev/sda1 1 18277 146809971 7 HPFS/NTFS
/dev/sda2 18278 18670 3156772+ 83 Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (18671-19457, default 18671):
Using default value 18671
Last cylinder, +cylinders or +size{K,M,G} (18671-19457, default 19457): +3G

Command (m for help): v
Remaining 6332662 unallocated 512-byte sectors

Command (m for help): p

Disk /dev/sda: 160.0 GB, 160040803840 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009e367

Device Boot Start End Blocks Id System
/dev/sda1 1 18277 146809971 7 HPFS/NTFS
/dev/sda2 18278 18670 3156772+ 83 Linux
/dev/sda3 18671 19063 3156772+ 83 Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Selected partition 4
First cylinder (19064-19457, default 19064):
Using default value 19064
Last cylinder, +cylinders or +size{K,M,G} (19064-19457, default 19457):
Using default value 19457

Command (m for help): v
Remaining 3052 unallocated 512-byte sectors

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Итак, разметка второго диска завершена:

test@testpc:~$ sudo fdisk -l /dev/sda

Disk /dev/sda: 160.0 GB, 160040803840 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009e367

Device Boot Start End Blocks Id System
/dev/sda1 1 18277 146809971 7 HPFS/NTFS
/dev/sda2 18278 18670 3156772+ 83 Linux
/dev/sda3 18671 19063 3156772+ 83 Linux
/dev/sda4 19064 19457 3164805 83 Linux

НЕ создаем ФС на них, т.к. сначала надо создать физические тома:

test@testpc:~$ sudo pvcreate /dev/sda2 /dev/sda3
Physical volume "/dev/sda2" successfully created
Physical volume "/dev/sda3" successfully created

Создаем группу томов сначала в тестовом режиме:

test@testpc:~$ sudo vgcreate -t -v toolsvg /dev/sda2 /dev/sda3
Test mode: Metadata will NOT be updated.
Wiping cache of LVM-capable devices
Wiping cache of LVM-capable devices
Adding physical volume '/dev/sda2' to volume group 'toolsvg'
Adding physical volume '/dev/sda3' to volume group 'toolsvg'
Test mode: Skipping archiving of volume group.
Test mode: Skipping volume group backup.
Volume group "toolsvg" successfully created
Test mode: Wiping internal cache
Wiping internal VG cache

Теперь реально:

test@testpc:~$ sudo vgcreate -v toolsvg /dev/sda2 /dev/sda3
Wiping cache of LVM-capable devices
Wiping cache of LVM-capable devices
Adding physical volume '/dev/sda2' to volume group 'toolsvg'
Adding physical volume '/dev/sda3' to volume group 'toolsvg'
Creating directory "/etc/lvm/archive"
Archiving volume group "toolsvg" metadata (seqno 0).
Creating volume group backup "/etc/lvm/backup/toolsvg" (seqno 1).
Volume group "toolsvg" successfully created

Смотрим, что есть:

test@testpc:~$ sudo vgdisplay -C --verbose
Finding all volume groups
Finding volume group "netshara"
Finding volume group "toolsvg"
VG Attr Ext #PV #LV #SN VSize VFree VG UUID
netshara wz--n- 4,00m 1 6 0 148,81g 0 zr6i2P-KImk-pYPP-gAUy-vkkt-Uuw6-AQLVTT
toolsvg wz--n- 4,00m 2 0 0 6,02g 6,02g DtejK2-3nb7-dbdJ-4BR8-4jHx-w4Vg-FGEYz5

Создаем виртуальный том в тестовом режиме, полностью забиваем место созданной группы томов:

test@testpc:~$ sudo lvcreate -l 100%FREE -n netboot -t -v toolsvg
Test mode: Metadata will NOT be updated.
Setting logging type to disk
Finding volume group "toolsvg"
Test mode: Skipping archiving of volume group.
Creating logical volume netboot
Test mode: Skipping volume group backup.
Found volume group "toolsvg"
Aborting. Failed to activate new LV to wipe the start of it.
Found volume group "toolsvg"
Unable to deactivate failed new LV. Manual intervention required.
Test mode: Wiping internal cache
Wiping internal VG cache

Реально:

test@testpc:~$ sudo lvcreate -l 100%FREE -n netboot -v toolsvg
Setting logging type to disk
Finding volume group "toolsvg"
Archiving volume group "toolsvg" metadata (seqno 1).
Creating logical volume netboot
Creating volume group backup "/etc/lvm/backup/toolsvg" (seqno 2).
Found volume group "toolsvg"
Creating toolsvg-netboot
Loading toolsvg-netboot table (254:6)
Resuming toolsvg-netboot (254:6)
Clearing start of logical volume "netboot"
Creating volume group backup "/etc/lvm/backup/toolsvg" (seqno 2).
Logical volume "netboot" created

Смотрим список логических томов в системе:

test@testpc:~$ sudo lvdisplay -C
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
home netshara -wi-ao 135,98g
root netshara -wi-ao 332,00m
swap_1 netshara -wi-ao 980,00m
tmp netshara -wi-ao 380,00m
usr netshara -wi-ao 8,38g
var netshara -wi-ao 2,79g
netboot toolsvg -wi-a- 6,02g

Создаем ФС на новом томе:

test@testpc:~$ sudo mkfs.ext3 /dev/mapper/toolsvg-netboot
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
394352 inodes, 1576960 blocks
78848 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1614807040
49 block groups
32768 blocks per group, 32768 fragments per group
8048 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 24 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

Монтируем:

test@testpc:~$ sudo mount /dev/mapper/toolsvg-netboot /srv/

Расширим раздел /home первого диска за счет оставшегося пустого третьего раздела. Предварительно его надо отмонтировать без последствий, поэтому останавливаем все, что использует файлы на нем:

test@testpc:~$ sudo service transmission-daemon stop
root@testpc:~# service samba stop
test@testpc:~$ sudo lsof /home/
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
bash 25063 alex cwd DIR 254,5 4096 7331841 /home/test
sudo 26887 root cwd DIR 254,5 4096 7331841 /home/test
lsof 26888 root cwd DIR 254,5 4096 7331841 /home/test
lsof 26889 root cwd DIR 254,5 4096 7331841 /home/test

Выходим из под обычного пользователя (убить оболочку не получилось), разрешаем доступ по ssh от рута и заходим (уже ничего не будет мешать для размонтирования домашнего каталога):

root@testpc:~# lsof /home/
root@testpc:~# umount /home

Создаем физический том:

root@testpc:~# pvcreate /dev/sda4
Physical volume "/dev/sda4" successfully created

Расширяем, как обычно, сначала в тестовом режиме:

root@testpc:~# vgextend -t -v /dev/sda4 netshara
Test mode: Metadata will NOT be updated.
Checking for volume group "sda4"
Wiping cache of LVM-capable devices
Volume group "sda4" not found
Test mode: Wiping internal cache
Wiping internal VG cache
root@testpc:~# vgextend -t -v netshara /dev/sda4
Test mode: Metadata will NOT be updated.
Checking for volume group "netshara"
Test mode: Skipping archiving of volume group.
Wiping cache of LVM-capable devices
Adding physical volume '/dev/sda4' to volume group 'netshara'
Volume group "netshara" will be extended by 1 new physical volumes
Test mode: Skipping volume group backup.
Volume group "netshara" successfully extended
Test mode: Wiping internal cache
Wiping internal VG cache

Реально:

root@testpc:~# vgextend -v netshara /dev/sda4
Checking for volume group "netshara"
Archiving volume group "netshara" metadata (seqno 7).
Wiping cache of LVM-capable devices
Adding physical volume '/dev/sda4' to volume group 'netshara'
Volume group "netshara" will be extended by 1 new physical volumes
Creating volume group backup "/etc/lvm/backup/netshara" (seqno 8).
Volume group "netshara" successfully extended

Видим изменения:

root@testpc:~# vgdisplay -C
VG #PV #LV #SN Attr VSize VFree
netshara 2 6 0 wz--n- 151,82g 3,02g
toolsvg 2 1 0 wz--n- 6,02g 0

На всякий случай

root@testpc:~# vgcfgbackup -v netshara
Using volume group(s) on command line
Finding volume group "netshara"
Creating volume group backup "/etc/lvm/backup/netshara" (seqno 8).
Volume group "netshara" successfully backed up.
root@testpc:~# vgcfgbackup -v toolsvg
Using volume group(s) on command line
Finding volume group "toolsvg"
Creating volume group backup "/etc/lvm/backup/toolsvg" (seqno 2).
Volume group "toolsvg" successfully backed up.

Сначала в тестовом режиме:

root@testpc:~# lvextend -L +3G -t -v netshara/home
Test mode: Metadata will NOT be updated.
Finding volume group netshara
Test mode: Skipping archiving of volume group.
Extending logical volume home to 138,98 GiB
Found volume group "netshara"
Found volume group "netshara"
Found volume group "netshara"
Test mode: Skipping volume group backup.
Logical volume home successfully resized
Test mode: Wiping internal cache
Wiping internal VG cache

Реально:

root@testpc:~# lvextend -L +3G -v netshara/home
Finding volume group netshara
Archiving volume group "netshara" metadata (seqno 8).
Extending logical volume home to 138,98 GiB
Found volume group "netshara"
Found volume group "netshara"
Loading netshara-home table (254:5)
Suspending netshara-home (254:5) with device flush
Found volume group "netshara"
Resuming netshara-home (254:5)
Creating volume group backup "/etc/lvm/backup/netshara" (seqno 9).
Logical volume home successfully resized

Надо увеличить размер ФС:

root@testpc:~# fsck -n /dev/mapper/netshara-home
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
/dev/mapper/netshara-home: clean, 3995/8912896 files, 33105822/35647488 blocks
root@testpc:~# fdisk -s /dev/mapper/netshara-home
145735680
root@testpc:~# resize2fs -P /dev/mapper/netshara-home
resize2fs 1.41.12 (17-May-2010)
Please run 'e2fsck -f /dev/mapper/netshara-home' first.

root@testpc:~# e2fsck -f /dev/mapper/netshara-home
e2fsck 1.41.12 (17-May-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/mapper/netshara-home: 3995/8912896 files (43.3% non-contiguous), 33105822/35647488 blocks
root@testpc:~# resize2fs -P /dev/mapper/netshara-home
resize2fs 1.41.12 (17-May-2010)
Estimated minimum size of the filesystem: 33065730
root@testpc:~# resize2fs /dev/mapper/netshara-home
resize2fs 1.41.12 (17-May-2010)
Resizing the filesystem on /dev/mapper/netshara-home to 36433920 (4k) blocks.
The filesystem on /dev/mapper/netshara-home is now 36433920 blocks long.

Монтируем раздел:

root@testpc:~# mount /dev/mapper/netshara-home /home
root@testpc:~# df -h /dev/mapper/netshara-home
Файловая система Разм Исп Дост Исп% смонтирована на
/dev/mapper/netshara-home
137G 125G 5,7G 96% /home

Стартуем сервисы:

test@testpc:/root$ sudo service samba start
[sudo] password for alex:
Starting Samba daemons: nmbd smbd.
test@testpc:/root$ sudo service transmission-daemon start
Starting bittorrent daemon: transmission-daemon.

В итоге:

test@testpc:/root$ sudo vgdisplay -C
VG #PV #LV #SN Attr VSize VFree
netshara 2 6 0 wz--n- 151,82g 16,00m
toolsvg 2 1 0 wz--n- 6,02g 0
test@testpc:/root$ sudo lvdisplay -C
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
home netshara -wi-ao 138,98g
root netshara -wi-ao 332,00m
swap_1 netshara -wi-ao 980,00m
tmp netshara -wi-ao 380,00m
usr netshara -wi-ao 8,38g
var netshara -wi-ao 2,79g
netboot toolsvg -wi-ao 6,02g

суббота, 3 ноября 2012 г.

Конвертирование ВМ VMware для VirtualBox

Дано: ВМ WinXP ( VMware версии 6.8)
Задача: запустить ВМ с помощью VirtualBox

Контрольные суммы для файлов ВМ:

test@testpc /media/WORK/VM/Windows/WinXP_SecretNet51 $ md5sum *
6945e0b81378dd1377f47c2c8e841799  Windows XP Professional.nvram
c84357e9f6e209b577510cdf1825f2f8  Windows XP Professional.vmdk
d41d8cd98f00b204e9800998ecf8427e  Windows XP Professional.vmsd
f1f30651ad5258fba5a0cc954decf33a  Windows XP Professional.vmx
17be67d8aaf2844c7619310597f82d28  Windows XP Professional.vmxf


Создаем пакет OVF :

test@testpc /media/WORK/VM/Windows/WinXP_SecretNet51 $ ovftool Windows\ XP\ Professional.vmx winxppro.ovf
Opening VMX source: Windows XP Professional.vmx
Opening OVF target: winxppro.ovf
Writing OVF package: winxppro.ovf
Transfer Completed                   
Completed successfully


Смотрим, что изменилось:

test@testpc /media/WORK/VM/Windows/WinXP_SecretNet51 $ md5sum *
6945e0b81378dd1377f47c2c8e841799  Windows XP Professional.nvram
c84357e9f6e209b577510cdf1825f2f8  Windows XP Professional.vmdk
d41d8cd98f00b204e9800998ecf8427e  Windows XP Professional.vmsd
f1f30651ad5258fba5a0cc954decf33a  Windows XP Professional.vmx
17be67d8aaf2844c7619310597f82d28  Windows XP Professional.vmxf
0d6caf97df338681da86c33ce869c51c  winxppro-disk1.vmdk
9307378a87f6069691c698043a3a334b  winxppro.mf
46febe5bd76f83a57e5759079f46ceb8  winxppro.ovf


test@testpc /media/WORK/VM/Windows/WinXP_SecretNet51 $ du -h *
12K    Windows XP Professional.nvram
1,9G    Windows XP Professional.vmdk
0    Windows XP Professional.vmsd
4,0K    Windows XP Professional.vmx
512    Windows XP Professional.vmxf
961M    winxppro-disk1.vmdk
512    winxppro.mf
8,0K    winxppro.ovf


Копируем новые файлы winxppro* в другой каталог SecretNet5. Запускаем VirtualBox, в меню "Файл" выбираем "Импорт конфигурации". Далее в диалоговом окне "Открыть конфигурацию" выбираем файл OVF и нажимаем "Вперед". Появляется ошибка:

Указано, что ошибка в строке 47 файла OVF. Открываем файл и смотрим, что в данной строке:

      <Item ovf:required="false">                             //строка 47
        <rasd:Address>0</rasd:Address>
        <rasd:Description>USB Controller (EHCI)</rasd:Description>
        <rasd:ElementName>usb</rasd:ElementName>
        <rasd:InstanceID>3</rasd:InstanceID>
        <rasd:ResourceSubType>vmware.usb.ehci</rasd:ResourceSubType>
        <rasd:ResourceType>23</rasd:ResourceType>
        <vmw:Config ovf:required="false" vmw:key="ehciEnabled" vmw:value="true"/>
      </Item>


Ошибка заключается в том, что VirtualBox не может распознать элемент Config, который используется только VMware. Стоит сразу сказать, что таких строк несколько в файле. После их удаления ошибка исчезнет:

test@testpc /media/WORK/VM/Windows/SecretNet5 $ grep -i vmw:Config winxppro.ovf
        <vmw:Config ovf:required="false" vmw:key="ehciEnabled" vmw:value="true"/>
        <vmw:Config ovf:required="false" vmw:key="wakeOnLanEnabled" vmw:value="false"/>
        <vmw:Config ovf:required="false" vmw:key="useAutoDetect" vmw:value="true"/>
      <vmw:Config ovf:required="false" vmw:key="tools.syncTimeWithHost" vmw:value="false"/>
      <vmw:Config ovf:required="false" vmw:key="tools.toolsUpgradePolicy" vmw:value="useGlobal"/>


При импорте появляется другая ошибка о неверных значениях хэшей для файлов (т.к. из файла OVF удалили несколько строк, то необходимо пересчитать значение хэш-функции и добавить ее значение в файл winxppro.mf):

test@testpc /media/WORK/VM/Windows/SecretNet5 $ cat winxppro.mf
SHA1(winxppro.ovf)= 7e2f06b0bf6330a1d6778ff23b89a6021b0f7703
SHA1(winxppro-disk1.vmdk)= a66d7aa13662a019f76a1baa49a2e19e56dd7711
test@testpc /media/WORK/VM/Windows/SecretNet5 $ sha1sum winxppro.ovf
e083b7e5f9f1f5b1a1841361e6340dfbd08ada4e  winxppro.ovf
test@testpc /media/WORK/VM/Windows/SecretNet5 $ cat winxppro.mf
SHA1(winxppro.ovf)= e083b7e5f9f1f5b1a1841361e6340dfbd08ada4e
SHA1(winxppro-disk1.vmdk)= a66d7aa13662a019f76a1baa49a2e19e56dd7711



среда, 24 октября 2012 г.

MS Exchange 2003 error 0x80040a01


Проблема: не работает прием почты почтовом клиенте (Outlook, Thunderbird) по протоколу POP3.

Решение:

Ошибка в логах сервера Windows 2003 с Ecxhange на борту:

Event Type: Error
Event Source: POP3SVC
Event Category:
Event ID: 1036
Description: An error occurred while starting the Microsoft Exchange POP3 Service: server instance number 1 failed to start with error 0x80040a01.

Находим на странице http://support.microsoft.com/?kbid=906154 решение в виде правки значения RootVer в реестре на значение 1.1.4322.0 ( качать FixIt с данной страницы нет смысла, т.к. он не в итоге обламывается при запуске с проблемой несовместимости ОС).



Было 2.0.50727.0 - > 1.1.4322.0.Перезагружаем сервер.
После перезагрузки сервис POP3 автоматически НЕ страртует, хотя в службах стоит автозапуск. Запускаем вручную.

вторник, 23 октября 2012 г.

Настройка сканера Epson GT-7300U в Linux

При подключении в логах отображается
test@testpc ~/desktop $ dmesg | tail
[142247.446929] [fglrx] Firegl kernel thread PID: 17612
[142247.447036] [fglrx] Firegl kernel thread PID: 17613
[142247.447367] [fglrx] IRQ 18 Enabled
[142247.835030] [fglrx] Gart USWC size:1279 M.
[142247.835033] [fglrx] Gart cacheable size:508 M.
[142247.835038] [fglrx] Reserved FB block: Shared offset:0, size:1000000
[142247.835040] [fglrx] Reserved FB block: Unshared offset:fbff000, size:401000
[142247.835041] [fglrx] Reserved FB block: Unshared offset:1fffb000, size:5000
[143404.494280] device eth0 entered promiscuous mode
**[144012.116331] usb 3-1: new full-speed USB device number 3 using ohci_hcd**
test@testpc ~/desktop $ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
**Bus 003 Device 003: ID 04b8:011d Seiko Epson Corp. Perfection 1260 Photo**
Ставим утилиты для работы со сканером:
test@testpc ~/desktop $ sudo apt-get install sane sane-utils xsane
Находим сканер
test@testpc ~/desktop $ sane-find-scanner -q
found USB scanner (vendor=0x04b8 [EPSON], product=0x011d [EPSON Scanner], chip=LM9832/3) at libusb:003:003
test@testpc ~/desktop $ sudo scanimage -L
device `plustek:libusb:003:003' is a Epson Perfection 1260/Photo flatbed scanner
Тестируем работу:
test@testpc ~/desktop $ sudo scanimage -T -d 'plustek:libusb:003:003'
scanimage: scanning image of size 202x150 pixels at 24 bits/pixel
scanimage: acquiring RGB frame, 8 bits/sample
scanimage: reading one scanline, 606 bytes... PASS // очень долго (пару минут курим)
scanimage: reading one byte... PASS
scanimage: stepped read, 2 bytes... PASS
scanimage: stepped read, 4 bytes... PASS
scanimage: stepped read, 8 bytes... PASS
scanimage: stepped read, 16 bytes... PASS
scanimage: stepped read, 32 bytes... PASS
scanimage: stepped read, 64 bytes... PASS
scanimage: stepped read, 128 bytes... PASS
scanimage: stepped read, 256 bytes... PASS
scanimage: stepped read, 512 bytes... PASS
scanimage: stepped read, 1024 bytes... PASS
scanimage: stepped read, 1023 bytes... PASS
scanimage: stepped read, 511 bytes... PASS
scanimage: stepped read, 255 bytes... PASS
scanimage: stepped read, 127 bytes... PASS
scanimage: stepped read, 63 bytes... PASS
scanimage: stepped read, 31 bytes... PASS
scanimage: stepped read, 15 bytes... PASS
scanimage: stepped read, 7 bytes... PASS
scanimage: stepped read, 3 bytes... PASS