Home | News | Download | Packages | Forum | Wiki | Github

Mklive


(Alex) #1

Would like to learn how to make a live-ISO of my installed void.
Can not figure out / find info how to install the tool.

xbps-install -S mklive returns no results.

Added repository=https://github.com/voidlinux/void-mklive
to /usr/share/xbps.d/00-repository-main.conf
xbps-query -L returns only the default void repo (http://repo.voidlinux.eu/current)
Have no idea if that is the link to that repo, just guessing.

Did I enter wrong link to the repo.conf-file?
Do I need to register an account at github to use repos there?
Do I need to manually compile the tool?
Do I do any thing right? :sweat:

Laptop HP mini N455 Atom (64bit), 2gb ram 250hdd
void-live-x86_64-20160420-cinnamon.iso, fully updated 05-Dec-2016


#2
$ git clone https://github.com/voidlinux/void-mklive
$ cd void-mklive
$ make
$ ./mklive.sh -h
$ ./mkrootfs.sh -h
$ ./mkimage.sh -h

(Userx) #3

take a look at that . you get a full blown Void System on a USB Stick. it is rather easy to do. I got step by step … networkManager and lxdm just soft link them to /var/service, then sv … start, to get them up and running.

https://wiki.voidlinux.eu/User:Userx


(Alex) #4

Thanks @Duncaen for pointing me to where and how to start. Great help!
Installed git and make. Ran the procedure.
./mklive.sh -c /path/to/cache/dir -k se -l se_SE.UTF-8 -p “cinnamon nano iptables”

I was hoping for a custom ISO like the official one downloaded from Void.
(Live-boot into Desktop Environment, including void-installer, nano, iptables)
And customized with personal desktop settings.
Although I thought “Naaah, I doubt it can be just that easy…”

Cinnamon, nano, iptables was added to iso during creation.
Found instructions on burning ISO to USB with dd.
USB was booted, but I saw a couple of errors during the start-up and ended up at the prompt of emergency shell?
Do not know if I did some thing wrong, or creating an iso of live-Void like the official one requires much more knowledge and work than just one line in CLI.

And thanks @userxbw, always good to have alternatives.


(Michael Aldridge) #5

@Alex

Take a look at the dracut directory within mklive. The scripts in that directory are responsible for creating the live environments you see on the official images. The build-x86-images.sh script may also be of interest as it shows how to call mklive.sh with the appropriate arguments to include additional packages.


(Alex) #6

Ok… I did the first tree steps in @Duncaen’s post
red the build-x86-images.sh.in with nano, as advised by @maldridge
found h) echo "${0#/*}: [-a arch] [-b base|e|xfce|mate|cinnamon|kde|lxde|lxqt]
as root:
./mklive.sh -b cinnamon -k se -l se_SE.UTF-8 -p “iptables nano” ( l is a lower case “L”)
the prosedure stops at step 4/9 with output:
[4/9] Generating initramfs image (xz)…
chroot: failed to run command ‘env’: No such file or directory
ERROR: Failed to generate the initramfs

When I trired
./mklive.sh -k se -l se_SE.UTF-8 -p “iptables nano” ( no " -b cinnamon " )
the procedure comletes all 9 steps and generates an iso.
I red instructions in specified locations several times. Can not find any thing else to try.
Am I missing some thing?
(Edit) Hmm… is -b only for ./mkimage.sh and not for ./mklive.sh ?


#7

No its a different b flag.
-b cinnamon etc is only for build-x86-images.sh.
This is the only script that knows about desktop environments.


(Alex) #8

Ok.
Does it mean that I can not create a custom, live, cinnamon, x86-64 iso with mklive?
or
does build-x86-images.sh creates a custom, live iso?
If later, do I then need to specify the arch? (x86 / 64)


#9

You can, but you have to specify all the packages from build-x86-images.sh listed in BASE_PKGS, X_PKGS and CINNAMON_PKGS.

Its just a wrapper script which calls ./mklive.sh with all the necessary packages for a desktop environment.

No, build-x86-images.sh is just some small script to automatize the ISO generation, it doesnt allow adding other packages through a commandline argument, you would have to edit the script or call mklive.sh directly with all necessary packages, described earlier in my answer.

Its really not that complicated, build-x86-images.sh has a list of packages that are necessary for the desktop environments and it calls mklive.sh.
If you want a custom image with a desktop environment you just have to see/read how build-x86-images.sh does it.


(Alex) #10

Ok, this is what I came up to:
./mklive.sh -k se -l se_SE.UTF-8 -p “dialog cryptsetup lvm2 mdadm xorg-minimal xorg-input-drivers xorg-video-drivers setxkbmap xauth font-misc-misc terminus-font dejavu-fonts-ttf alsa-plugins-pulseaudio lxdm cinnamon gnome-keyring colord gnome-terminal gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox-esr iptables nano”

