Clonezilla

dforbes
Posts: 37
Joined: Tue Jan 12, 2010 3:48 pm

Clonezilla

Postby dforbes » Sun Oct 31, 2010 6:23 am

Just been trying out clonezilla again. In the install log, I get:


======= app install begin @ Sun Oct 31 12:52:33 +0000 2010 ==========
Installing app id c5rjmqz3jc under /var/hda/platform/html ENV=production
NOTICE: redirected 'http://downloads.sourceforge.net/projec ... 4-i686.zip' --> 'http://switch.dl.sourceforge.net/projec ... 4-i686.zip' ...
NOTE: file /tmp/amahi-download-cache/abfff2027f6b7cc0a2816fb65c6b7b8fd35d19ff written in cache
WARNING: this application unpacks into more than one file/dir. PLEASE contact the authors and well them to unpack into one dir only as most other apps so!
NOTE: check the unpack/ directory for all the files
Your HDA services have been restarted.
Your HDA services have been restarted.
Installation complete.
cp: cannot stat `/var/hda/web-apps/pmagic/html/uninstall-pmagic.sh': No such file or directory
sudo: no tty present and no askpass program specified
App: Clonezilla installed
======= app install end @ Sun Oct 31 12:55:15 +0000 2010 ==========

Question 1: Should I have installed pmagic?


Despite the apparent error message, it appears to have installed successfully and I can boot to clonezilla from my laptop on the network. As compared earlier versions, I notice that the Samba server address is filled in with the address of my router! (Rather than the hda.)
Question 2: Would it be easier to have that box populated with "hda" as Clonezilla will do a DNS lookup. (Certainly works for me.)
Finally, I can see that later boxes in the Clonezilla setup don't necessarily have suitable defaults in them. I guess that's coming over time? Quite happy to help with some of the legwork here, but don't want to duplicate effort if someone else is already working on it?

Question 3: Given ReDo has appeared, is there still the demand/interest in Clonezilla? I'm happy to help test etc, but to be entirely honest I've moved over to ReDo as my first choice on my own systems.

Dave.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Clonezilla

Postby bigfoot65 » Sun Oct 31, 2010 7:14 am

Just been trying out clonezilla again. In the install log, I get:


======= app install begin @ Sun Oct 31 12:52:33 +0000 2010 ==========
Installing app id c5rjmqz3jc under /var/hda/platform/html ENV=production
NOTICE: redirected 'http://downloads.sourceforge.net/projec ... 4-i686.zip' --> 'http://switch.dl.sourceforge.net/projec ... 4-i686.zip' ...
NOTE: file /tmp/amahi-download-cache/abfff2027f6b7cc0a2816fb65c6b7b8fd35d19ff written in cache
WARNING: this application unpacks into more than one file/dir. PLEASE contact the authors and well them to unpack into one dir only as most other apps so!
NOTE: check the unpack/ directory for all the files
Your HDA services have been restarted.
Your HDA services have been restarted.
Installation complete.
cp: cannot stat `/var/hda/web-apps/pmagic/html/uninstall-pmagic.sh': No such file or directory
sudo: no tty present and no askpass program specified
App: Clonezilla installed
======= app install end @ Sun Oct 31 12:55:15 +0000 2010 ==========

Question 1: Should I have installed pmagic?


Despite the apparent error message, it appears to have installed successfully and I can boot to clonezilla from my laptop on the network. As compared earlier versions, I notice that the Samba server address is filled in with the address of my router! (Rather than the hda.)Dave.
There is some issue there that I will take a look at today. Nothing wrong on your end.
Question 2: Would it be easier to have that box populated with "hda" as Clonezilla will do a DNS lookup. (Certainly works for me.)
Finally, I can see that later boxes in the Clonezilla setup don't necessarily have suitable defaults in them. I guess that's coming over time? Quite happy to help with some of the legwork here, but don't want to duplicate effort if someone else is already working on it?
Dave.
It is setup to poplate the IP, but the boot process appears to make it the gateway for some reason. I will have to check this more as well.

