• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. ntomsheck
    N
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 5
    • Best 0
    • Controversial 0
    • Groups 0

    ntomsheck

    @ntomsheck

    0
    Reputation
    291
    Profile views
    5
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    ntomsheck Unfollow Follow

    Latest posts made by ntomsheck

    • RE: Changing the partition used by the task

      Tom,

      I found some time to just dive in. In the init image, under bin/fog.av, the code that selects the partition is this:
      [CODE]part=$hd’1’;[/CODE]
      If the OS is set to windows 7, then it simply selects the last partition of all the partitions.
      [CODE] if [ “$osid” == “5” ]; then
      win7partcnt=“0”;
      parts=fogpartinfo --list-parts $hd 2>/dev/null;
      for prt in $parts
      do
      win7partcnt=expr ${win7partcnt} + 1;
      done
      part=${hd}${win7partcnt};
      fi
      [/CODE]

      To obtain the behavior I was speaking of, I added this simple bit to the fog.av script:

      [CODE]
      partNum=“1”;

          partNum=`parted $hd -m print | grep 'boot' | sed -n 's/^\([0-9]\+\).*/\1/p'`;
      
          part=$hd'1';
      
          if [ -n "$partNum" ]
          then
                  part=$hd$partNum;
          fi
      

      [/CODE]
      This finds the boot partition on the selected hard drive, then uses that partition number, instead of just selecting partition 1. When will this not work? Dual boot machines would likely have a problem, but there’s a 50% (or 33%) chance they wouldn’t work in the original configuration anyway. But on dual partition (where one partition is a recovery partition) and single partition machines, this works great. I have a clamscan running on a previously offending computer now.

      The code above is not a final solution. I will be creating a function under the funcs.sh script and applying it to the rest of the scritps as I see fit. I’ll probably also refine the sed portion a little bit.
      Can you see any issue with this method which makes it worse off than just using $hd’1’?

      I’ve only used git, but I can submit a pull request (or whatever the equivalent terminology is for svn) of my completed work if you see no issue so far.

      posted in FOG Problems
      N
      ntomsheck
    • RE: Changing the partition used by the task

      That was my other thought. Tools such as the checkdisk and clamAV - what criteria are they using to select the windows partition? Because it’s selecting the wrong partition to act on in my case.

      posted in FOG Problems
      N
      ntomsheck
    • RE: Changing the partition used by the task

      Hi Tom!

      [quote=“Tom Elliott, post: 26826, member: 7271”]Host Primary Disk should be the Device, not a partition label.[/quote]

      This part I have already figured, so I abandoned this early on.
      [quote=“Tom Elliott, post: 26827, member: 7271”]I’m going to guess that you’re trying to create a Single Disk Resizable image?[/quote]
      Actually, I’m not trying to create any image yet. At the moment, I’m just playing with the additional tools FOG comes with. My question is, is there a way to change the partition these tools use? Instead of automatically using /dev/sda1, can I change it to /dev/sda2?
      Thank you for such a quick reply!

      posted in FOG Problems
      N
      ntomsheck
    • Changing the partition used by the task

      Good Morning!

      I’m experimenting with FOG 1.0.0 now, and I’ve run into a bit of a problem. On computers which have a recovery partition, tasks like checkdisk and clam fail. It tries to use /dev/sda1, which happens to be the recovery partition. I can see the usual error ‘NTFS Signature missing’, which makes sense because it’s not defined as an NTFS partition.

      If I boot into debug mode, fdisk -l shows me that /dev/sda2 is the boot partition. I can mount /dev/sda2 using ntfs-3g as well.

      I tried specifying the correct partition under the Host in ‘Host Primary Disk’, but it appears this is for the whole disk only, as it appends a ‘1’ to whatever I enter. I skimmed through available kernel arguments on the fog wiki, but couldn’t find an appropriate one. If anyone has some suggestions, I’m all ears!

      I found a related thread:
      [url]http://fogproject.org/forum/threads/host-primary-disk-issue.907/[/url]

      But this is simply asking about entering the partition under ‘Host Primary Disk’.

      Thanks!

      posted in FOG Problems
      N
      ntomsheck
    • RE: PXE, TFTP, Sophos UTM

      If you created the ubuntu VM without a swap partition, that would explain MySQL faltering (assuming it’s running out of memory). The mysql logs under /var/log/mysql will help more than my best guess though.

      posted in FOG Problems
      N
      ntomsheck