Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HOWTO: Changing APT to point to debian archives
#1
Hello,

The linux distribution used on the power PC based PowerPMAC is debian Lenny and it has been out of the support chain now for years. When I first started using hte PPMAC I could go out and install a package or two that I liked or needed for a particular thing I needed to do. For some number of years the main archives have been down. Here is how to get back to where you can install software using apt-get once again:

First make sure you have a backup of your disk image (if not stock), some of these steps if done wrong will botch your system up.

First log into your system as root, using puTTY or other SSH shell and make your root disk writeable:

# mount -o remount,rw /

Next, edit your /etc/apt/sources.list file to point to the archived repository. In this example I will use the editor called pico.

#pico /etc/apt/sources.list

<Add the two lines shown below>

deb http://archive.debian.org/debian/ lenny contrib main non-free
deb http://archive.debian.org/debian-security lenny/updates main

<comment out all other lines referring to other deb sources>
<save file with CTRL-O, confirm save, and exit with CTRL-X>

#apt-get-update

<The above seems needed to get the new soruces referenced>

#apt-get install debian-archive-keyring

<answer yes to installing unverified package, 2 new RSA keys shoudl have been copied....>

<install your desired package, in my case, gdb>
#apt-get install gdb

Next we need to copy all of the newly modified files in /etc ramdisk to the real disk "readonly" location so that changes will be restored upon powering back up. We also want to make the root filesystem readonly once again.

# cd /.readonly/etc-tmpfs-mirror
# cp –a * ../etc
# mount -o remount,ro /

For good measure, lets reboot:

#shutdown -r now

Of course to install additional packages later you can repeat this process but should leave out the parts about updating sources.list and installing the keyring, etc.

I hope this helps others.

KEJR
Reply
#2
Awesome writeup KEJR. While most installations only modify /etc, this isn't always true so I typically sync the main three mount points after installing anything.

# cd /.readonly/root-tmpfs-mirror
# cp –a * ../root
# cd /.readonly/etc-tmpfs-mirror
# cp –a * ../etc
# cd /.readonly/var-tmpfs-mirror
# cp –a * ../var
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)