-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ideas for distributing multiple or larger ELKS disk images #2157
Comments
For me personally, the only viable interface into my 286-PC is and remains the floppy image. Hence, I like the idea of multiple FD images, one bootable, and the other one with a pink EXTRA label ;). And I guess it would be a nice challenge to replace I also think a HD image with "everything" is useful for many other cases, hence I don't see this as a "Either this way or that". |
I had the idea of producing a 'make_floppy' script along with a set of set of application lists (like elkscmd/Applications with tags) that would allow users to create floppy images, like:
The idea needs more work, but would allow for "popular" lists to be kept in files named Games, Devkit, etc. It is a bit of a maintenance burden as more stuff is added, but could work.
LOL - I think the name was originally suggested by someone that had previously used the DOS "SYS" program to create bootable floppies. And so it stuck.
Calculating block sizes and handling files that span across multiple floppies would be a lot more work... looking for contributors on that one, and/or converting from shell scripts, which are used now for building ELKS images and the sys program, to a C program or something a lot more sophisticated. Was it you that pointed out the site that generated ascii art from any text? That was pretty cool :) |
Thank you for creating this thread. This might be not comment for the disks but I haven't use git submodule in github so I'm not sure it works well |
I was not thinking that complex to be honest. We can keep the current situation where the "base" is defined in (e.g.) the 1440 config file from which I guess Then we could define:
One challenge could be, that we already want at the In the kernel we could then, before the init process is spawned, check:
Then everything could be done in user-space like Line 473 in 2f2c2e1
Anyhow, I could have a fundamental misunderstanding, so feel free to enlighten me 🥇 |
Hello @ghaerr Current ELKSmoria still can be built with ia16 gcc, so I updated the Makefile to build at elkscmd. I noticed there is no memory.h anymore. I can copy elks releated files under elkscmd for now if it is easier to include in hard disk image. It needs morifiles in current directory in the image now, |
master...floriangit:elks:install_option This is hacky (some is too hacky I guess), but it works. It will currently either continue with the regular You can try the code path in QEMU by doing: |
Hello @floriangit, While I can see this was probably fun to add into the kernel init code, my opinion is that we don't need special kernel handling in order to accomplish what you're suggesting. Using the /bootopts init= option or just adding the capability into /etc/rc.sys would work just as well and don't require special kernel handling. Both those approaches have the big advantage of not requiring a special kernel build for a distribution disk. There has been some work done to allow user programs/shell scripts to get a list of drives, but IIRC they may have to be mounted first, which won't work here. That should be somewhat easily extended though. But before we get into all that, when someone boots from floppy and has a hard disk attached, what is wrong with just using the 'sys' command (script) to prepare the HD? I know you're not crazy about sys being a shell script, but aside from that, what exactly doesn't it do that should be handled? Sys should be able to copy everything (selectively perhaps) from the FD to the HD, which doesn't seem much different than running a special installer. If new disks need to be inserted, that should be able to be handled, although the kernel might get quite fussy and problematic about having the root-mounted floppy removed. (This would be the case even if handled internal to the kernel too, BTW).
I definitely like the idea of keeping it all in user space. And with an addition to /etc/rc.sys or /bootopts init=, yet another script could start running which could ask the installation question and and then do whatever is needed (as well as run a fancy new installation program, should someone write one) or continue with normal init. IMO, a big advantage of keeping this sort of thing in shell script is maintainability, as well as allowing for ELKS build-time tools to easily specify/add/subtract programs to a distribution, without changing any binaries which would already have been built. Thank you! |
Thanks for your feedback! Yes, it was more of a nice tour to learn, hence no PR ;-)
|
Ok - agreed.
Also agreed. But the big problem here is that, given ELKS' stage of development, usually all the binaries and kernel should be updated together, to be safe. Even if we were not to do that, frankly, running
Yes, this would get longer-winded when apps + toolchain + header files need updating. In general though we're still limited to 1440k disks, one at a time. One idea here would be putting the sys program and kernel on any distribution, allowing it to boot and thus copy directly using sys or another script/program, but that uses up a lot of space. Other big problems are that this method won't work for Doom, nor likely a full dev-disk as they're way bigger than a 1440k floppy. So we're back into large files overlapping floppies, which would likely need an installation program, not script (as well as the host side too).
Agreed. I still think the easiest first step would be to get sys working without errors for the basic installation tasks you're talking about, then moving forward with the problem of larger distributions. BTW, the kernel isn't set up for allowing a single floppy system to switch floppies (i.e. unmount root and put another disk in its place) for any installation program. There is currently no way to actually unmount root and have the kernel continue running safely. So a dual floppy system is potentially necessary, and/or having a bootable kernel on each floppy. Other ideas we've talked about are distributing larger images, such as a 32MB (or smaller) HD distribution, which would basically just be a 32MB MINIX filesystem. That could potentially be copied using Linux tools or a network copy to an ELKS system with an HD. The advantage here is that a single HD distribution could be made with everything on it, very easily and automatically nightly. Yet another idea would be to port one of the old UNIX utilities, such as cpio, which can already be used to partition files into fixed-size (floppy-sized) chunks, which could then be un-archived at runtime directly onto a mounted filesystem (HD). This would still require a two-floppy system though. As I write this, I realize the whole problem is potentially quite messy. |
That's what I wanted to learn ;-) Chicken & Egg, huh? How do DOS games do that? With that protected mode kernel mode thing which we don't (or do?) run?
Agreed, and either way fine, I will not have time before the next weekend, but I can try if you want.
Yes, still too many options and none seems golden. Multiplied by the usual: "Ask 3 persons to get 9 opinions" ;-) |
No, not really. ELKS or Linux as an OS is entirely different from DOS: ELKS/Linux are built as a multitasking kernel with an associated design that buffers I/O for speed. DOS on the other hand is single-tasking, and programs are allowed to hook interrupts, take over the system, etc. They are very different. Also, the FAT filesystem is extremely different than MINIX: FAT was designed for DOS which never buffers any I/O, whereas MINIX is run on multitasking OSes which, at any time, may write the filesystem with un-synced buffers. This is the reason why there is no easy way to umount the root filesystem, as there may be other running time-sliced processes requesting I/O at any time. There's lots of other technical issues, but that's it in a nutshell.
DOS games take over the system entirely - they reprogram the PIT and PIC, take over interrupt vector tables, and generally do whatever they want. Since nothing else is running, that works for DOS, and the program can restore it all on exit. They can request the user change a floppy and nothing else is running so nothing else cares. On ELKS/Linux, reprogramming any of the hardware used by the kernel is a strict no-no, and the kernel filesystem code assumes it can write to root at any time. There is no notion of "no root", even with the root filesystem mounted read-only. None of this really has anything to do with protected mode, just the nature of the difference of design of the OSes.
If you find time to enhance sys to update your system from a distribution floppy image, please go ahead, and submit a PR. And it sounds like you've got a system with which to test your changes with, which is great. If you don't, I've added it to my TODO list :) |
In my opinion it is also a question of folder organization. For example: Where will be the binaries of /usr/src deployed be default? It does not need to be /usr/bin. These are custom binaries that the user should decide if he wants to make them "common" binaries. Also the PATH variable might grow a lot. |
I agree to the above from @toncho11 and also a side comment on a PR from @ghaerr. If a better installer/updater is appreciated, we should have some kind of requirements/design in which direction this should go. There are so many options as well as restrictions (don't oversize the image for real floppy PC users) I guess. |
The name sys was my idea as in DOS. In my opinion sys as a program/shell script simply works very well. It could be extended to copy more stuff from a 1440 floppy for example. Maybe in this case we can have another script ... you already guessed it ... called "install". |
It seems three separate things are brought up in this comment, and previously: 1) whether to call the program that creates a new, separate bootable HD or FD image should be called "sys", or "install", 2) whether that program should be a C program or a shell script, and 3) whether that same program should be extended to copy more files than is necessary for a bootable image, or whether a separate program/script (e.g. "install") should be used. My take on these three items is:
The only difference in copying all of binaries versus just the system binaries, especially now that the system installer has been enhanced to allow updating is about three lines of shell script: copy all of /bin rather than just named programs from /bin. The reason why we even built the installer to copy only a few files was/is to support building a 360k floppy from a 1440k floppy, as otherwise it would quickly run out of space. Of course, we could add special tags to indicate which files to copy for which destination sizes, but this complicates things quite a bit versus a simpler first approach of either copying a minimal bootable system versus everything.
I'm not sure the question here? I myself use QEMU all the time, and uncomment various IMAGE= lines to support running whichever image I want to run. However, my use case is built around always running the latest build, rather than building a hard-drive image once with the intention to be updated occasionally. So yes - I run -hda or various combinations of floppy/hard drives in order to test and implement various ELKS facilities - but not to create distributions.
I would say that, for me, my role as maintainer is different than a typical actual user (as described above). Thus, "distribution" oriented issues regarding creating images of programs built outside of the ELKS tree (e.g. Doom, 8086-toolchain, etc) might be better supported outside of the main ELKS repo, as the source code to those binaries aren't in the ELKS repo. I don't have a problem bringing those binaries into the repo, or possibly as @tyama501 suggested using git sub-repos, but that's another whole ballgame, at least for now, especially for those external repos that I do not maintain. Individual users's goals might be quite different - some want games, others want dev kits, etc, so more discussion will be needed on distribution issues versus ELKS "system updates". |
From the recent and increasing flurry of activity, it seems that ELKS has, (finally!), reached the point where all the good stuff won't fit on one 1440k floppy disk. I'm using the 2880k floppy image for testing the native C86 compiler and have run out of space on that on occasion, having to delete some programs in order to proceed.
Here are some of the larger categories of stuff that have recently become available:
I thought to ask the community what might be best - separate "packages" of floppy images perhaps, or a hard disk image with everything on it? Either has its sets of problems: an issue with multiple floppy packages is whether the package disk is bootable, or whether it's just an add-on that must be mounted in order to be accessed, exactly which programs are on it, etc. An HD image with everything on it would be great for, say, a full C86 devkit and/or all games, but only immediately usable with an emulator. Users with hard drives would have to go through more of a hassle to get a system up and running.
Since I primarily run from QEMU, I kind of like the idea of producing an HD image that has everything on it - this would allow for a single image to be used for everything ELKS. Perhaps someone could write a script that would then extract from that into a series of floppy images for later installation onto real hardware - floppies or install sets for a real hard drive. For real hardware, updating a system like this can take a lot of work, and shouldn't be normally performed unless the distribution is stable.
Since Doom and C86 now require the Open Watcom C compiler, there is the additional issue of having that installed and/or built, in order to build a full ELKS system, should one be buildable from the ELKS repo. Given that the ELKS C library will have to be used for both OpenWatcom programs, as well as C86 toolchain, we're probably already well headed in the direction of requiring OWC to be installed to build ELKS "extras" or a full HD distribution.
Thoughts?
The text was updated successfully, but these errors were encountered: