Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Installing NetBSD on a low-memory 486

184 views
Skip to first unread message

Gavan Fantom

unread,
Oct 3, 2000, 3:00:00 AM10/3/00
to
I have a really old 486 machine which has (I think) 4 megs of RAM. I'd
like to get NetBSD 1.4.2 running on it, but the install discs don't get
very far.

The standard boot discs (boot1.fs + boot2.fs) load a kernel and then
reboot, and boot-small.fs reboots immediately after reading a small amount
of data (probably only the boot sector?) from the disc.

Which floppy image is recommended for booting on low-memory machines?
Should it still be possible, or should I consider installing NetBSD 1.2?

Is there a way of finding out more detailed information about what is
happening to cause a reboot?

--
Gillette - the best a man can forget


Manuel Bouyer

unread,
Oct 3, 2000, 3:00:00 AM10/3/00
to
On Tue, Oct 03, 2000 at 04:40:16PM +0100, Gavan Fantom wrote:
> I have a really old 486 machine which has (I think) 4 megs of RAM. I'd
> like to get NetBSD 1.4.2 running on it, but the install discs don't get
> very far.
>
> The standard boot discs (boot1.fs + boot2.fs) load a kernel and then
> reboot, and boot-small.fs reboots immediately after reading a small amount
> of data (probably only the boot sector?) from the disc.
>
> Which floppy image is recommended for booting on low-memory machines?
> Should it still be possible, or should I consider installing NetBSD 1.2?

Should be possible. fvdl has successfully installed 1.5_ALPHA2 on a 4M machine.


>
> Is there a way of finding out more detailed information about what is
> happening to cause a reboot?

Bad floppy ? corrupted disk image ? hardware problems ?

--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel...@lip6.fr
--


Gavan Fantom

unread,
Oct 3, 2000, 3:00:00 AM10/3/00
to
On Tue, 3 Oct 2000, Manuel Bouyer wrote:

> > Which floppy image is recommended for booting on low-memory machines?
> > Should it still be possible, or should I consider installing NetBSD 1.2?
>
> Should be possible. fvdl has successfully installed 1.5_ALPHA2 on a 4M machine.

OK. Presumably 1.5_ALPHA2 is a tad bigger than 1.4.2?

> > Is there a way of finding out more detailed information about what is
> > happening to cause a reboot?
>
> Bad floppy ? corrupted disk image ? hardware problems ?

I'm 95% sure the floppies are OK.. I dd'd all of them to /dev/null and
they didn't report any errors. The image I wrote was the image pulled off
Sunsite UK about a week ago, and the MD5 checked out.

