Advertising

Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum https://forum.linuxiarze.pl

Part-1 How To Obtain Success Using Sparky-Backup-Sys Tool (Forked Remastersys)

Started by sasdthoh, March 23, 2017, 06:44:47 AM

Previous topic - Next topic

armakolas

Sparky Backup System has improved a lot and Pavroo has done very good job once again. Unfortunately, testing revealed some problems.
In Sparky backup gui, in the EFI option, the file name libefiboot1 should be placed before libefivar1, in order to correct the alphabetical order.

When I install by using "sudo apt install packagename", the /var/cache/apt/archives folder is emptied automatically when the installation procedure ends. This is a long awaited improvement, because there will be no need to clean the cache as often as before. Though, when I do the same installation with APTus, the deb file remains in the /var/cache/apt/archives folder. I think that APTus should be automatically emptying  the cache too.

Sparky Backup System > Cache removes all deb packages from system's deb cache folder (/var/cache/apt/archives/) and exactly the same is done by the command "sparkybackup cache". All correct here, so nothing to worry about.

Sparky Backup System > Clean did not delete the folder /home/sparkybackup-sys/. Though, the command "sparkybackup clean" worked as expected and deleted the folder /home/sparkybackup-sys/.

Sparky Backup System > Skel deleted all the files that existed in the /etc/skel/ folder and right afterwards copied, to etc/skel/, only some basic settings of /home/user/. The same actions are made by the command "sparkybackup skel".
This way, the created iso didn't preserve the settings that were made. This is not enough. It would have been more useful if it copied every file, hidden or not, that exists in the /home/user/ folder. After this action is completed, it would be helpful to show a reminder that the user should delete from /etc/skel/ the files that should not be included in the iso. The way Skel option works now limits its usability, because the user still needs to delete all the files at /etc/skel/ by hand, so as to be sure that the files which will afterwards be copied into /etc/skel/ will be the exact ones that the user wants to be in skel folder. Of course, copying everything from the home folder means that the home folder should have already been cleaned-up and kept small in size.

Sparky Backup System > Dist works correctly, but if we change our mind and press exit, when we see the "Click OK to create a backup iso now", it closes the program. It should simply return us to the main window, just like Sparky Backup System > Cache does.

armakolas

Sparky Backup System guide

Sparky provides Sparky Backup System to make custom iso images. If you make a spin of existing iso image or a hard drive installation of SparkyLinux you have to:
1. Change the iso image name adding 'community', 'custom', 'unofficial' or 'remix' in the new spin's name.
2. Let all the people know that you made an 'unofficial' spin which is NOT made by SparkyLinux 'dev' team members.
-----------------------------------------------------------------------

Install Sparky Backup System, if it is not already installed. Run "sudo apt install sparky-backup-sys sparky-backup-core" for installing both the graphical and the command line interface. When the iso creation procedure will have been completed, there will have been created three files: the iso file, a file with iso verification codes and a list with the installed packages and their versions.

Part-1: Upgrading and cleaning (junk files, system leftovers and trash files)

Run System Upgrade Tool to upgrade the system. Otherwise, execute the following commands:
sudo apt update (to see the packages that can be upgraded, run 'apt list --upgradable')
sudo apt upgrade (to install the upgradable packages, if any)
(simpler as a joined command: "sudo apt update | sudo apt upgrade")

Run Sparky Backup System > Clean (or "sudo sparkybackup clean")
to delete the folder /home/sparkybackup-sys, which hosts the previous builds.

Run Sparky Backup System > Cache (or "sudo sparkybackup cache") to remove cached deb packages and all orphaned packages. It executes the following commands:
1) sudo apt clean (Removal of all deb packages from system's deb cache folder (/var/cache/apt/archives/). Never use "sudo apt autoclean", because it removes only the old deb packages).
2) sudo apt autoremove (Removal of orphaned packages. Use it with caution because unintended results may occur with basic system files like Xorg, grub, etc)
3) sudo aptitude purge ~c (which usually suggests to remove the same packages as "sudo apt autoremove" does).

-delete all inside /home/user/.cache/thumbnails/fail, /large and /normal folders
-review home folder's hidden files (especially .cache and .config) so as to delete folders, files, settings, history and leftovers of uninstalled applications.
-run APTus > system > remove old system kernel (the previous kernels are not usefull if the latest one works fine)
-Do not delete all inside /home/user/.cinnamon/spices.cache/applet, /extension and /theme folders because at the cost of 1MB, more readyness is provided.

