WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Setting up Qemu  (Read 24090 times)

Offline nick65go

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 930
Re: Setting up Qemu
« Reply #30 on: February 24, 2023, 01:10:47 PM »
@Rich, I found the answer myself, by try and error:
from tc I see: /dev/vda: LABEL="QCOW2" UUID="69b2bd7f-5108-43b9-94d8-da4800b53851" BLOCK_SIZE="1024" TYPE="ext2"

case 1: waitusb=10:LABEL=QCOW2 => countdown stop at 7, so it starts in 3 seconds

case 2: waitusb=10:UUID=69b2bd7f-5108-43b9-94d8-da4800b53851 => countdown stop at 7, so it starts in 3 seconds

if all upercase UUID (as I see in 7zip) it still successfully finished, but:
case3 : waitusb=10:UUID=69B2BD7F-5108-43B9-94D8-DA4800B53851, countdown stop at zero.
so blkid UUID is case sensitive, prone to error if manually input; so LABEL= will be.

So it is the same speed 3 seconds (before staring to load tcz), as with simple  waitusb=3; Maybe qemu has a bug.
« Last Edit: February 24, 2023, 01:18:46 PM by nick65go »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12244
Re: Setting up Qemu
« Reply #31 on: February 24, 2023, 04:55:31 PM »
Hi nick65go
... so blkid UUID is case sensitive, prone to error if manually input; so LABEL= will be. ...
That's why I ran  blkid  on the image file directly and then copy/pasted the result.

Quote
... So it is the same speed 3 seconds (before staring to load tcz), as with simple  waitusb=3; Maybe qemu has a bug.
Or it could have been 2.25 seconds. tc-config uses integer math to compute the
countdown you see and the result displayed can be off by about 1 second.
There is no downside to using  waitusb=seconds:LABEL=TCVM  and setting  seconds
to a large number like 30.

Offline mocore

  • Hero Member
  • *****
  • Posts: 727
  • ~.~
Re: Re: Setting up Qemu
« Reply #32 on: October 01, 2023, 08:36:08 PM »
idk how relevant this might be  , just ftr  ;D

I concatenated rootfs.gz + modules.gz into MyCore,gz (because I can not have multiple -initrd parameters in qemu  :( ).

https://bugs.launchpad.net/qemu/+bug/393569/comments/6
Quote
Looking through old bug tickets... If I've got that right, there is multiboot support in QEMU nowadays, and we also have the possibility to load multiple files with the "loader" device ... is that enough, or is still something to be done here?

digging around abit i  an  example using "-device loader"
 
https://support.xilinx.com/s/question/0D54U00005VTWwTSAX/using-an-initramfs-with-qemu-does-not-run-uboot-is-this-intentional-also-what-is-linuxbootelf?language=en_US

as yet untested  ???

Offline nick65go

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 930
Re: Setting up Qemu
« Reply #33 on: October 02, 2023, 07:09:09 AM »
@mocore: thanks!, when/if/after you tested it could you please copy/paste here the full command line :)
in the mean time I will waste my hdd space with concatenation (in 3 seconds).
PS: I am interested also in qemu 3.0 test (it has less dependencies) as it does a nice (& sufficient for me) job for small virtual-I/O kernel devices.
« Last Edit: October 02, 2023, 07:16:33 AM by nick65go »

aus9

  • Guest
Re: Setting up Qemu
« Reply #34 on: October 02, 2023, 08:44:30 PM »
Hi

Are any of you guys running qemu on host RPi piCore64 14.x?

Offline nick65go

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 930
Re: Setting up Qemu
« Reply #35 on: September 25, 2025, 02:26:13 PM »
regarding https://forum.tinycorelinux.net/index.php/topic,27274.0.html as "boot multi initrd (on qemu)" by @mocore

Following below is some old info, but not touched until now on this subject of using a "root image" as an init-tmpfs.
https://virtio-fs.gitlab.io/howto-boot.html about How to boot from virtiofs
and https://virtio-fs.gitlab.io/howto-qemu.html

It seams that we could boot a VM (virtual machine) with a qemu, even without a root+modules grouped in a core.gz the files from core.gz could stay in a folder of the host
Code: [Select]
Start the virtiofs daemon:
# virtiofsd --socket-path=/tmp/vhostqemu -o source=virtio-fs-root -o cache=none

The following QEMU options are required:
The path to the guest kernel:
    -kernel path/to/bzImage
 Guest kernel parameters:
 -append "rootfstype=virtiofs root=myfs rw"
FYI: I "discovered" this info reading documentation about "Docker Desktop for Linux" (which runs in a VM and use VirttioFS),
but normal Docker version (without VM, just kernel name-space, etc) can coexist installed in parallel, as server and client, if you like CLI commands only.
« Last Edit: September 25, 2025, 02:28:52 PM by nick65go »