Clonezilla is not customizable for many options. I have researched and not found much we can pre-config other than what is done and the language for Amahi. Clonezilla has not provided much documentation for customization. It appears that if it was all run command line, then more could be done. That defeats the purpose though for mroe basic users who need the gui.
Question 3: Given ReDo has appeared, is there still the demand/interest in Clonezilla? I'm happy to help test etc, but to be entirely honest I've moved over to ReDo as my first choice on my own systems.
Dave.
Keep in mind Amahi is all about choice. Having more than one app is normal. I feel clonezilla is more stable and reliable at this point than Redo Backup. It has been around for quite some time and saved my bacon. Many folks still rely on clonezilla and it's development is constant.

In my opinion Redo Backup is relatively new and not proven itself. One downfall to Redo Backup that I found is its compatibility with graphics cards is limited. I have a few machines that cannot boot to it as a result.

I have not had sufficient time to test Redo Backup, but I presume the restore works well. Many people backup, but never restore until there is a catastrophe only to find out the restore is bad or does not work.

Also, please keep in mind that these are beta apps, so users are the main feedback mechanism we have. If you can find a way to make things work better, please let us know.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

dforbes
Posts: 37
Joined: Tue Jan 12, 2010 3:48 pm

Re: Clonezilla

Postby dforbes » Sun Oct 31, 2010 12:41 pm

All understood. I agree that the documentation for customizing clonezilla is a little limited. There are three ways forward that I can see:

1. Have several boot menu options that pass all sorts of interesting parameters to clonezilla.
2. Have a custom script that is pulled over by tftp and executed.
3. Create a custom squashfs filesystem on the fly as clonezilla is installed into the hda.

The last option seems hard. The second option is do-able (there's an example on the net) but I haven't got it to work yet. The first option has taken me most of today, but I seem to have got something usable. The key is to put something like this into conf/clonezilla.conf:

LABEL Clonezilla (Easy-mode)
MENU LABEL Clonezilla Live (Easy-mode)
kernel clonezilla/vmlinuz1
append initrd=clonezilla/initrd1.img boot=live union=aufs noswap noprompt vga=normal nomodeset nosplash fetch=tftp://192.168.56.10/clonezilla/filesystem.squashfs ocs_live_keymap="NONE" ocs_prerun="/sbin/dhclient -v" ocs_prerun1="mount -t cifs -v //192.168.56.10/Drivebackups /home/partimag -o user=xxxxx -o password=XXXXX" ocs_live_run="ocs-sr -g auto -e1 auto -c -r -j2 -k -p true ask_user ask_user" ip=frommedia live-config

Notes:

1. I don't know whether the ocs_prerun="/sbin/dhclient -v" is strictly necessary; I was trying to get it to do a proper DNS lookup so that I don't have to put the IP address in the mount command.
2. I'm assuming that we want to use a CIFS mount rather than NFS. Clonezilla's internals have more smarts to deal with NFS and in particular, while you can specify a CIFS mount from the boot options, I don't think you can nominate a server/share combo.
3. Having to put a username/password combo in the boot options is clearly suboptimal. Perhaps we could have a clonezilla user with a trivial password that just has access to the Drivebackups share?
4. It is possible to set the language and keymap from the boot options; perhaps the correct way would be to have them match whatever has been configured on the hda?
5. I haven't scrutinised the options passed to ocs-sr in detail; there are some to do with checksums etc that might be worth checking out.

I hope this is helpful?

Dave.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Clonezilla

Postby bigfoot65 » Mon Nov 01, 2010 4:57 am

Awesome. I will have to check it out and see what we can do with the app. Not sure about the cifs line though. I have a nfts volume that I put all my images on.

Did you find this info somewhere or was it from trial and error? I would interested to see how much more we can customize this app for users.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

dforbes
Posts: 37
Joined: Tue Jan 12, 2010 3:48 pm

Re: Clonezilla

Postby dforbes » Mon Nov 01, 2010 10:00 am

A bit of both really. Took a while on google to find some pages that hinted that it was even possible. These helped:

http://sourceforge.net/projects/clonezi ... ic/3868703
http://clonezilla.org/clonezilla-live/d ... ptions.doc
http://clonezilla.org/clonezilla-live/d ... manual.doc

Then I mounted the filesystem.squashfs and had a cruise around.

cd /usr/share/amahi-netboot/tftp/clonezilla/
mount -o loop filesystem.squashfs /media
cd /media/opt/drbl/sbin

Everything that begins "ocs" is relevant, but ocs-sr is key. My understanding is that ocs-sr is the "core" so to speak and has the most options that can be passed to it.

And after that I just played with options until it worked. Being able to PXE-boot from one VM to another makes it go a bit quicker...

Today's learning: the dhclient thing is unnecessary. When the clonezilla menu comes up, it offers Beginner or Expert mode. In Expert mode, many of the options that might be set in the boot parameters can be manually overriden. Options worth enabling, in my view:

One of the compression options: perhaps -z2p
-rm-win-swap-hib: remove windows swap and hibernate files
-fsck-src-part: run fsck before imaging partitions
-gs & -cs: to generate and check SHA1 checksums of the images. (-gm & -cm if you prefer MD5) I've tested it with the -gs and -cs in the boot parameters together and it Does The Right Thing, i.e. generates when saving partitions, checks when restoring and doesn't complain that both have been specified.
-p reboot/shutdown/etc (At the moment it drops to a slightly unfriendly text menu and it might as well just shutdown)

It might also be worth having a separate boot menu option to specify rescue mode (-rescue) and/or batch mode.

I've managed today to image and restore a complete linux install and confirm that it still boots after the event. No real surprises there, as clonezilla is generally very robust and all we're doing here is narrowing down the options presented to the user, by providing sensible defaults. I'm not sure about the "-g auto -e1 auto -c -r -j2 -k " bit though. (That seems to be: install grub=Auto, change geometry=Auto, prompt for confirmation, resize partitions, clone hidden data, don't create partitions.)

Two things I'm finding slightly frustrating: when clonezilla runs loads of text scrolls up the screen and if something has failed (like mounting the share) it's very difficult to track down what the error is (I expect it logs it somewhere, but I can't work out where). Secondly, I haven't been able to find any way of altering the default image name before saving it.

Didn't understand your point about cifs-v-ntfs? Doesn't cifs just mount the smb share? (And is therefore agnostic as to the underlying fs?) Or have I misunderstood your setup? Either way, the name of the game is to get the target volume mounted under /home/partimag before ocs-sr runs (hence the prerun stuff).

Dave

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Clonezilla

Postby bigfoot65 » Mon Nov 01, 2010 10:26 am

Awesome. I have been doing a little reading and see how I can make some things easier. I still need to play with it a bit more.

The key here is to make it usable by anyone on any platform. So have to be careful what options get hard coded, i.e. language would not be a good one. If we set it to English, the those who can't read English are at a disadvantage.

Once you have something working well, please post the menu command lines that you coded for PXE boot. I can then tweak if necessary and add them to the clonezilla app. Might be worth adding these as custom versus replacing the existing ones. Could call them advanced or something maybe.

Anyway, thanks for all the help and feedback on this one. I would love to get it more narrowed down so users can select backup disk/partition and restore disk/partition and do a backup/restore without all the extra prompts.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

dforbes
Posts: 37
Joined: Tue Jan 12, 2010 3:48 pm

Re: Clonezilla

Postby dforbes » Mon Nov 01, 2010 12:26 pm

Awesome. I have been doing a little reading and see how I can make some things easier. I still need to play with it a bit more.

The key here is to make it usable by anyone on any platform. So have to be careful what options get hard coded, i.e. language would not be a good one. If we set it to English, the those who can't read English are at a disadvantage.
Indeed. The language/keymap point is very important. Given that we can specify these in the boot options, could you not have the install script read the locale settings that were chosen for when the hda was first installed? That would seem a reasonable default, no? (Then as a fall-back you could have another boot menu option that does the full clonezilla thing with lots of options.)
Once you have something working well, please post the menu command lines that you coded for PXE boot. I can then tweak if necessary and add them to the clonezilla app. Might be worth adding these as custom versus replacing the existing ones. Could call them advanced or something maybe.
Anyway, thanks for all the help and feedback on this one. I would love to get it more narrowed down so users can select backup disk/partition and restore disk/partition and do a backup/restore without all the extra prompts.
The version I've got running at the moment asks very few questions:
1. Beginner mode or expert; if beginner, then
2. Do you want to save or restore?
3. Select disk or partitions to work on?
4. Image name?
5. Are you sure yes/no?

I'll finalise what I've done and post again. I'm thinking the first boot menu option should give you simple straight forward questions to answer and perhaps others that give you every possible option. That way newbies & gurus are both happy!

The only bit I'm not sure about is how to deal with the username/password for the share. Obviously its not ideal to hardcode it into the conf file; nor is it good to have a trivial password or no password at all. I don't much care for my network, but others might. I'm sure you guys have a policy for this kind of thing though?

Dave.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Clonezilla

Postby bigfoot65 » Mon Nov 01, 2010 2:06 pm

Grabbing the info language and key map info may be possible. If we could find/create a variable to hold those settings, then on install it would add it to the menu options automatically. That's how I get the IP address and insert it.

Awesome job on this one! I am excited that we can get it more automated. I think we can get the user name and password sorted out as well. I saw a boot option that allows it and you insert ask password to have it entered when needed.

I will experiment some myself and see what I can find. It might be better if you post the stuff in a wiki page. Maybe create a clonezilla notes that we can update accordingly.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Clonezilla

Postby bigfoot65 » Mon Nov 01, 2010 2:40 pm

Update:

I followed your options, but left off the -o password and it will prompt during boot for it. I would presume user name is the same.

That will allow users to do the backup and only have to enter their user name and password for it to work.

Awesome.....I can change clonezilla app and add the new options. I will however leave the keymap and language alone so it can be customized. I think I will run a few more tests first to make sure though :)
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

