Re: [Freedos-user] How to try FDT2404 (Latest test version) on QEMU the hard way + kvm fixed

2024-04-05 Thread Paul Dufresne via Freedos-user
It turn out that using kvm was giving me the illusion of using kvm... but I 
missed the warning saying
that kvm was not loaded, and that it was falling back on tcg  don't know 
really what it is.
The reason was that "Intel virtualization technology" option in "BIOS" was 
disabled.
After enabling it, now qemu-system-i386 -enable-kvm works... I hope for real.
So qemu-system-i386 -enable-kvm make it more obvious that you need to fix 
something than by using kvm.

Also... it seems that setup need the cdrom (dvd) to be working... as it seems 
to install from it.

My guess was that because I was using -machine pc-i440fx-4.2 I was forcing the 
use of cdrom...
Somehow, the cdrom drive was empty, but setup was finding the emulated hard 
disk containing the content of the cdrom...
and used that instead of the cdrom... at least this is my hypothesis why it 
worked, and not anymore now that I don't use -macine.

So now I come back to use 
https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/test/FDT2404-LiveCD.zip
instead of 
https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/test/FDT2404-FullUSB.zip

I installed with (admittedly more complex than needed):

qemu-system-i386 -enable-kvm -m 32 -cpu 486 -device 
ide-hd,drive=myhd,bootindex=2 -drive 
file=2404.qcow2,format=qcow2,if=none,id=myhd,media=disk -device 
ide-cd,drive=mydvd,bootindex=1 -drive 
file=T2404LIVE.iso,format=raw,id=mydvd,if=none,media=cdrom 

And as this use a menu to choose what to boot with, there is no real need to 
exchange bootindex values.

But to have sound and networking, I just used (added previous message 
parameters to previous line):
qemu-system-i386 -enable-kvm -m 32 -cpu 486 -device 
ide-hd,drive=myhd,bootindex=2 -drive 
file=2404.qcow2,format=qcow2,if=none,id=myhd,media=disk -device 
ide-cd,drive=mydvd,bootindex=1 -drive 
file=T2404LIVE.iso,format=raw,id=mydvd,if=none,media=cdrom -audiodev 
pa,id=mysnd -device sb16,audiodev=mysnd -device adlib,audiodev=mysnd -machine 
pcspk-audiodev=mysnd -vga cirrus -display sdl -net nic,model=pcnet -net user

You can get control back from emulated machine with Ctrl-Alt-G (as shown in 
upper window) and allows you to close the window.

Hope it can help someone while not confusing too many!


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


Re: [Freedos-user] How to try FDT2404 (Latest test version) on QEMU

2024-04-05 Thread Jim Hall via Freedos-user
Jim Hall 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

Paul Dufresne wrote:
> 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.


