The officially official Devuan Forum!

You are not logged in.

#1 2018-05-22 20:06:21

Registered: 2018-05-14
Posts: 68  

largely for siva (+ anybody interested): distro remixing methods

siva and i have talked about remixing distros a lot over the past couple days, i thought id talk about it for a minute.

this is one of the best things about devuan imo, they encourage remixes / derivs. i have one, it proves that im not just making things up-- it does what im talking about-- but i truly care more about the ideas of fig os than fig os itself.

some of us, not just me-- are doing software not just for the software itself but to showcase ideas and other software (and yes, devuan itself.) so if you say "but thats not devuan?" you know-- its pretty easy to prove if we merely agree exactly *what* devuan is.

i mean i actually made a simple tool that diffs iso contents and squashfs contents by md5-- i can really prove these things by percentage, if necessary.

i like the "make it your own" brand and i love refracta, and all this is devuan. all this is definitely devuan. but how do you remix it?

i know several ways, but you only need to choose the one right for you. fsr showed me some things related to how devuan "becomes refracta" and the INPUT looks wildly (wonderfully) simple. i never did it that way because its debian specific and i didnt "get it" in 2016, but the more he documents it the more he ensures that refracta doesnt depend on him.

im a huge fan so i care how refracta (the distro) is actually made. he can correct me-- refracta is made with debootstrap or devuans version of it or something like that.

much related is how any debian/devuan distro can be turned into another distro-- using refracta tools. as far as i know, many of the derivs around here are made with those. ive tried it, i still need more free space to make it work.

i believe my way requires less free space. not fud, happy to confer with him on whether this is a fair statement.

each method has its strengths. here is a simple comparison:

* debootstrap / (devbootstrap?):
official - powerful - some of the input stages are relatively simple

* refracta tools:
friendly - easy - popular - almost certainly more fun (subjectively)

* mkfigos
probably requires less disk space - scripts can be distributed instead of isos (isos can be distributed too, like "normal") - a great amount of control over details

depending on your goal, the biggest projects will more often lean towards the most official method.

by definition, the most popular methods are what most people will use. thats a friendly, traditional remastering tool like refracta tools. there are plenty of others, but refracta tools are good.

i thought mkfigos was a new idea, but the olpc project has a similar thing that converts ubuntu into a distro for the olpc project.

im very glad im not the only person using this idea. it means i can point to at least one other example.

i dont care which of these you use, or if you make your own its great. but because i like the ideas, here is how it works:

mkfigos is written in my own language-- if you have python 2, you can run it. refracta includes the tools you need. (xorriso, isolinux, last time i checked.)

xorriso helps produce a bootable iso.

isolinux (iirc) includes tools to make the iso hybrid so you can write to cd/dvd or usb instead of just the first two.

mkfigos does all this for you. so does refracta tools i believe, which is probably why refracta has all the stuff you need.

with mkfigos, which is just *one example* of doing things this way, you could ultimately create your own if you wanted-- you can either:

distribute a 60k (right, 61,440 bytes) script that downloads a source iso (refracta in this version) and autoremixes it to create your own iso--

or-- create and upload a new 600+mb (629,145,600 bytes) every time you tweak your deriv.

when i make fig os, i dont even upload iso files. i upload a 60k script, a wonderful guy in britain runs it on another distro (cross-compatibility beyond devuan is a feature of mkfigos too) and he doesnt know how it works. just like devuan trusts fsmithred to be in charge of live, i trust ally and he trusts me.

he is not an official "fig os team" member though if he wanted it, id have to give him that. my forum (offline) was called "unofficialdistros" and fig os is very unofficial. but i did perform some checks on his work! hes also a respected archivist in charge of putting hundreds of isos online, so he was a good choice.

again, with this "third method" of remixing, when you want to change a small thing you dont have to upload and ask people to download 600mb or more each time.

in fact, since its based on refracta and new versions of that only come out so often-- mkfigos saves you TWO excesses:

1. you dont have to upload the latest "product iso" ever. because people can make it "at home."

2. THEY only have to download the latest "source iso" once, only when you switch to the latest source iso (the latest refracta version.)

so to recap:

1. if you make 10 updates to your derivative, thats only 0.6 megabytes (less than 1mb) of uploading you have to do. for 10 versions of your distro. that could work out to less than 1mb PER YEAR of uploading.

