Refracta Development, Scripts, etc.
Post a reply
nadir

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

## ready to do some tests

Fri May 27, 2011 5:38 pm

A friend of mine gave me two old PCs (the better one comes with 700Mhz and 250MB of Ram, but works good. The other one i don't know, but is said to be older).
If you got things i shall test (any form of installing, tell me what and i will go for it asap).
No clue what to do with those PCs (he wanted to throw them away, i asked him, he agreed and i did your "dd if=/dev/urandom of=/dev/sda1" from the encryption-thread. He was very amazed by that. Lol. ).
Long story short: i really would like to do some refracta test-installs. I could need a short tip what i should or could test. Else i always go for the most easy install, which works, and does not need to be tested.
fsmithred

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

## Re: ready to do some tests

Sat May 28, 2011 1:19 am

Test the latest installer and snapshot that's on my github. I do have a later version, but it's on my main computer, which died yesterday. I think it's the power supply, but the spare is in a box at another location. I'm on a borrowed laptop right now, so I can't even pull the hard drive to access my files. When I get to the new location at the end of this weekend, I'll have test equipment, extra parts and extra computers, but I may not have internet. In other words, you'll have to amuse yourself for awhile.
If dzz will post the link to the pastebin of whatever he did to my script, maybe you could play with that. I won't have time to look at it for at least a few days, so I'll expect a full report from you.
nadir

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

## Re: ready to do some tests

Sat May 28, 2011 11:35 am

ok, thanks.
I will:
- take the actual refracta iso (6.0.5)
- take the code from your github
- test the installer and the snapshot
- i will go for installations without encryption first of all.
If you got more ideas, just say. This is PC number 9 or 10 or so (some are borked, sure) , so i really got no serious use for it.
I will unplug its harddrive and put it in PC number 3 once i am done with the tests.
The other one my friend gave me comes with 120MB and has got hard times to run from a live.
nadir

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

## Re: ready to do some tests

Sun May 29, 2011 7:21 pm

making some notes here, just ignore in case it sounds confusing or in case you are busy
(in plain words: i can't find out if we did already speak about that or not. Perhaps its an issue with "simple" which is already solved, but i forgot it).
I started with the tests. I use refractainstaller-new from here:
https://github.com/fsmithred/refracta
and a stock refracta-6.0.5.
First test->
simple install and i choose exit.
Works
Second test->
simple install and i pick /dev/sda1 for the operating system.
Fails immediatly.
Errors in /var/log/refractainstaller-log
mention grep and mke2fs.
As of now i could not figure out where the problem is.
I tried it several times in a row.
Edit: i tested the installer-new from the menu, in VBox, and don't run into that proble.
Third test->
expert and leave all specail choices unselected.
pick /dev/sda1 for operating system
Works.
gparted seems to be broken (on a side note). (but only on the burned CD, not in VBox. Strange).
Will make more tests and have a closer look at the code itself these days.
No need to get exited, like said: i only store the info here.
nadir

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

## Re: ready to do some tests

Sun May 29, 2011 8:53 pm

nope, seems to be a blind alarm.
after i tried the refractainstaller-new from the menu in VBox, i did the same with the downloaded version from github. Works too.
No clue what i borked on the PC, but it looks like its my problem
(either something with the PC/hard-disk, or something with the CD-iso, or something i can't think of).
sorry for that.
dzz

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

## Re: ready to do some tests

Mon May 30, 2011 1:25 am

Yes, I've been doing some snapshot tests and experiments with refracta and other Debian including Wheezy. I needed some specific options, e.g. temp files on another partition.
As fsmithred asked, one of my variations (deviations!) is posted here: http://paste.debian.net/118350/
@fsmithred, please note this is updated from my earlier pastebin as there were some errors. There will probably be more.
I'm posting this mostly to share some ideas, it was done for my personal use as an "interim hack", till the new "official" version is ready. Hoping to see snapshot evolve as a versatile and generic-Debian tool.
Please be careful if you want to test this, read through it first (there are some root rm -r commands in there). My scripting ability is not up to fsmithred's standard, I know what I want to do but not always how. It's not fully tested, some bits might just not work at all, it keeps getting changed.
Xterm is needed, it's not in refracta but small install size. Uses the existing snapshot lib files
fsmithred

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

## Re: ready to do some tests

Fri Jul 08, 2011 12:54 pm

dzz, I finally had a chance to look at your snapshot script, and I've borrowed some ideas for my next version. (or maybe they're ideas that you borrowed - I'm losing track.) Anyway, the new version is here - https://github.com/fsmithred/refracta/b ... nogui-0.04
Here's the config file that goes with it, in case you want to change some of the defaults - https://github.com/fsmithred/refracta/b ... pshot.conf
Put the config file in /etc, or edit the configfile variable at the top of the script. Other options get edited in the config file.
And here's the latest excludes file - https://github.com/fsmithred/refracta/b ... .list.july
This is a text-only tool. No zenity. I'll do that later.
You can change the locations of the rsync copy and the iso file, you can opt to save the rsync copy, which makes subsequent builds go much faster. (Note that --delete has been added to the rsync command because of this.)
You can select which kernel to use in the iso, in case you have more than one kernel.
The iso files get numbered (snapshot1.iso, snapshot2.iso, etc.) or you can optionally have them with date/time in the name.
I've tested it a bit, and it seems to work as intended. I'm still not completely satisfied with the screen that tells you about your disk space - if you save the rsync copy, the required amount of free space changes, and it can be confusing. Only tested in vbox, and did not try changing the work directory or the snapshot directory.
dzz

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

## Re: ready to do some tests

Mon Jul 18, 2011 12:36 am

Lost track a bit myself lately, too busy elsewhere. If some of those ideas are helpful, good. I will be back on the case more soon!
Doing a quick test on the new script. Using standard Refracta install for this and hoping it will work also for other Debian-live
Results so far:
The directory $work_dir/iso/live was not made (should it be done around lines 83 and 87?) so the squash didn't get made
There is a typo at line 27 "snapshot_exlcudes" (should be "snapshot_excludes")
Line 21 should probably be:
configfile="/etc/refractasnapshot.conf"
Having adjusted those, the whole process completed but no time to test the ISO today.
Extract from log:
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rsync: readlink_stat("/home/dzz/.gvfs") failed: Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1060) [sender=3.0.7]
The log could be simplified without the stdout from genisoimage
nadir

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

## Re: ready to do some tests

Mon Jul 18, 2011 11:43 am

dzz, i for one didn't get it running (before your post). I tried all i can think of (the snapshot version from system, downloaded the new version from github, downloaded that and the new excludes-list).
I will have a look at the lines you mention in your post.
Not sure when i will have the time. A short step-by-step what to change to make it run would be good. For me its much easier to run "lh config --bootstrap copy --debian-installer live" instead of hunting for what is wrong. I do it in the interest of science...
My resulting iso, /home/snapshot/snapshot.iso, is always around 500K.
As far i see that is my main problem:

> The directory $work_dir/iso/live was not made (should it be done around lines 83 and 87?) so the squash didn't get made

I had a solution for it, but forgot what it was. i am quite sure i even posted it here, somewhere, but can't find it.
nadir

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

## Re: ready to do some tests

Mon Jul 18, 2011 4:18 pm

this is as far as i could get.
I made some stops in the script (via "exit 0") and it looks like the error takes place in line 124:

Code:
  `rsync -a / myfs/ --delete --exclude="$work_dir" --exclude="$snapshot_dir" --exclude-from="$snapshot_excludes"`

I tried and changed a lot of things. The last things before it finally worked where:
a) I removed all, but made it look like:

Code:
  `rsync -a / $work_dir/myfs --delete --exclude-from="$snapshot_excludes"`

b) I changed the variable at the top to full path:

Code:
  `snapshot_excludes=${snapshot_excludes:="/home/user/exclude.list"}`

c) i changed the file exclude.list to look like this:(starting with a hyphen and an empty space, not sure if i need to start with /cdrom or cdrom after that...):

Code:
  `- dev/*
  - cdrom/*
  - media/*
  - target
  - swapfile
  - mnt/*
  - sys/*
  - proc/*
  - tmp/*
  - live
  - boot/grub/grub.cfg
  - boot/grub/menu.lst
  - boot/grub/device.map
  - etc/udev/rules.d/70-persistent-cd.rules
  - etc/udev/rules.d/70-persistent-net.rules
  - etc/fstab
  - etc/mtab
  - home/snapshot`

d) i also changed:
initrd_image=${initrd_image:="/initrd"}
to
initrd_image=${initrd_image:="/initrd.img"}
https://github.com/fsmithred/refracta/b ... nogui-0.04
i can't say if it will or will not work. But at least rsync runs now (instead of getting skipped, more or less, and giving me a nearly empty iso). More later.
Post a reply
Jump to:

Powered by phpBB © phpBB Group.

phpBB Mobile / SEO by Artodia.