äÏÂÒÏÇÏ ×ÅÞÏÒÁ, ÛÁÎÏ×Φ ËÏÌÅÇÉ.

èÅÌРͦ, Ð̦Ú.

ð¦ÄËÁÖ¦ÔØ, ÂÕÄØ-ÌÁÓËÁ, ÑË ÐÒÁ×ÉÌØÎÏ ÎÁÍÁÌÀ×ÁÔÉ ÎÁÊÐÒÏÓÔ¦ÛÉÊ ËÏÎƦÇÕÒÁæÊÎÉÊ ÆÁÊÌ × Xen 3.X ÄÌÑ ÐÁÒÁצÒÔÕÁÌØÎϧ ÇÏÓÔØÏ×ϧ ÍÁÛÉÎÉ Ð¦Ä Debian (Domain0).

íÁÀ ÏÂÒÁÚ ÓÉÓÔÅÍÉ õÂÕÎÔÕ Õ ×ÉÇÌÑĦ Xen'¦×ÓØËÏÇÏ ÆÁÊÌÕ BBB.img:

oleh@aaz64:~$ /sbin/fdisk -lu BBB.imgš
You must set cylinders.
You can do this from the extra functions menu.

Disk BBB.img: 0 MB, 0 bytes
4 heads, 32 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x0004b043

ššDevice Boot š š šStart š š š š End š š šBlocks š Id šSystem
BBB.img1 š š š š š š š 1 š 156248046 š š78124023 š 83 šLinux
Partition 1 has different physical/logical endings:
šš š phys=(1023, 3, 32) logical=(1220687, 3, 15)
BBB.img2 š š š 156248064 š 164061183 š š 3906560 š 82 šLinux swap / Solaris
Partition 2 has different physical/logical beginnings (non-Linux?):
šš š phys=(1023, 3, 32) logical=(1220688, 0, 1)
Partition 2 has different physical/logical endings:
šš š phys=(1023, 3, 32) logical=(1281727, 3, 32)
oleh@aaz64:~$
root@aaz64:/home/oleh# losetup /dev/loop0 BBB.img -o $((1 * 512))

ôÁÍ Õ ÆÏÒÍÁÔ¦ ext4 (Á Domain0 × ÍÅÎÅ ext3) ÚÎÁÈÏÄÉÔØÓÑ ÒÕÔÏ×Á ÆÁÊÌÏ×Á ÓÉÓÔÅÍÁ:

root@aaz64:/home/oleh# file -s /dev/loop0
/dev/loop0: Linux rev 1.0 ext4 filesystem data, UUID=8930d547-902b-483a-bdec-3f7b3a8be99c (needs journal recovery) (extents) (large files) (huge files)
root@aaz64:/home/oleh#š


èÏÞÕ ÝÅ ×ÉĦÌÉÔÉ ÄÌÑ Ã¦¤§ ÇÏÓÔØÏ×ϧ ÍÁÛÉÎÉ (DomainU) 1 çâ Ram.

