On Friday, April 15, 2016 at 3:24:05 AM UTC+1, cristianomatte wrote: > Hi everyone! > > I have a Cubietruck and set up the Linux Kernel with the Xen hypervisor, > entirely built on a SD Card (8GB). The mounted system is composed by: > Bootloader: Uboot 2015.01 Mainline. > Hypervisor: Xen 4.4.0. > Kernel: Linux 3.19.3 Mainline. > RootFS: linaro-utopic-developer-20150115-694. > > I've strongly followed these two guides: > http://www.cubieforums.com/index.php?topic=3647.0 > https://mirage.io/wiki/xen-on-cubieboard2 > > The configuration file I've used for building Linux is a modified version of > the "sunxi_defconfig", including the needed Xen and LVM configurations. > https://www.dropbox.com/s/doo8ylicsz39m0z/config?dl=0 > > My SD Card is partitioned the following way: a 16 MB FAT boot partition, a 4 > GB dom0 root, and the rest for the guests as an LVM volume. > sfdisk -R /dev/mmcblk0 > cat <<EOT | sudo sfdisk --in-order -uM /dev/mmcblk0 > 1,16,c > ,4096,L > ,,8e > EOT > > mkfs.vfat /dev/mmcblk0p1 > mkfs.ext4 /dev/mmcblk0p2 > > I have a working dom0, and everything works okay for it. The problem is when > I create the domU. > > Following the steps for "LVM configuration" and "Linux DomU" in the second > guide above, I've used the following commands to create my domU disk and > filesystem: > apt-get install lvm2 > pvcreate /dev/mmcblk0p3 > vgcreate vg0 /dev/mmcblk0p3 > > lvcreate -L 4G vg0 --name linux-guest-1 > /sbin/mkfs.ext4 /dev/vg0/linux-guest-1 > > mount /dev/vg0/linux-guest-1 /mnt > // here I unpack or debootstrap a filesystem and configure some files like > etc/interfaces and etc/fstab > umount /mnt > > The kernel is the same zImage for both dom0 and domU. The Xen configuration > file I am using is the following: > kernel = "/root/zImage" > memory = 512 > name = "Ubuntu-14.04" > vcpus = 2 > serial="pty" > disk = [ 'phy:/dev/vg0/linux-guest-1,xvda,w' ] > vif = ['bridge=br0'] > extra = 'console=hvc0 xencons=tty root=/dev/xvda' > > Everything works well for the first time I instantiate the domU. But when I > shutdown the domU and try to run it again, the following problem occurs when > booting: > xvda: unkwnown partition table > drivers/rtc/hctosys.c: unable to open rtc file (rtc0) > List of all partitions: > ca00 3145728 xvda driver: vdb > No filesystem could mount root, tried: ext3 ext2 ext4 vfat > Kernel panic - not syncing: VFS: Unable to mount root fs on > unknown-block(202,0) > > Even if I try to mount /dev/vg0/linux-guest-1 on dom0, I get the following > error: > mount: wrong fs type, bad option, bad superblock on > /dev/mapper/vg0--linux--guest--1, missing codepage or helper program, or > other error > > It does not matter what filesystem I use (deboostrap ubuntu trusty, use the > same linaro tar), the same happens: I can instantiate the domU once, but then > it seems the filesystem gets corrupted. > > I have also tried not using LVM, and using the the 3rd partition (mmcblk0p3) > directly as the domU disk, but exactly the same happens: I instantiate the > domU once, and the second time I try to mount the partition or instantiate > the domU, the filesystems seems to be corrupted. > > Any ideas on what and why this is happening?
Have you tried: disk = [ 'phy:/dev/vg0/linux-guest-1,xvda,rw' ] ? (http://xenbits.xen.org/docs/4.3-testing/misc/xl-disk-configuration.txt) -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
