[Rule-list] Re: Swap Brainstorm

Scott Hallock scott at hallocks.net
Sun Feb 24 19:47:58 EET 2002


> 
> Yes, turning on some form of swap earlier in the install process would 
> help greatly, no doubt about it. 
> 
> I'll spend some time looking at ways we might accomplish this. By all 
> means, please feel free to try things on your own and let me know.

Here's what I was envisioning:  Write a small C program that looks at the
first primary partition on /dev/hda (and /dev/sda, if it exists) and
determines if the partition ID is Linux swap.  If so, say something to
the user like, "It looks like you have already set up a swap partition.
Would you like me to start using it for swap now?  (Note that if you have
not already set up a swap partition, saying yes here WILL CAUSE YOU TO
LOSE DATA!)"  Based on the return code from this small C program, the
init script can run mkswap /dev/hda followed by swapon /dev/hda, and
then proceed with the normal installation procedure.

I can probably write the small C program.  I can just bash the source to
cfdisk with a large hammer until it does what I want.  Where I'd need
help is with the init script (if there is one) on the Red Hat install boot
disk.  I've never even looked at how the Red Hat boot disk works, but
I'll start looking into it as soon as I get some time.

So the final install process on very low memory machines would be:

1.  User boots with DOS or very small Linux boot disk.
2.  User creates a primary partition on the first IDE or SCSI hard drive
    and sets its partition ID to Linux swap.
3.  User boots modified installer and answers "yes" when asked if 
    they really want to swap on the partition they created.
4.  mkswap /dev/hda1 (or /dev/sda1) ; swapon /dev/hda1 (or /dev/sda1)
5.  Proceed with install.

Does that seem reasonable?  Is it possible with the Red Hat installer?
Would it interfere with the rest of the install process?

> 
> It's not ready for prime time, nor is it for the faint of heart, but 
> there you have it:
> Red Hat Linux 7.2 installed in 10M of RAM. :)
> 

That's awesome.  Next target, 8MB.  Maybe someday we can even see Linux
running on that legendary 4MB 386SX again.  :)

Scott

_______________________________________________
Rule-list mailing list
Rule-list at mail.freesoftware.fsf.org
http://mail.freesoftware.fsf.org/mailman/listinfo/rule-list



This full static mirror of the Run Up to Date Linux Everywhere Project mailing list, originally hosted at http://lists.hellug.gr/mailman/listinfo/rule-list, is kept online by Free Software popularizer, researcher and trainer Marco Fioretti. To know how you can support this archive, and Marco's work in general, please click here