linux

Gentoo/MIPS Cobalt 2005.1 — Comming Soon, Watch This Space

Well I’ve fixed it. After a lot of arguments with my Qube2, I finally have a stage 1 tarball for 2005.1, with stage 2 and 3 tarballs on the way.

I’ll be uploading the stage 1 tarball shortly (tomorrow in fact, as QUT has a slightly faster pipe, and it costs me nothing to upload there), and will upload the stage 2 and 3 ones later as they are built.

I’ll also be uploading binpkg’s, for those who wish to just upgrade their existing Cobalts to the latest Gentoo release.

So yeah, Gentoo/MIPS Cobalt 2005.1 comming soon, to a mirror near you. ๐Ÿ™‚

Further glibc hell

I’m really beginning to dispise glibc, if I wasn’t doing so already.

For those trying to update their boxes from an existing 2005.0 installation, you should be fine now. glibc-2.3.5 was recently bumped to stable, as has binutils-2.16.1.

However, for whatever reason, catalyst doesn’t like me, or glibc. Thus stages are still in hiatus at the moment while I sort the issues out.

Cobalt/MIPS: glibc mayhem holds up stages

Hi All,

Those who are trying to update their boxes, may have struck problems building the latest versions of glibc. It appears, a bug in the binutils package, is causing the following error message to be spat out, and thus causes portage to bomb out:

/var/tmp/portage/glibc-2.3.4.20050125-r1/temp/ccyZTFe5.s: Assembler messages:
/var/tmp/portage/glibc-2.3.4.20050125-r1/temp/ccyZTFe5.s:131: Error: operation combines symbols in different segments

The build usually falls apart from there. This problem affects both 2.3.4 and 2.3.5. Currently, progress on building 2005.1 stages is halted due to this issue.

At the moment, I’m trialling binutils-2.16.1 (as opposed to 2.x.9x.x.x series, which have known issues), and there are plans to potentially mark it stable on mips. glibc-2.3.5 is a definate candidate for a bump to stable.

So, for those who have hit this problem… try upgrading using the following commands:

# ACCEPT_KEYWORDS="~mips" emerge =binutils-2.16.1
# source /etc/profile
# ACCEPT_KEYWORDS="~mips" emerge =glibc-2.3.5

If you’re paranoid, do the following, first, before attempting an upgrade:

# quickpkg /var/db/pkg/sys-libs/glibc* /var/db/pkg/sys-devel/binutils*

then store the resulting packages somewhere handy, as you’ll need them if you have to recover your system.

We hope to have the situation rectified in the very near future.

Regards,
Stuart Longland.

Cobalt 2005.1 Builds begin

Hi All,

For those wondering where the 2005.1 Cobalt stages are, read on.

I have just started updating my Qube’s portage tree. Once that is done, I’ll start making a seed stage (a crude stage 3 image) before the build commences in earnest.

As with last time, I’ll upload the binary packages during the stage3 build phase as they are compiled, these will go into my devspace.

Please note, the changes to CoLo with respect to menus. This release will have the newer CoLo loader, and the syntax has changed slightly. See my previous post on the topic for details… I’ll be updating the documentation as soon as I have arcload nutted out.

I’ll keep you posted. ๐Ÿ™‚

Cobalt Users: Moving to sys-boot/colo-1.16

Hi All,

I will shortly (i.e. probably this weekend) will move CoLo 1.16 into
stable (mips, currently in ~mips), and eventually remove CoLo 1.13 from
the tree.

In the newer release, the syntax for your CoLo scripts does change
slightly. In particular, the “menu” command (covered in the handbook)
has been changed to the “select” command. It differs, in that rather
than spitting out a text label, it spits out a numerical ID that you use
with the goto command. You’ll therefore need to update your scripts.

Below is an example of the old ‘menu’ command and the new ‘select’ command.

The old ‘menu’ command:

#:CoLo:#
 
lcd "Mounting hda1"
mount hda1
menu "Which Kernel?" 50 Working working New new
lcd "Loading Linux" {menu-option}
load /vmlinux.gz.{menu-option}
lcd "Booting..."
execute root=/dev/hda5 ro console=ttyS0,115200
boot

The equivalent script, using ‘select’:

#:CoLo:#

lcd "Mounting hda1"
mount hda1
select "Which Kernel?" 50 Working New

goto {menu-option}
var image-name vmlinux.gz.working
goto 3f
@var image-name vmlinux.gz.working
goto 2f
@var image-name vmlinux.gz.new

