1.root=UUID=
the UUID should be the same as others
2.sudo apt-get install xen-utils-4.4
3.the command "xm" has changed for "xl"
4.sudo service xencommons start
xc: error: Could not obtain handle on privileged command interface (2 = No such file or directory): Internal error
libxl: error: libxl.c:92:libxl_ctx_alloc: cannot open libxc handle: No such file or directory
cannot init xl context
5.
sudo apt-get install virtinst python-libvirt virt-viewer virt-manager
6.sudo \sudo apt-get install gcc g++ make patch libssl-dev bzip2 gettext \ zlib1g-dev python libncurses5-dev libjpeg62-dev libx11-dev \ libgcrypt11-dev pkg-config bridge-utils bcc bin86 libpci-dev \ libsdl-dev python-dev texinfo libc6-dev uuid-dev bison flex fakeroot \ build-essential crash kexec-tools makedumpfile libncurses5 \ libncurses5-dev iasl gawk liblzma-dev libaio-devapt-get install build-essential binutils python-dev libncurses5-dev libcurl4-openssl-dev xorg-dev uuid-dev bridge-utils bison flex \ udev gettext bin86 bcc iasl libgcrypt11-dev libssl-dev pciutils gcc-multilib texinfo zlib1g-dev sudo apt-get build-dep linux
sudo apt-get install bcc python-dev gettext iasl uuid-dev libncurses5-dev libglib2.0-dev libyajl-dev texinfo git
7.
一般是准备好一个虚拟硬盘在Domain-0上面,为安装System1做准备:
dd if=/dev/zero of=/opt/Xen/system1.img bs=1024k count=10000
生成一个10g大小的硬盘。
sudo virt-install -n system1 -r 1024 --file=/opt/xen/system1.img --nographic -c /home/libaohui/Downloads/ubuntu-14.04-desktop-amd64.iso
menuentry 'Ubuntu, with Linux 3.13.0-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-24-generic-recovery-097bd610-a5ea-40f8-8e87-a7bb9bddc2cb' {
recordfail
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos8'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8 097bd610-a5ea-40f8-8e87-a7bb9bddc2cb
else
search --no-floppy --fs-uuid --set=root 097bd610-a5ea-40f8-8e87-a7bb9bddc2cb
fi
echo 'Loading Linux 3.13.0-24-generic ...'
linux /boot/vmlinuz-3.13.0-24-generic root=UUID=097bd610-a5ea-40f8-8e87-a7bb9bddc2cb ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.13.0-24-generic
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
menuentry 'Ubuntu GNU/Linux, with Xen hypervisor' --class ubuntu --class gnu-linux --class gnu --class os --class xen $menuentry_id_option 'xen-gnulinux-simple-097bd610-a5ea-40f8-8e87-a7bb9bddc2cb' {
insmod part_msdos
insmod ext2
set root='hd0,msdos8'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos8 --hint-efi=hd0,msdos8 --hint-baremetal=ahci0,msdos8 097bd610-a5ea-40f8-8e87-a7bb9bddc2cb
else
search --no-floppy --fs-uuid --set=root 097bd610-a5ea-40f8-8e87-a7bb9bddc2cb
fi
echo 'Loading Xen xen ...'
if [ "$grub_platform" = "pc" -o "$grub_platform" = "" ]; then
xen_rm_opts=
else
xen_rm_opts="no-real-mode edd=off"
fi
multiboot /boot/xen.gz placeholder ${xen_rm_opts}
echo 'Loading Linux 3.13.0-24-generic ...'
module /boot/vmlinuz-3.13.0-24-generic placeholder root=UUID=097bd610-a5ea-40f8-8e87-a7bb9bddc2cb ro quiet splash crashkernel=384M-:128M
echo 'Loading initial ramdisk ...'
module --nounzip /boot/initrd.img-3.13.0-24-generic
}
- 编译环境
Ubuntu 14.04 64位- Python错误
Traceback (most recent call last): File "./tools/layoutrom.py", line 630, in <module> main() File "./tools/layoutrom.py", line 607, in main info16 = parseObjDump(infile16, '16') File "./tools/layoutrom.py", line 538, in parseObjDump relocsection = sectionmap[sectionname] KeyError: '.text.asm.out/../src/smp.c.77'原因是:语言设置为UTF-8解决方法:使用 LC_ALL=C make命令进行编译- cdefs.h
fatal error: sys/cdefs.h: No such file or directory原因是:使用的是amd64版本的Ubuntu解决方法:安装 libc6-dev-i386软件包
- makeinfo
WARNING: `makeinfo' is missing on your system. You should only need it if
you modified a `.texi' or `.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy `make' (AIX,
DU, IRIX). You might want to install the `Texinfo' package or
the `GNU make' package. Grab either from any GNU archive site.原因:未安装makeinfo软件包解决方法:安装texinfo- tmpback.c语法错误
tpmback.c: In function 'tpmif_change_state':
tpmback.c:350:4: error: format '%d' expects argument of type 'int *', but argument 3 has type 'enum xenbus_state *' [-Werror=format=]
if(sscanf(value, "%d", &readst) != 1) {
^
cc1: all warnings being treated as errors
原因:gcc4.8.2对C99语法支持不好解决方案:将系统默认的GCC 降级到4.7具体操作如下:- 使用apt-get安装特定版本的GCC
sudo apt-get install gcc-4.7- 使用update-alternatives配置版本
下述命令将特定版本的GCC 列为GCC 的选项sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40
下述命令设置选择哪个版本的GCC 作为默认的GCC
sudo update-alternatives --config gcc- xl报错
# xl info
xc: error: Could not obtain handle on privileged command interface (2 = No such file or directory): Internal error
libxl: error: libxl.c:99:libxl_ctx_alloc: cannot open libxc handle: No such file or directory
cannot init xl context是因为没有挂载 xenfs 的缘故挂载一下:# modprobe xenfs
# mount -t xenfs xenfs /proc/xen- 启动Domain0
# /etc/init.d/xencommons start