If it's not on-topic, it's in here.
Post a reply

New forum subscriber

Wed Apr 27, 2011 12:01 pm

Greetings all, I just registered here. I recognise names from some of the most informative and interesting posts I read on other forums. Refracta has been on my "must-investigate" list for a while, I finally got round to trying it (so far only in virtualbox) and found no major problems. First impressions are definitely a great job here, well done Refracta team.

I am particularly impressed with fsmithred's latest installer scripts.

I would like to ask if this forum is strictly for Refracta "as-is" or can include more general live-image discussion (I know of nowhere else) For example:

"refracta-snapshot" (which I have heard of but can't find much info on)
fsmithred's scripts (including zinstaller, the generic debian-live installer)
modifications to suit particular requirements (other desktops, package configurations, wheezy/sid, ........ )

Re: New forum subscriber

Wed Apr 27, 2011 2:37 pm

Hi dzz.
There has been some discussion here regarding builds in general. fsmithred is the man with the kung-fu grip and Dean is still lurking about. There's a (more-or-less) anything goes attitude toward posting here, so I'd say have at it and start a discussion.
(I'd post a welcome image, but I fear Nadir would post a retaliatory image...) :D

Re: New forum subscriber

Wed Apr 27, 2011 3:46 pm

Yeah, what EDP said. I had a nice welcome message all typed out, then I got a phone call and forgot to copy/paste my post to a text editor in case I got logged out. Well, I got logged out, and the post evaporated.

Anyway, welcome to the forum, and I think it would be great if we shared ideas. Someone at duf expressed interest in using the installer with his remix of lmde/vinux, but I haven't heard back from him.

Look at /usr/local/lib/refractasnapshot/refractasnapshot.py to see the commands. It rsyncs the system to a temporary location, squashes it, then makes it into a .iso file. Meandean wrote that one. I might convert it to bash at some point, so that I can maintain it. (In case things change and it stops working.)

zinstaller is several versions and name-changes ago. Latest ones are installerz-debian.05 and installerz-refracta.05, the latter renamed as refractainstaller-new in the release. I can't recall what the last changes were in the script, but it's newer, so it must be better.

Re: New forum subscriber

Sun May 01, 2011 10:44 am

I had a look at refracta-snapshot (I don't know much of Python) and tried to "dpkg -i" the 8.0.4 deb on a non-refracta squeeze system to see what it would do.

Failed because live-initramfs is a listed dep (is that not a transitional "dummy" package, post-lenny?)

Solved that, then calling "/usr/local/lib/refractasnapshot/refractasnapshot.py" in a terminal returns:

Code:
You do not have all the dependencies!


That was because python-glade2 was not present. As there are probably other "necessary deps" not listed in the control file that's as far as I got for now.

An updated bash version would be superb, even better if portable to other debian-live builds.

Re: New forum subscriber

Sun May 01, 2011 1:29 pm

I think python-glade2 might be the last one, but I guess that depends on what you already have installed. If you can wait a little while, (and I really do mean little) I'll have a bash version for you. Running the first test now, and it's about 2/3 done squashing the filesystem.

Yes, live-initramfs is listed as a dep, but that package has been replaced with live-boot-initramfs-tools. I'll make sure to change that whenever I get to packaging the bash script in a deb file. That could be awhile. For now, I'll put it in a tarball.

Copy the tarball to /usr/local/lib/ and unpack it. It should unpack into refractasnapshot/. Then move the script out of that directory and put it somewhere in your path. I'll be putting it in /usr/local/bin/ when it's debianized. Then run it as root. I think that's it. Oh yeah, make sure you have enough space. It copies your entire filesystem to /tmp/work, so you need to have about 2/3 free space. It also creates the iso under /home/snapshot, so if you have a separate /home partition, make sure you've got enough free space for that to fit.

All I did was take the commands out of refractasnaphot.py (8.0.4) and put them in a script. I don't know any python either, but all the commands are on lines that start with "os.chdir" or "os.system" or some such. Other stuff in the tarball is needed for the build.

Oh cool, it's done. I've got /home/snapshot/snapshot.iso, so now all I have to do is sftp it out of vbox and then boot the iso in vbox. I'm pretty confident it'll work. I'll edit this post with a link to the tarball when I upload it. That'll probably be in less than an hour.

It boots. Here's the link. Let me know how it works for you.
http://distro.ibiblio.org/pub/linux/dis ... a/testing/


.

Re: New forum subscriber

Mon May 02, 2011 1:47 am

Failed because live-initramfs is a listed dep (is that not a transitional "dummy" package, post-lenny?)

live-initramfs is listed to ensure the system can boot and run live

package name changes suck....but nothing I can control...


That was because python-glade2 was not present. As there are probably other "necessary deps" not listed in the control file that's as far as I got for now.

oops....good catch....that would be the only thing i can think of that isn't listed.
rsync, squashfs-tools, genisoimage, live-initramfs, and python-glade2

Re: New forum subscriber

Mon May 02, 2011 2:28 pm

Success!

An unusual one here that must make a good "portability" test. One of my live ISO's, current wheezy with Trinity and LXDE desktops, runlevel default set to 5, grub-legacy, some custom live-config scripts. Made manually from a debootstrap and chroot, not live-build tool.

There is a virtualbox "install" of that here, done recently with installerz-05. That too was a good success, with just a few minor tweaks needed for the Trinity stuff (autologin, death to sudo) and the runlevel mod

First attempt with the bash version failed, the / was too small. A secondary vdi and minor script tweak to change the "work" location sorted that.

Some time later, there was the ISO! And it boots fine in a new virtual machine. More tests to do but it's looking good. This opens all sorts of possibilities, machine clones and more.

VB on an old xp3200 single-core is slow going, mksquashfs takes ages, to sftp 700MB takes half an hour.

My thanks must also go to the author of the python version, where the basic idea and process originated from. Although it's not easily readable, understandable and editable if you don't know Python (I'm no bash expert either), what it can do has really great potential.

Suggestion for future, some default-override options:
Make and use temp and work directories in another partition/disk if needed
Don't delete temp and work directories and seperate the script process into stages (allow to customise/modify them manually without starting from the beginning)

Re: New forum subscriber

Tue May 03, 2011 11:12 am

Thanks, dzz. Good suggestions. I was thinking about the first one, and I made a variable for the work directory and commented it out, just to remind myself to do it. There has to be a way to add that directory to the rsync excludes file, so any old snapshots don't get copied in the image. I believe I can use some code from the installer for that.

The second one I hadn't thought of, but leaving the rsync'd copy in place would definitely make repeat runs go a lot faster. There are a couple of minor issues with that - it'll screw up the free-space estimate, and it'll use up a lot of disk space. If you know what you're doing, those aren't problems.

Re: New forum subscriber

Tue May 03, 2011 2:05 pm

dzz wrote:My thanks must also go to the author of the python version, where the basic idea and process originated from. Although it's not easily readable, understandable and editable if you don't know Python (I'm no bash expert either), what it can do has really great potential.

Actually started as bash commands and a howto do it your self posted in a forum. Then it became a script. If you call a handful of bash commands a script. Then came the python/glade wrapper because I thought more 'normal' users would be interested. Of course that 'python' is just bash commands wrapped up in a python call and with a glade gui that I honestly only have hlaf a clue how to tweak.

Anymore I feel snapshot should be more of a 'technical' users tool. Something someone should have to tweak before running so that it does what they want it to do rather than some default....or maybe the default should be ultra safe and sane....but then it kind of loses some usefulness if you cant just slap it in and run it...but then you have bob that has twenty gigs of pr0n sitting in his home folder...or you have someone that has ten gvfs mounts on remote locations with terabytes of data....or you have someone that has a odd mount point like /music and twenty gigs of music sitting in it....how to handle all those variables...

I have actually wondered if we should define exactly what IS backed up rather than excluding some stuff that may or may not need to be....

Of course I also want to stop using rsync and just squash the system itself into a file. That would save a shitload of space and be faster. But I have never got to a point with it that I feel comfortable that I can understan/explain it and have some confidence in the process...not to mention that squashing in lenny is different than squeeze.....and I havent even played with wheezy or sid yet...

But fsmithred gets to worry about that now ;)

although I am hoping he will host a meandean-refracta version if I ever get enough time to create something stupid again... :shock:

Re: New forum subscriber

Wed May 04, 2011 12:38 am

Sure, "snap it and go" with sensible defaults should stay. But by it's very nature, snapshot will also appeal to more technical users who want/need to tweak stuff, or have specific limitations (e.g. space distribution) This can be (already is) a versatile tool with numerous potential uses. Here, for example, first priority will be a custom USB "travelling OS"

It would also be good to not get over-complex; become a Chinese puzzle that only the developer could understand!

As we are still relying on rsync for now, some more suggestions, for the snapshot rsync-excludes:

A user option to easily edit rsync-excludes (nano?) without trashing the original (e.g. exclude *.mpg, *.iso)

Removing these shaved 40MB+ from my ISO. They get regenerated anyway:

/var/cache/apt/pkgcache.bin
/var/cache/apt/srcpkgcache.bin

and apt lists:
Code:
ls /var/lib/apt/lists| grep -v lock| grep -v gpg| grep -v partial

/var/cache/apt/archives/*.deb

Probably most of /var/log. Maybe more.

Refracta is a fine project...I'm even getting to like XFCE!
Post a reply