@lcd "Loading Linux" {image-name}
load /{image-name}
lcd "Booting..."
execute root=/dev/hda5 ro console=ttyS0,115200
boot

It is advised that you have a look at the documentation that’s
distributed with CoLo. I’ll advise you all once the update is complete.

Regards,
Stuart Longland

PreLinux now in Atomic Linux CVS

Hi All,
Been working on PreLinux lately… been learning lots about how to, and how not to, netboot a workstation… and so far, I’ve now got something that does something useful.

It’s now in Atomic Linux CVS (as I intend to use it for their install/live CDs). If you want to check my work out…

$ cvs -d:pserver:anonymous@cvs.atomicl.berlios.de:/cvsroot/atomicl login $ cvs -z3 -d:pserver:anonymous@cvs.atomicl.berlios.de:/cvsroot/atomicl co prelinux

It’s pretty simple… Adjust Makefile to taste, if you like, customise whatever files you like in root/ (e.g. you might like to replace the startup banner in root/etc/prelinux.d/banner), then run make. You’ll come out at the end with a file called prelinux which is your binary. You’ll need crossdev if you haven’t got an appropriate cross-compiler, and it uses the ebuild utility to fetch, unpack and patch a BusyBox tree.

Booting it, without parameters, drops you to a shell w/ init. This will be particularly of use with later netboot images for Gentoo/MIPS, as it has all the necessary components. Specifying noinit on the command line instead exec’s ash, allowing you to exec init yourself — this mode is mainly for working out exactly what commands are necessary in the script for the third mode. Specifying setup=http://some/script/file.sh tells PreLinux to download the mentioned script and execute it.

It is this third mode that I’m still trying to perfect. So far, an image made from a 2005.0 stage 3 tarball, boots fine. Ubuntu sorta boots, there’s some issues I still need to sort out… at the moment, I’m trying to see if I can netboot Knoppix via this method, as its bootup config is much simpler. (Ubuntu is straight plain weird, still trying to get my head around it) and I might look at what Gentoo LiveCDs are available too… if I can find one with X and some sort of desktop (Gnome, KDE, FluxBox, XFCE… I’m not picky) I’ll give that a try too.

The cross-compilation (for use with Gentoo/MIPS) has still not been tested yet, but I see no reason why it wouldn’t work. As well as testing that feature, I also have to work on handling dynamic libraries. For the moment, BusyBox is linked statically, as locating the necessary runtime libs seems to be a real issue. I could just do it the dirty way and assume they’re in /usr/${CHOST}/lib, but I’d rather not, and besides, this hasn’t worked all that well when I last tried it.

In short, there’s still plenty of hacking to do with this little utility, but I hope to have something useful shortly. Stay Tuned. ๐Ÿ™‚

WOOHOO!! Holiday’s at last

Well, I just finished my final end-semester exam for Semester 1, 2005… 6 exams in total (two maths, two electrical engineering, an IT software engineering exam, and a physics exam).

It’s a great thing to see the back of them now… as I can at last get to work on things that have been demanding my attention for some time now.

I’ve started work on a netboot-building system called PreLinux. It’s primarily designed to allow netbooting of diskless/semi-diskless workstations and allow distributions such as Gentoo, Fedora Core, Ubuntu and others run without needing to install them first.

The concept is this:

  • Inside an initramfs image, there’s a version of BusyBox and some basic tools, linked against ร‚ยตClibc, along with just enough driver modules to get the ethernet card and/or storage devices talking.
  • Once a means of downloading the root FS image is established, the system then attempts to connect to the network, and prepares the disk, formatting it completely as swap-space. As initramfs is paged to disk when not in use, it should be possible to run completely out of swap/RAM.
  • If a modules= kernel option is specified, it downloads additional modules to be extracted into RAM, and does further hardware probing.
  • The scripts then look for a root= parameter on the kernel command line. This is a URL to where to grab the image… e.g. http://foo/bar.tbz2, nfs://server/foo.tbz2 or cdrom:/blah.tbz2. This is extracted onto /.
  • The system then execs /setup.sh (from the downloaded tarball for /) which takes care of downloading any SquashFS/cloop images for /usr /opt, etc… and setting up any system-specific configuration settings for the booting machine.
  • Last step… /sbin/init is exec-ed, and Linux boots up like normal

