PDA

View Full Version : YAKRS (Yet another Knoppix-Remaster-Script)



maxi_king_333
06-03-2012, 09:14 PM
Hello,

this is my first post here so I hope everything is correct, if not, please point me into the right direction.

I wrote a remaster script which was more like an assistant some time ago.
Now I rewrote it to speak english and thought it would be a good idea to tell you.

It provides a graphical user interface as well as a command line version.
Some small changes like cheatcodes or the xorg background image will also work out of everyone's favorite os Microsoft Windows.
(but there is no graphical interface for this micro remastering yet)

It is written in Python and uses PyGTK, both are preinstalled on Knoppix.
Because it uses its own implementation of Cloop it would work on any other Linux system too.
So you don't have to boot Knoppix native or in a VM, just use your prefered linux distribution.

There is a Github Repository for the source code and some german documentation:
https://github.com/koehlma/remasterscript
English documentation will follow later so for now a short description on how to use:

Download the Debian Package:
https://github.com/koehlma/remasterscript/raw/7703dc73bec8d28fcf4b38b86a2ae45e9f7072a1/remasterscript.deb (http://knoppix.net/forum/Hello,%20%20this%20is%20my%20first%20post%20here%2 0so%20I%20hope%20everything%20is%20correct,%20if%2 0not,%20please%20point%20me%20into%20the%20right%2 0direction.%20%20I%20wrote%20a%20remaster%20script %20which%20was%20more%20like%20an%20assistant%20so me%20time%20ago.%20Now%20I%20rewrote%20it%20to%20s peak%20english%20and%20thought%20it%20would%20be%2 0a%20good%20idea%20to%20tell%20you.%20%20%20%20htt ps://github.com/koehlma/remasterscript/raw/7703dc73bec8d28fcf4b38b86a2ae45e9f7072a1/remasterscript.deb)
Install it through
sudo dpkg -i remasterscript.debUse remaster-create to create a new remaster from scratch and remaster-build to build an iso image of your remaster.
The assistant is self explaining I think, if not - feel free to ask.

Some screenshots:
https://github.com/koehlma/remasterscript/blob/master/english/screenshots/screenshot0.png?raw=true
https://github.com/koehlma/remasterscript/blob/master/english/screenshots/screenshot1.png?raw=true
https://github.com/koehlma/remasterscript/blob/master/english/screenshots/screenshot3.png?raw=true
https://github.com/koehlma/remasterscript/blob/master/english/screenshots/screenshot5.png?raw=true

Greetings
Maxi

Capricorny
06-04-2012, 09:50 AM
Nice!
Of course I wonder about the "own implementation of Cloop" - I would rather use the standard package if there is any chance of Knoppix compatibility problems. I use to do a series of remasterings whenever appropriate.
Because the shell script approach is so simple, I think I will stick with that for my own use for now. But there are several ways this can de developed to become even more useful:
* Creating just a CD boot image, empty Knoppix, for booting machines with DVD/USB booting problems. There is one 7.X thread about this. Should be very simple.
* Creating a "bare bones" Knoppix image, throwing out everything except for init, hardware detection, graphics, (probably) communications. I have to do this myself, manually, now. Useful for a lot of things, among them 64-bits version.
* Creating a "bare bones" 64-bits Knoppix image. As far as possible with 64-bits programs. I will try to go this way with 64-bits Knoppix 7.0.2. Made 64-bits Knoppix 6.4.4 in a more elaborate manner, too much work and to much fuzz - though it works very well in practice.
* Creating a CD image from DVD. Maybe with some a la carte purging.

I may be able to help a little with the 64-bits things, if you or someone should want to take on them.

maxi_king_333
06-04-2012, 03:34 PM
Hi Capricorny,


Of course I wonder about the "own implementation of Cloop" - I would rather use the standard package if there is any chance of Knoppix compatibility problems.There should be no compatibility problems because its more or less a copy of the original C implementation - and of course the Cloop format is very simple:


Headroom (128 bytes) with a shell script for mounting
Blocksize of an uncompressed block (unsigned int - network order)
Number of blocks (unsigned int - network order)
Offsets for the compressed blocks (unsigned long long - network order)


Because the shell script approach is so simple, I think I will stick with that for my own use for now.Yeah, shell scripts are of course simpler than that. xD
I developed this more with an windows user in mind who wants to customize his live system.
But I think it would be useful for us command line junkies too. :grin:


But there are several ways this can de developed to become even more useful:So you mean the script should do all these things automatic?
So the user says for example: "clean Knoppix" and the script will remove all software except the init and the other stuff?

Greetings
Maxi

Capricorny
06-04-2012, 11:29 PM
There should be no compatibility problems because its more or less a copy of the original C implementation - and of course the Cloop format is very simple:


Headroom (128 bytes) with a shell script for mounting
Blocksize of an uncompressed block (unsigned int - network order)
Number of blocks (unsigned int - network order)
Offsets for the compressed blocks (unsigned long long - network order)


No chance of compatibility problems? Beautiful!



I developed this more with an windows user in mind who wants to customize his live system.
But I think it would be useful for us command line junkies too. :grin:
Sure it can be useful. And the more, the better the opportunities in the concept are used.



So you mean the script should do all these things automatic?
So the user says for example: "clean Knoppix" and the script will remove all software except the init and the other stuff?
Yes. Stripping down and then rebuilding is very often the way to go. Stripping down is about purging a lot of packages, and there could be, say, 3-5 standard selections of what to keep. Plus alternative 0: The empty selection, leaving only booting. First and most basic choice is a set of utilities, like what is implemented in current busybox. Plus networking etc. Next step up might be terminals and communications, and third step might be graphics, up to and including LXDE.

maxi_king_333
06-05-2012, 12:34 AM
Yes. Stripping down and then rebuilding is very often the way to go. Stripping down is about purging a lot of packages, and there could be, say, 3-5 standard selections of what to keep. Plus alternative 0: The empty selection, leaving only booting. First and most basic choice is a set of utilities, like what is implemented in current busybox. Plus networking etc. Next step up might be terminals and communications, and third step might be graphics, up to and including LXDE.Sounds good, could be done with some checkboxes where the user could decide what to keep and what to remove. Also with some requirement system beetween the different checkboxes. For example the checkbox "office software (libreoffice...)" requires the "basic graphical environment" checkbox. There is also some basic handling for various Knoppix versions in the script already so the selection of software to remove and to keep could be different for different Knoppix versions. I will see what I can do but I think I would need some help ;).

Capricorny
06-06-2012, 04:20 PM
When we have safe and stable ways of doing it "manually", it may be automated more. May have to do some adaptations to the package structure to make it efficient, though. For example, some crucial Knoppix packages are not apt-downloadable, had a few of them purged by aptitude yesterday wthout me asking for it.

I got down to about 1660 packages by systematic, mostly group-wise purging of 7.0.2 DVD. Will see how much space they will take up when remastered, but I doubt there is very much use in going for a very low basic package count for the graphics version. Another alternative could be to use the package selection in business card version of ordinary Debian 6.0X.

I will try to carry out this purging running Knoppix in a virtual machine next time. Qemu-kvm is quite nice when we are friends and I don't try too hard to direct its workings. But don't use qemu without kvm, way too slow for realistic use!

Capricorny
06-07-2012, 05:17 AM
Update on purging: As told, I got down to around 1700 packages, 4GB total/1.6GB remastered cloop quite easily, BUT: It happens over and over again, that large scale upgrading/purging in Debian introduces problems. Therefore, I think it may actually be safer and easier to grow the whole thing from a small, well controlled starting version. Which means that it is essentially the package list that is the input from a Knoppix instance. And the purging problems illustrate the needs for more general tools - this isn't something to undertake by oneself, normally.

maxi_king_333
06-16-2012, 10:45 AM
Sorry, that I didn't respond before - the "before holiday stress"... I think the use of a debian businesscard edition would be a good idea. But, that's not script related. - Nevertheless, if we have such an minimal version the script could do the installation of other packages or package groups. Because I have very limited time I think I can't do that - but I could help of course.

Capricorny
06-18-2012, 10:34 AM
After doing some more experimentation myself, I have come to the conclusion that a Knoppix-adapted version of the debootstrap utility (something like "knxbootstrap") would be a good tool. With Debian 6.0.5, debootstrap creates a bare bones install of size ca 200MB. It's probably not worthwhile to go any lower for general use. I haven't looked into any details about the debootstrap utility, so I have no idea what it could take.