Hi

> On May 9, 2024, at 6:31 PM, Eric Auer via Freedos-user 
> <freedos-user@lists.sourceforge.net> wrote:
> 
> 
> Hi!
> 
> Turns out I only had some 2020 Bochs and no boot "disk"
> for it, so I could not easily test any hotkeys :-o But:
> 
>>> What if the DOS distro installer can be improved, so it no
>>> longer matters which emulator or virtualizer people use? ;-)
> 
>> As I’ve mentioned many times before, it already does that.
>> And has done that since FreeDOS 1.2.
> 
> I was not referring to "autodetect in which virtual
> environment you are and do special things for that"
> but to "be flexible enough with real or virtual PC
> hardware to just work out of the box with all popular
> virtual computers", in combination with "to make it
> easy to install DOS on virtual computers, we could
> have a disk image with pre-installed DOS, suitable
> for all types of virtual PC, one size fits all".
> 
> Of course virtual computers today tend to be tuned
> towards Linux or Windows running inside them, but
> my hope was that a few hints for options might be
> enough, something like "configure your virtual PC
> to offer AC97 or HDA sound, SATA without AHCI and
> BIOS instead of UEFI boot mode, then this FreeDOS
> disk image should be sufficiently happy", leaving
> "only" the issue that emulators often isolate DOS
> too well. Because you need specific drivers to get
> files out of or into the virtual computer, which
> is a problem very elegantly avoided by dosemu2 or
> dosbox or similar DOS specific environments.
> 
> There are drivers for DOS as client OS for some
> virtual PC, but no universal ones. And there are
> drivers for a few of the network cards a typical
> virtual PC can simulate, but maybe not for those
> simulated by default and maybe not at least one
> for each popular virtual PC brand? In addition,
> it is not very convenient to have to use a FTP
> or NFS or SAMBA client or web browser for DOS
> to transfer files, which in addition means that
> you would have to run the corresponding servers
> on the host operating system, on your real PC.

I think I see the distinction you are trying to make.

 Unfortunately, I think that probably won’t happen in the official release. 
But, there is no reason a third party could not make a bunch of pre-installed 
tuned images for various virtual environments.

> 
>> However when it comes to virtual environments, it
>> only has separate config files for DOSBox at this time.
> 
> In a perfect world, no special config would be needed,
> because a generic config would be compatible enough.

Yes. But, that leads to much more complex auto/config files. 

With the recent updates to those files, we seem to be moving in the opposite 
direction. By which I mean, providing much simpler and easier to modify 
configuration files. Along with different sets of those files based on hardware 
requirements and capabilities. 

> 
> But I agree that exactly because dosbox and similar
> are MEANT to be used with DOS, it can be good to
> have a special config to activate the special DOS
> interaction helpers dosbox and others support :-)
> 
>> ... V8Power Tools program VINFO to detect if and what
>> virtual environment it is installing the OS. At present,
>> that is Virtual Box, VMware, QEMU, DOSBox and some others
> 
> Good to know :-)
> 
>> As you may recall, the installer now uses this information
>> to also determine how to behave when a disk is not partitioned.
> 
>> On real hardware when a drive has no partitions, the installer
>> will prompt to overwrite the MBR. Inside known virtual environments,
>> it just overwrites it and does not bother the user.
> 
> I remember that I would prefer if the detection checks
> whether there is absolutely nothing that could get lost,
> not whether the target is virtual. If the disk is REALLY
> totally empty, then there is less need to ask. If it is
> NOT, then even in a virtual PC I would prefer to be asked.
> 
> It also is conceivable that the detection just THINKS a
> disk is empty, due to a read error. So I would prefer
> the most cautious approach, even if it means that the
> user has to press a few more buttons during install :-)

My previous email was a major abbreviation of the differences between real and 
virtual hardware as related to the MBR. 

It only installs it automatically when running under a known virtual machine 
AND the drive has a single DOS partition AND you proceed to installing the OS. 
And even that can be overridden using the advanced mode of the installer. 

On real hardware or unknown virtual environments, it just asks. 

> 
>> Big and little USB images, live and legacy CD, plus the floppy edition.
> 
> The floppy edition is a special case. The live CD could
> get replaced by a live disk image :-) One which could be
> either copied on USB or used directly as virtual disk of
> a virtual PC, with everything pre-installed? Does that
> live CD sometimes use "install to ramdisk on the fly"
> strategies for some apps? Or does it really have every
> app fully pre-installed? Would a live DVD make sense?

Yes, no, sort-of, kinda, depends. I think I went over all of that in previous 
emails.

But as a reminder…

When the LiveCD boots the Lice Environment, it performs a series of actions 
that fall back to less flexible settings when needed.

During that process, it attempts to allocate a very large RAM drive leaving a 
sizable percentage free for program usage. The less RAM available the more is 
dedicated to individual program usage. If that driver is not capable of 
creating any RAM drives (which is the case in some VMs and possibly hardware), 
then a different RAM disk driver will be attempted for a trivial size RAM 
drive. 

