Hi Steven,

I had thought that Clonezilla would install grub to the partition I 
specified (sda1) after restoring the image to the disk. That is why I 
used the option '-g /dev/sda1'. It seems that the option '-g auto' 
works, but it installs grub to the MBR and that's not what I want.

However, I have written a script to install grub to sda1 post-restore, 
which works OK. In that case I leave out the -g option in the osc-sr 
command line.

Thanks,
Mark


On 20/04/12 13:05, [email protected] wrote:
>
>
> "-g /dev/sda1" means
> /dev/sda1 is the partition where /boot/grub exists.
> It does not mean the MBR.
> In you case, try not to use "-g /dev/sda1", i.e.
> /opt/drbl/sbin/ocs-sr -e1 auto -e2 -c -r -j2 -k -p true -t
> restoreparts 2012-04-05-13-img sda1
>
> Steven.
>
> On 2012/4/11 ?? 05:16, Mark Ellerby wrote:
>> Hi,
>>
>> I am using clonezilla-live to backup a linux OS to an image, then
>> restore it to another hard disk. (Testing in preparation for, hopefully,
>> a network installation onto many PCs)
>>
>> I install Ubuntu 10.04 LTS to the disk at /dev/sda. sda1 is root and
>> sda2 is swap. Grub goes on /dev/sda1, NOT the MBR. (I have good reasons
>> for doing this). Then I boot Clonezilla Live via PXE. I am able then to
>> image sda1 to a temporary hard disk.
>>
>> Then I swap out the source hard disk for a blank one, and partition it
>> similarly to the source one (sda1 root, sda2 swap). Following that I
>> boot Clonezilla Live and enter the command shell. I mount the disk with
>> the image with it onto /home/partimag.
>>
>> I run this command next:
>>
>> /opt/drbl/sbin/ocs-sr -e1 auto -e2 -c -r -j2 -k -p true -g /dev/sda1 -t
>> restoreparts 2012-04-05-13-img sda1
>>
>> In theory grub should be installed to /dev/sda1. However, I get the
>> following message:
>>
>> The boot loader on /dev/sda is not grub. Skip running grub-install!
>>
>> I am unable to find out why this is so. Nothing in /var/log has anything
>> grub-related in there, so far as I can tell.
>>
>> I can manually install grub to the root partition by doing this:
>>
>> mkdir /a
>> mount /dev/sda1 /a
>> mount --bind /dev /a/dev
>> mount --bind /dev/pts /a/dev/pts
>> mount --bind /proc /a/proc
>> mount --bind /sys /a/sys
>> chroot /a bin/bash
>> [chroot] grub-install --force /dev/sda1
>>
>> It's not ideal, because I'd like to be able to boot Clonezilla and
>> restore images automatically. Is there any way I can get the ocs-sr
>> command do what I want?
>>
>> Many thanks,
>> Mark
>>


-- 
Mark Ellerby, Systems Administrator | Department of Computer Science
[email protected]         | Regent Court, 211 Portobello
+44 (0)114 2221856                  | Sheffield, S1 4DP


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Clonezilla-live mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clonezilla-live

Reply via email to