User:Tonyr/Journal/Jul07

From FreekiWiki
< User:Tonyr‎ | Journal
Revision as of 23:43, 15 July 2007 by Tonyr (talk | contribs) (15jul07 section; yaboot options comments)
Jump to navigation Jump to search

05Jul07

Airport Extreme
New to me: Airport Extreme cards don't 'just work' in Ubuntu. The driver is bdm43xx, but special magic is required to get the firmware from Mac OSX installed in the right place in the file system. The process is documented at https://help.ubuntu.com/community/WifiDocs/Driver/bcm43xx/Feisty. It requires installing package bcm43xxx-fwcutter, and the documentation therein explains where to get the firmware source files from Mac OSX.

Wireless network selection
Also new to me: Kathey Sutter pointed out that when configuring the wireless interface, setting the ESSID to auto and enabling roaming mode will result in the network icon in the menu bar providing a list of detected networks to choose from.

11Jul07

iMac power button mechanical failure
Jake worked on an iMac that wouldn't power on. He discovered that the front face button was not travelling inward far enough to contact and press the interior button mechanism. Pressing the interior button directly would work, i.e. the machine would power up. We decided that something about the metal chassis area holding the interior button mechanism must have been deformed somehow, just enough to defeat the minimum tolerance required for the button assembly to work. We couldn't see exactly what kind of adjustment would be necessary to bring the whole thing back into alignment.

12Jul07

Using network proxy for update
Michael said we should be using a proxy for updating software, especially if there are many updates, or if any update package is large (several megabytes). If it's only one or two small packages, it probably isn't necessary. A case in point is the Feisty OpenOffice update that appeared a couple of days ago that was over 70MB, if I remember correctly.

The FG proxy machine is proxy.fglan, and it uses port 3128 for apt updates. A way to specify this is with an entry in /etc/apt/apt.conf, which does not usually exist by default in Ubuntu. The entry looks like this:

Acquire
  {
     http::Proxy "http://proxy.fglan:3128";
     ftp::Proxy  "ftp://proxy.fglan:3128";
  }

Alternatively the lines could appear without the enclosing brackets as

Acquire::http::Proxy "http://proxy.fglan:3128";
Acquire::ftp::Proxy  "ftp://proxy.fglan:3128";

I'm not sure the ftp line is necessary, but it appears in all the examples I saw. Synaptic has a proxy configuration option in it's own Settings->Preferences menu, but the settings file only shows up in /root/.synaptic aas far as I can tell, and wouldn't extend back to cover apt in general. I think that /etc/apt/apt.conf applioes to every utility that uses apt.

What this means for the MacBuild process is that /etc/apt/apt.conf will need to be created before the update is done, and removed after it is finished. This may perhaps be automated in the cloning process by doing a chroot to the target installation partition/directory and invoking aptitude dist-upgrade. This calls for an experiment.

13Jul07

That proxy business
Well, Martin has put in place something called Transparent Proxy, making all that proxy stuff in yesterday's post unnecessary. So it goes.

14jul07

Pricing
According th the store price list, the difference between the hd/mem configurations 40/512 and 20/256 is $25 ($20 from mem, $5 from hd).

Yaboot options
The FreekBoxen boot option for new user creation is implemented as a script in run level 3, one of the otherwise unused Debian run levels (run level 2 is multi-user by convention, levels 3-5 default to multi-user). The script uses the oem-config script provided by the oem installation option. MacBuild should implement both of these practices (oem installation and new user boot option).

Basiccheck
Basiccheck is a Ruby script and a file of test specifications. This whole thing can be adapted to the Mac environment by modifying the tests.

15Jul07

Yaboot options
Along with the new-user boot option, x86 based Ubuntu installations by default have a rescue boot option that boots into single-user (root) mode. The PPC version never has had that as far as I can tell. Why is that, do you suppose?

It is relatively easy to add a boot stanza to /etc/yaboot.conf: make a copy of the Linux stanza, change the label to rescue, and change the append line to be append="single". This by itself does not work, because the PPC boot environment does not behave the same way as the x86 boot environment. Ubuntu, as of release 6.10(Edgy) is using a new init system called upstart, which does not pay any attention to runlevels. An accommodation has been made by the devs to have a semblance of backward compatibility with the earlier runlevels convention. There is a ramification for selecting a runlevel from bootloader menus. Before release 6.10, a runlevel specifier could be added to one of the lines in a boot stanza in menu.lst (grub) or yaboot.conf that would be digested and acted on. Since 6.10, only single or S is recognized, otherwise only the "default" runlevel 2 is available, and in the PPC version, even that is broken. A bug <reference, please> has been logged about this at Launchpad. All is not lost, however.

In upstart runlevels are selected at boot time by the event script in /etc/event.d/rc-default. The distributed version of this script doesn't know anything about runlevels 0,1,3,4,5,6. I found a modification out in webland, and tweaked it a little. Here is the PPC version:

# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.

start on stopped rcS

script
        runlevel --reboot || true

        if grep -q -w -- "-s\|single\|S" /proc/cmdline; then
            telinit 1
        elif grep -qE -- "\<[0-6]\>" /proc/cmdline; then
            RL="$(grep -Eo -- "\<[0-6]\>" /proc/cmdline)"
            if [ -n "$RL" ]; then
                telinit $RL
            else
                 telinit 2
           fi
        elif [ -r /etc/inittab ]; then
            RL="$(sed -n -e "/^id:[0-9]*:initdefault:/{s/^id://;s/:.*//;p}" /etc/inittab || true)"
            if [ -n "$RL" ]; then
                telinit $RL
            else
                telinit 2
            fi
        else
            telinit 2
        fi
end script

The x86 version is slightly different. The line that contains telinit 1 in the PPC version can be telinit S in the x86 version. telinit behaves differently on the two architectures: in x86 it stops all non-critical processes, and in PPC it does not. In fact, in the PPC version, invoking telinit S hangs the system. Somebody knows about this, since man telinit specifically warns against using it in the PPC release.

There are still things wrong in this script. Runlevel 6 means reboot, so using runlevel 6 in a boot stanza would cause and endless reboot loop. In pre-upstart releases, the sysV style init system allowed for (undocumented) additional runlevels 7,8,9. The script above has remnants of that. The accommodating telinit used with upstart does not recognize runlevels 7,8,9.

It sure would be nice if there were a way to make yaboot offer a menu of boot options like grub does.

Once the modifications described here are in place, it is a simple matter to add other boot stanzas to /etc/yaboot.conf for other runlevels, specifically runlevel 3 for the new-user (oem-config) option.