I am struggling to get an automated install to work via USB key, I feel I am very close, just need pushing over the finish line. Instead of booting into the automated install, it goes into an interactive Clonezilla session. An error appears before the bluescreen session starts but the screen clears too fast for me to read it, I think it is a file not found.
I've set up a custom-ocs as follows:
------
if [ ! -f /opt/drbl/sbin/drbl-conf-functions ]; then
echo "Unable to find drbl-conf-functions - program terminated"
exit 1
fi
I created my bootable USB using unetbootin, and have modified my syslinux.cfg with the following stanza:
------
label restore
menu label Restore image from USB stick
kernel /ubnkern
append initrd=live/initrd1.img boot=live union=aufs vga=788 ip=frommedia ocs_live_run="/live/image/custom-ocs" ocs_live_extra_param="" ocs_live_keymap="NONE" ocs_live_batch="yes" ocs_lang="en_us.UTF8"
------
If I exit the interactive session and go to shell, "sudo su -" and then manually run the custom-ocs file, it works.
Do I need to make any changes in the /etc/ocs/ocs-live.conf file?
What else could be the problem? Something to do with the image being on a different partiton?
Any thoughts or suggestions welcome!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In your custom-ocs, I guess you'd better to create the dir /home/partimag before you mount it. i.e.
ask_and_load_lang_set en_US.UTF-8
mkdir -p /home/partimag
mount /dev/sda2 /home/partimag/ <------------
/opt/drbl/sbin/ocs-sr -g auto -c -p true restoredisk maverick-img hda
Steven.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I added the mkdir command before mounting the volume but it still does the same thing. Is there a log file generated somewhere where I can find out what the error says?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Also I've noted that if I put an echo or a sleep command in my custom-ocs, they are ignored. I wonder if my custom-ocs is being read at all but I don't know how to find out.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Not really... but you can manually run the custom-ocs by:
1. sudo -i
2. bash -x custom-ocs
It will give verbose messages.
If you are familiar with command "screen", you can enter screen to scroll back to read the messages.
Steven.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Does this mean the problem is with the boot parameters? The syslinux.cfg I am using looks like this (and both my 'backup' and 'restore' stanzas do not work as expected):
default vesamenu.c32
prompt 0
menu title Thin_Client_Image
timeout 100
label restore
menu label Restore from USB stick
kernel /ubnkern
append initrd=live/initrd1.img boot=live union=aufs vga=788 ip=frommedia ocs_live_run="/live/image/custom-ocs" ocs_live_extra_param="" ocs_live_keymap="NONE" ocs_live_batch="yes" ocs_lang="en_us.UTF8"
label backup
menu label Backup to USB stick
kernel /ubnkern
append initrd=/ubninit boot=live union=aufs vga=788 vga=788 ip=frommedia ocs_live_run="/live/image/custom-ocs-backup" ocs_live_extra_param="" ocs_live_keymap="NONE" ocs_live_batch="yes" ocs_lang="en_us.UTF8"
Make sure the file on your USB flash drive, i.e. "/live/image/custom-ocs" is the same one when you run "bash -x custom-ocs".
By running "type custom-ocs" in the Clonezilla live as root, you can identify the full path of custom-ocs.
Steven.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
ok I think I misunderstood your previous instructions :-)
If I go to root using 'sudo su -' and then type 'bash -x custom-ocs', I get "custom-ocs: No such file or directory". However if I cd into /live/image/ first and run the command, it works. Also if I try 'type custom-ocs' , I get custom-ocs not found. Should I copy the file somewhere else in the $PATH in the filesystem?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, I found you should put your customized script in /live/image/pkg/ instead of /live/image/.
When Clonezilla live boots, it will copy the /live/image/pkg/custom-ocs to /opt/drbl/sbin/.
For more info, you can check:
/etc/ocs/ocs-live.d/S03prep-drbl-clonezilla
Steven.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Steven, thanks for your help, I have eventually got this working after discovering some missing files in /etc/ocs in my Clonezilla installation. The version that is automatically installed on the usb stick by Unetbootin is not the same as the ISO that I downloaded from the site. I created the usb stick again using the ISO and it worked perfectly using the scripts I had created.
I've documented the process in case this could help someone else.
I am struggling to get an automated install to work via USB key, I feel I am very close, just need pushing over the finish line. Instead of booting into the automated install, it goes into an interactive Clonezilla session. An error appears before the bluescreen session starts but the screen clears too fast for me to read it, I think it is a file not found.
I've set up a custom-ocs as follows:
------
if [ ! -f /opt/drbl/sbin/drbl-conf-functions ]; then
echo "Unable to find drbl-conf-functions - program terminated"
exit 1
fi
. /opt/drbl/sbin/drbl-conf-functions
. /opt/drbl/sbin/ocs-functions
[ -e /etc/ocs/ocs-live.conf ] && . /etc/ocs/ocs-live.conf
ask_and_load_lang_set en_US.UTF-8
mount /dev/sda2 /home/partimag/
/opt/drbl/sbin/ocs-sr -g auto -c -p true restoredisk maverick-img hda
----
I created my bootable USB using unetbootin, and have modified my syslinux.cfg with the following stanza:
------
label restore
menu label Restore image from USB stick
kernel /ubnkern
append initrd=live/initrd1.img boot=live union=aufs vga=788 ip=frommedia ocs_live_run="/live/image/custom-ocs" ocs_live_extra_param="" ocs_live_keymap="NONE" ocs_live_batch="yes" ocs_lang="en_us.UTF8"
------
If I exit the interactive session and go to shell, "sudo su -" and then manually run the custom-ocs file, it works.
Do I need to make any changes in the /etc/ocs/ocs-live.conf file?
What else could be the problem? Something to do with the image being on a different partiton?
Any thoughts or suggestions welcome!
In your custom-ocs, I guess you'd better to create the dir /home/partimag before you mount it. i.e.
ask_and_load_lang_set en_US.UTF-8
mkdir -p /home/partimag
mount /dev/sda2 /home/partimag/ <------------
/opt/drbl/sbin/ocs-sr -g auto -c -p true restoredisk maverick-img hda
Steven.
Thank you for the reply.
I added the mkdir command before mounting the volume but it still does the same thing. Is there a log file generated somewhere where I can find out what the error says?
Also I've noted that if I put an echo or a sleep command in my custom-ocs, they are ignored. I wonder if my custom-ocs is being read at all but I don't know how to find out.
Not really... but you can manually run the custom-ocs by:
1. sudo -i
2. bash -x custom-ocs
It will give verbose messages.
If you are familiar with command "screen", you can enter screen to scroll back to read the messages.
Steven.
If I run these commands it works perfectly!
1. sudo -i
2. bash -x custom-ocs
Does this mean the problem is with the boot parameters? The syslinux.cfg I am using looks like this (and both my 'backup' and 'restore' stanzas do not work as expected):
default vesamenu.c32
prompt 0
menu title Thin_Client_Image
timeout 100
label restore
menu label Restore from USB stick
kernel /ubnkern
append initrd=live/initrd1.img boot=live union=aufs vga=788 ip=frommedia ocs_live_run="/live/image/custom-ocs" ocs_live_extra_param="" ocs_live_keymap="NONE" ocs_live_batch="yes" ocs_lang="en_us.UTF8"
label backup
menu label Backup to USB stick
kernel /ubnkern
append initrd=/ubninit boot=live union=aufs vga=788 vga=788 ip=frommedia ocs_live_run="/live/image/custom-ocs-backup" ocs_live_extra_param="" ocs_live_keymap="NONE" ocs_live_batch="yes" ocs_lang="en_us.UTF8"
label unetbootindefault
menu label CloneZilla Interactive Session
kernel /ubnkern
append initrd=/ubninit boot=live union=aufs vga=788 ip=frommedia
Make sure the file on your USB flash drive, i.e. "/live/image/custom-ocs" is the same one when you run "bash -x custom-ocs".
By running "type custom-ocs" in the Clonezilla live as root, you can identify the full path of custom-ocs.
Steven.
ok I think I misunderstood your previous instructions :-)
If I go to root using 'sudo su -' and then type 'bash -x custom-ocs', I get "custom-ocs: No such file or directory". However if I cd into /live/image/ first and run the command, it works. Also if I try 'type custom-ocs' , I get custom-ocs not found. Should I copy the file somewhere else in the $PATH in the filesystem?
OK, I found you should put your customized script in /live/image/pkg/ instead of /live/image/.
When Clonezilla live boots, it will copy the /live/image/pkg/custom-ocs to /opt/drbl/sbin/.
For more info, you can check:
/etc/ocs/ocs-live.d/S03prep-drbl-clonezilla
Steven.
Hi Steven, thanks for your help, I have eventually got this working after discovering some missing files in /etc/ocs in my Clonezilla installation. The version that is automatically installed on the usb stick by Unetbootin is not the same as the ISO that I downloaded from the site. I created the usb stick again using the ISO and it worked perfectly using the scripts I had created.
I've documented the process in case this could help someone else.
: http://ukstokes.com/blog/2009/09/12/the-thin-client-project/
Nice! Thanks for sharing that.
Steven.