• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Resize only root partition

    Scheduled Pinned Locked Moved Unsolved
    Linux Problems
    2
    5
    674
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      docorange6
      last edited by

      Hi,

      Been having great success using Fog to deploy Windows images by using sysprep beforehand. Resizing the disk seems to work without much issue.

      However when I capture a linux image (Centos or Ubuntu), I’m finding that the /boot and swap partitions are also being resized (expanded). We deploy this image to many different hardware configurations so we need to find a way to standardize /boot and swap to 500 MB and 4096 MB respectively, regardless of the size of the disk. Can this be done? Any suggestions?

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by

        @docorange6 Easy way on deploy is to edit d1.fixed_size_partitions file in the /images/<IMAGENAME> directory on your FOG server. Put in the partitions that you want to have fixed in size (and sector start position) separated by colon, e.g. 1:2

        Don’t think we ought to expand SWAP partitions but maybe there is an issue in the scripts. Can you please post the contents of d1.partitions, d1.minimum.partitions and d1.fixed_size_partitions of your Linux images.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 1
        • D
          docorange6
          last edited by

          I’m gonna capture a fresh image now and see what I get. I think I was last trying fixed partitions (been a while since I’ve messed with it.) Currently only have d1.partitions in the directory, is as follows:

          root@FogProject:/images/CentOS6# cat d1.partitions
          label: dos
          label-id: 0x0002bc90
          device: /dev/sda
          unit: sectors

          /dev/sda1 : start= 2048, size= 819200, type=83, bootable
          /dev/sda2 : start= 821248, size= 8388608, type=82
          /dev/sda3 : start= 9209856, size= 24344576, type=83

          Will capture fresh image and update with results.

          1 Reply Last reply Reply Quote 0
          • D
            docorange6
            last edited by

            Captured a fresh image set to resizable:

            root@FogProject:/images/CentOS6# cat d1.fixed_size_partitions
            :2
            root@FogProject:/images/CentOS6# cat d1.minimum.partitions
            label: dos
            label-id: 0x00026917
            device: /dev/sda
            unit: sectors

            /dev/sda1 : start= 2048, size= 241815, type=83, bootable
            /dev/sda2 : start= 1026048, size= 8388608, type=82
            /dev/sda3 : start= 9414656, size= 3383175, type=83
            root@FogProject:/images/CentOS6# cat d1.fixed_size_partitions
            :2
            root@FogProject:/images/CentOS6# cat d1.partitions
            label: dos
            label-id: 0x00026917
            device: /dev/sda
            unit: sectors

            /dev/sda1 : start= 2048, size= 1024000, type=83, bootable
            /dev/sda2 : start= 1026048, size= 8388608, type=82
            /dev/sda3 : start= 9414656, size= 74471424, type=83
            root@FogProject:/images/CentOS6#

            1 Reply Last reply Reply Quote 0
            • S
              Sebastian Roth Moderator
              last edited by

              @docorange6 Sorry for the late answer.

              Looking at the information you posted we see that it handles sda2 (SWAP as we see from type=82) as fixed partition. And because of that I am fairly sure it will resize the boot partition (sda1) back to it’s original size as well.

              I can understand that you would prefer it to not touch sda1 at all and I think we have fixed this in the latest scripts already. Please download the latest init files (32 bit and 64 bit) and put those into /var/www/html/fog/service/ipxe/ (best to rename the original ones instead of directly overwriting those.

              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post

              167

              Online

              12.0k

              Users

              17.3k

              Topics

              155.2k

              Posts
              Copyright © 2012-2024 FOG Project