Web lists-archives.com

image created by debootstrap does not work




Hi all,

The image created by debootstrap does not work in the qemu

I use the following script to generate one image:

----------------------------------------------------------------

IMG=qemu-stretch.img
DIR=mount-point.dir

#qemu-img create -f qcow2 $IMG 5G
qemu-img create $IMG 5G
sudo mkfs.ext4 $IMG
mkdir $DIR
sudo mount -o loop $IMG $DIR
sudo debootstrap --arch amd64 stretch $DIR
sudo umount $DIR
rmdir $DIR

----------------------------------------------------------------

The commented line in the above script will get error when you create 
image by "qcow2" format.

Then I use the following command to run this image:

qemu-system-x86_64 -kernel /boot/vmlinuz-4.12.0-1-amd64 -hda 
qemu-stretch.img -append "root=/dev/sda1 single"

However, the result shows that "VFS: unable to mount root fs".

I learn the method from the following website:

https://www.collabora.com/news-and-blog/blog/2017/01/16/setting-up-qemu-kvm-for-kernel-development/

By the way, I use Debian Testing as my host operating system.

P.S. I don't subscribe debian-root mailing list, please cc to me if you 
reply in the debian-root mailing list.

-- 

My best regards to you.

      No System Is Safe!
      Dongliang Mu