What a better way to start, let's introduce you to on what this blog/website is currently host.. well, you already read it three times, on a Wii.
First of all, before writting my own explanation of how I manage to do that, I would like to credit Alex Haydock without who I wouldnt even had the
idea to make this site and especially, to host it on a wii.
You can find his "tutorial" right here with his own website
also hosted on a Wii (As the time as I wrote this post).
That said, let's start !
The Wii, for recall, is a Nintendo video game consoles released in 2006 and it's one of the most successful console of the brand, it manage to sold for over 100 millions
unit across the world and stay even today as one of the most well known familly consoles of the world. She's simple to understand (The "controller" is litteraly a remote),
fun to play, have a great catalog (With the Nintendo exclusivities), retrocompatible with the Gamecube, free online, some office functions (Sending Mail, see photos on a SD card, check News, Meteo and have a
free internet browser... already outdated for his time but that not the subject.
On a more technical level, the Wii is nothing more than a GameCube+, it share the same base and is just slightly upgraded (IBM Broadway instead of IBM Gecko for the CPU, who permit to switch from
486Mhz to 729Mhz for example).
Today, the Wii is especially known for it's principal gimmick, the motion control, and for it's Homebrew Community who keep alive the console with lot of.. homebrew and services like
WiiLink or Wiimmfi to precise only this two (I only had this two in head).
The point is, that the Wii is still followed and people still work on it for this or that, and one of the example is NetBSD.
You know linux/ubuntu right ? Everybody know's it today.. or I think
Anyway, NetBSD is an OS of Unix type (So really close from the Linux familly) who is known (For the people who know it) to be really portable.
Well, NetBSD will be what we will use as a new OS for our Wii. Why ? Because there's an official version made juste for her who'se still up to date, so With
this linux alternatives, we have our first step to host a web server.
Now that we know which OS we can use to host our server, it's time to see which device will host it. Yes a Wii of course but which one ? There's multiple Wii and, as a collector, I have a lot of them.
Luckily, I have some Wiis in my collection that I consider defective or just not usable for play.. but that doesn't mean they are dead!
I have two Wiis defective, two white Wiis, RVL-001 model (Gamecube compatible) with each one a button broken (One is the reset button, the other is the eject button)
but everything else work perfectly, read game, run, connect to internet, detect Wii remote etc..
I've chose the one with the eject button broken because this Wii will not be used for play and because the reset button can be useful as an en emergency shutdown (We will see why later)
Now, before entering in the world of NetBSD, we need to mod/hack our Wii (Oooouuh, that's illegal, oooouuh.... more seriously, yes, before continue you must modify your wii so it's good to know
that before starting).
To hack your Wii for this project (Or just to hack it), I highly recommend you the website Wii Hacks Guide; this website present the most secure
way to hack your consoles and is really up to date, don't use video tutorial, they are not up to date, they can be old and they can brick your consoles,
just follow well the guide provided and everything will be fine 99% of the time; trust me, you doesnt want to brick a console, even if it already broken like mine.
Once you have the Homebrew Channel installed and ready (And your NAND backup.. that's always good to have one), we can go to the next step.
So to summarize before continue :
Before starting, make sure you have a SD card for installing the image (In general, if you have already mod your Wii, you've used an SD card), this is where
the OS will be installed so make sure to chose one not too small. Personally I use a Micro-SD (With an SD adapter of course) of 64Gb, I think only a 32 can work fine too
but that's your choice.
And here we are now, let's prepare NetBSD.
First of all you need to download the Wii image of NetBSD on their websites.
Once this is done, we will need to write the image/iso on our sd card, I recommend to use Raspberry Pi Imager who do really well the work but I guess you can use
others tools like Rufus for example.
Once you downloaded Raspberry Pi Imager and your image, open the image with the tool, you will be prompted to chose on which storage the image will be written, select your SD card
You can also preset some settings in the tool but I recommend to not touch it, we will not (In theory) use Wi-Fi and we don't need to risk the password of the default root account.
Make just sure that the SSH is activated, even if we can activate it later, it's better to have it already.. ready.
Once everything is ready, launch the writting process and wait for it to conclude.
Yeaaah, if we use the Wii as a server it's a little bit important that it had internet access.. saddly, even if the Wii possess a Wi-Fi antenna, NetBSD doesn't seem
to recognize it and so, can't use it to connect to internet, which is a problem.
Fortunately, there is other solutions that I tested, the first is to use an external antenna or a Wi-Fi usb dongle who are compatible and you will need to set up
the daemon wpa_supplicant in local (Saddly, I don't remember exactly what to do here so I can't help much more), but I don't really advise to take this solution.. you
can take it if you want to have a little SSH access to your Wii to set it up, but if you plan to use it as a Webserver or on the long term, I will advise you to take
the second solution.
Why if you ask ? Well, I think you know that the Wii is not a supercomputer, not at all, you will see that for permit the webserver to run well we will need to shutdown
some daemon, and well, wpa_supplicant run, but is a big weight for our pour Wii, so it's better if we don't have it running.
The second solution is to use one of the official usb to ethernet adapter of Nintendo (I got mine for this experiment for 20€, maybe a bit expensive for what it is but it
will join my collection of stupid Nintendo accessories).
Using this is far more easy than to set up Wi-Fi connection, here you just need to plug it to the Wii, maybe doing a test connection in the Wii settings to be sure
that your device works well and everythings done ! NetBSD will recognise the device and will automatically connect to your network and to internet, so once we will launch it
we will be able to almost instantly connect in SSH to it.
I can't guaranty otherwise that all USB to ethernet adapter will work, I know that the one for the Nintendo Switch doesn't work natively with the Wii but maybe with NetBSD, that's a good question and I saddly didn't have the answer. But if you like me, you will certainly prefer to use the Nintendo one, it look's better and that's funnier... I think.
We talk we talk and now the writting process should be finished, once RaspBerryPi Imager inform you that it is, you can take back your SD card and go back to your Wii. The advantage is Raspberry Pi Imager alread organize everything in your SD card, so the Homebrew channel will instantly recognize NetBSD and will permit us to launch it.
So once you plugged back the SD card into the Wii, power it up and access the Homebrew Channel, if everythings has been done correctly, you should see NetBSD (With the little white flag on a Orange banner), you can click on it and launch it.
You should now see a loooot of line, sign that NetBSD are launching, I recommend that you plug a USB keyboard now. If you are prompted to login, congratulation,
everything work's fine, if you are not.. well, I don't know so maybe retry to write the image on your SD card.
Anyway, you can login with the default account, our dear root account (No password in theory but no SSH access too with it); I recommend that you immediately
create a non-root account but with his privilegies (I'm a computer-science student, but especially a CyberSecurity computer-science student so we will comme back later
on what I advise you to do to protect your dear Wii). Create an non-root account permit you to also connect in SSH, things who will be by far really useful if you want
to copy paste things.
So to create an account type this :
# useradd -m -G wheel accountName //Create the account. Wheel is the "sudo" group
# passwd accountName //Set the account password
You can now login with this new account and access root privilegies with the command "su". You can even login in SSH from your computer if you have your USB to ethernet adapter. Otherwise, you will be required to do some research on wpa_supplicant.
If your familliar with Ubuntu/Linux, you know that program with a package system, NetBSD too of course.. but it slightly different
To be short, the Packet Manager installed with NetBSD is not really really good