ðÒÉÍÏÎÔÕ×Á× ÆÁÊÌ ÏÂÒÁÚÕ BBB.img (צÒΦÛÅ, /dev/loop0) ÄÏ /mnt. ïÔÒÉÍÁ× ÎÏÒÍÁÌØÎÅ ÄÅÒÅ×Ï ÒÕÔÏ×ϧ ÆÁÊÌÏ×ϧ ÓÉÓÔÅÍÉ:
oleh@aaz64:/home/oleh$šls -l /mnt
ÚÁÇÁÌÏÍ 88
drwxr-xr-x š2 root root š4096 Ó¦Þ 13 07:17 bin
drwxr-xr-x š3 root root š4096 Ó¦Þ 13 07:22 boot
drwxr-xr-x š4 root root š4096 Ó¦Þ 13 07:15 dev
drwxr-xr-x 85 root root š4096 Ó¦Þ 13 07:22 etc
drwxr-xr-x š3 root root š4096 Ó¦Þ 13 07:17 home
lrwxrwxrwx š1 root root š š37 Ó¦Þ 13 07:22 initrd.img -> boot/initrd.img-2.6.32-27-generic-pae
drwxr-xr-x 14 root root š4096 Ó¦Þ 13 07:17 lib
drwx------ š2 root root 16384 Ó¦Þ 13 07:21 lost+found
drwxr-xr-x š2 root root š4096 Ó¦Þ 13 07:15 media
drwxr-xr-x š2 root root š4096 Ëצ 23 š2010 mnt
drwxr-xr-x š2 root root š4096 Ó¦Þ 13 07:15 opt
drwxr-xr-x š2 root root š4096 Ëצ 23 š2010 proc
drwx------ š3 root root š4096 Ó¦Þ 13 07:17 root
drwxr-xr-x š2 root root š4096 Ó¦Þ 13 07:22 sbin
drwxr-xr-x š2 root root š4096 ÇÒÕ š5 š2009 selinux
drwxr-xr-x š2 root root š4096 Ó¦Þ 13 07:15 srv
drwxr-xr-x š2 root root š4096 ÂÅÒ 30 š2010 sys
drwxrwxrwt š5 root root š4096 Ó¦Þ 13 07:22 tmp
drwxr-xr-x 10 root root š4096 Ó¦Þ 13 07:15 usr
drwxr-xr-x 14 root root š4096 Ó¦Þ 13 07:16 var
lrwxrwxrwx š1 root root š š34 Ó¦Þ 13 07:22 vmlinuz -> boot/vmlinuz-2.6.32-27-generic-pae
oleh@aaz64:/home/oleh$


