Deploy a multi partition image with multicast



  • Re : Multicast randomly hangs##### Server

    • FOG Version: 1.2
    • OS: Debian Jessie
    Description

    Re : Multicast randomly hangs

    Hi,

    Thanks to Felipe Solari
    https://forums.fogproject.org/topic/2810/multicast-randomly-hangs/19

    We managed to deploy a multi partition image with multicast.
    We just add a sleep 5 to the fog.download at the line 440.

    • unzip init.xz (the same goes for init32.xz) with xz -d init.xz
    • mount the init file in a loop device with: mount -o loop init sometempdir/
    • go to sometempdir/bin with cd
    • edit fog.download
    • save your file, and back to the init file dir.
    • zip it with xz -C crc32 init
     elif [ "$imgType" == "mps" ]; then
                            dots "Checking Hard Disks";
                            runPartprobe $hd &> /dev/null;
                            echo "Done";
                            parts=`fogpartinfo --list-parts $hd 2>/dev/null`;
                            diskLength=`expr length $hd`;
                            for part in $parts; do
                                    partNum=${part:$diskLength};
                                    echo " * Processing Partition: $part ($partNum)";
                                    imgpart="$imagePath/d1p${partNum}.img*";
                                    sleep 2;
                                    if [ ! -f $imgpart ]; then
                                        echo " * Partition File Missing: $imgpart";
                                        # Add a sleep here
                                        sleep 5;
                                    else
                                        writeImage "$imgpart" $part;
                                    fi
                                    resetFlag $part;
                            done
    

    Hope this help.
    Thanks for Fog :) It’s a great soft.


  • Senior Developer

    @marcolefo The sleep 5 you’ve added will only happen if the $imgpart is not found. This seems rather pointless if you ask me. (Again following along @Sebastian-Roth I’m not intending to offend, but why does having sleep 5 in a spot where no code is run to begin with “help” a user with multi partition imaging via multicast?



  • No problem. Excuse me for the wrong forum ;).

    Adding the sleep 5 solved our problem. The sleep 2 was already here unless I am mistaken.


  • Developer

    @marcolefo I am not sure if I get what you are up to with this. You posted a supposed fix for FOG version 1.2.0 which is years old in the bug reports section of this forum. Please don’t get me wrong, I don’t want to offend you for posting this. I just don’t understand it - partly because there are two sleeps in the code you posted, one sleep 2 which might solve the issue your talk about and another sleep 5 which is in the “wrong” if-branch and won’t help in getting multicast right from my point of view.

    Would you mind correcting the code and/or your comment so that other people still using FOG 1.2.0 can profit from this?

    Moving this to Tutorials section of the forum…


 

445
Online

41.9k
Users

12.4k
Topics

116.7k
Posts