dforbes
Posts: 37
Joined: Tue Jan 12, 2010 3:48 pm

Re: Clonezilla

Postby dforbes » Mon Nov 01, 2010 3:07 pm

Update:

I followed your options, but left off the -o password and it will prompt during boot for it. I would presume user name is the same.

That will allow users to do the backup and only have to enter their user name and password for it to work.

Awesome.....I can change clonezilla app and add the new options. I will however leave the keymap and language alone so it can be customized. I think I will run a few more tests first to make sure though :)
I tried this, but unfortunately, it defaults to the username on the clonezilla live disk (which happens to be "user", I think) rather than prompting for a username. The other issue we have is that if the login fails for any reason, it will do so silently and the backup will proceed but to a location on the Clonezilla file system - not terribly helpful!

Could we generate a clonezilla user, a random password, put it in the clonezilla.conf file and make sure it's only readable by root?

You can get the current language from the locale command. I'd offer to write that bit for you, but I'm not sure where to find the install script. Below is my current set of three. The last item is very similar to the original one installed, I think. Will put some stuff on the wiki as you suggest, but it might be later this week, as I have to go and do some real work...

Dave

====


MENU TITLE Clonezilla

LABEL Clonezilla
MENU LABEL Easy start
kernel clonezilla/vmlinuz1
append initrd=clonezilla/initrd1.img boot=live union=aufs noswap noprompt vga=normal fetch=tftp://192.168.56.10/clonezilla/filesystem.squashfs ocs_live_keymap="NONE" ocs_prerun="mount -t cifs -v //192.168.56.10/Drivebackups /home/partimag -o user=david -o password=xxxx" ocs_live_run="ocs-sr -gs -cs -r -j2 -k -rm-win-swap-hib -fsck-src-part -z1p -um beginner ask_user ask_user" ip=dhcp live-config

LABEL Clonezilla
MENU LABEL Expert/Rescue mode
kernel clonezilla/vmlinuz1
append initrd=clonezilla/initrd1.img boot=live union=aufs noswap noprompt vga=normal fetch=tftp://192.168.56.10/clonezilla/filesystem.squashfs ocs_live_keymap="NONE" ocs_prerun="mount -t cifs -v //192.168.56.10/Drivebackups /home/partimag -o user=david -o password=xxxx" ocs_live_run="ocs-sr -gs -cs -r -j2 -k -z1p -um expert ask_user ask_user" ip=dhcp live-config

LABEL Clonezilla
MENU LABEL Generic
kernel clonezilla/vmlinuz1
append initrd=clonezilla/initrd1.img boot=live union=aufs noswap noprompt vga=788 nomodeset nosplash vga=normal ocs_lang="" fetch=tftp://192.168.56.10/clonezilla/filesystem.squashfs live-config

Who is online

Users browsing this forum: No registered users and 58 guests