Hardware problems are entirely likely, but the machine just rebooting with
no message after loading the kernel isn't really a good indication as to
where there might be a problem. :-(

Manuel Bouyer

unread,
Oct 3, 2000, 3:00:00 AM10/3/00
to
On Tue, Oct 03, 2000 at 04:58:45PM +0100, Gavan Fantom wrote:
> On Tue, 3 Oct 2000, Manuel Bouyer wrote:
>
> > > Which floppy image is recommended for booting on low-memory machines?
> > > Should it still be possible, or should I consider installing NetBSD 1.2?
> >
> > Should be possible. fvdl has successfully installed 1.5_ALPHA2 on a 4M machine.
>
> OK. Presumably 1.5_ALPHA2 is a tad bigger than 1.4.2?

Well, that's not sure. Some work has been done on the kernel to remove some
features (e.g. NFSv3).

>
> > > Is there a way of finding out more detailed information about what is
> > > happening to cause a reboot?
> >
> > Bad floppy ? corrupted disk image ? hardware problems ?
>
> I'm 95% sure the floppies are OK.. I dd'd all of them to /dev/null and
> they didn't report any errors. The image I wrote was the image pulled off
> Sunsite UK about a week ago, and the MD5 checked out.
>
> Hardware problems are entirely likely, but the machine just rebooting with
> no message after loading the kernel isn't really a good indication as to
> where there might be a problem. :-(

Sure. I guess it panics in the earlier stage of the boot, or, worse, it
gets a triple fault (in which case it just reboots).

Frank van der Linden

unread,
Oct 3, 2000, 3:00:00 AM10/3/00
to
On Tue, Oct 03, 2000 at 04:58:45PM +0100, Gavan Fantom wrote:
> > > Should it still be possible, or should I consider installing NetBSD 1.2?
> >
> > Should be possible. fvdl has successfully installed 1.5_ALPHA2 on a 4M machine.
>
> OK. Presumably 1.5_ALPHA2 is a tad bigger than 1.4.2?

Please note that these changes have not been made available in the 1.5
branch yet, as I am still waiting for a pullup approval.

So, if you grab an 1.5_ALPHA2 snapshot, it won't work. I can send
you a floppy image that works, if you want. I have tested a configuration
with 640k base and 3200k extended memory (which about corresponds to
a 4M machine with some shadow ram enabled). 640k and 3072k won't work,
I'd have to cut into sysinst further to enable that.

- Frank


Andrei Petrov

unread,
Oct 3, 2000, 3:00:00 AM10/3/00
to
Seems to me that the real win would be to use floppy based
root file system. You'll get your MINIROOTSIZE back as memory.
That will be slow though.

Frank van der Linden

unread,
Oct 3, 2000, 3:00:00 AM10/3/00
to
On Tue, Oct 03, 2000 at 11:53:13AM -0700, Andrei Petrov wrote:
> Seems to me that the real win would be to use floppy based
> root file system. You'll get your MINIROOTSIZE back as memory.
> That will be slow though.

I assume you mean having one kernel floppy and one rootfilesystem
floppy. We used to have something like that, but using that is also
a squeeze, since, for example, the 'tiny' install ramdisk is already
1376256 bytes big. So it won't fit on ye olde 1.2M floppy anymore,
which is a one advantage of the 'tiny' floppy set.

Tricks can be pulled like using a gzip-filesystem, etc, but.. maybe
next time :-)

- Frank


Gavan Fantom

unread,
Oct 3, 2000, 3:00:00 AM10/3/00
to
On Tue, 3 Oct 2000, Frank van der Linden wrote:

> So, if you grab an 1.5_ALPHA2 snapshot, it won't work. I can send
> you a floppy image that works, if you want. I have tested a configuration
> with 640k base and 3200k extended memory (which about corresponds to
> a 4M machine with some shadow ram enabled). 640k and 3072k won't work,
> I'd have to cut into sysinst further to enable that.

OK. Well the BIOS is reporting 3072K extended memory. Is this something I
should be able to tweak somehow, or does that mean I haven't much hope of
getting NetBSD onto this box nowadays?

Gavan Fantom

unread,
Oct 3, 2000, 3:00:00 AM10/3/00
to
On Tue, 3 Oct 2000, Andrei Petrov wrote:

> Seems to me that the real win would be to use floppy based
> root file system. You'll get your MINIROOTSIZE back as memory.
> That will be slow though.

This machine isn't exactly built for speed. ;-)

Is it an easy thing to do, or does this involve some serious hacking? I'm
not at all familiar with building install images, as generally the
prebuilt ones Just Work(tm).

Gavan Fantom

unread,
Oct 3, 2000, 3:00:00 AM10/3/00
to
On Tue, 3 Oct 2000, Manuel Bouyer wrote:

> > > Should be possible. fvdl has successfully installed 1.5_ALPHA2 on a 4M machine.
> >
> > OK. Presumably 1.5_ALPHA2 is a tad bigger than 1.4.2?
>

> Well, that's not sure. Some work has been done on the kernel to remove some
> features (e.g. NFSv3).

Ah right. Would be interesting to look at the sizes of the images and
compare.

> > Hardware problems are entirely likely, but the machine just rebooting with
> > no message after loading the kernel isn't really a good indication as to
> > where there might be a problem. :-(
>
> Sure. I guess it panics in the earlier stage of the boot, or, worse, it
> gets a triple fault (in which case it just reboots).

Right. Is there a way to debug this with a bit more certainty? What are
the common causes of an early panic? Presumably a triple-fault would most
likely be caused by a lack of memory?

OK, I just took another look at the machine. It's a 386, not a 486. Should
still work though, right? It's an AMD chip running at 25 MHz, and there's
a separate Cyrix-labelled floating point chip.

With the 2-disc floppy set, it loads the image (completing the line with
the hex numbers), waits for about 2 seconds (decompressing? Or is that
done on the fly?) and then reboots.

Frank van der Linden

unread,
Oct 3, 2000, 3:00:00 AM10/3/00
to
On Tue, Oct 03, 2000 at 08:12:20PM +0100, Gavan Fantom wrote:
> OK. Well the BIOS is reporting 3072K extended memory. Is this something I
> should be able to tweak somehow, or does that mean I haven't much hope of
> getting NetBSD onto this box nowadays?

3072 is 128k too little.. I have tested this, and it'll run out of memory.
Try going into the BIOS setup and disable any 'shadow ram' settings.

If I get the time, I might see if I can pull some tricks (within
the existing framework) to save some more memory.

- Frank


Andrei Petrov

unread,
Oct 3, 2000, 3:00:00 AM10/3/00
to

Going this way prepare to do everything manually. I did similar
things pretty long time ago so I can tell something wrong, the List
will correct me:
1) build kernel you will boot, I assume INSTALL_TINY without
MEMORY_DISK_.. and MINIROOTSIZE, I'd add DDB option in your case.
2) make bootable floppy, heck, I don't remember it anymore:
anyway you should use

