system2iso script

Forum rules
We don't support installations in VirtualBox, VMWare, qemu or others. We ignore posts about WINE, PlayOnLinux, Steam and Skype. We don't support btrfs, lvm, UEFI, side-by-side installations with GPT or dualboot with anything newer than Windows XP.
Google your problem first. Check the Wiki. Read the existing threads. It's okay to "hijack" an existing thread, yes! If your problem is not yet covered, open a new thread. To get the quickest possible help, mention the exact release codename in your post (uname -a is a good idea, too). Due to the lack of crystal balls, attach the output of lspci -nnk if you encounter hardware problems.
rufio
Virgin
Posts: 7
Joined: Tue Jan 14, 2014 12:10 am

system2iso script

Unread post by rufio » Tue Jan 14, 2014 1:47 am

system2iso
In the last days I worked on a set of scripts that can create a snapshot of your running system and squash it to an ISO. The framework is not yet fully finished (right now, bbqinstaller is the installer) but I expect it to be ready by the end of November. What works now is "system2iso" -- and it does work well. The "Baby" is actually created with it.
Hello. I registered to express my interest in the system2iso script. I'm looking forward to seeing how/why it differs from bbqsnapshot.
Is a "ready" version yet available ?
(asking because http://sourceforge.net/projects/linuxbb ... amebuffer/ still shows an Oct2013 for the "baby" iso)

Thanks in advance if you're willing to post the WIP script to zerobin or pastebin

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: FRAMEBUFFER: Baby (U-Series) Release News

Unread post by machinebacon » Tue Jan 14, 2014 3:00 am

Hello rufio,
yes, the script is work in progress and will be included in all future BBQ releases as 'universal solution'.
The difference to bbqsnapshot is that it is more interactive and lets the user change the setup inside a chroot environment for easier fine tuning. It is part of a framework that - in the final version - can build a system in a clean environment, much like Debian Live or the FULLSTORY, but independently of the distribution, create a snapshot, and install this snapshot. The system2iso script is, right now, only working for Ubuntu (upstart/casper), but I am working on another version that uses systemd and isolinux.
Please be patient, I think the final version of system2iso for Debian will be ready in February.
Thanks for your message and registering to the grill!
..gnutella..

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: FRAMEBUFFER: Baby (U-Series) Release News

Unread post by machinebacon » Tue Jan 14, 2014 3:07 am

Sorry, forgot the link :)

https://github.com/machinebacon/sys2iso

The scripts are system2iso-* and of course the grub.cfg

(the sys2iso* files are a wrapper above the snapshoter and installer)

Keep in mind that this is for Ubuntu now.
..gnutella..

rufio
Virgin
Posts: 7
Joined: Tue Jan 14, 2014 12:10 am

Re: FRAMEBUFFER: Baby (U-Series) Release News

Unread post by rufio » Tue Jan 14, 2014 11:43 am

aw, not what I expected.
create a snapshot of your running system and squash it to an ISO
This is a remastersys -type deal. Create a redistributable respin from your running system...
Okay, here's a couple points of feedback regarding the WIP anyhow.

https://github.com/machinebacon/sys2iso ... system2iso
script bails if not run by root. So, the call to sudo
sudo chroot
seems superfluous (or I'm failing to comprehend why it's desirable here)

https://github.com/machinebacon/sys2iso ... iso_chroot
invocation of grub-mkrescue necessitates the presence of grub2 which, in turn, depends on xorriso v0.5.6+
(ouch. 'Cept for mint and bbq, I don't think many of the distros I hop between have embraced grub2 yet)
Hmm, they _might_ be using grub v1.99 and would have grub-mkrescue available.
(FWIW, beyond the flicker of curiousity about casper, I have zero interest in Ubuntu.)

========

refractasnapshot (pkg in debian sid in not latest version) is the best debian implementation I've seen
similar to sys2iso, but I'm not interested in a tool to support wannabe distroteers.
(I coined that term, distroteer, {a play on "mousekateer"} -- check it, it stumps google.)
but, ala refracta, providing a gui is a bad idea, IMO. User should be expected/required to read through the script and/or at least fine-tune the rsync excludes entries. For instance, user may have retrieved (but not installed) various deb packages prior to snapshotting, so that they'll be available for later offline installation... but oops, in the spirit of helpfulness, the script unconditionally calls apt clean.

My take on "snapshot" has been "create a faithful copy of my current system (usually performed within a live session) and prep it for installation to another bootable pendrive", and the workflow amounts to:
-- prompt to run bleachbit/sqlite (continue/exit)
-- cleanup additional hand-picked targets, esp paths containing stray lang files (continue/exit)
-- rsync (using tailored --excludes) to external partition (continue/exit)
-- create squashfs -> genisoimage (continue/exit)
-- isohybrid (continue/exit)
To be clear, I'm not asking you to tailor the WIP "snapshot" script based on my use case. I'm describing a different use case.

I've realized that I'll need to incorporate chroot+update kernel+update initramfs into the flow at some point,
but I got sidetracked {headspin} looking at how refracta, antix, and porteus(IIRC) accomplish customizing and rebuilding the gfxboot cpio.
(in the meantime, pushing the image to pendrive via unetbootin, i dont see that gingerbread anyhow).

With an eye toward privacy, I've been excluding etc/machine-id from the copy and regenerating it afresh during live boot. (I didn't find machine-id listed among the excludes in the bbq WIP.) I'm still wondering whether there are any other systemwide fingerprint-y details I might omit. (FWIW, no akonadi nor gvfs datastores exist on my system)

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: FRAMEBUFFER: Baby (U-Series) Release News

Unread post by machinebacon » Tue Jan 14, 2014 3:21 pm

sys2iso does what it says - it copies the existing system, changes to chroot, lets the user there delete or add content, then creates an ISO which can be booted from USB. If it's used for 'roast your own distrolette' or as a backup tool - that's more in the eye of the beholder.
Of course it requires grub2, as it is the standard for LinuxBBQ. Maybe I didn't explain clearly: this tool can be used for LinuxBBQ releases in the future (which are now based on Debian, Ubuntu and Slackware).

But thanks for the feedback. Not sure if the script is so much far off from what you expect it to do:

- create a copy of the system to /sys2iso
- chroot into /sys2iso as interactive session
- change the distro defaults (this can be extended to whatever should be automatically called)
- ...
- leave chroot
- squashfs/geniso/isohybrid

The wrapper that calls these steps one after the other is being prepared by Joe, and he is actually waiting for me to finish the other parts of the framework.

The few echo/read stops you can build in yourself, not a big deal. The only thing that the script does not do is to remove the language files - because they are already removed in BBQ spins, except for en_US. Bleachbit is a GUI tool and AFAIK has no TUI frontend, so this call is not 100% fitting most of our BBQ spins (because they come without GUI tools, or without GTK dependencies, whenever possible).

So, feel free to steal this and change it as you want. The idea (frame) for it works as it should, it is a kind of unbloated (sorry!) refracta script, without UI and with an interactive chroot session, instead of automated excludes.
..gnutella..

User avatar
ivanovnegro
Minister of Truth
Posts: 5449
Joined: Wed Oct 17, 2012 11:12 pm

Re: system2iso script

Unread post by ivanovnegro » Tue Jan 14, 2014 8:41 pm

Moved the discussion out of the release section for better visibility. ;)

Post Reply