If it is not already installed, install trash-cli package (with "sudo apt install trash-cli"), and execute:
1) sudo trash-empty (with sudo, for administrator's trash)
2) trash-empty (without sudo, for simple user's trash)
The trash-empty commands delete the hidden trash leftovers from root user's and simple user's account. If the root and simple user's trash files don't get deleted, they will make the iso file bigger. Although simple user's trash files are not included in the iso build, it is better to use the trash-empty command to delete them. The smallest the file size, the better. (simpler as a joined command: "sudo trash-empty | trash-empty")
------------------------------------------------------------------------------------------------

Part-2: Deciding the default settings and files

After the preferred applications have been installed, make certain that all settings and preferences are set, like backgrounds, browser settings, theme preferences, icons, task bar appearance, prefered applications etc. Any kind of file may be added to user's home folder, at the cost of making the iso bigger. Delete any data that may reveal personal information. The user's home folder and default settings must be ready before following Part-3 guidelines.

-install new backgrounds: if you have a collection of backgrounds that are under GPL licence, you can add them in the distribution. Put the backgrounds in a folder and place the folder into /usr/share/backgrounds/ (root priviledges are needed). Copy from /usr/share/gnome-background-properties/ a simple xml file, with less than 15 lines of code, and paste it inside the same folder (usr/share/gnome-background-properties/). Rename the xml file, having in mind that the xml's filename will be shown in the left side of Cinnamon's background settings. Now, basic html knowledge is needed. Edit the xml so as to include 1) the path of every image file that exists in the folder and 2) a name for every background that is shown in the right side of Cinnamon's background settings.

-set the default background: The system uses as default wallpaper the "/etc/alternatives/desktop-background" file. The filename is "desktop-background" and it does NOT have an extension in the file name. It is a standard png graphics file, and so should the new wallpaper be. The filename must remain the same. Instead of replacing the original, back it up by adding a .bak extension (root priviledges are needed). Of course, the users of the created iso are able to change the wallpaper to anything they want.

-support UEFI booting: create the home/offline/ folder and place inside the following 6 deb files: efibootmgr grub-efi grub-efi-amd64 (or ia32) grub-efi-amd64-bin (or ia32) libefivar1 libefiboot1. Use apt-get download <packagenames of the 6 files> to downloaded them. Sparky Backup System will later copy them to the /etc/skel/ folder, together with the other /home/user/ files. The same instructions can be found at Sparky Backup Sys gui > EFI. UEFI works with Calamares installer (sparky installer) and with Sparky Advanced Installer.

-Home folder: delete all unwanted files inside the, not hidden, subfolders of the home folder (downloads, pictures, etc).
-Firefox > Preferences > Privacy and security > delete saved logins, clear history "time range: everything" (for deleting EVERYTHING and feeling safe), clear Data. Uninstall not usefull addons (possibly disable ublock origin).
-delete all keyboard layouts except of US-English.
-set the sound volume to 100%
-clear libreoffice's recent documents
-clear media player's recent documents (qmmp, vlc) and set the sound volume to 100%.
-toggle Nemo's location entry to "breadcrumbs", preferences/toolbar/show home button
-Nomacs: edit /home/user/.local/share/nomacs/settings.ini to remove recent files and folders history. Nomacs must have been executed at least once for this.
-update all files inside /user/offline/ folder. Use apt list <packagenames of the 6 files> and apt-get download <packagenames of the files in need of update>. No need for superuser rights in both commands. Alternatively, apt-get download <packagenames of the 6 files>, move them to /user/offline/ folder and delete the old ones.
-update anydesk.deb in /home/downloads/ folder. If Anydesk is installed, it must be purged, together with it's dependecies (anydesk libgtkglext1 libpango1.0-0 libpangox-1.0-0). After removal, delete home/.anydesk folder. The reason for the removal is that the username, which is generated by Anydesk, will stay the same for everyone who will use the iso of the distribution. Copyright prοblems may occur too.
--------------------------------------------------------------------------------------------------

Part-3: Copying settings and creating the backup

Run Sparky Backup Sys gui > Skel (or "sudo sparkybackup skel")
The skel command empties the /etc/skel folder and afterwards copies there all the files (and the hidden ones) from /user/home/.
Though, sparkybackup skel (both gui and cli) does not work as expected (*). Until it works the way it should, we have to start a file manager as root, set it to display the hidden files and folders and:
1) navigate to /etc/skel/ and delete everything inside it.
2) go to your user's home folder, copy everything, including all hidden items, paste them into the /etc/skel folder and close the file manager.
(*)The /etc/skel/ folder is deleted every time we use the "skel" command (gui and cli version) but both gui and cli version fail to copy everything from /user/home/ folder to the newly created /etc/skel/ folder. They both deleted the skel folder, created a new skel folder and placed inside only some hidden files of the /user/home/ folder.