disklabel [new bootable]

newfs /dev/rfd0a

mount /dev/fd0a /mnt

cp <your_kernel> /mnt

At this point I'd try to boot this floopy.

3) make another floppy for root file system the same way as before
but don't copy kernel there. Then you'll need to copy there only
what is nessesary for you.
/dev/console (use MAKEDEV, do not copy)
/sbin/init
/bin/sh

....

You will need to boot the kernel with flag which says ask for root.
I think INSTALL kernel does it, not sure how to do it.

You definitely need another machine with netbsd installed.

Have fun,
Andrey


Andrei Petrov

unread,
Oct 3, 2000, 3:00:00 AM10/3/00
to

On Tue, 3 Oct 2000, Frank van der Linden wrote:

> On Tue, Oct 03, 2000 at 11:53:13AM -0700, Andrei Petrov wrote:
> > Seems to me that the real win would be to use floppy based
> > root file system. You'll get your MINIROOTSIZE back as memory.
> > That will be slow though.
>

> I assume you mean having one kernel floppy and one rootfilesystem
> floppy. We used to have something like that, but using that is also
> a squeeze, since, for example, the 'tiny' install ramdisk is already
> 1376256 bytes big. So it won't fit on ye olde 1.2M floppy anymore,
> which is a one advantage of the 'tiny' floppy set.
>

I didn't mean that that's common solution, but when you customize
you can throw away unused utilities (sysinst?). Another thing that
as soon as you label you harddrive(if you got one) you'll get swap
besides those 2 Megs you got from memory disk, Oh that's plenty.

> Tricks can be pulled like using a gzip-filesystem, etc, but.. maybe
> next time :-)

I'd go with netboot. Or more memory:-).

Andrey


Andrew Gillham

unread,
Oct 3, 2000, 3:00:00 AM10/3/00
to
Andrei Petrov writes:
> Seems to me that the real win would be to use floppy based
> root file system. You'll get your MINIROOTSIZE back as memory.
> That will be slow though.

How about a fdisk/disklabel floppy + a kernel/sysinst/root tarball
floppy?


Stage 0 floppy:
INSTALL_BLAH kernel with minimum device support.
sysinst with only fdisk/disklabel/mount/pax/etc
(no networking on INSTALL_TINY)

Stage 1 tarball: (aka package?)
INSTALL_BLAH or GENERIC_BLAH kernel, no ramdisk
turns swap on immediately.
full sysinst and "boot strapping binaries"
full networking support.


The goal of stage 0 would be to fdisk, label, and make a disk bootable.
Then the root filesystem would be untarred, and the system should reboot
from the drive.

At this point stage 1 completes the installation via CD/nfs/ftp/http while
using swap and having no active ramdisk.

