---- Le ven., 05 avr. 2024 09:52:10 -0400 Jim Hall via Freedos-user  wrote: ----

 > Then I create a virtual disk where I can install FreeDOS T2404. I'll
 > set this up as 500MB, which is plenty big for what I do:
 > 
 > $ qemu-img create -f qcow2 2404.qcow2 500M
I was prefering raw, because I was using:
https://www.seei.biz/how-to-mount-raw-images-img-images-on-linux/
to mount raw disk, and exchange data between the host and the emulated machine.

But I discovered qemu-nbd... that allows the same with qcow2 image too.
So I guess I will adopt qcow2.
Now, as I understand, the size of the file for qcow2, is way less than the size 
specified...
because allocation is done only when needed... so I would suggest to oversize 
the value...
maybe 3G?

 > And then I boot the FreeDOS 1.3 LiveCD using QEMU. To install, I don't
 > need much, so I set up FreeDOS to use 32MB memory. I use -enable-kvm
 > with QEMU 8.1.3 on Fedora Linux 39.
On Ubuntu 23.10, with QEMU 
paul@starman:~/FDT2404$ kvm -enable-kvm -m 32 -hda T2404FULL.img
WARNING: Image format was not specified for 'T2404FULL.img' and probing guessed 
raw.
         Automatically detecting the format is dangerous for raw images, write 
operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
Could not access KVM kernel module: No such file or directory
kvm: failed to initialize kvm: No such file or directory

but the following works:
kvm -m 32 -hda T2404FULL.img

paul@starman:~/FDT2404$ qemu-system-i386 --version
QEMU emulator version 8.0.4 (Debian 1:8.0.4+dfsg-1ubuntu3.23.10.3)
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers

https://www.qemu.org/docs/master/system/invocation.html
says: "Older options like -hda are essentially macros which expand into -drive 
options for various drive interfaces. The original forms bake in a lot of 
assumptions from the days when QEMU was emulating a legacy PC, they are not 
recommended for modern configurations."

 > $ qemu-system-i386 -enable-kvm -m 32 -cdrom T2404LIVE.iso -hda
 > 2404.qcow2 -boot order=d
This works with iso file, and d means to boot cdrom... but this means d cannot 
be used to boot with second hard drive ... which is needed when I
choose to use FullUSB image. So I tend to prefer the "new way":

"Instead of -hda, -hdb, -hdc, -hdd, you can use:
qemu-system-x86_64 -drive file=file,index=0,media=disk
qemu-system-x86_64 -drive file=file,index=1,media=disk
qemu-system-x86_64 -drive file=file,index=2,media=disk
qemu-system-x86_64 -drive file=file,index=3,media=disk "

"qemu-system-x86_64 -drive if=ide,index=1,media=cdrom"

"index=index
    This option defines where the drive is connected by using an index in the 
list of available connectors of a given interface type.
 compare with bootindex=index later in this message.

media=media
    This option defines the type of the media: disk or cdrom."

So rather than -boot order=d I would prefer to use:
https://www.qemu.org/docs/master/system/bootindex.html

I was saying than rather to use mount -o loop,offset= line to mount RAW images, 
it is probably better to use:
https://gist.github.com/shamil/62935d9b456a6f9877b5
that works with qcow2.
That was not working on VanillaOS... but seems to work on Ubuntu 23.10.
(bit unclear when you need to use sudo on these lines)...
https://www.baeldung.com/linux/mount-qcow2-image might be clearer.

So... I was using the same arguments you use... but try to change to more 
modern parameters, because of deprecation warnings/messages.


_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to