I use qcow2 because it's a bit more efficient, and a little faster.
(Not that speed matters much here .. my 3-yr old desktop PC is still
*way* more powerful than a 1990s '486 or Pentium PC.)

I use guestfstools to "mount" the virtual disk from Linux. Works
great. It's basically this:

guestmount -a "$img" -m /dev/sda1 "$mnt"

In other words:

mkdir /tmp/freedos
guestmount -a mystuff.qcow2 -m /dev/sda1 /tmp/freedos

..and that will "mount" the first (only) partition in my virtual disk,
and make it accessible at /tmp/freedos.

> 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?

That's a lot. FreeDOS (like any DOS) is not big. What are you putting
in that virtual disk? My "C:" virtual disk is 500MB, and that's much
larger than I need to install OpenWatcom plus editors and tools. My
"D:" virtual disk is like 200MB.


Jim


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


Re: [Freedos-user] How to try FDT2404 (Latest test version) on QEMU

2024-04-05 Thread Paul Dufresne via Freedos-user
 Le ven., 05 avr. 2024 11:38:28 -0400 Jerome Shidel via Freedos-user  wrote 


 > Hi Paul,
 > Just a side note about installing using the FullUSB.
 > 
 > One of my DOS test machines is an Acer One netbook with a 1Ghz Atom 
 > processor and an ancient 30Gb SSD. This machine has no CD/DVD drive. It does 
 > boot from the FullUSB when written to a flash drive. It takes about 5 
 > minutes from start to finish (boot, partition, reboot, install, reboot) to 
 > do a Full install without sources. 
 > 
My about 40 mins [did not really check the clock]  in an emulated (kvm) was 
Full install with sources.

Also... using FullUSB just because not liking [understand less] the iso format.
I take/took for granted, that USB key format is the same as an hard disk... so 
used the USB key image on an emulated hard disk.
But I realize that I could use the USB key image on an emulated USB key:
https://qemu-project.gitlab.io/qemu/system/devices/usb.html

 > Although it can only use one at a time, modern versions of FDIMPLES can use 
 > different local package repositories. 
 > 
 > You could have different repos on different drives. Or, even multiple ones 
 > on the same drive in different paths.
 > 
 > When FDIMPLES starts, it checks the current drive for a repository in one of 
 > the standard paths. If it does not find one, it searches existing drives C: 
 > through Z: for a repository. 
 > 
 > You can also tell it to check a specific drive (and/or alternate path) for a 
 > repo at startup. 
 > 
 > For example,
 > 
 > C:\>fdimples e:
 > C:\>fdimples d:\repo-1
 > 
 > etc.  
 > 

So, I guess this tend to suggest the follwing approach for most people: (almost 
obvious, but was not really told to me before)

Have C: be the target hard disk, have D: be the installation disk...

on installation, boot D:  , do a minimal installation, then on usage boot C: 
but with D: present, 
do fdimples D: to add needed packages.

People that need packages only present on Bonus disk should add the E: drive 
with the Bonus image, and use
fdimples e:
to add packages from the bonus disk.


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


Re: [Freedos-user] How to try FDT2404 (Latest test version) on QEMU

2024-04-05 Thread Paul Dufresne via Freedos-user
 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


Re: [Freedos-user] How to try FDT2404 (Latest test version) on QEMU

2024-04-05 Thread Jerome Shidel via Freedos-user
Hi Paul,

Just a side note about installing using the FullUSB.

One of my DOS test machines is an Acer One netbook with a 1Ghz Atom processor 
and an ancient 30Gb SSD. This machine has no CD/DVD drive. It does boot from 
the FullUSB when written to a flash drive. It takes about 5 minutes from start 
to finish (boot, partition, reboot, install, reboot) to do a Full install 
without sources. 

That machine will also boot from a USB floppy drive. 

Another side note…

You could create a second partition on the USB stick and copy the files from 
the Bonus CD to to that.

Although it can only use one at a time, modern versions of FDIMPLES can use 
different local package repositories. 

You could have different repos on different drives. Or, even multiple ones on 
the same drive in different paths.

When FDIMPLES starts, it checks the current drive for a repository in one of 
the standard paths. If it does not find one, it searches existing drives C: 
through Z: for a repository. 

You can also tell it to check a specific drive (and/or alternate path) for a 
repo at startup. 

For example,

C:\>fdimples e:
C:\>fdimples d:\repo-1

etc.  

:-)

Jerome

> On Apr 4, 2024, at 11:45 PM, Paul Dufresne via Freedos-user 
>  wrote:
> 
> Hi! Especially to Lunduke fans having their "second part" of DOS week... 
> about one year and a half after first part.
> So from April 3 to April 10 2024.
> I am not a paid subscriber to lunduke.locals.com and just observing it from 
> far.
> 
> I decided to retry FreeDOS after not using it for too many months.
> 
> And as I do in this time... I search back the messages I have previously left 
> on the list to help me know how to launch qemu...
> as I don't think the wiki have an article about it...
> But it has been a long time... and I am seeding a new message for the next 
> time(s).
> 
> So FDT2404 is out: "
> ###
> FreeDOS 2404-Test ("FreeDOS T2404")
> ###
> 
> Warning: This is a FreeDOS development build and is for testing purposes.
> It may exhibit behavior vary different from a release build and may not be
> suitable for regular use. For general use, please consider using the latest
> release build available at http://freedos.org
> "
> 
> And can be found at:
> https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/test/readme.txt
> 
> This time, I  have chosen to use 
> https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/test/FDT2404-FullUSB.zip
> rather than the usual 
> https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/test/FDT2404-LiveCD.zip
> Mostly, I find a disk image, a more simple and logical format that a CDROM or 
> DVD image format (iso file).
> 
> So with an iso file I would use -cdrom image.iso... but the FullUSB.zip 
> contains an .img file, that I will use the same
> qemu parameter as the hard drive destination image: -drive 
> format=raw,file=$DISK where DISK=T2404FULL.img
> 
> Steps goes about like this:
> Download and extract 
> https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/test/FDT2404-FullUSB.zip
>  in FDT2404 directory.
> cd FDT2404
> qemu-img create fdos.img 1000M
> DESTDISK=fdos.img
> INSTALLDISK=FDT2404FULL.img
> 
> At install time, I present first INSTALLDISK, then DESTDISK:
> qemu-system-i386 -cpu 486 -name FreeDOS -machine pc-i440fx-4.2 -m 64 -drive 
> format=raw,file=$INSTALLDISK -drive format=raw,file=$DESTDISK -audiodev 
> pa,id=mysnd -device sb16,audiodev=mysnd -device adlib,audiodev=mysnd -machine 
> pcspk-audiodev=mysnd -vga cirrus -display sdl -net nic,model=pcnet -net user
> 
> After installation, I present first DESTDISK containing the installed 
> FreeDOS, and then INSTALLDISK (not so much needed anymore):
> qemu-system-i386 -cpu 486 -name FreeDOS -machine pc-i440fx-4.2 -m 64 -drive 
> format=raw,file=$DESTDISK -drive format=raw,file=$INSTALLDISK -audiodev 
> pa,id=mysnd -device sb16,audiodev=mysnd -device adlib,audiodev=mysnd -machine 
> pcspk-audiodev=mysnd -vga cirrus -display sdl -net nic,model=pcnet -net user
> 
> Information given at boot seems to say E: is the INSTALLDISK... but it is 
> really D: ... I don't know why.
> 
> Games seems to work often better than it did in my memory.
> Was it on VirtualBox that color palette was wrong?
> 
> Also... Magic Mirror game seems to start... and I did not remember to have 
> seen it working before.
> 
> For me DHCP seems not really working... but I run this on Vanilla  OS ... 
> with apx run $command  and so I think maybe it does not work because the 
> virtual machine
> is running inside the Ubuntu sub-machine (an other virtual machine as far as 
> I know).
> 
> So it seems to be the gist of what I wanted to say.
> 
> 
> ___
> Freedos-user mailing list
> Freedos-user@lists.sourceforge.net
> 

