• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

NetBSD 5.1 suitable?

beachycove

Well-known member
I am finally getting around to doing something unix-based with one of my 2x604e machines, in this case probably the 9500 with a 200MP card in it from a 9600.

I have looked at a number of options, from YDL to Debian, but am inclined increasingly to NetBSD because it seems to be designed to work on lowend (in fact, virtually any) hardware. Linux seems to me to tend, like everything else these days, towards the i7 world and such, which means it is little use/ interest to me. For that hardware I have OSX.

Before this UNIX newbie gets started and gets the usual headache attempting the installation — to be attempted most likely over the Christmas break — I thought I would ask for an informed views of the feasibility of this plan. Is a NetBSD 5.1 installation on a dual 604e PPC machine, intended for a further installation of WordPress or possibly a basic Drupal installation, a good idea or a very bad idea?

The machine doesn't need to be able to do heavy-lifting, but it does need to be secure and capable of actually running the intended software for a small number of hits/day. It needs to run a blog, though very modest extension is also possible (hence I am wondering about Drupal). I see that remarkably current packages of both are available for the PPC port of NetBSD.

Yes, I know about Old and New World machines, and that is not my question. My question is whether it will work or am I wasting my time/ needing a G4 minimally to run the software acceptably?

 

ChristTrekker

Well-known member
I was not able to get NB5 to recognize the 2nd CPU in my dual G4, so I ended up putting Linux on it. But that was my first attempt at installing NB on PPC (I've done mac68k numerous times and x86 a couple times), so maybe there is something I did wrong, or maybe it is just a support quirk with that model. Perhaps johnklos will chime in on this one.

 

ChristTrekker

Well-known member
I knew that at the time (Aug 2009) but had since forgotten it. Looking back at my mailing list posts, I may have been having other issues.

 

ClassicHasClass

Well-known member
I use NetBSD for my Power Mac 7300 and have done since '03. Works fine, decent performance (although it has a G3 in it). SMP is part of recent kernels now.

 

Gorgonops

Moderator
Staff member
I have looked at a number of options, from YDL to Debian, but am inclined increasingly to NetBSD because it seems to be designed to work on lowend (in fact, virtually any) hardware. Linux seems to me to tend, like everything else these days, towards the i7 world and such, which means it is little use/ interest to me. For that hardware I have OSX.
Perhaps a little late to chime in, but... since you're describing yourself as a "Unix N00b" I'd suggest reconsidering Linux before going with NetBSD. The thing about Linux and "low end" machines is the real *core* of Linux still runs fine on those boxes. It's certainly true that Linux these days is associated with fancy-pants 3D desktop environments that suck up as much CPU as Windows or OS X, but strictly speaking those are not *Linux* and to be pedantic, well, if you really wanted to you can bring a machine running NetBSD similarly to its knees by installing said environments on it.

(Truth be told NetBSD would certainly perform *worse* under those circumstances because chances are there will be less hardware acceleration thanks to NetBSD lacking drivers that Linux has for fancy/cutting edge video cards.)

A "server" install of Debian (IE, do *NOT* install the default GNOME-based desktop environment!) takes up about as much hard disk space as a full-set-of-base-packages NetBSD install and will perform similarly. (I recently set up Debian on a very old and creaky 200Mhz Pentium lunchbox and it works just fine.)The reason I'd suggest you go with Debian is that installing the packages you want will simply require network access and a few "apt-get install" statements, and keeping them up to date in the future will likewise only require regular "apt-get update ; apt-get upgrade" sessions. I may be being somewhat unfair since the bulk of my NetBSD experience is about ten years old at this point (although I have just this year set up NetBSD a Sparc64 Sun box and gone through all the motions to make it a full desktop environment so I'm not *completely* rusty) but unless they've improved the packaging system a *lot* (and I haven't really seen evidence of it on my Sun box) it's *really a pain* to keep a NetBSD box current. Doing an in-place upgrade on a running system has always felt (with good reason) like an open invitation to disaster, which I suppose explains why most of the people I know who run BSD, Net or otherwise, tend to install a box once and let it rot apparently assuming that they'll be immune to attacks because nobody will specifically target such an obscure platform. Which may well be true, and letting your system rot will give you great uptime numbers, but frankly it seems to me a bad practice.

