Carl Karsten wrote:
> I am wondering what is really going on.
>
> The first one doesn't really matter, I changed the restoredisk target to sdb, 
> but forgot to change -g /dev/sdc1 so weird stuff happened.  but the 
> "unexpected 
> operator" makes me think the error handler code failed.
>
> The 2nd one is what you suggested, but also failed.
> -g /dev/sdb1
>
> the 3rd one I pointed it at the drive instead of the partition:
> -g /dev/sdb
> /dev/sda1 is mounted as root partition for grub-install...
> Installing GRUB to /dev/sdb as (hd1)...
>
> Is it going to work when I make that the primary drive?
>
> I am pretty fuzzy about how grub and grub-install does what it does.
>
>
> *****************************************************.
>
> sudo /opt/drbl/sbin/ocs-sr -g /dev/sdc1 -e1 auto -j3 -p true -p true 
> restoredisk 
> 2009-02-18-16-img sdb
>
> (I think - pulled from history, the command left my shell buffer)
>
> There is a separate boot partition in target device. Trying to mount root 
> partition for grub-install to work with that...
> /dev/sda1 is mounted as root partition for grub-install...
> Running: grub-install --no-floppy --root-directory=/tmp/hd_img.CvShxQ /dev/sdc
> Probing devices to guess BIOS drives. This may take a long time.
> grub-probe: error: Cannot find a GRUB drive for /dev/sdc1.  Check your 
> device.map.
> [: 494: =: unexpected operator
> The file /tmp/hd_img.CvShxQ/boot/grub/stage1 not read correctly.
> WARNING!!! Can NOT find the grub config file "menu.lst" or "grub.conf" in the 
> system cloned!!!
> Failed to install grub!!!
> cp: cannot stat `/tmp/hd_img.CvShxQ/boot/grub/menu.lst': No such file or 
> directory
> done!
> *****************************************************.
>
> ho...@asus17:~/y/cz$ sudo /opt/drbl/sbin/ocs-sr -g /dev/sdb1 -e1 auto -j3 -p 
> true -p true restoredisk 2009-02-18-16-img sdb
>
> Running: grub-install --no-floppy --root-directory=/tmp/hd_img.MlZLpW /dev/sdb
> Probing devices to guess BIOS drives. This may take a long time.
> grub-probe: error: Cannot find a GRUB drive for /dev/sdb1.  Check your 
> device.map.
> [: 494: =: unexpected operator
> Installing GRUB to /dev/sdb as (hd1)...
> Installation finished. No error reported.
> This is the contents of the device map 
> /tmp/hd_img.MlZLpW/boot/grub/device.map.
> Check if this is correct or not. If any of the lines is incorrect,
> fix it and re-run the script `grub-install'.
> (hd0) /dev/sda
> (hd1) /dev/sdb
> (hd2) /dev/sdc
> done!
>   

The above is a correct one I think.
BTW, you can neglect the error "

grub-probe: error: Cannot find a GRUB drive for /dev/sdb1.  Check your 
device.map.
[: 494: =: unexpected operator", it's a bug in grub-install, and harmless. You 
can find some bug report in bugs.debian.org.

> *****************************************************.
>
>
> ho...@asus17:~/y/cz$ sudo /opt/drbl/sbin/ocs-sr -g /dev/sdb -e1 auto -j3 -p 
> true 
> -p true restoredisk 2009-02-18-16-img sdb
>
> mount: you must specify the filesystem type
> umount: /tmp/hd_img.jdXbpM: not mounted
> There is a separate boot partition in target device. Trying to mount root 
> partition for grub-install to work with that...
> /dev/sda1 is mounted as root partition for grub-install...
> mount: you must specify the filesystem type
> Running: grub-install --no-floppy --root-directory=/tmp/hd_img.jdXbpM /dev/sdb
> Probing devices to guess BIOS drives. This may take a long time.
> Installing GRUB to /dev/sdb as (hd1)...
> Installation finished. No error reported.
> This is the contents of the device map 
> /tmp/hd_img.jdXbpM/boot/grub/device.map.
> Check if this is correct or not. If any of the lines is incorrect,
> fix it and re-run the script `grub-install'.
> (hd0) /dev/sda
> (hd1) /dev/sdb
> (hd2) /dev/sdc
> done!
> *****************************************************.
>
>
> Carl K
>
>
> Carl Karsten wrote:
>   
>> Steven Shiau wrote:
>>     
>>> Yes, that's a problem. However, since it's "-g auto", clonezilla will
>>> search all the disk.
>>>       
>> I guess that makes sense.
>>
>>     
>>> We can modify that to make it search only restored disk or partitions.
>>>       
>> That sounds good.
>>
>>     
>>> An alternative way is not to use "-g auto", use "-g /dev/sdc1" for example.
>>>       
>> That sounds good too.
>>
>> Thanks.
>>
>> Carl K
>>
>>     
>>> Steven.
>>>
>>> Carl Karsten wrote:
>>>       
>>>> This looks like a problem:
>>>>
>>>> ju...@dell30:~$ sudo /opt/drbl/sbin/ocs-sr -g auto -e1 auto -c -j3 -p true 
>>>> -p 
>>>> true restoredisk "Atom-2009-02-12-04-img" "sdc"
>>>> ...
>>>> Found grub partition: /dev/sda1... Trying to run grub-install now...
>>>> Installing GRUB to /dev/sda as (hd0)...
>>>>
>>>>
>>>> Here is the whole thing:
>>>>
>>>>
>>>> ju...@dell30:~$ sudo /opt/drbl/sbin/ocs-sr -g auto -e1 auto -c -j3 -p true 
>>>> -p 
>>>> true restoredisk "Atom-2009-02-12-04-img" "sdc"
>>>> Setting the TERM as xterm
>>>> clonezilla image dir: /home/partimag
>>>> *****************************************************.
>>>> *****************************************************.
>>>> clonezilla image dir: /home/partimag
>>>> *****************************************************.
>>>> *****************************************************.
>>>> Target disk sdc does not exist in the image saved from disk(s) "sda".
>>>> Creating a tmp Clonezilla image "Atom-2009-02-12-04-img-tmp-cnvted" based 
>>>> on the 
>>>> image "Atom-2009-02-12-04-img" so that we can restore the image 
>>>> Atom-2009-02-12-04-img (was saved from sda) to sdc...
>>>> ///NOTE/// If the restored OS is GNU/Linux, you might have to modify 
>>>> /etc/fstab 
>>>> and grub config file in the restored GNU/Linux to affect these changes so 
>>>> that 
>>>> it can boot successfully!
>>>> Press "Enter" to continue......
>>>> Creating a temporary image based on image Atom-2009-02-12-04-img...
>>>> Setting the TERM as xterm
>>>> clonezilla image dir: /tmp
>>>> Change sda to sdc in /tmp/Atom-2009-02-12-04-img-tmp-cnvted/disk... done!
>>>> Change sda to sdc in /tmp/Atom-2009-02-12-04-img-tmp-cnvted/parts... done!
>>>> Change sda to sdc in /tmp/Atom-2009-02-12-04-img-tmp-cnvted/sda-pt.sf... 
>>>> done!
>>>> Change sda to sdc in 
>>>> /tmp/Atom-2009-02-12-04-img-tmp-cnvted/sda-pt.parted... done!
>>>> The created image is "/tmp/Atom-2009-02-12-04-img-tmp-cnvted".
>>>> Activating the partition info in /proc... done!
>>>> Getting /dev/sdc1 info...
>>>> *****************************************************.
>>>> The following step is to restore image to the harddisk/partition(s) in 
>>>> this 
>>>> machine: "/tmp/Atom-2009-02-12-04-img-tmp-cnvted" -> "sdc sdc1"
>>>> WARNING!!! WARNING!!! WARNING!!!
>>>> WARNING! THE EXISTING DATA IN THIS HARDDISK/PARTITION(S) WILL BE 
>>>> OVERWRITTEN! 
>>>> ALL EXISTING DATA WILL BE LOST:
>>>> *****************************************************.
>>>> Machine: OptiPlex GX260
>>>> sdc (40.0GB_0AB-00BVA0_______0:0)
>>>> sdc1 (38.3GB_boot(In_0AB-00BVA0______)_0:0)
>>>> *****************************************************.
>>>> Are you sure you want to continue? ?
>>>> [y/n] y
>>>> OK, let's do it!!
>>>> This program is not started by clonezilla server.
>>>> The following step is to restore image to the harddisk/partition(s) in 
>>>> this 
>>>> machine: "/tmp/Atom-2009-02-12-04-img-tmp-cnvted" -> "sdc (sdc1)"
>>>> WARNING!!! WARNING!!! WARNING!!!
>>>> WARNING! THE EXISTING DATA IN THIS HARDDISK/PARTITION(S) WILL BE 
>>>> OVERWRITTEN! 
>>>> ALL EXISTING DATA WILL BE LOST:
>>>> *****************************************************.
>>>> Machine: OptiPlex GX260
>>>> sdc (40.0GB_0AB-00BVA0_______0:0)
>>>> sdc1 (38.3GB_boot(In_0AB-00BVA0______)_0:0)
>>>> *****************************************************.
>>>> Let me ask you again, Are you sure you want to continue? ?
>>>> [y/n] y
>>>> OK, let's do it!!
>>>> Shutting down the Logical Volume Manager
>>>> Finished Shutting down the Logical Volume Manager
>>>> Creating partition in /dev/sdc...
>>>> *****************************************************.
>>>> Thu Feb 12 12:26:08 CST 2009
>>>> Writing the partition table...
>>>> Running sfdisk --force /dev/sdc < 
>>>> /tmp/Atom-2009-02-12-04-img-tmp-cnvted/sdc-pt.sf
>>>> Checking that no-one is using this disk right now ...
>>>> OK
>>>> Warning: extended partition does not start at a cylinder boundary.
>>>> DOS and Linux will interpret the contents differently.
>>>>
>>>> Disk /dev/sdc: 38166 cylinders, 64 heads, 32 sectors/track
>>>> Warning: partition 1 does not end at a cylinder boundary
>>>> Old situation:
>>>> Units = cylinders of 1048576 bytes, blocks of 1024 bytes, counting from 0
>>>>
>>>>     Device Boot Start     End   #cyls    #blocks   Id  System
>>>> /dev/sdc1   *      0+  36546-  36547-  37423386   83  Linux
>>>> /dev/sdc2      36546+  38154-   1609-   1646662+   5  Extended
>>>> /dev/sdc3          0       -       0          0    0  Empty
>>>> /dev/sdc4          0       -       0          0    0  Empty
>>>> /dev/sdc5      36546+  38154-   1609-   1646631   82  Linux swap / Solaris
>>>> New situation:
>>>> Units = sectors of 512 bytes, counting from 0
>>>>
>>>>     Device Boot    Start       End   #sectors  Id  System
>>>> /dev/sdc1   *        63  74846834   74846772  83  Linux
>>>> /dev/sdc2      74846835  78140159    3293325   5  Extended
>>>> /dev/sdc3             0         -          0   0  Empty
>>>> /dev/sdc4             0         -          0   0  Empty
>>>> /dev/sdc5      74846898  78140159    3293262  82  Linux swap / Solaris
>>>> Successfully wrote the new partition table
>>>>
>>>> Re-reading the partition table ...
>>>> If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
>>>> to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
>>>> (See fdisk(8).)
>>>>
>>>> This is done by sfdisk --force /dev/sdc < 
>>>> /tmp/Atom-2009-02-12-04-img-tmp-cnvted/sdc-pt.sf
>>>> Checking the integrity of partition table in the disk /dev/sdc...
>>>> *****************************************************.
>>>> The first partition of disk /dev/sdc starts at 63.
>>>> Restoring the hidden data between MBR (1st sector, i.e. 512 bytes) and 1st 
>>>> partition, which might be useful for some recovery tool, by:
>>>> dd if=/tmp/Atom-2009-02-12-04-img-tmp-cnvted/sdc-hidden-data-after-mbr 
>>>> of=/dev/sdc seek=1 bs=512 count=62
>>>> 62+0 records in
>>>> 62+0 records out
>>>> 31744 bytes (32 kB) copied, 0.0129257 s, 2.5 MB/s
>>>> *****************************************************.
>>>> Restoring partition /dev/sdc1...
>>>> *****************************************************.
>>>> Clean filesystem header in device /dev/sdc1...
>>>> *****************************************************.
>>>> *****************************************************.
>>>> Starting unicast restoring image Atom-2009-02-12-04-img-tmp-cnvted to 
>>>> /dev/sdc1...
>>>> Finished unicast restoring image Atom-2009-02-12-04-img-tmp-cnvted to 
>>>> /dev/sdc1.
>>>> *****************************************************.
>>>> Creating swap partition /dev/sdc5...
>>>> Found the swap partition /dev/sdc5 info in the image dir, create it by:
>>>> mkswap-uuid  -U 54ad9caf-2332-46f9-914e-cfd22f21ba38 /dev/sdc5
>>>> Setting up swapspace version 1, size = 1686142 kB
>>>> no label, UUID=54ad9caf-2332-46f9-914e-cfd22f21ba38
>>>> *****************************************************.
>>>> Restoring the first 446 bytes of MBR data, i.e. executable code area, for 
>>>> sdc... 
>>>> done!
>>>> *****************************************************.
>>>> Found grub partition: /dev/sda1... Trying to run grub-install now...
>>>> Running: grub-install --no-floppy --root-directory=/tmp/hd_img.PCWDkY 
>>>> /dev/sda
>>>> Probing devices to guess BIOS drives. This may take a long time.
>>>> /usr/sbin/grub-install: 494: grub-probe: not found
>>>> [: 494: =: unexpected operator
>>>> Installing GRUB to /dev/sda as (hd0)...
>>>> Installation finished. No error reported.
>>>> This is the contents of the device map 
>>>> /tmp/hd_img.PCWDkY/boot/grub/device.map.
>>>> Check if this is correct or not. If any of the lines is incorrect,
>>>> fix it and re-run the script `grub-install'.
>>>>
>>>> (hd0)      /dev/sda
>>>> (hd1)      /dev/sdb
>>>> (hd2)      /dev/sdc
>>>> done!
>>>> *****************************************************.
>>>> The NTFS boot partition is NOT found or not among the restored 
>>>> partition(s). 
>>>> Skip running partclone.ntfsreloc.
>>>> *****************************************************.
>>>> *****************************************************
>>>> *****************************************************
>>>> This program is not started by Clonezilla server, so skip notifying it the 
>>>> job 
>>>> is done.
>>>> Finished!
>>>> Now syncing - flush filesystem buffers...
>>>>
>>>>
>>>> Carl K
>>>>
>>>> ------------------------------------------------------------------------------
>>>> _______________________________________________
>>>> Clonezilla-live mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/clonezilla-live
>>>>   
>>>>         
>> ------------------------------------------------------------------------------
>> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
>> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
>> -Strategies to boost innovation and cut costs with open source participation
>> -Receive a $600 discount off the registration fee with the source code: SFAD
>> http://p.sf.net/sfu/XcvMzF8H
>> _______________________________________________
>> Clonezilla-live mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/clonezilla-live
>>
>>
>>     
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Clonezilla-live mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/clonezilla-live
>   


-- 
Steven Shiau <steven _at_ nchc org tw> <steven _at_ stevenshiau org>
National Center for High-performance Computing, Taiwan. http://www.nchc.org.tw
Public Key Server PGP Key ID: 1024D/9762755A
Fingerprint: A2A1 08B7 C22C 3D06 34DB  F4BC 08B3 E3D7 9762 755A


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Clonezilla-live mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clonezilla-live

Reply via email to