This prodominantly for the Asperger’s Syndrome Support Network, as a means for netbooting their workstations for the Adult Computer Club… however, I’m also aiming to use this for Atomic Linux LiveCD, and for Gentoo/Cobalt-MIPS netboot images. Already, the system is more than capable of calling crossdev to make a cross-compiler suitable, cross-compiling BusyBox statically and cross-compiling a kernel complete with the initramfs — thus making it capable of providing netboot images good enough for bootstrapping Gentoo Linux. I have a prototype script that does some of the other idea too… it’s now just a case of putting it all together.

In short, watch this space. ๐Ÿ™‚

Going Full Circle — Linux Newbie, to Advanced User, to Developer

Ten years ago, if you had asked me where I was likely to be… what my plans were… chances are I would’ve responded along the lines of setting up my own software company here, and making software for a living. I hadn’t heard of Open Source, or Linux… I had heard of Unix, but had never seen or used it, and I was aware of only two platforms, IBM and Apple.

My, have things changed over that 10 years.

At the time, my father had recently been made redundant from Telstra (having been a communications engineer there for 29 years) and had gone back to university to study a post-grad IT degree.

Part of his course, dealt with this funny little Unix-like OS called Linux. He brought home a set of CDs, complete with Red Hat Linux 4.0, dragged out his old workstation (a 486 DX4 100MHz with 64MB RAM, previously ran Windows NT 4.0) and loaded it on. This was my beginnings with Linux.

At first, all I knew how to do, was to switch the machine on, log in, run startx at the prompt, and I discovered issuing the 3-finger-salute sent the machine into a shutdown procedure. (Very useful when you didn’t have root access) I used to fire that machine up a lot… largely to play the games that were available.

For the most part, I was fascinated by the games. xbilliard and xhextris in particular, as I had nothing like them on my Windows machine. (At this point, I had just upgraded to Windows 95, and was still trying to adjust) First time I ever saw the desktop in Linux (FVWM 2) my first comment was how much the task bar resembled Windows 95… until I realised that FVWM 2 got there first. Microsoft do like pinching ideas of others.

Anyways, it wasn’t long, before I was putting it on my machine. Initially, it was Red Hat 4.0, then later, 4.1. I managed to screw up my machine’s installed version of Windows 95 in the process, but soon I had mastered the concept of dual-booting.

Sometimes I came into uni, and helped out with the exercises — largely to do with routing and TCP/IP. The lab machines there ran some derivative of Slackware, sporting the FVWM 95 desktop, which I quite liked. It wasn’t long before I switched to Slackware on my desktop machine at home, and that’s where I learned the most about how Linux works.

From there, I ricochetted between several distributions… Red Hat, Slackware, Mandrake (briefly), Caldera, SuSE (before Novell took over)… Most of the time was spent running Red Hat or Slackware.

At this point, we also upgraded the Linux box… to a Pentium 120MHz w/ 48MB RAM. The old 486, then got a lesson in true Unix… it got a dosage of SCO OpenServer 5.0.4… which it still runs today.

This continued right up to around 2001, when I downloaded Slackware 8.0… on dialup, whilst trying to burn up hours. We were preparing to switch to ADSL, and I had clocked up some 800 hours on my account. In that time, I downloaded Slackware 8, Solaris 8/x86, Counter-Strike 1.3 (although I lacked Half-Life), and numerous other bits and pieces.

After running Slackware 8.0 happily for some time, I had gotten used to the concept of compiling stuff by hand. Anyways, we managed to get hold of Red Hat 8.0.

My, what a disappointment. No support for MP3 playback, RPM dependancy hell (Incidentally, I have heard Red Hat developers complain about RPM), and a stuffed up text console. BlueCurve wasn’t all it was cracked up to be either. I sorta got used to it… but there were things I didn’t like. Essentially, I had outgrown the distribution, and found it very fragile when I tried to bring in third-party apps. I spent more time wrestling with RPM than I did using the distro.

Eventually, it was back to Slackware 9.0. Sure, there was next to no package management, but that was okay… I knew how to compile stuff at this stage. I had also dabbled a bit in FreeBSD, and saw Ports which I liked emmensely. It was here (Slackware), that I stayed, and contemplated making my own, using some sort of Ports-like system for package management (later to be called Atomic Linux).

At this point, I knew quite a bit about how to use Linux, and regularly assisted others in using it. I was also starting to play with Linux on RISC architectures. We had bought a Gateway Microserver (cousin to the Cobalt Qube 2), which ran an ancient distribution of Linux based on Red Hat 5.0. (Kernel 2.0.37 or something — need I say more?) Anyways, needless to say, I decided to try upgrading the distribution by hand. BIG MISTAKE.

