Re: mondorestore command not found

Stanislav Tokoš <[email protected]>
Newsgroups gmane.linux.mondo.devel
Message-ID <[email protected]>

On 08/18/2017 01:45 PM, Stanislav Tokoš wrote:
> Hello Bruno,
>
>
> On 08/18/2017 12:26 PM, Bruno Cornec wrote:
>> Hello again,
>>
>> Bruno Cornec said on Fri, Aug 18, 2017 at 12:06:19PM +0200:
>>> Stanislav Tokoš said on Thu, Aug 17, 2017 at 03:58:28PM +0200:
>>>> I finally figured them out. I am using mondo and mindi in the 
>>>> version 3.2.2. Patches from the attachments
>>
>>> I have applied most of your modifications. Please look at:
>>
>> Well here:
>> http://trac.mondorescue.org/changeset?sfp_email=&sfph_mail=&reponame=&new=3683%40branches&old=3680%40branches&sfp_email=&sfph_mail= 
>>
>>
>> I'm still looking at your patch on mr-make-me-bootable, which I'm not 
>> sure to understand. Could you explain to me the issue you encountered 
>> and the rationale of the fix please ?

I fixed this problem:

12:22 -------------
12:22 fdisk result:
12:22 -------------
Disk /dev/vda: 16 GiB, 17179869184 bytes, 33554432 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0005211a

Device     Boot   Start      End  Sectors Size Id Type
/dev/vda1          2048  4192255  4190208   2G 82 Linux swap / Solaris
/dev/vda2  *    4192256 33554431 29362176  14G 83 Linux
12:22 -------------
12:22 /tmp/mondorestore.cfg result:
12:22 -------------


Command (m for help): Disk /dev/vda: 16 GiB, 17179869184 bytes, 33554432 
sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0005211a

Device     Boot   Start      End  Sectors Size Id Type
/dev/vda1          2048  4192255  4190208   2G 82 Linux swap / Solaris
/dev/vda2       4192256 33554431 29362176  14G 83 Linux

Command (m for help): The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

Use of uninitialized value $min in substitution (s///) at 
/usr/sbin/mr-parted2fdisk line 242.

Welcome to fdisk (util-linux 2.28).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): Partition number (1,2, default 2):
The bootable flag on partition 2 is enabled now.

Command (m for help): Partition number (1,2, default 2):
The bootable flag on partition 2 is disabled now.

Command (m for help): Disk /dev/vda: 16 GiB, 17179869184 bytes, 33554432 
sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0005211a

Device     Boot   Start      End  Sectors Size Id Type
/dev/vda1          2048  4192255  4190208   2G 82 Linux swap / Solaris
/dev/vda2       4192256 33554431 29362176  14G 83 Linux

Command (m for help): The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

It means that the boot flag was removed by mr-make-me-bootable but the 
script didn't set up again back.

Regards

Stanislav
>>
> Sure.
>
> 1. We don't need for cycling. Boot partition for each machine is only  
> one.
> -       for p in "$activepart"; do
> -               # First desactivate active partitions (coming from 
> previous usage)
>
>
> 2. echo -en "${cmd}a\n$partno\np\nw\n" is replaced by echo -en 
> "a\n$partno\nw\n"
> This command is same for mark or unmark boot partition. For that 
> reason I removed
> cmd variable and piping to mr-parted2fdisk two times. It is the 
> easiest for debugging and
> working for the each test case scenario without problem. I have 
> already test it.
>
> 3. added condition for missing $dummy variable
>
> +    elif [ ! "$dummy" ] ; then
> +       echo -en "a\n$partno\nw\n" | mr-parted2fdisk $drive >> 
> $LOGFILE 2>> $LOGFILE
>
> Am I cleared? Is it make sense for you?
>
> PS: What about svn access? Is it possible access it? I am not able 
> checkout it. Thanks for your
> advice.
>
> Regards
>
> Stanislav
>
>>
>>
>> TIA,
>> Bruno.
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.