Ubuntu 8.10 on a PowerMac G4 450 mhz

After buying a new MacPro and giving the old PowerMac G5 to my mother, I had a spare machine with no clearly defined role. I choose to give a try to Ubuntu on this PowerMac G4 450 Mhz.

This machine is now an 9 years old, but I never had any problem with it except that I had to change the power supply.

My previous experience of installing Ubuntu on an old Mac was performed on an PowerMac 7500 and was far from successful. This time I had no problem at all to install it.

Step-by-step guide

  1. Download the latest Ubuntu release for PowerPC (currently 8.10 Intrepid Ibex), be carefull to choose the alternate install CD (the other download is server version without a GUI)
  2. Burn the CD
  3. Start the Mac with the option(alt) key pressed down and insert the CD in the CD-ROM drive
  4. Choose to boot on the CD (the icon with the CD and a small pinguin on the bottom left)
  5. Follow the on screen indications
  6. I had a problem during the installation when the installer tries to detect my CD-ROM drive. In order to circumvent the problem I had to issue the following command in the second terminal (you access it with option+F1 key combination): modprobe ide-scsi You should ear the CD spinning in the drive and by restarting this step of the install this should go through.
  7. Take a break, the installation now goes till this end without a problem but last in my case 1 hour.

That’s it. As you see there’s no major challenge in this operation.

SVN on NSLU2

Goals

  • Have a central repository at home that manage the code I produce
  • Use material that I allready had or that is inexpensive
  • Consume minimal power

Hardware

Disclaimer

As always if something goes wrong and you destroy your hardware or lose some data, I cannot be held responsible. This said it worked for me 😉

Prerequisite

Your NSLU2 is correctly configured for your network. That is in the Web Interface under Tab Administration, sub-tab LAN, the IP address, network mask, gateway and primary DNS server fields are set.

Step-by-step guide

Installing the modified firmware:

  1. Download the latest Unslung firmware (currently 6.10 Beta)
  2. Install UpSlug2 on your Mac. If you don’t know how to install UpSlug2, on Mac follow the directions given here
  3. You can find the UpSlug2 under the following path /usr/local/sbin
  4. Shutdown the NSLU2
  5. Press and hold the reset button and at the same time press the power buton
  6. At the moment when the Ready/Status LED turn solid red, release the reset button
  7. You know that the NSLU2 is in upgrade mode when the Ready/Status LED in blinking red and green
  8. If you have more that one network interface (for example one ethernet and one wifi), you have to determine the one you use to connect to your NSLU2 (use ifconfig to see which interface get the ip address from your DHCP server for example)
  9. sudo ./upslug2 --device en0

    You should see your NSLU2 listed. (As mentionned in point 8 the --device is only needed to specify your network interface)

  10. Flash the NSLU2 with the Unslung firmware
    sudo ./upslug2 --device en0
    --image="/<path_to_the_firmware>/Unslung-6.10-beta.bin

Installing the necessary packages on the NSLU2:

  1. In the Web interface under tab Administration, sub-tab Disk (accessed by cliking on the Advanced sub-tab), format the USB2 flash key by cliking on the button Format Disk 2
  2. You know have to move the data from the internal flash to your USB flash key. This operation is called unslinging. In the Web interface under Tab Home, sub-tab Manage Telnet, click the button Enable Telnet
  3. Telnet your NSLU2 with the login “root” and password “uNSLUng”
  4. Enter
    unsling disk2

    and give a new password for the root account

  5. Reboot and reactivate telnet as described at point 2
  6. Telnet the NSLU2 and perform the
    ipkg update
  7. Install openssh so you don’t have to use telnet anymore
    ipkg install openssh
  8. Logout and login with ssh. Now you don’t have to enable telnet anymore. From now on we’ll use ssh that is more secure
  9. In the Web interface under tab Administration and sub-tab Users create a new user that is named “svn”. Be sure that you have checked the Create Private Folder (Share) check box
  10. Back to the ssh session install svn
    ipkg install svn
  11. If you’re lazy like me and don’t know how to use vi then install nano
    ipkg install nano

Configure SVN:

  1. Create the /svn/repositories directory with
    mkdir /svn/diretories
  2. Prepare the svn repository for your project
    svnadmin create /svn/repositories/<projet_name>
  3. (OPTIONAL) If you want to migrate a previous svn repository, then copy via the svn share the dump that you produce with
    svnadmin dump <repos_path> > project.dump

    (on the old svn instance). In the NSLU2 perform a

    svnadmin load /svn/repositories/<project_name> < project.dump

    You can now delete the project.dump file.

  4. Edit the /svn/repositories/<project_name>/conf/svnserve.conf such that the following lines appears
    anon-access = none    #no anonymous can login
    auth-access = write   #authenticated user are allowed to write
    password-db = passwd  #use the passwd file for authentication
  5. Modify the /svn/repositories/<project_name>/conf/passwd file according to the example provided in the file
  6. Create a diversion script to start the svnserve deamon. We will make a /etc/rc.d/rc.svn diversion’s script with the following content
    #!/bin/sh
    
    /opt/bin/svnserve -d
    
    echo `date '+%Y/%m/%d %k:%m:%S'` " : svnserve start" >> /var/log/svnserve.log
    
  7. Correct the script’s premission with
    chmod ugo+rx rc.svn
  8. Add the svnserve to your startup sequence. In order to do so add the following line
    /bin/echo  "Starting svn server:"; ( . /etc/rc.d/rc.svn )
    

    to your rc.1 diversion’s script. You can put it almost anywhere in this diversion but I recommend put it near the end. In my case I have it after the start of the rc.bootdisk‘s diversion.

  9. Reboot the NSLU2 to see if your rc.svn is taken into account
  10. The URL to connect to your svn server is something like svn://<user_name_from_passwd>@<server_address>/svn\
    /repositories/<projet_name>

Additional informations:

  • You have access to the linux hierarchy via the shared element named ADMIN 2. If you use the standard admin/admin password you can see the file there but cannot modify them.
  • The public share is located at /share/flash/data/public and has a mount point in the unix hierarchy at /public. The same apply to the svn share.

Installer SVN en local

M’étant mis en tête après la lecure de The Pragmatic Programmer, je me suis décidé à installer SVN en local sur mon Mac. Suite à quelques recherches sur internet, j’ai fini par trouver trois très bonnes sources d’informations.