The distribution on this Gateway machine, was so out of date, I practically had to replace every single package on the system. Of course, once I replaced things like modutils it all turned pear shaped. I tried compiling kernel sources from kernel.org (which don’t work with MIPS), and failed… and managed to bugger up the module loading. So things like PPP didn’t work.

Upon restoring a backup… I reformatted the root filesystem, EXT3. I thought this would be fine, as it was backward compatable with EXT2. Wrong! The machine’s boot ROM is so primitive, it can only understand EXT2 revision 0. I had made a nice AU$400 MIPS-powered door stop.

I ended up trying out Linux From Scratch, which I ran for a couple of months. The aim of the experiment was also to figure out how to compile a distribution for the Gateway box. During this time, I also got a Silicon Graphics Indy. The intent was to follow this guide I had found on bootstrapping an Indy with Linux.

Well, in the end I didn’t go though with it… I found Debian had a MIPS port of Linux, and ended up running Debian Woody on both the Indy and the Gateway. Debian wasn’t bad on MIPS… but it really didn’t satisfy me. There were things that didn’t work right on the Gateway machine… and I was forever plagued with problems trying to build kernels on both machines.

On my desktop, I tried Gentoo on the recommendation of a few others. Damn… that scratched itches that I never knew existed! It wasn’t perfect… but it was the best distribution I had tried yet. So far, I haven’t left Gentoo.

I later discovered there was a MIPS port of Gentoo. This was before the Cobalt port existed. Needless to say, off came Debian, and I had printed out the handbook, and was sitting in front of my Indy, having netbooted it (at the time Gentoo pinched Debian’s netboot images) and was doing a stage1 install on it. Initially, I just left the CFLAGS unset… I figured I’d just keep things simple, then build up from there. It was bliss. ๐Ÿ™‚ I later tweaked the CFLAGS (to their present setting, -pipe -march=r4600 -mabi=o32 -O2) and saw a DRAMATIC improvement in the system’s responsiveness — much greater than I had seen on x86.

Kumba, then announced a port to the Cobalt server. This immediately purked my interest. At the time, my Gateway box was acting as a CVS server for the Atomic Linux project, but the moment we moved it to BerliOS, I took Gentoo/Cobalt for a spin. I did a stage3 this time… had all sorts of fun doing so… but eventually I cracked it. Once again… bliss… The machine was so much more responsive under Gentoo than it was under Debian, and for once, it was nice to have a common platform on all my machines. Not to mention, I finally got a hand-made kernel to boot on the damn thing. No more kernel 2.4.18… hello 2.4.22 ๐Ÿ™‚

It was some time later, the Gentoo/MIPS team were looking for someone to handle the Cobalt port, and the Documentation. I wasn’t sure at the time. I did assist a lot of people with Gentoo/MIPS, but wasn’t ready at the time to commit myself. Eventually (about 6 months down the track), I decided I’d test the water by maintaining the documentation.

One complete re-write of the docs later… and a crash course in using Catalyst… I’m filling both roles. I’ve gone full circle. Started out a newbie user… and have now been made a developer working for Gentoo.

The Linux community has let me gain HEAPS. Not just technical knowledge either. It helped my social skills, as I had to ASK questions, and it helped my research skills, as I had to go locate the information before asking. (People get justifiably upset when you don’t do some research first).

The latter two have applications in real life. Especially the social skills one. I have Asperger’s Syndrome, which affects my ability to communicate with others… Having to go out, and ask people, whom I’ve never met, how to do something has been great life experience for me.

So the open source community has helped me greatly along the way. Now, as a developer, I’m able to give back to the community. I’ve already done a complete re-write of the Gentoo/MIPS documentation… and up on my dev space I have stages and netboot images for use on Cobalt servers.

I hope to continue this work for much time to come. What comes of it, I don’t think anybody can say, but for the moment, I intend to keep at it. I’m having fun here, doing something practical, and of use to the community overall. Unless things suddenly change for the worse, I don’t see myself leaving any time soon. ๐Ÿ™‚

In a way, I’ve thrown away the old dream of running my own company… but in a way, I’ve succeeded. I’m freelance now, working on a number of opensource projects, and under my own terms. Sure, there’s no money involved… but it’s practical experience, which may be useful when I do get to the stage of getting a paid job. I’m hoping my job, will also involve one of my primary hobbies. I’ve had a lot of fun in the open source community, and hope to continue to do so, in the distant future.