sudo trash-empty
trash-empty
The above commands are executed again, because the deletions that we may have made with the previous file handling should not remain the trash folder.

Run Sparky Backup Sys gui > Edit (Be carefull not to remove the quotes when editing)
-WORKDIR no need to be changed
-LIVEUSER no need to be changed. The iso file that will be created, will use the username "live" and the password "live" until installing to actual hardware.
-LIVECDLABEL is what appears at the top of the iso boot manager's initial display. Change it to something more self-explanatory. (i.e: LIVECDLABEL="SparkyLinuxCinnamonRemix")
-CUSTOMISO label entry is where we actually name the iso file that will be created. It should be something short and descriptive. (i.e: CUSTOMISO="sparkylinux-5.4-x86_64-cinnamon-remix.iso")
-VOLIDxxbit no need to be changed

Run Sparky Backup Sys gui > Installer
-NewGrubDefLine no need to be changed. The entry may be removed, by leaving just the two quotes with no space between them, only if the user can understand the results of this change. (NewGrubDefLine="quiet splash")

Close all programs that do not need to be open.

Run Sparky Backup Sys gui > Dist (or "sudo sparkybackup dist")
This command starts the process of iso creation and may need varying amounts of time, depending on hardware and system resources. It uses 100% of the cpu and needs at least 8 minutes (or 37 under virtualbox). Do not use the system for other tasks while building the iso file. Once the process has been completed, use the file manager and check the hybrid iso's properties to make certain that the file size is normal. Test the iso file by writting it to an optical disk or a usb drive and trying to use it.

If a usb thumb drive with persistence is the target, users should read the special thread of Sparky Linux Forums about it.

armakolas

Athough I have written it in the previous reply, inside the Sparky Backup-System guide, rephrasing it may help solving the problem.

As far as I know, the skel command is supposed to empty the /etc/skel folder and afterwards copy there all the files (and the hidden ones) from /user/home/.
Though, when using Sparky Backup Sys gui > Skel or "sudo sparkybackup skel", things do not work as expected.
At start, everything goes well and the /etc/skel/ folder gets deleted every time we use the gui or cli version of the "skel" command. Then, a new skel folder gets created and placed inside.

The problem is what happens next. Both gui and cli version fail to copy everything from /user/home/ folder to the newly created /etc/skel/ folder. Only .cinnamon folder, .config folder and 4 hidden text files of the /user/home/ folder get copied. I have been using it since May 2018 and I never saw it working as I expected. Latest Sparky Backup version tested: 20181127.

tuatha-solas

Thank you very much for this thread.  :) Much appreciate. I've been able to create an iso, but it wasn't bootable/seen in the bios menu (needing to do UEFI-booting iso) ... I'm doing the process again, and have the 6 deb files in a folder called 'offline' in home directory, as before, but can see now that they aren't copied over into etc/skel. Just to ask which folder the 6 debs need to be copied into in skel.

I've just seen another thread about remastering, and it says there should be 5 dirs, but, if I open the iso in engrampa, it shows three folders: BOOT, isolinux, live.
BOOT contains Boot-NoEmul.img. Unfortunately no EFI or offline folders.




tuatha-solas


21grams

Following the backup tool instructions, it works very well and I'm sure a response is not needed to justify that.
The 6 files are not copied to etc/skel.
They appear in the /home/sparkybackup-sys/ISOTMP/offline folder needed to create the iso and are probably part of the 5 folders you refer to.
21grams >> light in flight

tuatha-solas

I followed the instructions. It didn't work, so a response turned out to be needed. Whatever the 6 debs have done, the folders needed are missing, so not seen/bootable. No worries. Had appreciated the (2018/abandoned?) tutorial here, but that's why I said maybe the package is broken, as, despite following this tutorial, things didn't work and there's not much else to read. Complicated business, and am not very tech, so am learning about MX Linux and glad of beginner-level tutorials, even though have been on linux since 2017. With too much changing on Linux, although I really am impressed how well Sparky runs and feel it should be a lot more popular, need to futureproof stuff, and have stronger backups generally. Anyway, good luck to Sparky.

View the most recent posts on the forum