Based on the amount of space allocated to a RAM drive the following things 
happens.

Lots of space, the DOS environment is completely switched over to the RAM drive 
and the LiveCD packages are installed to that drive. The end user can add and 
remove packages to the RAM disk installed version of FreeDOS using FDIMPLES or 
the other standard programs. They can even remove the CD. Stick in another disc 
and install programs or even run CD based games. If at some point they wish to 
install FreeDOS to the hard disk, they would need to re-insert the LiveCD for 
that.

Decent amount of space, the most important DOS programs are installed to the 
RAM drive based on priority and common usage. This is the same as ‘Lots of 
Space’ with one difference. Not everything fits on the RAM drive. So, the 
LiveCD should really not be removed. The OS will look there for the programs 
that did not fit in the RAM drive.

A little bit of space, only essential DOS programs are transferred to the RAM 
drive. Otherwise, it’s like “Decent amount of space”

Almost no space, only the TEMP directories are setup to use the RAM drive. 
Mainly for I/O redirection.

No space, everything runs from CD. I/O redirection is not possible. User can 
still run most things and even install the OS. But, the OS is very limited. If 
there is a hard drive available, the user could configure things to use that. 
But, it would be cumbersome.


> 
> Of course old PC cannot boot from USB, but then those
> could also be too old to have decent live performance
> from CD, so people could rather boot the legacy CD and
> install from there to their legacy PC harddisk instead?

Not true.

My Pentium Pro won’t boot the LiveCD. But, I had something similar running on 
it at one point before I replaced the Clock Chip (with built in battery). It 
would boot from a floppy. Which loaded some RAM and network drivers. It then 
imported a directory from one of my servers using EtherDFS. It then copied DOS 
across the network to a RAM drive. I think I had it setup for 64mb RAM disk. 
Leaving the remainder of its 96mb of RAM available for programs. It ran like 
this very well. Common stuff in RAM and other things living on the network. 
Eventually, I desoldered the clock IC, put in a socket and new Dallas Clock. 
Afterwards, the hard disks were usable again. 

> 
> As every installer, the legacy CD also offers a bit of
> live DOS as well. So to keep the number of downloadable
> install media at 5, the live CD could get replaced by a
> live disk image suitable for both USB and virtual PC?

I disagree. 

> 
>>> This would be convenient for users of virtual computers,
>>> because they do not need to worry about installing to
>>> actual disks when their disks are imaginary anyway :-)
>> Sounds similar to what the LiveCD provides.
> 
> Exactly :-)
> 
>> Without the worry of having too small or too large of a disk image
> 
> Yes and no. DOS cannot use ISO filesystems for interactive
> persistent read/write access, while it could use FAT on
> a disk image for exactly that. In addition, users could
> still take any of the better partitioning tools, as long
> as it has disk image support, to resize the disk image :-)
> 
> If there are worries about bootability after resizing, a
> pre-installed disk image download could contain TWO FAT
> partitions, one of them as safely to resize D: drive :-)
> 
>> With enough ram, it relocates itself onto a RAM drive...
> 
> ...which is a bottleneck on old computers, while less old
> computers can already boot from USB. However, BIOS support
> for USB "disks" can be very SLOW, so maybe a RAMDISK has
> advantages even on newer REAL computers? On VIRTUAL ones,
> however, I would really prefer a virtual PERSISTENT disk.
> 
>> disadvantages are a slightly longer boot time and changes are not persistent.
> 
> Exactly.
> 
>> But the user could have a virtual HD attached to remedy that.
> 
> The idea was that SHIPPING FreeDOS pre-installed on virtual
> harddisk would both remedy that AND completely avoid the very
> need to perform an installation at all :-)
> 
> Regards, Eric
> 

I don’t think the LiveCD should go away. 

In theory, a USB image could double as an install media and vm hard disk image. 
In fact, the USB images come with a vmdk file to easily attach them to most 
virtual machines. 

There are a couple issues with having them do double duty.

They cannot be made to be DOS on a USB stick by default. Many computers boot 
from the USB as a read only device. I have not personally seen a computer do 
that. But, during early development of the installer, it would use the USB for 
some IO redirection when a RAM drive could not be created. This resulted in at 
least one tester’s computer screaming loudly at him when that happened. This 
resulted in some deep thought and changes to prevent such issues. Nowadays, the 
installer can get by in early stages without a RAM drive or I/O redirection. 
Later on it needs redirection. But by that time, it can utilize the hard drive 
if needed. 

So in theory, the USB stick image could boot itself in several ways based on 
hardware. If it is on a known virtual platform, it could boot as real DOS on 
hard drive. If it is booted on real hardware or any unknown virtual 
environment, it could boot like the LiveCD, putting things in RAM. A simple 
batch could be provided that could switch it to DOS on USB for those users.


Jerome

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


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

Reply via email to