Re: image created by debootstrap does not work
- Date: Wed, 27 Sep 2017 19:42:17 +0300
- From: Reco <recoverym4n@xxxxxxxxx>
- Subject: Re: image created by debootstrap does not work
On Wed, Sep 27, 2017 at 04:32:34PM +0000, 慕 冬亮 wrote:
> On 09/22/2017 04:02 PM, Reco wrote:
> > <DM5PR12MB190060F6A3633E658F56D98FBC670@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
> > Hi.
> > On Fri, Sep 22, 2017 at 07:07:28PM +0000, 慕 冬亮 wrote:
> >> qemu-system-x86_64 -kernel /boot/vmlinuz-4.12.0-1-amd64 -hda
> >> qemu-stretch.img -append "root=/dev/sda1 single"
> One small problem I have modified, sda1 => sda.
> There is no any partition in image file.
> >> However, the result shows that "VFS: unable to mount root fs".
> > And that's exactly how it should be. I'm not sure about jessie's kernel,
> > but stretch one has ext support built as a module (CONFIG_EXT4_FS=m).
> > Meaning - if you want to boot from ext2/ext4 filesystem you'll need
> > initrd. This qemu invocation does not supply one.
> I tried the following command, that uses the default initrd in /boot,
> but dead loop "floopy error -5 while reading block 0"
> qemu-system-x86_64 -kernel /boot/vmlinuz-4.12.0-1-amd64 -initrd
> /boot/initrd.img-4.12.0-1-amd64 -hda qemu-stretch.img -append
> "root=/dev/sda single"
There is other thread at this mailllist that also shows some curious
breakage of stock Debian initrd if it's forced to boot from
My gut feeling is you can not force it to work unless you rebuild
> >> 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/
> > I'm genuinely surprised that such method worked for them.
> I have learned how to use busybox as basic environment.
> Is that any tutorial to show how to make debian debootstrap image as
> basic environment?
apt-get install vmdebootstrap
man vmdebootstrap -- search for SYNOPSIS