NetBSD has its good points, don't get me wrong. The reason it's known for running on tiny/obscure platforms is it has a nice clean code base and the drivers are well engineered and use abstracted interfaces so a driver that works on one port will usually work on another system even if the CPU and bus architecture are vastly different. (Linux developers have a bad habit of writing drivers targeted to a particular architecture/implementation which require "deep hacking" to get working on another platform with a different bus structure, leading to a fair amount of redundancy/duplication in the source tree. They *are* getting better about it, slowly.) If you're looking at an OS for some embedded computer development project I'd recommend it, but... I really just can't for a server. Been there, done that, got the tee shirt.

If nothing else a strong argument for Debian is that there are oodles of trivial recipes out there telling you what you need to install to make a Debian box into a web server. NetBSD isn't going to be that different, I'll grant you, but if at any point you get lost with Debian you'll have a web full of answers to turn to for help. (The Ubuntu support forums are a very helpful resource and nearly everything in them applies to plain Debian as well as Ubuntu.) NetBSD you're going to be on your own, pretty much. Obviously the commands you use to install everything in the first place will be unique to NetBSD, and a NetBSD box needs some careful prep before you start installing software at all. (Read the documentation for the NetBSD pkgsrc tree *very carefully*) You'll need to decide whether to go with the "stable" or "current" package tree (hint, don't bother with "stable", it isn't), how much you're going to rely on binary packages or if you'll use them at all (whether or not you can depends a lot on how well your particular platform is maintained), you'll need to figure out if you intend to track the NetBSD source and do OS builds to patch security holes, try using the weird and spooky binary updating system (which is half-arsed and I wouldn't trust on anything but x86), or ignore security/bug fixes entirely (the default), etc, etc. And after you do get everything installed all the paths to the installed software and their config files are going to be different relative to most of the documentation floating around out there, the mechanisms for starting and stopping services are different... you get the idea.

Anyway, that's my jaded take on it. The one thing I don't know is how well Linux actually runs on Beige macs these days. It's been about as long since I did that as it's been since I supported NetBSD as a server platform. Judging from the sparse mailing list traffic it appears SMP for dual 604s doesn't work on NetBSD while in 2006 at least Linux *did* work. (The note in there about booting OS 9 screwing up the second CPU is interesting...) So, it that's the current state of affairs Linux already wins since if you're going to be running a 200Mhz CPU you might as well have two of them.

As for whether the machine will actually do what you want, IE, be a competent server for a blog, well... my guess is it will hold up to a few simultaneous hits acceptably, but you'll have to install it and try it to really know. I would suggest placing a carefully crafted robots.txt text file in your web root to make sure nothing automated starts combing links that require a lot of CPU to serve, however.

 

johnklos

Well-known member
Sorry I disappeared for a while!

Regarding what Gorgonops wrote, my problem with GNU/Linux (and note that I'd LOVE to be wrong) is that it's very poorly supported on non-x86 and non-amd64 architectures. Sure, you can get distros which are a few years old, but how much time do you want to spend trying to figure out how to get x86-specific patches to work on PowerPC to get modern enough to get past security issues? Or are you, as some suggest, going to just hope that those security issues are never tested?

NetBSD is new on all platforms. 5.1 just came out, and all of the non-architecture specific pkgsrc packages compile and run on all architectures. (Things like Java VMs are the kinds of things which are architecture specific... so much for write once, run anywhere!) Gorgonops brings up some interesting points, but they're mostly moot - NetBSD has ways of doing things which are either painfully simple, but take more time (like building everything from source), or kind of brute force (download yesterday's entire OS build, which is typically less than 100 megs without X, and untargzip everything except etc.tgz, and the system is up to date). Gorgonops - I didn't even know NetBSD has a binary patching system! I certainly wouldn't trust anything like that that isn't part of the official OS from NetBSD, anyhow.

As far as paths being different from documentation, that's partly what drove me from GNU/Linux to NetBSD in the first place. Back in the day I had Red Hat (some version) on m68k on one machine, and the same version on an x86 box. Everything was peachy. The new version of Red Hat came out, and I tried it on the x86 box, and it was a huge mess - there were files in multiple places, some which matched the older system, and some which came with the newer. I couldn't make sense of anything, plus the newer version wasn't available for m68k. It turned out that running things like Samba, Apache, wu-ftpd, and others were more consistent on AmigaDOS than they were on GNU/Linux! Anyhow, pkgsrc makes it all very consistent - even if the docs tell you to use some bizarrely different path (/opt/etc/, for instance), pkgsrc fixed all of that for you. You just need to decide where you want all your third party software installed, and it's all automatically done for you. I, for one, use /usr/local/ instead of /usr/pkgsrc/, for instance.

Gorgonops - the starting and stopping daemons issue is easily fixed. In your /etc/mk.conf (which is where you set your pkgsrc base, too), just put "PKG_RCD_SCRIPTS=YES", and all of the rc.d scripts get installed automatically. Then, just edit /etc/rc.conf and put configuration options for each daemon. For instance, Apache's is nothing more complex than adding "apache=YES" to /etc/rc.conf. Starting and stopping is done by running /etc/rc.d/apache start or /etc/rc.d/apache stop (or restart, or reload, or status, or others).

pkgsrc has gotten a lot betterregarding updates. Your best friend is pkg_rolling-replace. You can only really fault the naming scheme, if you ask me. To update all of your pkgsrc software to the latest, just cvs update your pkgsrc tree, then run pkg_rolling-replace -ru and let it run.

You can run WordPress, Drupal, Joomla, or others on NetBSD just fine. A 200 MHz 604e would be a bit modest if you get lots of hits, but I have dozens of blogs (a mix of all three, plus a few other kinds) hosted on a PowerMac 9600, and while my 9600 has a 1 GHz G4, for years it had a 400 MHz 604ev.

Regarding SMP, New World SMP is supported and pretty well tested. ChristTrekker - you just need to get the MP kernel. However, Old World SMP is broken, and although I have a dual CPU 604e card, I haven't had time to do any testing myself. Sure, you can run GNU/Linux from 2006, but would you want to?

The bottom line is do you want to try to maintain an OS where everything non-x86 and non-amd64 is treated as second-class, or do you want to have an OS which is kept up to date for all architectures? Some people don't see that as a problem at all, but I personally got tired of people dismissing my problems as unimportant because I wasn't running the same thing they were.

Just my two bits.

 

johnklos

Well-known member
BTW - if you or anyone else would like a shell on my PowerMac 9600 running NetBSD, let me know. It had a year of uptime before it moved to a new datacenter this September, then was rebooted again last month to install a proper high capacity UPS, so it's safe to say that it's wonderfully stable.

 

Gorgonops

Moderator
Staff member
Just a few points... not to argue, really... of all the idiotic "My OS is bigger than yours" arguments you can have the ones between "BSD people" and "Linux people" are the worst, but...

my problem with GNU/Linux (and note that I'd LOVE to be wrong) is that it's very poorly supported on non-x86 and non-amd64 architectures. Sure, you can get distros which are a few years old, but how much time do you want to spend trying to figure out how to get x86-specific patches to work on PowerPC to get modern enough to get past security issues?
I wasn't suggesting they go out an install some "old version" of Linux. Debian is reasonably well maintained on PowerPC from all the evidence I can find on the subject and it has release parity with the x86 version. (IE, Debian Lenny, 5.0.7, released 11/27/2010 supporting 12 architectures.)

To some extent your objection here comes across as FUD. I know Linux has this bad rep when it comes to non-x86 platforms, but the fact is that a Linux-kernel based OS is now outselling iOS in the ARM-based mobile phone market so they must be able to handle a little more than i386/x86-64 semi-competently. Debian worked fine on the last Sun box I tried it on, and I've also run a Debian variant on my R4400 Indy within the last five years or so. Linux works on non-x86 platforms, and while PPC Linux hasn't gotten much press recently (mostly because of the whithering on the vine of most of the remotely mainstream sources of PPC desktop and server hardware) PowerPC is still possibly the *best supported* non-x86 "big computer" architecture Linux runs on. So I think you're reaching a bit when it comes to the cross-platform-ability business.

Linux's biggest flaw in my opinion when it comes to the oddball platforms is in documentation. Linux "works" on a lot of things but actually getting it installed and bootstrapping is where you hit the wall on the weird stuff. NetBSD's installation documentation is a *lot* better, I won't deny that.

Gorgonops brings up some interesting points, but they're mostly moot - NetBSD has ways of doing things which are either painfully simple, but take more time (like building everything from source), or kind of brute force (download yesterday's entire OS build, which is typically less than 100 megs without X, and untargzip everything except etc.tgz, and the system is up to date)
And this is better than a system that does intelligent version checking automatically and downloads appropriate packages... how?

As far as paths being different from documentation, that's partly what drove me from GNU/Linux to NetBSD in the first place. Back in the day I had Red Hat (some version) on m68k on one machine, and the same version on an x86 box. Everything was peachy. The new version of Red Hat came out..
There's your problem, you're basing your opinion of Linux on Red Hat. Red Hat for all the numbered pre-Fedora/Enterprise split versions was always incredibly inconsistent, particularly when it came to the configuration directives stored in the /etc/sysconfig directory. It was really a horrid mess even in its last days. (And Fedora still is a horrid mess. Enterprise... could be worse.) But, as I'm sure you've heard before, a singular distribution is not "Linux".

Gorgonops - the starting and stopping daemons issue is easily fixed. In your /etc/mk.conf (which is where you set your pkgsrc base, too), just put "PKG_RCD_SCRIPTS=YES", and all of the rc.d scripts get installed automatically. Then, just edit /etc/rc.conf and put configuration options for each daemon. For instance, Apache's is nothing more complex than adding "apache=YES" to /etc/rc.conf. Starting and stopping is done by running /etc/rc.d/apache start or /etc/rc.d/apache stop (or restart, or reload, or status, or others).
I'm aware of how to work the rc.conf system in NetBSD. (It's essentially the same as FreeBSD's, which the bulk of my soul-scarring BSD experience since 2002 is with.) Perhaps I'm a little embittered from my experience back in the old days prior to that system being developed. 1.4 was still the "release" version when I started dealing with it, and it took *quite a while* before packages were fixed to work with system introduced with 1.5, which in many ways is a close copy of the System V init system that most Linux distributions newer than Slackware use. And should I fault NetBSD for being inconsistent for adopting something more elaborate than the BSD 4.4 system? It was a major *change*, after all, and there was a long period in which at least two completely different methods for starting and stopping services was in play. How Linux-y...

Anyway, my point was that there are scads of HOWTOs out there for getting a LAMP server running on the "L" part of the acronym. Is it simple enough to translate those instructions to NetBSD-ese? Sure, if you know NetBSD. The OP does not.

pkgsrc has gotten a lot betterregarding updates. Your best friend is pkg_rolling-replace. You can only really fault the naming scheme, if you ask me. To update all of your pkgsrc software to the latest, just cvs update your pkgsrc tree, then run pkg_rolling-replace -ru and let it run.
And wait a few days. And hope your system doesn't self-destruct its dumb self half way through it.

(And yes, that's me being old and embittered again. I just recall way too many incidents of having to fix people's machines (they were of course way too busy being ENGINEERS to do it themselves) in which a bulk pkgsrc build crashed after it'd de-installed half the software on their computer in a vain attempt to sort out dependencies. In my opinion the only safe way to compile packages on NetBSD is to do it in a chrooted environment, and if you're spending that much effort building packages you'd better be able to leverage that investment over a whole herd of machines. To maintain just one it's stupid busy work unless you have no other alternative.)

Maybe it works perfectly every time now. If it does, well, happy motoring.

Regarding SMP, New World SMP is supported and pretty well tested. ChristTrekker - you just need to get the MP kernel. However, Old World SMP is broken, and although I have a dual CPU 604e card, I haven't had time to do any testing myself. Sure, you can run GNU/Linux from 2006, but would you want to?
Again, where did I suggest they run Linux from 2006? (Pardon the length of this reply at this point, but this is the one thing I'm a little annoyed about... it seems like you're dying to put words into my mouth that I did *not* say. If the only source of Linux for PowerPCs was some creaky and completely abandoned 2006 version I wouldn't recommend it as an alternative.) I was just noting that the date on the blog post saying it worked was from 2006, and I have no way to test as to whether it works *now*. But unless something has changed which has *broke* it theres' no reason to presume it doesn't work on a modern kernel. You just said that Old World SMP is *definitely* broken on NetBSD, so... seems like it'd be worth at least *trying* Linux first, eh?

The bottom line is do you want to try to maintain an OS where everything non-x86 and non-amd64 is treated as second-class, or do you want to have an OS which is kept up to date for all architectures?
So, the "OS is kept up to date for all architectures", in the sense that the base packages all build out of the same source tree and they throw tarballs that boot on at least some machines of that architecture up on the ftp site, but it's *really* a stretch to imply that every architecture gets the same amount of "lovin'" on NetBSD. (Some of the ports seem to be pet projects maintained by literally one person.) I'm not sure how reassuring that really is in practice. And again, I think your allegations so far as they apply to PowerPC Linux are a little dirty-pool... it's not like we're discussing the best OS for something really ancient like an m68k Macintosh... the Linux community has clearly lost interest in some of those old dead platforms. PowerPC isn't there yet.

Anyway, this is all besides the point. My reasoning for suggesting Debian was *assuming the software installation went ok* (I don't know if it would or not, again, haven't touched a Beige PPC mac in the better part of a decade) Linux might be a better choice because:

A: Once the OS is installed and the machine has net access installing the software the OP wants to try will take about as long as it takes to download it;

B: There are oodles of HOWTOs out there describing how to set up the environment the OP wants on Debian-based Linux-i, so getting up and running wouldn't require the OP to exert much effort; and

C: There is at least a chance the second CPU in their DP machine might work.

If Debian turned out to be a complete faceplant fail, either because it won't work on the machine or because even with two CPUs the machine is too slow to do what they want then they haven't wasted anywhere near as much time as they might of if they'd started with NetBSD and subsequently hit a wall. (I figure a healthy way to approach a task like this is to see if the chainsaw will do the job before breaking your back swinging an axe or pulling a saw. Debian is the chainsaw approach to this. It's not "elegant", but if it works who cares?)

 

johnklos

Well-known member
Gorgonops - I agree with most of what you're saying. If Debian is up to date on PowerPC, then you're right - it'd likely be a good and not very difficult experience. I've always liked Debian best of all the GNU/Linux distros, if for no other reason than that they have a philosophy behind them, and that implies that their decisions are not necessarily gratuitous (some distros NEED to be different from others, so they change things with no good reason sometimes), but instead have reasoning behind them which makes sense. Modern Debian would certainly be preferred to older and no longer updated Yellow Dog, Ubuntu, or whatever.

Regarding your experiences with NetBSD, yes, they're out of date. pkg_rolling-replace avoids the exact situation you mention.

One important point I'd like to bring up is that if someone new to the Unix world wants to learn Unix and Unix-like OSes, NetBSD is an excellent way to go. If one wants to learn GNU/Linux and the GNU/Linux way of doing things, which is very often not translatable to other Unix and Unix-like OSes, then GNU/Linux is a good way to go.

 

johnklos

Well-known member
Just a few notes which are relevant to this particular site - a while ago I wanted to play around with GNU/Linux on an m68k machine (I had a spare Quadra 610 I was planning to use), but the state of things in m68k land were very ill defined. Bootstrapping sounded like something out of Alice in Wonderland, only less elegant, even with the suggestion of making a snapshot of someone's (somewhat) working system. I bugged lots of people about this, and maybe they got sick of hearing me, or maybe they just finally got some round tuits, but they've been working very hard on m68k Debian lately.

I'd love to see a time when m68k rejoins the list of architectures which Debian supports.

 
Top