# Install BSD on a Qube 3?



## matholwch (Apr 21, 2011)

I recently picked up one of these on an impulse buy off ebay and while it is set up as a Strongbolt web server at present I would love to use it as a very cool looking home server/NAS - someone on another forum suggested that BSD would be an ideal OS to put on it, but due to the Qube's slightly unusual boot method I'm wondering if was possible to install it?

If your not familiar with the hardware the spec is listed here:
http://en.wikipedia.org/wiki/Cobalt_Qube



> The original Qube systems were equipped with RM5230 or RM5231 microprocessors but later models used AMD K6-2 chips. NetBSD operating system has been ported to both, the Cobalt Qube and RaQ.



I can find a _NetBSD_ port for the older MIPS based Qube 2 but nothing for the i386 based Qube 3
- is there a particular reason why, or is it simply that nobody could be bothered!

If not, could I suggest that someone with coding skills vastly superior to mine might like to consider it as a project - there is a sizeable usebase for these little boxes and this would give them a new lease of life!   

Regards,
Jeff


----------



## SirDice (Apr 21, 2011)

matholwch said:
			
		

> I can find a _NetBSD_ port for the older MIPS based Qube 2 but nothing for the i386 based Qube 3
> - is there a particular reason why, or is it simply that nobody could be bothered!


This is a FreeBSD forum, not a NetBSD one.

http://www.freebsd.org/doc/en_US.ISO8859-1/articles/explaining-bsd/article.html#AEN183


----------



## matholwch (Apr 21, 2011)

Thanks for taking the time to reply - 
Does this mean that FreeBSD doesn't run on a Qube 3 either or that you don't know the answer?

Jeff


----------



## OH (Apr 21, 2011)

Everybody supports i386, you're probably overthinking it

Edit: Reading below, obviously I'm oversimplifying it. Looks like a fun project to try though.


----------



## matholwch (Apr 21, 2011)

> Everybody supports i386, you're probably overthinking it



Are you saying that the i386 port of FreeBSD *will* install on a Qube 3?

Have you any links or instructions I could follow, something similar to:

Installing Debian Linux on a Qube 3

Thanks,
Jeff


----------



## wblock@ (Apr 21, 2011)

Yikes.  There was some success with NetBSD reported on the mailing list: http://sourceforge.net/mailarchive/...ster1.charter.net&forum_name=cobalt-rom-devel

This happened long enough ago that the details link is gone, but remains in archive.org: http://replay.web.archive.org/20080125063828/http://webpages.charter.net/dbarnes3367/PC/RAQ/

That type of procedure may work for FreeBSD also.  It may be more practical to jam a mini-ITX or nano-ITX motherboard into that case.


----------



## matholwch (Apr 21, 2011)

Many thanks for digging that up - unfortunatly he doesn't seem to have been successful.

From how long ago was this?
Jeff


----------



## wblock@ (Apr 21, 2011)

There's a 2007 copyright on the bottom of that second page.


----------



## Zare (Apr 21, 2011)

I've never heard of device before. So what I grasp from articles posted here, thing has a custom ROM that's able to boot Linux kernel under certain conditions (exact partition layout). I don't think it's even possible to directly boot another system on this particular device revision, without modifying the firmware itself. Simplified, ROM has the basic functionality of GRUB - to boot the Linux kernel - and no other functionalities regarding hard disk bootstrap. 

FreeBSD's boot mechanism is quite different than Linux one. You can read about it here. 

However, thing also has a PXE boot. As described in that Debian article, you can use serial console to enter ROM menu from where you can initiate network boot. You can probably get FreeBSD kernel to boot over PXE. If it panics - tough luck, drivers may not be available/work, etc. But if it manages to work, boot live environment, manually partition drives, install userland, e.g. do a manual install without kernel, then use same FreeBSD kernel with root target modified to local hard drive, and boot it from PXE.

That way, you'll have to boot over network, but the userland itself will be on local hard drives. As I understand this device, and I have no previous experience whatsoever, it's your only choice.


----------



## tingo (Apr 22, 2011)

The suggestion here might also work: http://www.mail-archive.com/cobalt-developers@list.cobalt.com/msg00308.html
Like this:
- make a small ext2 fs
- copy the FreeBSD bootloader (gzipped) onto it, and name it ./boot/vmlinux.gz
- make a FreeBSD slice, and install everything as normal for i386
- hope that it works.


----------



## matholwch (Apr 22, 2011)

> Like this:
> - make a small ext2 fs
> - copy the FreeBSD bootloader (gzipped) onto it, and name it ./boot/vmlinux.gz
> - make a FreeBSD slice, and install everything as normal for i386
> - hope that it works.



I can see why that might work.
This is probably me asking stupid questions; 
Where do I get the FreeBSD bootloader from?
The Qube normally installs over a network from a second PC, how do I install 'as normal' this way?
Would it work if I took the drive out of the Qube - put it into a USB caddy and copied the files onto it then put the drive back in the Qube?
Thanks for the reply,


----------



## tingo (Apr 22, 2011)

matholwch said:
			
		

> I can see why that might work.
> This is probably me asking stupid questions;
> Where do I get the FreeBSD bootloader from?


From another FreeBSD machine, /boot/boot.


> The Qube normally installs over a network from a second PC, how do I install 'as normal' this way?


Somebody already answered that in this thread: do a PXE network install.


> Would it work if I took the drive out of the Qube - put it into a USB caddy and copied the files onto it then put the drive back in the Qube?


Well, that is what I would try if I had such a machine.
Note: all the steps are still necessary.


----------



## Zare (Apr 27, 2011)

Let's go over this again. boot0 or any other chainloader calls boot1 that can find boot2 that can find loader, which constructs and executes FreeBSD kernel. Neither of these executables are in ELF format. "boot" files are in pure architecture code, and this device won't run those at it's disk based boot.


```
gzipped, staticly compiled ELF executable called <ext2fs>/boot/vmlinux.gz, the
firmware will try to boot it.
```

You'd need /boot/loader in ELF format to boot off disk. Therefore;

- take the disk out, insert it into another FreeBSD machine and perform disklabel/partitioning/manual base installation 
- throw it back into Qube
- prepare a PXE image with kernel's root FS option pointing towards physical drive's dev entry in Qube, and then boot over network


----------



## wblock@ (Apr 27, 2011)

Maybe the BIOS boot will load a syslinux or grub bootloader, either which can load the FreeBSD kernel.  PXE is an alternative, but this little system is made to be a server itself.  Requiring another server just to boot limits its usefulness.

For the really motivated, the BIOS source is available under GPL.


----------



## Zare (Apr 28, 2011)

GRUB's stage1 serves the same purpose as our boot0. Yes, GRUB can load our /boot/loader but its stage1 is boot sector code which this thing won't run out of the box.

I really don't know if its possible to create a statically linked FreeBSD kernel. AFAIK about Linux, its images have two segments - small one that needs to be placed in conventional memory area, and big one that goes above 1 MB. So you'd also have problems with relocating and running the kernel.


----------

