The space between the MBR and the first partition with restoreparts option...
A partition and disk imaging/cloning program
Brought to you by:
steven_shiau
The function "task_restoreparts" of file "/usr/share/drbl/sbin/ocs-functions" does not restore the space between the MBR and the first partition when "saveparts" option is selected, however the menu itself leaves mark the "-j2" option.
I solved it by changing the line 7408:
if [ "$clone_hidden_data" = "yes" -a -n "$(echo "$ocs_sr_type" | grep -Ei "restoredisk")" ]; then
by:
if [ "$clone_hidden_data" = "yes" ]; then
This is what we defined "restoreparts".
Could you please tell me the scenario there? Why you need hidden data when you use "restoreparts"?
Thanks.
Steven.
I'll try to explain it, it is complex (sorry for my English, I use google translator X-)
This is my partition layout:
/dev/sda1(primary) : ntfs (Windows system)
/dev/sda2(primary) : ntfs (Windows)
/dev/sda3(extend)
/dev/sda5(logical) : MAX(Distribution Linux Madrid's community)
/dev/sda6(swap)
/dev/sda7(logical) : Data
/dev/sda4(primary) : SRP(A local System to Restore Partitions)
The "SRP" partition is based on SystemRescueCD and a very simple shell scripts,
and has its own GRUB installed in /dev/sda, so I need to restore hidden data between MBR and first partition.
The functionality of the SRP does not need any external means for restoring a partition.
(More information about the SRP: http://www.educa2.madrid.org/web/roberto.mengibar/srp)
Well, my problem is that I have to generate an image to give the client that works in two scenarios:
1.- When the disk is empty, factory or other distribution of partitions.
In this case I need to restore the partition layout and only the "SRP" partition, then the SRP itself is responsible for restoring other partitions.
2.- When the disc already has my partition layout.
In this case the same thing happens, the difference is that the user may have data in the data partition, and we want to keep this partition untouched.
This is the main reason why I can not choose "savedisk" to create an image, restoring the image with "restoredisk" information data partition would be eliminated.
Currently generating images with another program, my intention was to start using clonezilla but this limitation it is impossible.
Greetings.
OK. You could use the "restoreparts" function to do that, and when it's done, manually "dd" the hidden data image (e.g. "sda-hidden-data-after-mbr") to the place.
The file is dumped by dd command, therefore use "dd" to restore that.
You can have a script to merge these 2 steps.
Steven.