-
Remastering Knoppix 6.01, MySQL, Django, SQLAlchemy
Hi! I spent several days using the remastering instructions provided herein and experienced many problems. I was able to circumvent these problems eventually and bring up a successfull Live disk. I thought I would document my experience on the chance I can save someone some time.
LiveCD not LiveDVD for DVD
When I first started I looked at the packages on the LiveDVD, such as apache, and began with LiveDVD. However, after much time I hit on the idea of starting with the LiveCD and then just burning a bootable DVD with the image. Looking at the Remastering page you will notice there is no distincion made with the mkisofs command regarding CD vs. DVD. I finally ended up starting with a LiveCD copy and burned the resulting ISO of 1.5GB as a bootable DVD and it worked like a charm.
Reasons for starting with LiveCD vs LiveDVD are as follows:
- * Don't have to delete anything. You have essentially 3GB of compressed space available and then burning a DVD bootable disk.
* Package options. The LiveDVD packages for apache2 and what not were missing crucial modules or components that are installed by default when you use "apt-get install apache2" with LiveCD. In particular, I installed Trac, Subversion and Apache2 and needed them all to work together with WebDAV. They did not. I could not get Trac to browse the Subversion code using the packages preinstalled on LiveDVD.
* Package dependencies. Because the packages on the LiveDVD are missing things, sometimes apt-get would just fail altogether finding dependencies. I started down a rabbit hole of installing from source but eventually failed on that too.
MySQL failed
I naively started with installing mysql 5.0 with apt-get and then took a MySQL dump file and restored my entire database from one SQL script. However, I experienced two failures that required me to install MySQL at boot. 1.) The ".frm" files were not recognized as valid. I kept getting invalid messages. Second, when I just installed MySQL and then initialized the database at boot, the application SQLAlchemy failed. Everything worked in the chroot environment but when I created the ISO and booted, SQLAlchemy couldn't recognize the foreign keys. When I uninstalled MySQL, reinstalled and then restored my database then SQLAlchemy worked.
Following are the actions I had to take to get MySQL 5.0 to work correctly.
- * Install MySQL 5.0 with apt-get
Code:
apt-get install mysql-server-5.0
.
* Test everything in the chroot directory and make sure everything is hunky dory.
* Copy the mysql script in /etc/initi.d/ to /root:
Code:
/bin/cp /etc/init.d/mysql /root
* Before burning the KNOPPIX/KNOPPIX ISO image, remove and purge MySQL with apt-get
Code:
apt-get remove --purge mysql-server-5.0
. Note that this will leave the .deb file in the cache so that on any subsequent install you will not need a network:
Code:
knx/source/KNOPPIX/var/cache/apt/archives/mysql-server-5.0_5.0.51a-24+lenny2_i386.deb
* Modify the /etc/rc.local script and put the mysql and apache2 as start up scripts:
Code:
SERVICES="cups mysql apache2"
* Modify the /root/mysql script you copied previously. Note that the original was deleted when you removed MySQL. In the sanity_checks function add the code to install MySQL, initialize the database and restore from backup. Below is what I did:
Code:
## Do some sanity checks before even trying to start mysqld.
sanity_checks() {
if [ ! -x /usr/sbin/mysqld ]; then
/bin/rm -f /etc/init.d/mysql
echo "mysql-server mysql-server/root_password select YOURPASSWORD" | debconf-set-selections
echo "mysql-server mysql-server/root_password_again select YOURPASSWORD" | debconf-set-selections
apt-get install mysql-server-5.0
/bin/cp -f /root/mysql /etc/init.d/mysql
test -x /usr/sbin/mysqld || exit 0
echo "Install YOURDATABASE tables..."
mysql --password=YOURPASSWORD mysql < /root/create_database.sql
mysql -u YOURUSER YOURDATABASE < /root/dump.sql
invoke-rc.d mysql stop
fi
Now your database will install and load on boot. Install MySQL will overwrite the running /etc/init.d/mysql script, which is fine.
Root '/' directory paths failed
I installed Trac and Subversion root paths at '/' so as to avoid typing:
Before:
I had to move them though because for some reason they were omitted in the ISO. I had to root them under some subdirectory, so I moved them to /usr
After:
Applications installed via apt-get
After I ran apt-get update the following is the list of packages I was able to successfully install using apt-get install:
- * gcc
* flex
* bison
* gdb
* libtool
* m4
* automake
* patch
* autoconf
* emacs22 (emacs23 wanted to install a new version of libc.6, not recommended)
* apache2
* libapache2-mod-python
* python-setuptools (do this before installing trac or trac will fail)
* python-mysqldb
* python2.5-dev (Required to compile Python PIL, see below)
* trac
* subversion
Applications that were installed from source.
- * Python Image Library (PIL) 0.6
* Django 1.0
* SQL Alchemy 0.47
Hope this helps someone!
Similar Threads
-
By ilovelinux98 in forum MS Windows & New to Linux
Replies: 0
Last Post: 04-23-2005, 09:30 PM
-
By suprie1983 in forum Hdd Install / Debian / Apt
Replies: 1
Last Post: 10-27-2004, 02:41 AM
-
By PrOCesSkIlL in forum Customising & Remastering
Replies: 29
Last Post: 04-02-2004, 01:32 AM
-
By Coume in forum General Support
Replies: 5
Last Post: 08-06-2003, 06:42 AM
-
By antti in forum General Support
Replies: 1
Last Post: 02-10-2003, 02:16 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

(New) AMD Ryzen 7 5700X 8 Core 16 Thread AM4 Unlocked 3.4 GHz CPU OEM Tray
$169.99

Lenovo ThinkPad T14S Gen 1 8-Core 4750U 1.70 GHz 512 GB SSD 16 GB RAM Win11Pro
$240.00

Intel Core i9-9900K SRG19 3.60GHz 16MB 8-Core LGA1151 B Grade CPU Processor
$175.00

HP Pavilion Laptop Computer 15.6 8-Core Intel i3 8GB RAM 628GB Storage, Open Box
$299.00

Intel Xeon E5 - 2667V2 / SR19W 3.30GHz 25MB 8-Core CPU Socket LGA2011
$30.00

AMD Ryzen 7 9700X 8-Core 16-Thread 40MB Cache Socket AM5 9000 Series Processor
$245.99

AMD Ryzen 7 5800X 8-core, 16-Thread Unlocked Desktop Processor
$189.99

Microsoft Surface Go 2 Laptop Core i5 1135G7 2.4GHz 8GB 128GB SSD
$179.99

Dell OptiPlex 5070 SFF i7-9700 (8-Core) 3.0GHz 16GB 256 SSD Windows 11
$250.00

HP ZBook Firefly 14" G8 Mobile Workstation i5 11th Gen 16GB RAM 256 GB SSD No AC
$166.49