It would be easy enough to have a 4MB stage 0, a laptop stage 0, etc.
Then similar stage 1. It would be possible to have a stage 0 that works
on most machines if it doesn't include cardbus and other less stable items.
Then a more machine specific stage 1 could be used.

-Andrew


Andrei Petrov

unread,
Oct 3, 2000, 3:00:00 AM10/3/00
to

Uh, cool, I didn't think that far:-). That guy asked to boot.
--
Andrey


Gavan Fantom

unread,
Oct 3, 2000, 3:00:00 AM10/3/00
to
On Tue, 3 Oct 2000, Frank van der Linden wrote:

> On Tue, Oct 03, 2000 at 08:12:20PM +0100, Gavan Fantom wrote:
> > OK. Well the BIOS is reporting 3072K extended memory. Is this something I
> > should be able to tweak somehow, or does that mean I haven't much hope of
> > getting NetBSD onto this box nowadays?
>
> 3072 is 128k too little.. I have tested this, and it'll run out of memory.
> Try going into the BIOS setup and disable any 'shadow ram' settings.

Right. When you tested this, what happened when it ran out of RAM? Was a
message printed, or did the machine reboot?

Frank van der Linden

unread,
Oct 3, 2000, 3:00:00 AM10/3/00
to
On Tue, Oct 03, 2000 at 11:17:08PM +0100, Gavan Fantom wrote:
> > 3072 is 128k too little.. I have tested this, and it'll run out of memory.
> > Try going into the BIOS setup and disable any 'shadow ram' settings.
>
> Right. When you tested this, what happened when it ran out of RAM? Was a
> message printed, or did the machine reboot?

With 640 + 3072 it runs out of space when it's forking off disklabel
to label the disk you're about to install on. The main sysinst menu, etc,
comes up fine, but you can't finish the install. You'll get messages
like 'UVM: pid X killed, out of swap'.

- Frank


Henry Nelson

unread,
Oct 3, 2000, 8:31:37 PM10/3/00
to
> > > Which floppy image is recommended for booting on low-memory machines?
[...]

> Hardware problems are entirely likely, but the machine just rebooting with
> no message after loading the kernel isn't really a good indication as to

I was getting the exact same thing with an ancient 386 with 640+3360 KB
memory. "boot-tiny.fs" (1.4.2) worked well enough, but I had to install
from split sets on floppies since I couldn't seem to get the nic to work.

henry nelson

Manuel Bouyer

unread,
Oct 4, 2000, 3:00:00 AM10/4/00
to
On Tue, Oct 03, 2000 at 08:08:20PM +0100, Gavan Fantom wrote:
> Right. Is there a way to debug this with a bit more certainty? What are
> the common causes of an early panic? Presumably a triple-fault would most
> likely be caused by a lack of memory?

Possible, if it can't install the page table.

>
> OK, I just took another look at the machine. It's a 386, not a 486. Should
> still work though, right? It's an AMD chip running at 25 MHz, and there's
> a separate Cyrix-labelled floating point chip.

Should work as well.

>
> With the 2-disc floppy set, it loads the image (completing the line with
> the hex numbers), waits for about 2 seconds (decompressing? Or is that
> done on the fly?) and then reboots.

Did you try the boot-tiny.fs floppy ?
For sure the 2 floppy set won't fit in 4M.

Havard...@runit.sintef.no

unread,
Oct 4, 2000, 3:00:00 AM10/4/00
to
> With the 2-disc floppy set, it loads the image (completing the
> line with the hex numbers), waits for about 2 seconds
> (decompressing? Or is that done on the fly?) and then reboots.

The 2-disc floppy set will not have any hope of ever working on
4M machines.

The "small" version may also be too large for 4M machines.

1.4.2 has a "tiny" boot floppy; try that instead -- it's the only
one which has any hope of working. There's still a few manual
tweaks you will have to try to get it to work.

If you get sysinst to run and label your disk, you will need to
manually suspend sysinst, run "swapon" to enable swapping on the
swap partition on the newly partitioned disk before proceeding with
the extraction phase of sysinst. The gzip process needs sufficient
amounts of memory to exhaust available memory, and you'll otherwise
end up in a hang.

