-
Senior Member
registered user
@utu: Who needs to decide what is the best configuration of the end product?
I have some clear viewpoints about it, but they are surely not the only answer.
I'd rather spend time developing and trying out solutions than discussing.
With a script like I presented, you can remaster every day if you like.
And it can rather easily be complemented with an iso-creating step. The only real modification for ISO is writing the whole (or most of) /var directory
to the compressed image instead of to persistent.
Personally, I think package administration tools and testing methods are of much greater practical significance.
-
Senior Member
registered user
@ Capricorny
Would it be correct to say at the conclusion of your script
that there exists the content of a poor-man's install image on the workspace?
If so, then it would seem there is a lot of choice at this point
as to how to test the product-so-far. For examples:
(a) do a virtual install;
(b) do an actual install in, or adjacent to the workspace; or
(c) create and iso from which to burn a LiveCD or LiveUSB.
Last edited by utu; 08-11-2011 at 09:16 PM.
-
Senior Member
registered user
Originally Posted by
utu
@ Capricorny
Would it be correct to say at the conclusion of your script
that there exists the content of a poor-man's install image on the workspace?
If so, then it would seem there is a lot of choice at this point
as to how to test the product-so-far. For examples:
(a) do a virtual install;
(b) do an actual install in, or adjacent to the workspace; or
(c) create and iso from which to burn a LiveCD or LiveUSB.
No, there's more choice than that.
You could start up from the DVD or ISO, do a series of purges and installs, make some adaptations (like you would in a chroot environment), and then run the script to make a remastering which may then serve as your PMI. It could easily be expanded into copy-to-flash-with-remastering too.
I am not sure how useful the concepts "install" and "workspace" are in this respect.
1. Standard PMI is just copying the KNOPPIX directory into a root directory somewhere. Knoppix will find it even without being told where it is. How is that for an "install"?
2. You may just use the existing NTFS or Linux partitions. Using a non-FAT32 partition with 20+ GB free space, you can run remastering from there, it will be mounted on /mnt-system. How is that for a "workspace"? In fact if you have a dual boot system, you may want to drop KNOPPIX onto a NTFS partition, to avoid any unwanted interaction with other Linuxes, and/or keep the Knoppix system stuff properly separated from other data.
-
Senior Member
registered user
Update on 6.7.0 remastering
Filling up towards 4GB, there's still ca 250 MB size difference between unoptimized cloop and squashfs images. Creating a 4GB cloop image + persistent store took about 40 minutes on an ASUS N53S core I7-2630QM, using external USB3 harddisk (1TB WD Passport with ext4 fs.)
Using squashfs, it took 25-30 minutes.
The image I made might be representative for one kind of customization. Main additions are:
- R with a large selection of packages
- Octave, with lots of extra packages
- Axiom
- Scilab
- Bibble 5.2.2 Pro
- Oracle XE 10g
- VMware Workstation 7.1.4 (Must manually patch module code for 2.6.38+ kernels!)
- Plus a few tools, like Jython, bison, flex
I think it is hard to trim down 6.7.0 DVD to make room for large additions - I had to purge chromium and a few doc packages this time.
I will leave 32-bits 6.7.0 here for now, and concentrate on a 64-bits version. I don't bother to post a new "uni init" for cloop and squashfs for 6.7.0, editing steps can be gathered from the diff. The most important steps are to substitute the mountknoppix function + change /dev/loop0 references. Probably not as I did to /dev/loop8, as busybox seems to stick with old kernel conventions in that respect. But maybe to /dev/loop7.
Here's the updated script - with squashfs and cloop packages installed, it works for me. I'm writing this from a freshly remastered version.
Code:
#!/bin/bash
# Based loosely on Foresters script on Knoppix-forum modified by tay 20110511-20110810
function to_exist() {
[ -d "$1" ] || sudo mkdir -p $1 ;
}
function purge_or_create() {
[ -d "$1" ] && sudo rm -rf $1
sudo mkdir -p $1 ;
}
function remaster_knoppix() {
command=$1; shift;
operand=$1; shift;
case "${command} ${operand}" in
"create workspace") # Setup workspace as loop image
workdir=$1; shift;
psize=$1; shift;
sudo dd if=/dev/zero of=${workdir}/knoppix-remaster-data.img bs=1M count=$psize
sudo losetup /dev/loop7 ${workdir}/knoppix-remaster-data.img
sudo mkfs.ext3 /dev/loop7
sudo losetup -d /dev/loop7
purge_or_create /tmp/knx-remaster-data;
sudo mount ${workdir}/knoppix-remaster-data.img /tmp/knx-remaster-data -o loop=/dev/loop7 ;
;;
"copy live-system") # This is the simplified copy
to_exist /tmp/knx-remaster-data/knx_source ;
# Copy main /UNIONFS
sudo rsync -ax --exclude=home --exclude=lost+found --exclude=var /UNIONFS/ /tmp/knx-remaster-data/knx_source;
# Use a couple of directories/files from KNOPPIX as stubs
sudo rsync -ax /KNOPPIX/home /KNOPPIX/var /tmp/knx-remaster-data/knx_source;
sudo rsync -ax /KNOPPIX/etc/fstab /tmp/knx-remaster-data/knx_source/etc;
;;
"make isofs") # We don't use pipe here
purge_or_create /tmp/knx-remaster-data/knx_tmpiso ;
sudo chmod a+rwx /tmp/knx-remaster-data/knx_tmpiso;
sudo mkisofs -R -U -V "KNOPPIX.net filesystem" -publisher "KNOPPIX www.knoppix.net" -hide-rr-moved -cache-inodes -pad /tmp/knx-remaster-data/knx_source > /tmp/knx-remaster-data/knx_tmpiso/knoppix.iso ;
;;
"compress isofs") # Not optimized cloop compression
newknoppix_dir=$1; shift;
to_exist ${newknoppix_dir}
sudo create_compressed_fs -B 65536 /tmp/knx-remaster-data/knx_tmpiso/knoppix.iso $newknoppix_dir/KNOPPIX;
;;
"make squashfs")
newknoppix_dir=$1; shift;
to_exist ${newknoppix_dir}
sudo mksquashfs /tmp/knx-remaster-data/knx_source $newknoppix_dir/KNOPPIX.sq -b 262144 -noappend ;
;;
"loopcreate persistent") # Create new persistent image, size in MB must be given.
newknoppix_dir=$1; shift;
to_exist ${newknoppix_dir}
psize=$1; shift;
sudo dd if=/dev/zero of=${newknoppix_dir}/knoppix-data.img bs=1M count=$psize
sudo losetup /dev/loop6 ${newknoppix_dir}/knoppix-data.img
sudo mkfs.ext3 /dev/loop6
purge_or_create /tmp/knx-data
sudo mount -t ext3 -rw -o loop /dev/loop6 /tmp/knx-data ;
sudo rsync -ax /UNIONFS/home /UNIONFS/var /tmp/knx-data ;
sudo umount /tmp/knx-data;
sudo losetup -d /dev/loop6
;;
"purge workspace")
sudo umount /tmp/knx-remaster-data
sudo losetup -d /dev/loop7
workdir=$1; shift;
sudo rm -f ${workdir}/knoppix-remaster-data.img
;;
*)
echo oops;
;;
esac
}
# Calling examples:
#./rem_02.sh /mnt-system/store/local 25000 /mnt-system/store/KNOPPIX670 4000
#./rem_02.sh /mnt-system/store/local 12000 /mnt-system/store/KNOPPIX670 4000
#./rem_02.sh /media/sda2/store/local 10000 /media/sda2/store/local/KNOPPIX670 4000
# ./rem_02.sh /store/local 20000 /store/local/KNOPPIX670 4000
wrkspc_dir=$1 ; wrkspc_sz=$2 ; remaster_dir=$3 ; persist_sz=$4 ;
remaster_knoppix create workspace ${wrkspc_dir} ${wrkspc_sz}
remaster_knoppix copy live-system
remaster_knoppix make isofs
remaster_knoppix compress isofs ${remaster_dir}
# remaster_knoppix make squashfs ${remaster_dir}
remaster_knoppix loopcreate persistent ${remaster_dir} ${persist_sz}
remaster_knoppix purge workspace ${wrkspc_dir}
-
Senior Member
registered user
Originally Posted by
Capricorny
I don't bother to post a new "uni init" for cloop and squashfs for 6.7.0, editing steps can be gathered from the diff. The most important steps are to substitute the mountknoppix function + change /dev/loop0 references. Probably not as I did to /dev/loop8, as busybox seems to stick with old kernel conventions in that respect. But maybe to /dev/loop7.
So, does this mean YES, I have to redo minirt.gz?
-
Senior Member
registered user
Utu,
can't you just try out things?
When do you think patching minirt is necessary? I answered NO when you asked. If you want to use squashfs, yes you have to patch 6.7.0 init. And if you want to run a purely 64-bit version. And for uncountable other special modificatons. But for ordinary cloop remastering: No. In the script, squashfs creation is commented out. It makes only cloops as it stands.
"Uni init" means that the same script can be used with cloop and squashfs, a cheatcode tells which to use.
Last edited by Capricorny; 08-12-2011 at 09:29 PM.
-
I have found a poor man's install (PMI) to be very, very similar to a full HD install, and in fact I much prefer the PMI. And such an install can be run and modified in a VM, just like the ISO, only simpler and more thoroughly, IMHO, as I just add grub entries and can modify kernels and minirt, with modifications only in the /boot directory which grub uses.
... not yet mentioned: I in reality do all my testing and modifications of Knoppix within the HD-Installation, not with a Flash disk Installation of a remastered ISO.
All the things I install, purge, change and so on within the HD-Installation I collect in a script. If all is as I need it and runs very well, I execute this collecting script in the chroot and then build a new ISO.
If Klaus Knopper offers a new Knoppix version, I only have to do little changes in this collecting script and a remastered ISO of new Knoppix version will be done with little efforts.
Greetings Werner * http://www.wp-schulz.de/knoppix/summary.html
Own Rescue-CD with Knoppix (Knoppix V6.7.0 remaster)
-
Senior Member
registered user
Originally Posted by
Werner P. Schulz
All the things I install, purge, change and so on within the HD-Installation I collect in a script. If all is as I need it and runs very well, I execute this collecting script in the chroot and then build a new ISO.
If Klaus Knopper offers a new Knoppix version, I only have to do little changes in this collecting script and a remastered ISO of new Knoppix version will be done with little efforts.
I do the stone age equivalent of this.
I keep a changelog to remind me what I've done to my LiveUSB since it was new.
It's a script of sorts that I follow to put back all my little changes.
I can usually get back on-line in a few minutes after a version change,
unless there's something new structurally.
Not very elegant, but it works for me.
Leaving /home out of re-mastering sure works against this method, however.
Cheers
-
Senior Member
registered user
@ Capricorny
I now have your script working sufficiently well that I think I can
express some opinions for discussion:
1. I think the initial workspace should be saved as a subsequent starting
point for successive re-mastering attempts, rather than re-inventing it from
scratch each time. I fully realize this will double the storage used and
necessitate a copying phase as well. I'm assuming copying is much faster
than establishing the initial workspace from scratch, of course.
....I expect some will be shocked at the heretofore 2 Gb byte-miser is now
so profligate; but now he owns an extra Terrabyte of ntsf storage.
2. The rsynch and subsequent print-out is excessive and should be trimmed
down to whatever might serve some useful purposes.
3. The current choices of what to keep are way to restrictive for my uses.
I suggest keeping all of /home except for the compressed KNOPPIX file
and knoppix-data.img. That's where a lot of my stuff is.
4. I suggest we leave to Knoppix to replace the persistence file, and not
do its work for it.
5. In my case /dev/loop7 isn't found and deleted as it should be in the
purge process.
6. I suspect that the remastered product may often be larger than where
it started even if programs are removed. This is not a tolerable end solution.
Its ok to get things sorted out, but that's got to come under control at some
point.
-
Senior Member
registered user
7. One has to make sure the KNOPPIX670 file from a previous
remaster is indeed 'gone', not just hidden as PCManFM does when
you think it's deleting files.
You need to look for hidden files and delete them.
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
Vintage Dream Writer NTS 325 Computer Basic Language Notebook “Untested “
$30.00
Vintage 1986 Intel Books Leading Edge Technology Catalog 8086 286 PC
$11.99
Vintage Compaq 141649-004 2 Button PS/2 Gray Mouse M-S34 - FAST SHIPPING - NEW
$8.99
Vintage Classic Apple Macintosh System Boot Install Disk Floppy/CD *Pick Version
$10.39
VINTAGE MANUAL IBM / 5340 Volume D Field Service Logics
$74.99
Voltage Blaster (Enhanced) -5V ISA AT ATX Power for Vintage Retro PCs US Seller
$12.95
Vintage Black Microsoft intellimouse Optical USB Wheel Mouse 1.1/1.1a - EXC COND
$28.95
NEW Manufacture OLD STYLE Oval 3 Prong Power Cord HP style 125V 7A 875W Vintage
$39.95
Vintage KLH 2800 Laptop
$150.00
Vintage Comfort Keyboard Systems Ergomagic Mechanical AT/PS2 Keyboard
$149.99