Refracta Development, Scripts, etc.
Post a reply
dzz

- dzz
- Posts: 647
- Joined: Wed Apr 27, 2011 11:53 am
- Location: Devon, England

## Re: ready to do some tests

Thu Jul 21, 2011 1:42 pm

More snapshot tests. At least, to the point where a ISO is produced and boots to a desktop in virtualbox ( I'm using "real" installs to run the snapshot script not virtualbox)
Tried the new stuff with a non-Refracta Squeeze system. Success!
Regarding my version (dzsnapshot.sh) on the pastebin, that is also tested today to be working here on both Refracta and other Squeeze. I tried to lay out as clearly as possible in comments what is different and why. You will need to install xterm (not in Refracta). Usage is <su-to-root -X -c /path/to/dzsnapshot.sh>, it does not need to be called from a shell, can be a run command.. Obviously the contents of the pastebin should be pasted into a text file "dzsnapshot.sh" then <chmod +x> it.
Some bits of that are off the top of my own head, others lifted from elsewhere. I too don't remember what is what.
Anyone getting kernel panics must surely have something wrong with live-boot, live-config or the initrd in the installation?
Looking forward to trying it on wheezy/sid when I get time!
Please could someone post the correct and current url to get the lib files? it's not very clear ( I copied them from refracta install to the other squeeze)
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: ready to do some tests

Thu Jul 21, 2011 2:05 pm

I'm still using the lib files from the old refractasnapshot, which you can get here - http://distro.ibiblio.org/pub/linux/dis ... asnapshot/
I did a few more tests, in a fresh vbox install of refracta-6.0.5, using refractasnapshot-nogui-0.04.1. I used exclude.list.july (with the leading slashes on all excluded paths) and another excludes list without the leading slashes. Both ways created bootable isos, and /tmp/work/myfs was the same. (Set $save_work="yes" and rsync didn't need to change anything.)
I also had to add some code to the script on the fresh install - it failed at first, because the snapshot directory didn't exist. So I added:

Code:
  `# Check that snapshot_dir exists
  if ! [[ -d $snapshot_dir ]]; then
  mkdir -p "$snapshot_dir"
  fi
  `

right after the check for root near the beginning. That version (0.04.2) hasn't been uploaded yet. I'll wait to see if I make any other changes.
Edit: BTW, my isos are coming out to 612M with all the extra excludes that you (dzz) suggested. I'm pretty happy about that.
Nadir: Check that you're using initrd.img, and not just initrd. Use 0.04.1 or else edit the configs inside the script. That's my guess on what's happening, based on getting kernel panics before I fixed that typo.
Good call on noting that /tmp gets wiped on a reboot. I guess I'll add mention of that in the comments of the config file.
nadir

- nadir
- Posts: 1160
- Joined: Wed Mar 09, 2011 4:18 am
- Location: here

## Re: ready to do some tests

Fri Jul 22, 2011 5:42 pm

to make a very long story short:
after i ran snapshot in VirtualBox for six times in a row, all with kernel failures, the last one with live-build itself, i finally re-installed (with tears in my eyes).
Downloaded the actual versions from github/fsmithred, move exclude.list.july to /usr/local/lib/refractasnapshot/exclude.list, and that worked.
I seem to have borked something.
I will try your version, dzz, too. If you hear nothing, it worked too.
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: ready to do some tests

Fri Jul 22, 2011 6:09 pm

I just used dz-snapshot.sh inside my (almost) virgin vbox install of refracta-6.0.5, and it worked to create a bootable iso. I used my latest excludes list (exclude.list.july minus the leading slashes) and the iso came out the same size as my others. Right now, the only suggestion I have for dz-snapshot is that the screen that tells where the error messages go could probably be combined with the screen before that, which tells you what's about to be done.
Oh, I tried to pick a custom excludes file, and I could get as far as seeing the file listed in the directory where it was located, but I couldn't click on it. Not sure what the problem was. I tried that with the file in /home and in /usr/local/lib/refractasnapshot/, and neither worked. I ended up editing the script to point to the file I wanted (/usr/local/lib/refractasnapshot/exclude.list2.)
dzz

- dzz
- Posts: 647
- Joined: Wed Apr 27, 2011 11:53 am
- Location: Devon, England

## Re: ready to do some tests

Sat Jul 23, 2011 11:37 am

LOL! We develop and test snapshot, yet still bork our systems and have to reinstall from scratch!
Thanks fsmithred for finding those errors in the dzsnapshot. Added the error log location detail to the summary screen. Some minor mods to the comments.
Line 114 was wrong:

Code:
  `EXCLUDELIST=$(zenity --file-selection --directory --filename=/media/ --title="Please select a custom rsync-excludes file to use")`

Should be:

Code:
  `EXCLUDELIST=$(zenity --file-selection --title="Please select a custom rsync-excludes file to use")`

New pastebin with fixes: http://paste.debian.net/123868/
Hoping this (or any extracts of) is of some value to Refracta project. Not intended to detract from "official" dev stuff and hoping to see a deb soon! (the simplicity of the cli version with a config file is rather nice, how about keeping it going as well as gui?)
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: ready to do some tests

Sat Jul 23, 2011 9:32 pm

Yeah, we keep playing with stuff and tweaking it, and we're bound to screw things up eventually. I did a clean install because I couldn't remember all the changes I'd made to the previous install. They're all test installs anyway, so it doesn't matter. I'm a lot more careful with my main (real) installation.
Thanks for posting the corrections. I've never played with the file-selection window in zenity, but I'll probably be using it in the gui version of refractasnapshot. I'm planning to use some of your other ideas, too. There will definitely be a gui version and a non-gui version included in the next release of refracta. Not sure how soon I'll roll them (both) into a deb file. That's still a bit of a project for me to do it right. Maybe for testing, I'll use Dean's quick and dirty method of making a deb. More likely, I'll just wait until the scripts are finished and do it once. The gui version won't need a config file, since you configure stuff on the fly with the options window.
I think the nogui version is pretty much finished. Anyone think it needs anything else?
nadir

- nadir
- Posts: 1160
- Joined: Wed Mar 09, 2011 4:18 am
- Location: here

## Re: ready to do some tests

Mon Jul 25, 2011 5:59 pm

bad news, sorry. It broke again.
What did i do?
I installed. Tested snapshot, worked.
I rebooted. Removed apps. As far i can tell completely unrelated to snapshot or live-helper.
(abiword, gnumeric, zenmap, asunder, rosetti, xsane, ... like that).
Reran. snapshot made an iso. Booted. -> kernel-panic. Again.
No clue why or how.
dzz

- dzz
- Posts: 647
- Joined: Wed Apr 27, 2011 11:53 am
- Location: Devon, England

## Re: ready to do some tests

Tue Jul 26, 2011 2:26 am

> I think the nogui version is pretty much finished. Anyone think it needs anything else?

Two potentially useful extras went in the dzsnapshot:
1. md5sum the iso to a text file
2. config option to skip the rsync so a saved temp directory can be modified manually, then snapshot can reprocess it regardless of the state of current running system
nadir's issue makes a good case for snapshot as a deb, then dependencies won't get uninstalled. Far as I can see, they are:
live-config, live-boot, live-boot-initramfs-tools, live-config-sysvinit, rsync, squashfs-tools, genisoimage, zenity
You could get a package list with:

Code:
  `dpkg -l|grep ii|awk '{print $2}' >packages.txt`

and diff that against an original refracta list to find out what changed
Could also md5 the initrd and compare with Refracta original, maybe it got "updated"
If a live iso fails to boot properly you might be able to view the log from it's busybox shell (hazy memory) <cat /live/live.log>
nadir

- nadir
- Posts: 1160
- Joined: Wed Mar 09, 2011 4:18 am
- Location: here

## Re: ready to do some tests

Thu Jul 28, 2011 6:25 am

I gave up, and re-installed.
Did a first run of snapshot, worked.
Did a second, exactly the same, worked too (to exclude that simply the second run does not work).
Removed abiword and gnumeric, installed deborphan and ran aptitude purge ~c and apt-get autoremove.
Ran snapshot, worked. But:
Error during boot (directly after the screen where i choose to boot):
Loading...
/etc/init.d/live-config /lib/live/config.sh: not found
booted fine though.
I make very detailed notes now (which package do i remove, which gets removed by "apt-get autoremove", which by "deborphan", which by "aptitude purge ~c")
So: only little error messages after:
- abiword
- gnumeric
#----------------------------------------------------------------------#
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: ready to do some tests

Fri Jul 29, 2011 10:30 pm

I did a test similar to what nadir did. Remove abiword and gnumeric, made a bootable iso. Removed zenmap, asunder, ristretto, xsane, pidgin and gimp. Installed deborphan. Ran aptitude purge ~c and ran deborphan. Made another bootable iso. Nothing in the removal lists looked like it would cause a problem. I got no other suggestions right now.
Post a reply
Jump to:

Powered by phpBB © phpBB Group.

phpBB Mobile / SEO by Artodia.