1 2 Previous Next 24 Replies Latest reply on Mar 15, 2012 8:13 PM by msavy Go to original post
      • 15. Re: partitions
        t3d

        Thanks!

         

        Meanwhile I tried to workaround the issue by creating 2 ordinary partitions and one placeholder-partition, that was supposed to be erased and divided into ultimate partitions by fdisk in post section, but it seems there is no need to do that any more

        • 16. Re: partitions
          goldmann

          Please try nightly repository and let me know if this fixes your problem.

           

          --Marek

          • 17. partitions
            t3d

            Yes, I can have 4 partitions created now. Thanks a lot!

             

            BTW, while testing, I tend to comment out some obsolete lines in appliance definition. When I had everything commented out in post section, only section title left, boxgrinder crashed. Maybe that (section without meaningful content) is also to be checked in https://issues.jboss.org/browse/BGBUILD-156 ?

            • 18. partitions
              goldmann

              BGUILD-156 is developed in a branch and is not yet merged with master. What you currently see is the old behavior without commits for BGBUILD-156 included because nightly builds are executed against master branch. Expect the merge soon, the delay is caused because of this.

               

              --Marek

              • 19. Re: partitions
                ashish_singh

                Hi Marek,

                 

                I am new to BoxGrinder, so please pardon, if i ask something wrong.

                 

                I am trying to partition the disk but getting below error message, for the partition defined as below:

                 

                partitions:

                    "/":

                      size: 10

                      type: ext4   # currently supported: ext3 and ext4

                    "/boot":

                      size: 1

                      type: ext4   # currently supported: ext3 and ext4

                    "/home":

                      size: 20

                      type: ext4   # currently supported: ext3 and ext4

                    "/opt":

                      size: 5

                      type: ext4   # currently supported: ext3 and ext4

                    "/usr":

                      size: 5

                      type: ext4   # currently supported: ext3 and ext4

                    "/tmp":

                      size: 5

                      type: ext4   # currently supported: ext3 and ext4

                    "/var":

                      size: 5

                      type: ext4   # currently supported: ext3 and ext4

                    #"swap":

                     # size: 6

                     # type: ext4   # currently supported: ext3 and ext4

                 

                 

                D, [2012-02-10T11:00:51.049780 #2003] DEBUG -- : Formatting disks

                D, [2012-02-10T11:00:51.050099 #2003] DEBUG -- : Initializing partition table for /dev/loop0 with msdos layout

                D, [2012-02-10T11:00:51.075393 #2003] DEBUG -- : Assigning partitions to disks

                D, [2012-02-10T11:00:51.075799 #2003] DEBUG -- : Assigned / to sda1 at 0 at size 5120

                D, [2012-02-10T11:00:51.076354 #2003] DEBUG -- : Assigned /opt to sda2 at 5120 at size 5120

                D, [2012-02-10T11:00:51.078096 #2003] DEBUG -- : Assigned /tmp to sda3 at 10240 at size 5120

                D, [2012-02-10T11:00:51.078299 #2003] DEBUG -- : Assigned /usr to sda5 at 15360 at size 5120

                D, [2012-02-10T11:00:51.078416 #2003] DEBUG -- : Assigned /var to sda6 at 20480 at size 5120

                D, [2012-02-10T11:00:51.078535 #2003] DEBUG -- : Assigned /boot to sda7 at 25600 at size 1024

                D, [2012-02-10T11:00:51.078698 #2003] DEBUG -- : Assigned /home to sda8 at 26624 at size 20480

                D, [2012-02-10T11:00:51.078836 #2003] DEBUG -- : Creating partitions

                D, [2012-02-10T11:00:51.078953 #2003] DEBUG -- : Add primary part at 0 of size 5120

                D, [2012-02-10T11:00:51.095481 #2003] DEBUG -- : Add primary part at 5120 of size 5120

                D, [2012-02-10T11:00:51.107756 #2003] DEBUG -- : Add primary part at 10240 of size 5120

                D, [2012-02-10T11:00:51.143205 #2003] DEBUG -- : Added extended part at 15360 of size 31744

                D, [2012-02-10T11:00:51.155381 #2003] DEBUG -- : Warning: The resulting partition is not properly aligned for best performance.

                D, [2012-02-10T11:00:51.156709 #2003] DEBUG -- : Add logical part at 15360 of size 5120

                D, [2012-02-10T11:00:51.173774 #2003] DEBUG -- : Add logical part at 20480 of size 5120

                D, [2012-02-10T11:00:51.192021 #2003] DEBUG -- : Add logical part at 25600 of size 1024

                D, [2012-02-10T11:00:51.211367 #2003] DEBUG -- : Add logical part at 26624 of size 20480

                D, [2012-02-10T11:00:51.236309 #2003] DEBUG -- : Unable to create appliance : Failed mount disks : Unexpected number of partitions from kpartx: 8 != 7

                D, [2012-02-10T11:00:51.242631 #2003] DEBUG -- : umount: /root/BoxGrinder/appliance/test/build/appliances/x86_64/centos/5/centos-5-x86_64-x86_64/1.0/centos-plugin/tmp/imgcreate-0fqQPl/install_root/sys/fs/selinux/load: not found

                D, [2012-02-10T11:00:51.244195 #2003] DEBUG -- : Losetup remove /dev/loop0

                E, [2012-02-10T11:00:51.268302 #2003] ERROR -- : /usr/lib/ruby/gems/1.8/gems/boxgrinder-core-0.3.10/lib/boxgrinder-core/helpers/exec-helper.rb:85:in `execute'

                 

                 

                 

                If I use the partition detail as below:

                partitions:

                    "/":

                      size: 10

                      type: ext4

                    "/home":

                      size: 20

                      type: ext4   # currently supported: ext3 and ext4

                    "/boot":

                      size: 2

                      type: ext4   # currently supported: ext3 and ext4

                    #"/tmp":

                      #size: 5

                      #type: ext4   # currently supported: ext3 and ext4

                 

                everything goes fine.

                 

                It is something that BoxGrinder can format the disk if partition is defined more that 3 (Unexpected number of partitions from kpartx: 8 != 7).

                 

                Please, provide you thoughts.

                 

                Regards

                Ashish Singh

                • 20. Re: partitions
                  msavy

                  Ashish,

                   

                  Were you running BoxGrinder on a virtual machine?  Which hypervisor were you using?

                  • 21. Re: partitions
                    ashish_singh

                    Yes, I am running broxgrinder on fedora 16 (latest) in a virtual environment using virtual Box.

                    • 22. Re: partitions
                      ashish_singh

                      sine swap was recently added as per https://issues.jboss.org/browse/BGBUILD-300

                       

                       

                      Using below configuration

                       

                      partitions:

                          "/":

                            size: 20

                            type: ext4

                          "/home":

                            size: 20

                            type: ext4   # currently supported: ext3 and ext4

                          "swap":

                            size: 6

                       

                       

                      boxgrinder failed:

                      D, [2012-03-04T14:28:15.938225 #2922] DEBUG -- : Creating partitions

                      D, [2012-03-04T14:28:15.938478 #2922] DEBUG -- : Add primary part at 0 of size 20480

                      D, [2012-03-04T14:28:15.951322 #2922] DEBUG -- : Add primary part at 20480 of size 102

                      D, [2012-03-04T14:28:15.966185 #2922] DEBUG -- : Add primary part at 20582 of size 20480

                      D, [2012-03-04T14:28:15.978775 #2922] DEBUG -- : Added extended part at 41062 of size 6144

                      D, [2012-03-04T14:28:15.995281 #2922] DEBUG -- : Add logical part at 41062 of size 6144

                      D, [2012-03-04T14:28:16.021362 #2922] DEBUG -- : Unable to create appliance : Failed mount disks : Unexpected number of partitions from kpartx: 5 != 4

                      D, [2012-03-04T14:28:16.024463 #2922] DEBUG -- : umount: /root/BoxGrinder/appliance/test/build/appliances/x86_64/centos/5/HDP-1.0.1-PREVIEW-2/1.0/centos-plugin/tmp/imgcreate-vuRVgH/install_root/sys/fs/selinux/load: not found

                      D, [2012-03-04T14:28:16.027386 #2922] DEBUG -- : Losetup remove /dev/loop0

                      E, [2012-03-04T14:28:16.053245 #2922] ERROR -- : /usr/lib/ruby/gems/1.8/gems/boxgrinder-core-0.3.10/lib/boxgrinder-core/helpers/exec-helper.rb:85:in `execute'

                      /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.0/lib/boxgrinder-build/plugins/os/rpm-based/rpm-based-os-plugin.rb:107:in `execute_appliance_creator'

                      /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.0/lib/boxgrinder-build/plugins/os/rpm-based/rpm-based-os-plugin.rb:71:in `build_with_appliance_creator'

                      /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.0/lib/boxgrinder-build/plugins/os/rhel/rhel-plugin.rb:33:in `build_rhel'

                      /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.0/lib/boxgrinder-build/plugins/os/centos/centos-plugin.rb:44:in `execute'

                      /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.0/lib/boxgrinder-build/plugins/base-plugin.rb:172:in `run'

                      /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.0/lib/boxgrinder-build/appliance.rb:174:in `execute_plugin'

                      /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.0/lib/boxgrinder-build/appliance.rb:121:in `execute_plugin_chain'

                      /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.0/lib/boxgrinder-build/appliance.rb:121:in `each'

                      /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.0/lib/boxgrinder-build/appliance.rb:121:in `execute_plugin_chain'

                      /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.0/lib/boxgrinder-build/appliance.rb:154:in `create'

                      /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.0/bin/boxgrinder-build:189

                      /usr/bin/boxgrinder-build:19:in `load'

                      /usr/bin/boxgrinder-build:19

                      F, [2012-03-04T14:28:16.054010 #2922] FATAL -- : RuntimeError: An error occurred while executing command: 'appliance-creator -d -v -t 'build/appliances/x86_64/centos/5/HDP-1.0.1-PREVIEW-2/1.0/centos-plugin/tmp' --cache=/var/cache/boxgrinder/rpms-cache/x86_64/centos/5 --config 'build/appliances/x86_64/centos/5/HDP-1.0.1-PREVIEW-2/1.0/centos-plugin/tmp/HDP-1.0.1-PREVIEW-2.ks' -o 'build/appliances/x86_64/centos/5/HDP-1.0.1-PREVIEW-2/1.0/centos-plugin/tmp' --name 'HDP-1.0.1-PREVIEW-2' --vmem 2048 --vcpu 1 --format qcow2', process exited with wrong exit status: 1

                      /usr/lib/ruby/gems/1.8/gems/boxgrinder-core-0.3.10/lib/boxgrinder-core/helpers/exec-helper.rb:92:in `execute'

                      /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.0/lib/boxgrinder-build/plugins/os/rpm-based/rpm-based-os-plugin.rb:107:in `execute_appliance_creator'

                      /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.0/lib/boxgrinder-build/plugins/os/rpm-based/rpm-based-os-plugin.rb:71:in `build_with_appliance_creator'

                      /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.0/lib/boxgrinder-build/plugins/os/rhel/rhel-plugin.rb:33:in `build_rhel'

                      /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.0/lib/boxgrinder-build/plugins/os/centos/centos-plugin.rb:44:in `execute'

                      /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.0/lib/boxgrinder-build/plugins/base-plugin.rb:172:in `run'

                      /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.0/lib/boxgrinder-build/appliance.rb:174:in `execute_plugin'

                       

                       

                       

                      when I moved to partiiton configuration to

                       

                      partitions:

                          "/":

                            size: 40

                            type: ext4

                          "swap":

                            size: 6

                       

                      So, everything works fine.

                       

                      It means only 2 partitions we can or supported to have on the machine with boxgrinder ? is this statement correct ?

                       

                      ~Ashish Singh

                      • 23. Re: partitions
                        msavy

                        Hi Ashish,

                         

                        I think it might be best to open a new thread in the forum. I can only get this issue to happen (so far) on VirtualBox + Fedora. So I'm not sure if it is a weird interaction of some sort, I'll have to test with a couple of different versions of VirtualBox. It definitely does not happen with Xen (on EC2 etc).  Quite strange!

                         

                        Marc

                        • 24. Re: partitions
                          msavy

                          Just to follow up, this problem seems to have cropped up recently with virtualbox, and only seems to happen when you build an image in a virtualbox shared directory. Build in a non-shared directory, and it works fine.

                           

                          This definitely functioned previously, so I suppose it has occurred due to some recent change in virtualbox, vbox guest additions or fedora itself.

                          1 2 Previous Next