I followed tutorial http://www.howtoforge.com/virtualization-with-xen-on-centos-6.2-x86_64-paravirtualization-and-hardware-virtualization
To install xen on Centos 6.3 everything is going perfect but, after editing /boot/grub/menu.lst
Quote:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/mapper/vg_xen-LogVol01
# initrd /initrd-[generic-]version.img
#boot=/dev/sdb
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32.57-2.el6xen.x86_64)
root (hd0,0)
kernel /xen.gz dom0_mem=1024M cpufreq=xen dom0_max_vcpus=1 dom0_vcpus_pin
kernel /vmlinuz-2.6.32.57-2.el6xen.x86_64 ro root=/dev/mapper/vg_xen-LogVol01 rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_xen/LogVol01 rd_LVM_LV=vg_xen/lv_swap rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32.57-2.el6xen.x86_64.img
title CentOS (2.6.32-279.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-279.el6.x86_64 ro root=/dev/mapper/vg_xen-LogVol01 rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_xen/LogVol01 rd_LVM_LV=vg_xen/lv_swap rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=128M KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-279.el6.x86_64.img
when i reboot it is booted with xen kernel but when i run command
xm info or xm list
showing error
" Error: Unable to connect to xend: No such file or diectory. Is xend running "
when i run command
xend start
showing error
" xc: error: Could not obtain handle on privileged command interface (2 = No such file or directory): Internal error
xend/image.py: Error connecting to hypervisor "
ls /proc/xen
" ls: cannot access /proc/xen: No such file or directory "
added entry in /etc/fstab
Quote:
none /proc/xen xenfs default 0 0
after reboot gives error no such file or directory,
lsmod | grep -i xen output: Nothing...
modprob xen-evtchn
FATAL: Error inserting xen_evtchn (/lib/modules/2.6.32.57-2.el6xen.x86_64/kernel/drivers/xen/xen-evtchn.ko): No such device
modprob xen-gntdev
FATAL: Error inserting xen_gntdev (/lib/modules/2.6.32.57-2.el6xen.x86_64/kernel/drivers/xen/xen-gntdev.ko): No such device
I have enabled hardware virtulization in bios still problem not solved.
I tried another tutorial https://www.crc.id.au/xen-on-rhel6-scientific-linux-6-centos-6-howto/
it seems like nothing is working for me...
Guys... please share your thoughts about this problem...
Thank you.
i ran into this too in booting a Xen dom0 kernel.
i might have spotted one small omission in your grub.conf compared to the instructions.
in the grub config section at this line: "replace the first word initrd with module."
for example, here's my working Xen Dom0 grub.conf.
good luck!
default=0
timeout=2
title CentOS 6.3 Xen dom0
root (hd0,0)
kernel /boot/xen.gz loglvl=all guest_loglvl=all
module /boot/vmlinuz-dom0-kernel ro root=/dev/sda1 nomodeset console=ttyS0,115200 iommu=off earlyprintk=xen initcall_debug debug loglevel=10
module /boot/initrd-dom0-kernel.img
title CentOS 6.3 (No Xen)
root (hd0,0)
kernel /boot/vmlinuz-dom0-kernel ro root=/dev/sda1
initrd /boot/initrd-dom0-kernel.img
title Stock CentOS 6.3
root (hd0,0)
kernel /boot/vmlinuz-centos6.3 ro root=/dev/sda1
initrd /boot/initrd-centos6.3.img
This does the trick!
Check your boot entries in grub. I just upgraded my Centos 6.3 with the kernel-xen-3.5.3-1 to 3.7.1-3 and the new boot entry for this kernel gets wrong because between updates I installed a standard kernel for testing other things.
Fixing the correct boot options for xen brings back my virtualization!
title CentOS (3.7.1-3.el6xen.x86_64)
root (hd0,0)
kernel /xen.gz dom0_mem=1024M cpufreq=xen dom0_max_vcpus=4 dom0_vcpus_pin
module /vmlinuz-3.7.1-3.el6xen.x86_64 ro root=UUID=<longUUID> KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 crashkernel=auto rhgb quiet
module /initramfs-3.7.1-3.el6xen.x86_64.img
I had the same issue:
Could not obtain handle on privileged command interface (2 = No such file or directory): Internal error
This was solved by adding the below line in /etc/fstab
none /proc/xen xenfs defaults 0 0
See this post in the Xen Project mailing list for more details.
Related
Using Yocto-based tools, I'm able to generate several files for deployment. These involve:
sdimg file for writing to the SD card
A cpio.gz archive (Initramfs)
Image-initramfs.bin (Initramfs)
I would like to activate plymouth in my Embedded board (Raspberry Pi) with a Yocto-based Linux distribution. However I am not sure how to mount the cpio.gz archive or Image-initramfs.bin. I've read online that vanilla Raspbian has an entry in /config.txt in boot partition i.e. initramfs <file.gz> <start_address> and also a kernel command line option in /cmdline.txt in boot partition i.e. initrd=<file.gz>.
What I've tried so far involves both of these approaches. I copy the cpio.gz file to the /boot in root filesystem partition and configure the aforementioned files, which did not work. To break it down, here is how it looks:
+ Boot Partition
+ ---- overlays/
+ ---- config.txt
+ ---- cmdline.txt
+ ---- kernel.img
+ 1.2GB Volume (rootfs)
+ ---- bin/
+ ---- boot/
+--- <file>.cpio.gz
+ ---- var/
+ ---- usr/
....
Now, in config.txt, I have something like (tried many variations):
initramfs <file>.cpio.gz 0x00a00000
ramfsfile="<file>.cpio.gz"
ramfsaddr=0x00a00000
In cmdline.txt, I have:
initrd=<file>.cpio.gz dwc_otg.lpm_enable=0 console=serial0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait
However, nothing is enough for the kernel to even give an error. That means, system boots up as normal, and there is no sign of initramfs usage.
Kernel that I compile with yocto is the following:
#> uname -a
#> Linux raspberrypi0-wifi 4.9.77-rt61 #11 PREEMPT RT Tue May 22 01:14:26 +03 2018 armv6l armv6l armv6l GNU/Linux
Following kernel config parameters are enabled:
#> modprobe configs
#> cat /proc/config.gz | gunzip > kernelconf.txt
...
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_GZIP=y
I don't know what I'm missing here. Anything that catches your attention, please let me know. Any guidance is well appreciated.
I was able to boot into the initramfs by copying the resulting .cpio.gz archive to the boot partition of the sd card.
Then I've edited the config.txt option from
#initramfs initramf.gz 0x00800000
to
initramfs <name-of-the-copied-archive>.cpio.gz
After booting the raspberry it boots now into my initramfs image.
I know I can disable it by compiling a new kernel without setting CONFIG_DRM_VMWGFX in config file. But I don't want build a new kernel, can I achieve it by modify some configurations?
I tried to delete vmwgfx.ko from the lib/modules/XXX/kernel/driver directory, then reboot, but the driver works well On Ubuntu 16.04. Why? Is the file elsewhere?
And I also tried to rmmod,but it's not work.
[root#ubuntu:] lsmod |grep vmwgfx
vmwgfx 235405 4
drm_kms_helper 159169 1 vmwgfx
ttm 99345 1 vmwgfx
drm 370825 7 ttm,drm_kms_helper,vmwgfx
[root#ubuntu:] rmmod -f vmwgfx
rmmod: ERROR: ../libkmod/libkmod-module.c:793 kmod_module_remove_module()
could not remove 'vmwgfx': Resource temporarily unavailable
[root#ubuntu:] modprobe -r vmwgfx
modprobe: FATAL: Module vmwgfx is in use.
Finally, I know how to do it.
The reason for my situation is that the driver's file is stored in initramfs-xxx.img. So we need to rebuild a initramfs-xxx.img.
find file path: modinfo vmwgfx
filename: /lib/modules/4.4.0-21-generic/kernel/drivers/gpu/drm/vmwgfx/vmwgfx.ko
version: 2.9.0.0
license: GPL and additional rights
description: Standalone drm driver for the VMware SVGA device
author: VMware Inc. and others
srcversion: AC179B70460E5C5D32AC416
alias: pci:v000015ADd00000405sv*sd*bc*sc*i*
depends: ttm,drm,drm_kms_helper
intree: Y
vermagic: 4.4.0-21-generic SMP mod_unload modversions
parm: enable_fbdev:Enable vmwgfx fbdev (int)
parm: force_dma_api:Force using the DMA API for TTM pages (int)
parm: restrict_iommu:Try to limit IOMMU usage for TTM pages (int)
parm: force_coherent:Force coherent TTM pages (int)
parm: restrict_dma_mask:Restrict DMA mask to 44 bits with IOMMU (int)
remove the driver file mv /lib/modules/$(uname -r)/kernel/driver/gpu/drm/vmwgfx/vmwgfx.ko /home/$(whoami)/.
backup your boot img: mv /boot/initrd.img-`uname -r` /home/`whoami`/
rebuld boot img: mkinitrd -f /boot/initrd.img-`uname -r` `uname -r`
reboot
If you want to remove other build-in driver file, this method works well.
If your vm is centos, just choose the correct file path and boot img name.
I'm working on a bsp layer for SBC Pine64 and my image is successfully generated but I'm getting "FATAL: kernel too old" when booting init
from busybox. I've checked my busybox binary and it's being compiled for kernel 3.14.0.
My kernel is version 3.10 and I've used Linaro 5.3 toolchain. I've tried adding: OLDEST_KERNEL = "3.10.0" and I've also tried using Linaro 4.9 but I
still get the same error. I'm using yocto Krogoth and generating core-image-minial. Please, see below a snip of the error from boot log:
[13.068932] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[13.086717] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[13.112988] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[13.127040] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[13.143393] devtmpfs: mounted
[13.151972] Freeing unused kernel memory: 520K (ffffffc0009e4000 - ffffffc000a66000)
FATAL: kernel too old
[13.198566] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
[13.198566]
[13.218884] CPU: 2 PID: 1 Comm: init Not tainted 3.10.102-pine64 #1
[13.230876] Call trace:
How can I configure yocto to compile linaro eglibc for kernel 3.10.0?
Thx,
Montez
When you want to override an existing variable that is not "soft-assigned", which is to say does not use the ?= syntax but instead = syntax, you need to use one of the variables in OVERRIDES as part of changing the value. You can see how overrides work already as in conf/bitbake.conf we have:
##################################################################
# Kernel info.
##################################################################
OLDEST_KERNEL = "3.2.0"
OLDEST_KERNEL_aarch64 = "3.14"
OLDEST_KERNEL_nios2 = "3.19"
And aarch64 is already found in your overrides list. Fortunately there are other values in that list, and when evaluating variables the ones later in the list in OVERRIDES take precedence. So in your local.conf you can do:
OLDEST_KERNEL_forcevariable = "3.10"
And then confirm that it has taken effect:
$ bitbake -e busybox | grep -E ^OLDEST_KERNEL=
OLDEST_KERNEL="3.10"
I compiled a linux kernel for my Toshiba AC100 and want to boot it via uboot.
Problem: After displaying the message "Starting Kernel" nothing happens.
The flag CONFIG_DEBUG_LL was set but there is still no output after this message.
I have another precompiled kernel (but too old to use) which comes with its own dtb file and this one boots (same bootargs as the non-booting kernel).
Observation: If I change the dbt file for this kernel it shows the same behavior as the non-booting kernel, just displaying the "Starting kernel" line.
So I guess my problem is related to the dbt file I use for my kernel.
Are there any methods to check if the dbt file is right for my board?
What else could I do to get some information what the problem is?
The entry in the boot.scr:
setenv bootargs 'root=/dev/mmcblk0p7 rootfstype=ext4 earlyprintk=vga console=tty0 mem=448M#0'
setenv bootmenu_4 "Boot Arch Linux =ext2load mmc 0:7 0x1000000 /boot/zImage; ext2load mmc 0:7 0x2000000 /boot/tegra20-paz00.dtb; bootz 0x1000000 - 0x2000000"
And here's the output form u-boot:
2255488 bytes read in 116 ms (18.5 MiB/s)
14153 bytes read in 82 ms (168 KiB/s)
Kernel image # 0x1000000 [ 0x000000 - 0x226a80 ]
## Flattened Device Tree blob at 02000000
Booting using the fdt blob at 0x2000000
Loading Device Tree to 0fff9000, end 0ffff748 ... OK
Starting kernel ...
I tried also to extract the config from the working kernel and built a new kernel with this config, but this one does not work, too (does not matter which dtb file I use).
EDIT:
Finally I solved it by changing the kernel config from
CONFIG_TEGRA_DEBUG_UART_AUTO_ODMDATA
to
CONFIG_TEGRA_DEBUG_UARTA
After this, the kernel boots fine.
This config file can be found under /boot/grub/grub.conf. I'm wondering what is quiet mean in this config file.
kernel /vmlinuz-2.6.32-71.29.1.el6.i686 ro root=UUID=977d4c1d-6127-409f-b53a-694c17e13d90
rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM
LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us
crashkernel=auto LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc
KEYTABLE=us quiet biosdevname=eth0 usbcore.autosuspend=-1
I search around the internet but I couldn't find any good resources explaining about this parameter.
If you are referring to a kernel boot parameter of quiet, then that is to disable most log messages.
Linux kernel boot parameters.