0
I am trying to automate a clonezilla imaging, Thie issue is that the restore fails due to it saying that the device is in use
When I type "mount" /dev/sda is not anyware in the list ( and there mdadm is disabled as well and there is no /dev/md... in use )
If I manualy use fdisk to clear the partitions then run partprobe I get
Error: Partition(s) 2 on /dev/sda have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes.
If I do reboot, after whiping the data the restore works.
My boot options on pxelinux.cfg/default are
LABEL Factory Reset
KERNEL clonezilla/vmlinuz
APPEND initrd=clonezilla/initrd.img username=user boot=live union=aufs noswap noprompt vga=788 keyboard-layouts=NONE locales=en_US.UTF-8 fetch=tftp://10.11.12.1/clonezilla/filesystem.squashfs config quiet ocs_live_run="/home/partimag/restoreGolden.sh" ocs_live_extra_param="" ocs_live_keymap="NONE" ocs_live_batch="yes" ocs_lang="en_US.UTF-8 ocs_prerun="mount -t nfs 10.11.12.1:/copos/SystemImages /home/partimag && /home/partimage/fdisk.sh" nomdadm nodmraid noswap
the contents of /home/partimage/restoreGolden.sh is
/usr/sbin/ocs-sr -hn1 OP --batch -g auto -e1 auto -e2 -r -j2 -p reboot restoredisk GoldenImage sda
I think I figured it out, nomdadm does not work on ubuntu based clonezilla, And I switched from debian to ubuntu, ( /dev/md127 was showing up ) I am going to add mdadm --stop /dev/md127 to my startup script to see if it fixes it – Tim Holum – 2015-02-04T21:02:39.637