2. if refracta only updates its iso twice that year, then thats EIGHT times that you and your users dont have to download a big iso. unless you delete it.

3. it still produces an iso, so if you want to be traditional about it-- you can still distribute a big iso if you prefer / as an extra option.

but also, everybody that runs your script gets two things:

1. a full, fairly-easy to grep receipt of EVERY modification made to the source iso. are you curious what i did to refracta? NOTHING happens that you cant find in the script. nothings hidden, its all right there.

it even downloads copies of the files it integrates, so you can look at those afterwards or chuck them in the garbage. most of them however, are very plainly downloaded from the debian and refracta repos. (the way amprolla works, i havent checked if you can simply wget devuan packages. the community is free to school me on that.)

2. the whole thing is made FROM the "receipt," so this "receipt" you get actually predates the product itself. you can change the receipt and say: "well i like refractas window manager. can i get it to stop removing xfce?"

yes! you can figure that out yourself, and if this is a community thing, then i am happy to help *when i can.*

when you use a snapshot tool, youre creating a distro from a running system. did you look up something in the browser? that history might now be in your snapshot.

did you change something that you forgot about? it goes in the snapshot. im not saying this is awful, im just saying that my way avoids this-- all modifications are to a pristine source iso. every time-- um, assuming you delete the folder cache (even the perfect isnt perfect, right?)

so debootstrap i think "builds" an iso from instructions-- ive never used it--

refracta tools builds an iso from a running system-- very friendly, easy

and mkfigos rebuilds an iso directly from the iso. but it leaves the source iso alone so you can reuse it.

a nice side effect (or cost) of mkfigos is that if you want to modify it, you need to do a trivial amount of coding.

a trivial amount. go and get woof-ce and try it-- it asks you a lot of questions! mkfigos asks zero. you only have to run it.

but for example, you find the part that installs leafpad. you dont like leafpad? ok, the "coding" is to find the line and remove it. do it right, you get no leafpad.

like with any other technical task, you may have to ask on a forum. thats ok.

but you have all the power when you run mkfigos, because its not an iso-- its a very specific list of instructions for modifying a distro you know WAY better than fig os.

and yes, it could be used to modify devuan. or puppy linux. or artix. or...

i didnt mention, that i made it to modify TWO distros. at the same time. into a single iso.

i dont use it for that anymore, but thats what it was designed to do-- mix two distros together.

even if you never use this, i think there are some ideas here that maybe you can use depending on what you want to do.

happy remastering, happy "devuaning"


#2 2018-05-23 09:54:35

Registered: 2017-03-11
Posts: 38  

Re: largely for siva (+ anybody interested): distro remixing methods

There is "also" Devuan live-sdk:

which is quite easy to customise and allows to obtain a remastered Devuan with very little effort.


#3 2018-05-23 13:52:16

Registered: 2018-05-14
Posts: 68  

Re: largely for siva (+ anybody interested): distro remixing methods

yep, live-sdk too. only heard of it once, would have included that if id thought of it.


#4 2018-05-26 12:57:08

Registered: 2016-11-25
Posts: 912  

Re: largely for siva (+ anybody interested): distro remixing methods

The correction you requested:
While I have made a few experimental isos that started with a debootstrap install, I usually start with a netinstall iso and un-check everything except standard system utilities in the tasksel window. Add the cli refracta tools and make some config changes, and then make the no-X iso. 

For the desktop iso, I start with an install from the no-X. That way, I still have both systems and can update both no-X and desktop isos.

...and the one you didn't:

Older versions of refractasnapshot used the isohybrid command from isolinux. More recent versions make the isohybrid as part of the xorriso command.

I like the idea of changing an existing iso. David Hare (dzz of Exegnulinux and Refracta) wrote a script to do that, and that script was included in refracta8 (jessie). I should make sure it still works and include it in refracta9.

remaster-snapshot does the following:
# Four stages (script will execute one selected action only then exit):
# 1. Extract and unsquash a live-cd
# 2. Chroot the unpacked system with appropriate bind mounts
# 3. Prepare for "live" use and squash the unpacked system
# 4. Build a new ISO

Another place to customize a system is during the installation. Refracta installer has a point where it pauses to allow you to chroot into the installed system and make changes. You can edit configs and add or remove software at this point. (Note: you could also do those things in the live session, before running the installer, but adding software would use up a lot of RAM.)


Board footer