Re: [Freedos-user] How to try FDT2404 (Latest test version) on QEMU

2024-04-05 Thread Jim Hall via Freedos-user
I run FreeDOS in QEMU on Linux, so I can show you what I do.

First, I unzip the LiveCD ISO image so I can use it:

$ unzip FDT2404-LiveCD.zip '*.iso'
Archive:  FDT2404-LiveCD.zip
  inflating: T2404LIVE.iso


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
Formatting '2404.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off
compression_type=zlib size=524288000 lazy_refcounts=off
refcount_bits=16


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.

$ qemu-system-i386 -enable-kvm -m 32 -cdrom T2404LIVE.iso -hda
2404.qcow2 -boot order=d


That gets me into the installer, which will always boot from the
LiveCD because I used order=d. Install FreeDOS as you would normally.

After I install, I use a slightly different command line to boot
FreeDOS. This gives me two things: 1. I have a separate hard disk
image with all my personal stuff, and 2. I add SB16 and AdLib support
so I can play games. This is the script I use to run FreeDOS: (quoted
with ">")


> #!/bin/bash
> # wrapper to run FreeDOS in a QEMU virtual machine
>
> # to create an empty disk image, do this:
> # qemu-img create -f qcow2 freedos.qcow2 500M
>
> # '-display' options can be 'sdl' or 'gtk' or 'curses'
> # '-soundhw pcspk' is no longer supported
>
> qemu-system-i386 -enable-kvm -m 32 -boot menu=on -device sb16 -device adlib \
> -hda /usr/local/tmp/freedos/2404/2404.qcow2 \
> -hdb $HOME/lib/freedos/mystuff.qcow2 \
> -cdrom /usr/local/tmp/freedos/2404/T2404BNS.iso "$@"



A note on the paths: I keep my FreeDOS install (my virtual C: drive)
in /usr/local/tmp because I don't need to back it up. If it's outside
my home directory, I don't bother backing it up when I backup my
computer. (I can just download it again and re-install it.) But I have
my personal stuff under my home directory (in $HOME/lib/freedos) so
that gets backed up.

Also: this shows that I have the BonusCD loaded on the virtual system.
After I install, the first thing I do is switch to the BonusCD so I
can install the compilers and editors I use.


On Thu, Apr 4, 2024 at 11:01 PM Paul Dufresne via Freedos-user
 wrote:
>
> Hi! Especially to Lunduke fans having their "second part" of DOS week... 
> about one year and a half after first part.
> So from April 3 to April 10 2024.
> I am not a paid subscriber to lunduke.locals.com and just observing it from 
> far.
>
> I decided to retry FreeDOS after not using it for too many months.
>
> And as I do in this time... I search back the messages I have previously left 
> on the list to help me know how to launch qemu...
> as I don't think the wiki have an article about it...
> But it has been a long time... and I am seeding a new message for the next 
> time(s).
>
> So FDT2404 is out: "
> ###
> FreeDOS 2404-Test ("FreeDOS T2404")
> ###
>
> Warning: This is a FreeDOS development build and is for testing purposes.
> It may exhibit behavior vary different from a release build and may not be
> suitable for regular use. For general use, please consider using the latest
> release build available at http://freedos.org
> "
>
> And can be found at:
> https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/test/readme.txt
>
> This time, I  have chosen to use 
> https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/test/FDT2404-FullUSB.zip
> rather than the usual 
> https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/test/FDT2404-LiveCD.zip
> Mostly, I find a disk image, a more simple and logical format that a CDROM or 
> DVD image format (iso file).
>
> So with an iso file I would use -cdrom image.iso... but the FullUSB.zip 
> contains an .img file, that I will use the same
> qemu parameter as the hard drive destination image: -drive 
> format=raw,file=$DISK where DISK=T2404FULL.img
>
> Steps goes about like this:
> Download and extract 
> https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/test/FDT2404-FullUSB.zip
>  in FDT2404 directory.
> cd FDT2404
> qemu-img create fdos.img 1000M
> DESTDISK=fdos.img
> INSTALLDISK=FDT2404FULL.img
>
> At install time, I present first INSTALLDISK, then DESTDISK:
> qemu-system-i386 -cpu 486 -name FreeDOS -machine pc-i440fx-4.2 -m 64 -drive 
> format=raw,file=$INSTALLDISK -drive format=raw,file=$DESTDISK -audiodev 
> pa,id=mysnd -device sb16,audiodev=mysnd -device adlib,audiodev=mysnd -machine 
> pcspk-audiodev=mysnd -vga cirrus -display sdl -net nic,model=pcnet -net user
>
> After installation, I present first DESTDISK containing the installed 
> FreeDOS, and then INSTALLDISK (not so much needed anymore):
> qemu-system-i386 -cpu 486 -name FreeDOS -machine 

[Freedos-user] How to try FDT2404 (Latest test version) on QEMU

2024-04-04 Thread Paul Dufresne via Freedos-user
Hi! Especially to Lunduke fans having their "second part" of DOS week... about 
one year and a half after first part.
So from April 3 to April 10 2024.
I am not a paid subscriber to lunduke.locals.com and just observing it from far.

I decided to retry FreeDOS after not using it for too many months.

And as I do in this time... I search back the messages I have previously left 
on the list to help me know how to launch qemu...
as I don't think the wiki have an article about it...
But it has been a long time... and I am seeding a new message for the next 
time(s).

So FDT2404 is out: "
###
FreeDOS 2404-Test ("FreeDOS T2404")
###

Warning: This is a FreeDOS development build and is for testing purposes.
It may exhibit behavior vary different from a release build and may not be
suitable for regular use. For general use, please consider using the latest
release build available at http://freedos.org
"

And can be found at:
https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/test/readme.txt

This time, I  have chosen to use 
https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/test/FDT2404-FullUSB.zip
rather than the usual 
https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/test/FDT2404-LiveCD.zip
Mostly, I find a disk image, a more simple and logical format that a CDROM or 
DVD image format (iso file).

So with an iso file I would use -cdrom image.iso... but the FullUSB.zip 
contains an .img file, that I will use the same
qemu parameter as the hard drive destination image: -drive 
format=raw,file=$DISK where DISK=T2404FULL.img

Steps goes about like this:
Download and extract 
https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/test/FDT2404-FullUSB.zip
 in FDT2404 directory.
cd FDT2404
qemu-img create fdos.img 1000M
DESTDISK=fdos.img
INSTALLDISK=FDT2404FULL.img

At install time, I present first INSTALLDISK, then DESTDISK:
qemu-system-i386 -cpu 486 -name FreeDOS -machine pc-i440fx-4.2 -m 64 -drive 
format=raw,file=$INSTALLDISK -drive format=raw,file=$DESTDISK -audiodev 
pa,id=mysnd -device sb16,audiodev=mysnd -device adlib,audiodev=mysnd -machine 
pcspk-audiodev=mysnd -vga cirrus -display sdl -net nic,model=pcnet -net user

After installation, I present first DESTDISK containing the installed FreeDOS, 
and then INSTALLDISK (not so much needed anymore):
qemu-system-i386 -cpu 486 -name FreeDOS -machine pc-i440fx-4.2 -m 64 -drive 
format=raw,file=$DESTDISK -drive format=raw,file=$INSTALLDISK -audiodev 
pa,id=mysnd -device sb16,audiodev=mysnd -device adlib,audiodev=mysnd -machine 
pcspk-audiodev=mysnd -vga cirrus -display sdl -net nic,model=pcnet -net user

Information given at boot seems to say E: is the INSTALLDISK... but it is 
really D: ... I don't know why.

Games seems to work often better than it did in my memory.
Was it on VirtualBox that color palette was wrong?

Also... Magic Mirror game seems to start... and I did not remember to have seen 
it working before.

For me DHCP seems not really working... but I run this on Vanilla  OS ... with 
apx run $command  and so I think maybe it does not work because the virtual 
machine
is running inside the Ubuntu sub-machine (an other virtual machine as far as I 
know).

So it seems to be the gist of what I wanted to say.


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