ôÅÐÅÒ ÐÒÏÂÕÀ ÓÔÁÒÔÏÎÕÔÉ ×¦ÒÔÕÁÌØÎÕ ÔÁÞËÕ ¦ ΦÞÏÇÏ ÎÅ ×ÉÈÏÄÉÔØ. úÁ×ÁÌÀ¤ÔØÓÑ ÓÔÁÒÔ ÎÁ ÐÒÏÃÅÓ¦ init :(
÷¦ÄÞÕ×ÁÀ, ÝÏ ÑËϧÓØ ¤ÒÕÎÄÉ ÎÅ ×ÉÓÔÁÞÁ¤/ÎÅÐÒÁ×ÉÌØÎÏ ÒÏÂÌÀ... á ÝÏ ÓÁÍÅ?

îÁÐÅÒÅÄ ×ÄÑÞÎÉÊ ÚÁ ËÏÎÓÕÌØÔÁæÀ!



îÅ ÍÁ× Î¦ËÏÌÉ ÄÏ ÃØÏÇÏ ÞÁÓÕ ÓÐÒÁ×É Ú Xen, ÔÏ ×ÖÅ ×ÉÂÁÞÔÅ...

ïÓØ ÌÏÇ ËÏÎÓÏ̦:

root@aaz64:/home/oleh# xm create -c /dev/null memory=1024 kernel=/mnt/vmlinuz ramdisk=/mnt/initrd.img disk=file:/home/oleh/BBB.img,xvda1,r root=/dev/xvda1
Using config file "/dev/null".
Started domain null
[ š š0.000000] Reserving virtual address space above 0xf5800000
[ š š0.000000] Initializing cgroup subsys cpuset
[ š š0.000000] Initializing cgroup subsys cpu
[ š š0.000000] Linux version 2.6.32-27-generic-pae (buildd@roseapple) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #49-Ubuntu SMP Thu Dec 2 00:07:52 UTC 2010 (Ubuntu 2.6.32-27.49-generic-pae 2.6.32.26+drm33.12)
[ š š0.000000] KERNEL supported cpus:
[ š š0.000000] š Intel GenuineIntel
[ š š0.000000] š AMD AuthenticAMD
[ š š0.000000] š NSC Geode by NSC
[ š š0.000000] š Cyrix CyrixInstead
[ š š0.000000] š Centaur CentaurHauls
[ š š0.000000] š Transmeta GenuineTMx86
[ š š0.000000] š Transmeta TransmetaCPU
[ š š0.000000] š UMC UMC UMC UMC
[ š š0.000000] ACPI in unprivileged domain disabled
[ š š0.000000] BIOS-provided physical RAM map:
[ š š0.000000] šXen: 0000000000000000 - 00000000000a0000 (usable)
[ š š0.000000] šXen: 00000000000a0000 - 0000000000100000 (reserved)
[ š š0.000000] šXen: 0000000000100000 - 0000000040000000 (usable)
[ š š0.000000] DMI not present or invalid.
[ š š0.000000] last_pfn = 0x40000 max_arch_pfn = 0x1000000
[ š š0.000000] Scanning 1 areas for low memory corruption
[ š š0.000000] modified physical RAM map:
[ š š0.000000] šmodified: 0000000000000000 - 0000000000002000 (usable)
[ š š0.000000] šmodified: 0000000000002000 - 0000000000006000 (reserved)
[ š š0.000000] šmodified: 0000000000006000 - 00000000000a0000 (usable)
[ š š0.000000] šmodified: 00000000000a0000 - 0000000000100000 (reserved)
[ š š0.000000] šmodified: 0000000000100000 - 0000000040000000 (usable)
[ š š0.000000] init_memory_mapping: 0000000000000000-000000002d1fe000
[ š š0.000000] Using x86 segment limits to approximate NX protection
[ š š0.000000] RAMDISK: 00a5b000 - 01215000
[ š š0.000000] 302MB HIGHMEM available.
[ š š0.000000] 721MB LOWMEM available.
[ š š0.000000] š mapped low ram: 0 - 2d1fe000
[ š š0.000000] š low ram: 0 - 2d1fe000
[ š š0.000000] š node 0 low ram: 00000000 - 2d1fe000
[ š š0.000000] š node 0 bootmap 00007000 - 0000ca40
[ š š0.000000] (9 early reservations) ==> bootmem [0000000000 - 002d1fe000]
[ š š0.000000] š #0 [0000000000 - 0000001000] š BIOS data page ==> [0000000000 - 0000001000]
[ š š0.000000] š #1 [0001318000 - 0001324000] š XEN PAGETABLES ==> [0001318000 - 0001324000]
[ š š0.000000] š #2 [0000001000 - 0000002000] š šEX TRAMPOLINE ==> [0000001000 - 0000002000]
[ š š0.000000] š #3 [0000006000 - 0000007000] š š š TRAMPOLINE ==> [0000006000 - 0000007000]
[ š š0.000000] š #4 [0000100000 - 0000935818] š šTEXT DATA BSS ==> [0000100000 - 0000935818]
[ š š0.000000] š #5 [0000a5b000 - 0001215000] š š š š šRAMDISK ==> [0000a5b000 - 0001215000]
[ š š0.000000] š #6 [0001215000 - 0001318000] š XEN START INFO ==> [0001215000 - 0001318000]
[ š š0.000000] š #7 [0001324000 - 0001480000] š š š š šPGTABLE ==> [0001324000 - 0001480000]
[ š š0.000000] š #8 [0000007000 - 000000d000] š š š š šBOOTMAP ==> [0000007000 - 000000d000]
[ š š0.000000] Zone PFN ranges:
[ š š0.000000] š DMA š š š0x00000000 -> 0x00001000
[ š š0.000000] š Normal š 0x00001000 -> 0x0002d1fe
[ š š0.000000] š HighMem š0x0002d1fe -> 0x00040000
[ š š0.000000] Movable zone start PFN for each node
[ š š0.000000] early_node_map[3] active PFN ranges
[ š š0.000000] š š 0: 0x00000000 -> 0x00000002
[ š š0.000000] š š 0: 0x00000006 -> 0x000000a0
[ š š0.000000] š š 0: 0x00000100 -> 0x00040000
[ š š0.000000] Using APIC driver default
[ š š0.000000] SFI: Simple Firmware Interface v0.7 http://simplefirmware.org
[ š š0.000000] SMP: Allowing 1 CPUs, 0 hotplug CPUs
[ š š0.000000] Local APIC disabled by BIOS -- you can enable it with "lapic"
[ š š0.000000] APIC: disable apic facility
[ š š0.000000] PM: Registered nosave memory: 0000000000002000 - 0000000000006000
[ š š0.000000] PM: Registered nosave memory: 00000000000a0000 - 0000000000100000
[ š š0.000000] Allocating PCI resources starting at 40000000 (gap: 40000000:c0000000)
[ š š0.000000] Booting paravirtualized kernel on Xen
[ š š0.000000] Xen version: 3.2-1
[ š š0.000000] NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:1 nr_node_ids:1
[ š š0.000000] PERCPU: Embedded 15 pages/cpu @c1c88000 s39480 r0 d21960 u65536
[ š š0.000000] pcpu-alloc: s39480 r0 d21960 u65536 alloc=16*4096
[ š š0.000000] pcpu-alloc: [0] 0š
[ š š0.000000] Xen: using vcpu_info placement
[ š š0.000000] Built 1 zonelists in Zone order, mobility grouping on. šTotal pages: 259995
[ š š0.000000] Kernel command line: root=/dev/xvda1š
[ š š0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[ š š0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[ š š0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[ š š0.000000] Enabling fast FPU save and restore... done.
[ š š0.000000] Enabling unmasked SIMD FPU exception support... done.
[ š š0.000000] Initializing CPU#0
[ š š0.000000] allocated 5242880 bytes of page_cgroup
[ š š0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
[ š š0.000000] Initializing HighMem for node 0 (0002d1fe:00040000)
[ š š0.000000] Memory: 1014708k/1048576k available (4835k kernel code, 33012k reserved, 2218k data, 672k init, 309256k highmem)
[ š š0.000000] virtual kernel memory layout:
[ š š0.000000] š š fixmap š: 0xf571d000 - 0xf57ff000 š ( 904 kB)
[ š š0.000000] š š pkmap š : 0xf5200000 - 0xf5400000 š (2048 kB)
[ š š0.000000] š š vmalloc : 0xed9fe000 - 0xf51fe000 š ( 120 MB)
[ š š0.000000] š š lowmem š: 0xc0000000 - 0xed1fe000 š ( 721 MB)
[ š š0.000000] š š š .init : 0xc07e4000 - 0xc088c000 š ( 672 kB)
[ š š0.000000] š š š .data : 0xc05b8ebf - 0xc07e36e8 š (2218 kB)
[ š š0.000000] š š š .text : 0xc0100000 - 0xc05b8ebf š (4835 kB)
[ š š0.000000] SLUB: Genslabs=13, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ š š0.000000] Hierarchical RCU implementation.
[ š š0.000000] NR_IRQS:2304 nr_irqs:256
[ š š0.000000] Console: colour dummy device 80x25
[ š š0.000000] console [tty0] enabled
[ š š0.000000] console [hvc0] enabled
[ š š0.000000] installing Xen timer for CPU 0
[ š š0.000000] Detected 2094.748 MHz processor.
[ š š0.004000] Calibrating delay loop (skipped), value calculated using timer frequency.. 4189.49 BogoMIPS (lpj=8378992)
[ š š0.004000] Security Framework initialized
[ š š0.004000] AppArmor: AppArmor initialized
[ š š0.004000] Mount-cache hash table entries: 512
[ š š0.004000] Initializing cgroup subsys ns
[ š š0.004000] Initializing cgroup subsys cpuacct
[ š š0.004000] Initializing cgroup subsys memory
[ š š0.004000] Initializing cgroup subsys devices
[ š š0.004000] Initializing cgroup subsys freezer
[ š š0.004000] Initializing cgroup subsys net_cls
[ š š0.004000] CPU: L1 I cache: 32K, L1 D cache: 32K
[ š š0.004000] CPU: L2 cache: 1024K
[ š š0.004000] CPU: Unsupported number of siblings 2
[ š š0.004000] Performance Events: unsupported p6 CPU model 23 no PMU driver, software events only.
[ š š0.004000] SMP alternatives: switching to UP code
[ š š0.008000] Freeing SMP alternatives: 20k freed
[ š š0.008000] ftrace: converting mcount calls to 0f 1f 44 00 00
[ š š0.008000] ftrace: allocating 22417 entries in 44 pages
[ š š0.008078] cpu 0 spinlock event irq 1
[ š š0.008319] Brought up 1 CPUs
[ š š0.008531] devtmpfs: initialized
[ š š0.009098] Grant table initialized
[ š š0.009111] regulator: core version 0.5
[ š š0.028956] Time: 165:165:165 šDate: 165/165/65
[ š š0.029086] NET: Registered protocol family 16
[ š š0.029320] EISA bus registered
[ š š0.029320] PCI: Fatal: No config space access function found
[ š š0.032090] bio: create slab <bio-0> at 0
[ š š0.032193] ACPI: Interpreter disabled.
[ š š0.032236] xen_balloon: Initialising balloon driver.
[ š š0.032236] vgaarb: loaded
[ š š0.032341] SCSI subsystem initialized
[ š š0.032604] usbcore: registered new interface driver usbfs
[ š š0.032636] usbcore: registered new interface driver hub
[ š š0.032701] usbcore: registered new device driver usb
[ š š0.032923] PCI: System does not support PCI
[ š š0.032933] PCI: System does not support PCI
[ š š0.033068] NetLabel: Initializing
[ š š0.033078] NetLabel: šdomain hash size = 128
[ š š0.033085] NetLabel: šprotocols = UNLABELED CIPSOv4
[ š š0.033112] NetLabel: šunlabeled traffic allowed by default
[ š š0.033175] Switching to clocksource xen
[ š š0.035918] AppArmor: AppArmor Filesystem Enabled
[ š š0.035938] pnp: PnP ACPI: disabled
[ š š0.035946] PnPBIOS: Disabled
[ š š0.036300] NET: Registered protocol family 2
[ š š0.036411] IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
[ š š0.036785] TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
[ š š0.037410] TCP bind hash table entries: 65536 (order: 7, 524288 bytes)
[ š š0.037792] TCP: Hash tables configured (established 131072 bind 65536)
[ š š0.037806] TCP reno registered
[ š š0.037953] NET: Registered protocol family 1
[ š š0.038156] platform rtc_cmos: registered platform RTC device (no PNP device found)
[ š š0.038237] cpufreq-nforce2: No nForce2 chipset.
[ š š0.038275] Scanning for low memory corruption every 60 seconds
[ š š0.038468] audit: initializing netlink socket (disabled)
[ š š0.038499] type=2000 audit(1298063037.416:1): initialized
[ š š0.048478] Trying to unpack rootfs image as initramfs...
[ š š0.060402] highmem bounce pool size: 64 pages
[ š š0.060422] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[ š š0.068074] VFS: Disk quotas dquot_6.5.2
[ š š0.068186] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ š š0.069015] fuse init (API version 7.13)
[ š š0.069146] msgmni has been set to 1378
[ š š0.069455] alg: No test for stdrng (krng)
[ š š0.069543] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[ š š0.069557] io scheduler noop registered
[ š š0.069564] io scheduler anticipatory registered
[ š š0.069572] io scheduler deadline registered
[ š š0.069631] io scheduler cfq registered (default)
[ š š0.069724] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[ š š0.069769] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
[ š š0.078455] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ š š0.080133] isapnp: Write Data Register 0xa79 already used
[ š š0.080398] brd: module loaded
[ š š0.081151] loop: module loaded
[ š š0.081339] input: Macintosh mouse button emulation as /devices/virtual/input/input0
[ š š0.082061] Fixed MDIO Bus: probed
[ š š0.082121] PPP generic driver version 2.4.2
[ š š0.082189] tun: Universal TUN/TAP device driver, 1.6
[ š š0.082197] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[ š š0.082323] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ š š0.082355] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ š š0.082377] uhci_hcd: USB Universal Host Controller Interface driver
[ š š0.082462] PNP: No PS/2 controller found. Probing ports directly.
[ š š0.083285] i8042.c: No controller found.
[ š š0.083396] mice: PS/2 mouse device common for all mice
[ š š0.083505] rtc_cmos: probe of rtc_cmos failed with error -16
[ š š0.083656] device-mapper: uevent: version 1.0.3
[ š š0.084996] Freeing initrd memory: 7912k freed
[ š š0.089667] device-mapper: ioctl: 4.15.0-ioctl (2009-04-01) initialised: dm-devel@redhat.com
[ š š0.089784] device-mapper: multipath: version 1.1.0 loaded
[ š š0.092019] device-mapper: multipath round-robin: version 1.0.0 loaded
[ š š0.135381] EISA: Probing bus 0 at eisa.0
[ š š0.135393] EISA: Cannot allocate resource for mainboard
[ š š0.135402] Cannot allocate resource for EISA slot 1
[ š š0.135411] Cannot allocate resource for EISA slot 2
[ š š0.135419] Cannot allocate resource for EISA slot 3
[ š š0.135428] Cannot allocate resource for EISA slot 4
[ š š0.135436] Cannot allocate resource for EISA slot 5
[ š š0.135444] Cannot allocate resource for EISA slot 6
[ š š0.135453] Cannot allocate resource for EISA slot 7
[ š š0.135461] Cannot allocate resource for EISA slot 8
[ š š0.135469] EISA: Detected 0 cards.
[ š š0.135566] cpuidle: using governor ladder
[ š š0.135576] cpuidle: using governor menu
[ š š0.136060] TCP cubic registered
[ š š0.136277] NET: Registered protocol family 10
[ š š0.136751] lo: Disabled Privacy Extensions
[ š š0.137073] NET: Registered protocol family 17
[ š š0.137132] Using IPI No-Shortcut mode
[ š š0.137276] registered taskstats version 1
[ š š0.137297] XENBUS: Device with no driver: device/vbd/51713
[ š š0.137306] XENBUS: Device with no driver: device/console/0
[ š š0.137330] š Magic number: 1:252:3141
[ š š0.137364] /build/buildd/linux-2.6.32/drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[ š š0.137377] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found
[ š š0.137385] EDD information not available.
[ š š0.137466] Freeing unused kernel memory: 672k freed
[ š š0.139354] Write protecting the kernel text: 4836k
[ š š0.140033] Write protecting the kernel read-only data: 1884k
Loading, please wait...
[ š š0.191103] udev: starting version 151
Begin: Loading essential drivers... ...
Done.
Begin: Running /scripts/init-premount ...
Done.
Begin: Mounting root file system... ...
Begin: Running /scripts/local-top ...
Done.
[ š š0.444410] blkfront: xvda1: barriers enabled
Begin: Running /scripts/local-premount ...
Done.
mount: mounting /dev/xvda1 on /root failed: Invalid argument
Begin: Running /scripts/local-bottom ...
Done.
Done.
Begin: Running /scripts/init-bottom ...
mount: mounting /dev on /root/dev failed: No such file or directory
Done.
mount: mounting /sys on /root/sys failed: No such file or directory
mount: mounting /proc on /root/proc failed: No such file or directory
Target filesystem doesn't have /sbin/init.
No init found. Try passing init= bootarg.


BusyBox v1.13.3 (Ubuntu 1:1.13.3-1ubuntu11) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs)_


--š
Regards,
/oleh hrynchuk