All 9 steps completed.
(renamed iso), burned to external-usb-hdd with **dd if=/**path/to/live.iso of=/dev/sdb (usb-hdd), booted usb-hdd and it loaded into live cinnamon DE just like the official iso.

Trying to open Terminal - failed (no matter bottom-de-panel or the “start-menu”)
When trying to open, the round, rotating “loading symbol” rotates for some time, then cursor returns to the arrow-pointer.

(also, keyboard was not swedish, se, but still default, us. That is a secondary headache though)


#11

Are you connecting via NetworkManager before you attempt to open terminal or other applications? If so you’ll need to tweak the hostname setting for the live disk, by first confirming that it’s set to a static name (such as ‘void-live’ in /etc/rc.conf), and then adding the following to /etc/NetworkManager/NetworkManager.conf:

[keyfile]
hostname=void-live

This issue tripped me up in my early Void days. Also, thanks to Duncaen and maldrige for taking the time to lay this out explicitly. I’m going to spin my own image, hopefully this weekend, and will thoroughly document the process in the wiki for future Voiders.


#12

Have you documented your process?


#13

@AnachronGuy well it just so happens that I am building a fork of Void to help increase linux knowledge inside my university. We already had a distribution, known as Icabian (it mixes the name of the uni with debian). However, the linux people in my uni slowly disappeared, being me the last person in the Linux association we have (while being alone, some people ask for help, so it’s not that boring, and I get free PCs so it’s not that bad).

Yesterday I started creating a very rough script to automatize the process, which I just uploaded it to github (please, have in mind it is as shi*** as it gets, think of it as a draft). It is commented in Spanish, but I wouldn’t mind rewriting all the comments into english, it would take me less than 5 mins.

There is one problem that I came across after the first successful build. Mklive.sh does not expect any modification done by the user apart from selecting several other packages -p. So I’ll have to modify the mklive.sh script to call for an external function in which I will define all the changes to the system before the .iso is created.

Feel free to ask any more questions, yet have in mind my knowledge is rather limited at the moment.


#14

interesting.

I am on a similar path, have a look at my mklive repo on github if you like. nothing special though…
I used some patches i found useful from hrmpf (also a mklive fork, different goal though). i also patched mklive to detect different kernels (mainly intended to detect linux-lts package instead of latest kernel), as that is demanded by my needs. these are just first steps, until i have more time to go deeper.

Maybe we can team up and trade ideas / solutions

PS:
building is as simple as

#!/bin/sh

BASE_PKGS="base-voidstrap linux-lts libgcc glibc-locales wpa_supplicant wifi-firmware ethtool acpid "

./mklive.sh
-T “ExampleIso1”
-N “ExampleIso1”
-b “${BASE_PKGS}”
-p “$(grep ‘^[^#].’ examplePkgs/example.packages)”

PPS:
the-maldridge’s work on void-mklive is also worth noting.


#15

@ferviron You created Icabian ?! :clap: Interesting work, I am looking your script, unfortunately for me I do not speak Spanish but it’s not a big problem…

But why other students / teachers are not interested in Linux ?? It’s sad to hear… :slight_frown:


:construction_worker: In the past I tried several times (with no success) to build a Void live ISO which would look like the GParted Live ISO.
Like GParted Live, but with a Void fluxbox base system instead of a Debian one.

It could be called VParted Live, just an idea…


#16

@Piraty Thanks for all the feedback! Christmas is over and I no longer have the same free time as before, work is piling up. I’ll read the-maldridge’s work, it seem he is working in an image for the RPi3!

Sure we can share as many ideas as you want, PM are always welcome, there is no need to knock, door’s open.
I still have to study ./mklive.sh code. My knowledge in shell is limited (though I am currently reading TLCL, great book!) so I hope that by summer I’ll have most of it figured out (fluid dynamics are not helping :smile:).

Nein, nein, nein :smile: I was not the original creator of it at all by far in distant lands. I am just going to rebuild it in Void, instead of Debian (to keep it updated and fresh and stuff…)

And as I said, if someone wanted the comments to be in English… Well, they are now, so it is easier to follow what is going on :slight_smile: . I am going to document the files quite a bit, since someone will have to continue it after I am gone.

Go on with your project! Sound very interesting, and should’t be difficult to pull off! Any questions just ask!

My uni is focused in engineering, IT and industrial, nothing goes related to CS (we obviously have to learn how to do electronics design and microcontroller programming, mostly C, in IT introduction to OSes is taught, with ubuntu, tho) but all is done through Windows, and people are not that interested in having to learn another complicated OS, and being FREE is not something they really appreciate sadly…


#17

No, but another void core member is indeed (You don’t seem familiar with github it seems…). I think most of the work is done, but there is no boot-ready image yet. one would have to create it on it’s own. That would be one of the first 64bit systems for rpi3 if i read correctly.


(Masato the Empty) #18

I think one of the things he was working on was 32-bit hybrid install (32-bit EFI on 64-bit hardware, so 32-bit loader bootstrapping 64-bit EFI kernel). Intel Baytrail tablet I think. He mentioned having been working on it in the IRC channel.

Maybe that means I can revisit the UEFI version of the install article I did (I had to put in notes regarding 32-bit UEFI not working out of the box with the April 2016 live images.)


#19

which one? wiki?


(Masato the Empty) #20

Yeah; it’s the one right below the regular install article. It’s the same walkthrough with notes specific to UEFI setup. In my tests for that, I found a few cases don’t work well or at all because the CD isn’t set up.

  • 32-bit CD lacks a grub-efi package, so you have to install it into the environment
  • script is hardcoded to assume 32-bit is always legacy, EFI is always 64-bit. You have to edit it or install grub manually.
  • 64-bit CD doesn’t have ia32 grub EFI loader, so you can’t load a 64-bit OS on 32-bit firmware at all by that walkthrough (you have to do things completely different). I think this is one of the things maldridge was working on specifically for Baytrail.

If those things are resolved, it’d be nice to be able to get rid of those warnings and extra package install notes. (since these things can all be done, just not with the default toolset available on the April 2016 ISOs.