• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. H3Krn
    3. Best
    H
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 9
    • Best 3
    • Controversial 0
    • Groups 0

    Best posts made by H3Krn

    • RE: procsfdisk.awk "original_variable" calulation?

      These are the files as are currently in my image. I’ve manually modified “d1.fixed_size_partitions” which originally contained “1:2” and “d1.partitions” setting the size of the extended and logical partition to 99999999999 as I would like these partitions to fill the entire available space, whatever hardware or VM I deploy to. (Be it a VM with only 64GB disk or a PC with either 256 or 500GB disk)

      d1.fixed_size_partitions

      1:
      

      d1.original.fstypes

      /dev/sda5 extfs
      

      d1.minimum.partitions

      label: dos
      label-id: 0x964ef18c
      device: /dev/sda
      unit: sectors
      sector-size: 512
      
      /dev/sda1 : start=        2048, size=     1048576, type=b, bootable
      /dev/sda2 : start=     1052670, size=   103802882, type=5
      /dev/sda5 : start=     1052672, size=    54399852, type=83
      

      d1.partitions

      label: dos
      label-id: 0x964ef18c
      device: /dev/sda
      unit: sectors
      sector-size: 512
      
      /dev/sda1 : start=        2048, size=     1048576, type=b, bootable
      /dev/sda2 : start=     1052670, size= 99999999999, type=5
      /dev/sda5 : start=     1052672, size= 99999999999, type=83
      
      
      posted in Bug Reports
      H
      H3Krn
    • RE: procsfdisk.awk "original_variable" calulation?

      @sebastian-roth I won’t claim to completely understand the procsfdisk code, but I’m currently suspecting the “if” clause on line 436.

      436                if (match(fixedList, regex)) {
      437                    continue;
      438                }
      

      When encountering a extended partion, I think it’s size should never be taken into account when trying to resize variable primary or logical partitions. So the for loop should break there in whatever case.

      I’ve removed that “if” clause, leaving the “continue;” in place. This gives me:

      ./procsfdisk.awk -v SECTOR_SIZE=512 -v CHUNK_SIZE=512 -v MIN_START=2048 -v action=filldisk -v target=/dev/sda -v sizePos=134217728 -v diskSize=134217728 -v fixedList=1: d1.minimum.partitions d1.partitions 
      # Partition table is consistent.
      label: dos
      label-id: 0x964ef18c
      device: /dev/sda
      unit: sectors
      sector-size: 512
      
      /dev/sda1 : start=        2048, size=     1048576, type=b, bootable
      /dev/sda2 : start=     1052670, size=   133162498, type=5
      /dev/sda5 : start=     1052672, size=   133162496, type=83
      

      To me this seems a much more believable layout. So I’ve patched my init.xz, copying in the new procsfdisk.awk script using the postinitscript method. This seems to solve the issue for me. (… after deleting the d1p2.* files from my image as they overwrite the new layout of the extended partition.)

      posted in Bug Reports
      H
      H3Krn
    • RE: procsfdisk.awk "original_variable" calulation?

      @sebastian-roth, no worries. Thnx for the update. I had a quick glance at the other topic but I’ll need to read I properly to make any accurate observations

      Current causes I found for my own case:

      • The bug in the procsfdisk.awk resize script (fixed for myself with the PR)
      • After resizing partitions during a restore task the contents of the extended partition table (d1p2 in my case) is written to the disk. This contains the layout of the original small logical partitions. (solved by deleting d1p2.ebr &d1p2.img from the image)

      For now I have my setup working. Just hoping I can help you guys with it.

      posted in Bug Reports
      H
      H3Krn
    • 1 / 1