Revision [10020]
This is an old revision of Debianization made by tgp1994 on 2010-10-22 16:22:59.
Introduction
"Debianization" is my coined term for debianizing, or fully installing & enabling debian versions of DPKG and apt-get on puppy. I don't have any specific reason for doing this, other than research and trying to build puppy up to a debian distro. I have encountered many problems along the way, so if you find one that is not addressed in here, please visit this topic and post about it.Warning! The actual success of "debianizing" puppy may vary, and I only cover the basic procedure. DO NOT try this on a puppy save that you want to keep, or if you do actually want to try this on a valuable puppy save, then BACK IT UP. You have been warned.
Author's note: At the time I had written this article, puppy 4 was the latest stable distribution. Afaik puppy has since then split off into several distributions using different sources. If you are going through this tutorial for fun, then I'd recommend that you get the latest puppy 4 distribution, which is 431 if I'm not misteaken. Otherwise, proceed at your own risk.
Required Packages
I find it kind of silly that debian has no list whatsoever of required packages to get a bare system running. Here's a list of packages that I have needed while Debianizing my system. Required packages may differ, or I may have forgotten to add one. Go ahead and add it yourself, you'll be benefiting the whole community ;) (To edit, add /edit to the URL bar in your address. Speaking of silly... *AHEM wikka AHEM*)Package name | Download link | Comments |
---|---|---|
libgcc1 | ||
libc6 | ||
dpkg | ||
Perl-base | ||
Debconf | ||
Debconf-english, or Debconf-i18n | ||
libpam-runtime | Download | |
libpam0g | ||
Bash | Download | |
libncurses5 | Download | |
Base-files | Download | |
awk (gAwk) | Download | For this, we'll use gAwk, since Awk is actually a virtual package. |
base-passwd | Download | |
passwd | You will need to do lots of editing in the /etc/shadow file to get this package fully working. | |
debianutils | Download | Solves that darn missing tempfile command! |
libpam-modules | Download | |
libdb4.6 | Download | |
login | Download | Heh... very cryptic error message from libuuid before I found out that this package was needed :P Of course, according to Debian devs, "This packages comes standard with all debian systems, so we shouldn't have to make it required..." Pfft. |
libblkid1 | Download | |
mount | Download | |
initscripts | Download | |
e2fsprogs | Download | |
e2fslibs | Download | |
libcomerr2 | Download | |
libss2 | Download | |
lsb-base | Download | |
sed | Download | |
ncurses-bin | Download | |
sysvinit-utils | Download | |
sysvinit | Download | Once you [technically] correctly install it, it will give you an error saying "init: timeout opening/writing control channel /dev/initctl". I'm assuming that this is because we haven't yet rebooted the computer since starting our debianization, and I'm also assuming that this is no cause for alarm. At least dpkg didn't say so. |
The Flow Chart
Go here to see my flow chart. You'll want to follow it from right to left. The packages most-right are the ones you'll want to install first, then move up and to the left.
Steps
Starting at the very beginning here, I'm assuming that you have just downloaded the puppy ISO from this link. I myself will be installing it into a blank hard drive in my PC, but whether you are doing the same or installing in a Virtual Machine, the step process is similar.
NOTE: I know that installing puppy to the hard drive defeats the general purpose of puppy, but as far as my knowledge of how puppy works goes, it will be the only way for this to work.
1. Install/Boot puppy
1a. Burn to a CD (Preferably RW, so you can "re-write" it when another puppy distro comes out.)
1b. Follow this VERY useful full hd installation guide, all the way up to the point where you have booted from the hard drive.
2a. For most of you, you should click Internet by network or wireless LAN...
2b. The rest of the network setup should be self explanitory.
3. Using the above list, (and my soon-to-be-included flowchart,) download all of the packages.
4a. First make sure you have dpkg-deb installed;
4I. Click on install on the desktop
4II. Click on the "Run the puppy package manager" button
4III. Search for dpkg and install the first and only result that comes up.
4b. After that you will never have to go through step 4a again. Now all you have to type is dpkg-deb -x [.deb file]. Ensure that you are in the root of your hard drive, since the files in the .deb archive mirror that of the root of your hard drive.
4c. Search for and download DPKG for lenny on debian's package site, then run dpkg-deb -x /dpkg.deb (Assuming you saved it as dpkg.deb when you downloaded it.)
4d. Now type dpkg to ensure it installed correctly.
5a. Eventually you will reach a point where libc6 and libgcc1 will loop-depend on each other, meaning that one asks the other to be installed first, so you will want to run dpkg -i --force-all libgcc1.deb. This should automatically install libgcc1 and libc6. However, when it tries to install libc6, busybox will interrupt saying init is the parent of all processes. Cool story, brah.
5b. Navigate to /var/lib/dpkg/info and edit libc6.postinst. Go to line 367, and comment out all lines from that to line 371. That portion should like this when you are finished:
#if [ "$(stat -c %d/%i /)" = "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ]; then # the devicenumber/inode pair of / is the same as that of /sbin/init's # root, so we're *not* in a chroot #(init u ; sleep 1) #fi
5c. Save and close the file, then run dpkg --configure libc6. It should finish, then at that point you will want to run dpkg -i libgcc1.deb one more time to make sure it is installed as well.
6. After installing libselinux1, you may now install coreutils. ...Wait? What's this? Errors relating to a directory with perl in it!? No one said we needed perl! Ugh. Go ahead and download/install perl-base, then try again.7. Wait? perl depends on dpkg? Ok, let's have dpkg install its self then... (download and install dpkg, with dpkg >.>)
7a. dpkg will then ask for coreutils, which was [indirectly] asking for perl-base, which was in turn asking for dpkg... so now dpkg -i --force-all perl-base.deb.
7b. coreutils will then whine for a backup file, so create a blank file at /var/backups/infodir.bak. This will require creating the backups directory first.
7c. NOW you can run/install coreutils. After that, and just to be safe, dpkg -i dpkg.deb too, to prevent any further confusion. (Which will require downloading and installing lzma first, and any of its dependencies as well. But heck, maybe it(they) will be useful in the future.)
8. Now we can get to work. Navigate to this link, and save the package to the root again.
9. Don't forget to get the debian-archive-keyring package, as well as any dependencies that follow, since apt will want them before you install it. Install the dependencies, then install apt.
10. Type apt-get to see what comes out, and if it's something other than "Command not found", congratulations! You're past the worst part of this.
11. Now we need to create the sources.list file. Someone has made an excellent site for this particular task, The Debian Sources List Generator. It supports multiple debian releases as well as different branches, too. I will include a perfectly working sample below.
12. Create the sources.list file in the path /etc/apt/, and add the following to it:
###### Debian Main Repos deb http://ftp.us.debian.org/debian/ lenny main contrib non-free ###### Debian Update Repos deb http://security.debian.org/ lenny/updates main contrib non-free deb http://ftp.us.debian.org/debian/ lenny-proposed-updates main contrib non-free
14. You are now debianized by my definition. Take care in downloading possibly system-modifying packages, especially ones that change the way linux boots up. Puppy has it's own special way of booting up, so changing that could stop you from getting back to your puppy.
Notes
- Do not restart or shutdown your computer at any point during the above procedure. I have not tested the stability of a booting system after the installation of any one package, thus doing so your self could leave you unbootable.
Possible problems and solutions
Problem: When attempting to run apt-get, you get an error reading "E: Unable to determine a suitable packaging system type".Cause: DPKG is not installed.
Solution: Visit the debian package site, and download+extract the dpkg package.
Problem: When attempting to do any command (update, install, remove, etc.) with apt-get, you get an error saying "Cannot open file /var/lib/dpkg/status - open ... basicall saying that it cannot find the file named "status".
Cause: We simply have not install DPKG all of the way.
Solution: No worries, this is an easy solution. Simply navigate to /var/lib/dpkg, and create a blank file named "status".
Problem: When booting, it says Starting up..., then init: applet not found. The kernel panicks.
Cause: Your busybox binary file has been overwritten, with what seems like a debian version.
Solution:
1. Boot up puppy in LiveCD mode.
2. Access /bin, (and not in your broken hard drive, but the ramdrive.)
3. Find busybox, and copy it to the /bin folder in your broken hard drive.
4a. If there are differences in file sizes, you are on the right track. Overwrite it, reboot, enjoy.
4b. If there is no difference in file size, then there is something else wrong. Sorry, but I wouldn't know what else.
Problem: While installing a package, you get a console error reading; "tempfile: command not found."
Cause: Generally occurs while configuring base-passwd, and debianutils is not installed.
Solution: You must install the debianutils package. See the Required Packages section for a link.
Problem: While installing a package, you get an error saying; "/usr/lib/libxml2.so.2: undefined symbol: gzopen64"
Cause: I've seen it only occur in one package. (Can't think of it right now.) Happens because of an outdated zlib installation.
Solution:
1. Download the zlib1g package from Debian.
2. Extract it's contents, retaining the file/folder structure, to your root.
3. Try installing the package again.
NOTE: Some people have reported that it is necessary to run the command "ldconfig" after doing this. If your package gives the same error after trying steps 1-3, then run the command.
NOTE2: zlib is necessary for all programs to function on puppy. If it gets removed or corrupted, no programs will work, so make sure you have a backup and/or the updated package already extracted.
Problem: When booting, an error repeatedly comes up saying something about an /etc/tty0 directory missing.
Cause: This is linked to installing a certain debian package.
Solution: I currently have no direct solution for this. If you have a Live CD, try chrooting into the system and installing any terminal-related package.
Categories
CategoryDevelopmentCategoryHowTo