WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Launching an iso with QEMU?  (Read 2997 times)

Offline qopit

  • Jr. Member
  • **
  • Posts: 81
Launching an iso with QEMU?
« on: June 13, 2023, 01:58:02 PM »
I'm coming back to TinyCore (CorePure64) after a long hiatus, and just pulled the latest CorePure64-14.0.is from here:

http://tinycorelinux.net/14.x/x86_64/release/CorePure64-14.0.iso

I used to be able to kick off CorePure64 with a simple qemu -cdrom usage, but now, after pressing <Enter> at the boot: prompt, it loads for a few seconds... and then I get a blank screen I can't get out of.

Here's how I'm trying to launch the iso:

Code: [Select]
qemu-system-x86_64 -m 1024 -nic user -boot d -cdrom CorePure64-14.0.iso -nographic
Anyone know what I'm doing wrong?  Goal here is just to get Core spun up at console and explore what's new inside.

Offline qopit

  • Jr. Member
  • **
  • Posts: 81
Re: Launching an iso with QEMU?
« Reply #1 on: June 13, 2023, 03:48:52 PM »
This works, although with a gtk window popping up with a "graphical" console in it (that you can't paste into):

Code: [Select]
qemu-system-x86_64 -boot d -m 1024 -cdrom ./CorePure64-14.0.iso
At this point I'm thinking my memory must be failing me, and that I never did historically get Core working more-or-less-inline with shell invokation of qemu-system-x86_64.  :-\

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11651
Re: Launching an iso with QEMU?
« Reply #2 on: June 13, 2023, 05:43:15 PM »
Hi qopit
... after pressing <Enter> at the boot: prompt, it loads for a few seconds... and then I get a blank screen I can't get out of. ...
I booted the ISO under TC14 x86_64 and got the same result as you.
I then tried it like this and eventually was presented with a console:
Code: [Select]
qemu-system-x86_64 -m 1G -nic user -boot d -cdrom CorePure64-14.0.iso

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11651
Re: Launching an iso with QEMU?
« Reply #3 on: June 14, 2023, 12:31:03 AM »
Hi qopit
I played some more with this and got a little further.

Loading went a lot faster with KVM:
Install  kvm-6.1.2-tinycore64.tcz
For AMD
Code: [Select]
sudo modprobe kvm-amdFor Intel
Code: [Select]
sudo modprobe kvm-intel
Then:
Code: [Select]
qemu-system-x86_64 -enable-kvm -m 1G -nic user -boot d -cdrom CorePure64-14.0.iso -nographic -serial mon:stdioWhen the  boot  prompt appears enter:
Code: [Select]
corepure64 console=ttyS0
The loading vmlinuz64 and loading corepure64 messages are displayed.
Then the following messages are displayed:
Code: [Select]
Booting Core 14.0
Running Linux Kernel 6.1.2-tinycore64.
Checking boot options... Done.
Starting udev daemon for hotplug support... Done.
Scanning hard disk partitions to create /etc/fstab
Setting Language to C Done.
Possible swap partition(s) enabled.
Loading extensions... Done.
Setting keymap to us Done.
Setting hostname to box Done.
login[369]: root login on 'tty1'

After that hitting the  Enter  key just moves the cursor down
with no further prompts.

To get out of it, enter  ctrl-A + C
The  (qemu)  prompt will appear.
Press  q  and  Enter  to then quit qemu.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11048
Re: Launching an iso with QEMU?
« Reply #4 on: June 14, 2023, 02:34:42 AM »
"qemu -cdrom CorePure64-14.0.iso" still works for me, but this is with an older Qemu. Maybe they changed some defaults in newer versions.
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11651
Re: Launching an iso with QEMU?
« Reply #5 on: June 14, 2023, 08:45:55 AM »
Hi curaga
Can you copy/paste to and from the guest window?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11048
Re: Launching an iso with QEMU?
« Reply #6 on: June 14, 2023, 12:25:42 PM »
No, it's a graphical window (SDL or similar). It's never supported copypaste.
The only barriers that can stop you are the ones you create yourself.

Offline qopit

  • Jr. Member
  • **
  • Posts: 81
Re: Launching an iso with QEMU?
« Reply #7 on: June 14, 2023, 01:25:43 PM »
Rich - that is fantastic... thanks!  The `console=ttyS0` seems like the main trick so it can communicate.  I expect this may also help me connect to a libvirt-managed TinyCore VM with `virsh console`, and that was also on my list of things to figure out.

That said, I'm only close in the case where I want to try it.  Here's a gif showing where I get blocked:
https://s12.gifyu.com/images/SQbjT.gif

Some notes:

* This is under WSL on Win11 (please keep commentary/slagging to a minimum)  :)
*  no KVM wupport on WSL.  Will try on a debian host later tonight.
* I had all of "corepure64 console=ttyS0" in my clipbboard... but it curiously truncated the paste to "corepure64 cons"

Thanks again!!

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11651
Re: Launching an iso with QEMU?
« Reply #8 on: June 14, 2023, 05:43:00 PM »
Hi qopit
... * I had all of "corepure64 console=ttyS0" in my clipbboard... but it curiously truncated the paste to "corepure64 cons"
Now that is weird. The exact same thing was happening to me.