Lastly, you'll need to manually install the GENERIC_TINY kernel in
your root file system as "netbsd". The normal GENERIC kernel in the
kern.tgz set will not boot on 4M machines.

Regards,

- Håvard


Tim Walls

unread,
Oct 4, 2000, 3:00:00 AM10/4/00
to

That's a problem with the installer, rather than NetBSD 'not fitting'
as such. You just need to quit sysinst, partition the disk manually,
run swapon with your new swap partition, and then restart sysinst
to do the rest of the installation (or just do it yourself ;-).

I have 1.4.2 on a 3M+640k machine, FWIW, and it works fine. Don't
try X though ;-). (Although, I did get X working on this machine in
the days of 1.0, but I suspect these days it'd be practically
impossible.)

> - Frank

Ta,
Tim.

--
Tim Walls


John Hawkinson

unread,
Oct 4, 2000, 3:00:00 AM10/4/00
to

Perhaps the INSTALL kernel should try to detect when the machine has Not Enough
Memory and try to give some useful error and instructions rather than just
failing? [ i.e. give the user instructions on using the _TINY kernel ]

--jhawk


Manuel Bouyer

unread,
Oct 5, 2000, 3:00:00 AM10/5/00
to

If the machine reboot without message I fear the kernel won't be able to
do much. Maybe the boot loader could ?

--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel...@lip6.fr

{Net,Free}BSD: 22 ans d'experience feront toujours la difference
--


David Brownlee

unread,
Oct 5, 2000, 3:00:00 AM10/5/00
to
As a final 'Just dont go there' option, you could always use the
tail end of the floppy disk as swap space until you have the
disk partitioned and real swap added, then swapctl -d it :)

David/absolute
-- www.netbsd.org: A pmap for every occasion --

John Hawkinson

unread,
Oct 8, 2000, 3:00:00 AM10/8/00
to
In message <200010051...@antioche.lip6.fr>, Manuel Bouyer writes:
>On Wed, Oct 04, 2000 at 02:32:43PM -0400, John Hawkinson wrote:
>>
>> Perhaps the INSTALL kernel should try to detect when the machine has Not Enou
>gh
>> Memory and try to give some useful error and instructions rather than just
>> failing? [ i.e. give the user instructions on using the _TINY kernel ]
>
>If the machine reboot without message I fear the kernel won't be able to
>do much. Maybe the boot loader could ?

I don't see how that could work -- the boot loader shouldn't decide
based on the name of hte file, and there's no other way for the boot loader
to get capability information from the kernel.

I was hoping that the kernel could do this check before the point where
it failed.

--jhawk


Manuel Bouyer

unread,
Oct 9, 2000, 3:00:00 AM10/9/00
to
On Sun, Oct 08, 2000 at 01:53:14PM -0400, John Hawkinson wrote:
> I don't see how that could work -- the boot loader shouldn't decide
> based on the name of hte file, and there's no other way for the boot loader
> to get capability information from the kernel.

It knows how much memory is left once the kernel is loaded and decompressed.
Maybe it could print a warning if the free memory is below a limit.

--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel...@lip6.fr

--


Soren S. Jorvang

unread,
Oct 9, 2000, 3:00:00 AM10/9/00
to
On Tue, Oct 03, 2000 at 09:29:40PM +0200, Frank van der Linden wrote:
> If I get the time, I might see if I can pull some tricks (within
> the existing framework) to save some more memory.

Using unused "hole" memory would gain some amount of memory..


--
Soren


Gavan Fantom

unread,
Nov 13, 2000, 3:00:00 AM11/13/00
to
On Thu, 5 Oct 2000, David Brownlee wrote:

> As a final 'Just dont go there' option, you could always use the
> tail end of the floppy disk as swap space until you have the
> disk partitioned and real swap added, then swapctl -d it :)

Sorry to reply to such an old message - cleaning out folders again.

I did actually try putting in a spare floppy and doing swapctl -a
/dev/fd0[abcd]. All of these came up with Device not configured.

I tried the same thing on my NetBSD 1.4 workstation and had the same
result. Is the floppy device not capable of supporting swap?

0 new messages