Kickstart failing partition creation Announcing the arrival of Valued Associate #679: Cesar...

What is the "studentd" process?

What does Turing mean by this statement?

Nose gear failure in single prop aircraft: belly landing or nose-gear up landing?

How to change the tick of the color bar legend to black

Why is a lens darker than other ones when applying the same settings?

What does the writing on Poe's helmet say?

How do living politicians protect their readily obtainable signatures from misuse?

Rationale for describing kurtosis as "peakedness"?

Tips to organize LaTeX presentations for a semester

Found this skink in my tomato plant bucket. Is he trapped? Or could he leave if he wanted?

A proverb that is used to imply that you have unexpectedly faced a big problem

Can you force honesty by using the Speak with Dead and Zone of Truth spells together?

A term for a woman complaining about things/begging in a cute/childish way

What is the origin of 落第?

I can't produce songs

Special flights

Is it dangerous to install hacking tools on my private linux machine?

Did pre-Columbian Americans know the spherical shape of the Earth?

GDP with Intermediate Production

Did any compiler fully use 80-bit floating point?

A `coordinate` command ignored

what is the log of the PDF for a Normal Distribution?

How to write capital alpha?

Caught masturbating at work



Kickstart failing partition creation



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionAnanconda kickstartHow to mount sdb directly or using LVM partitions on sda?rgmanager [fs] start_filesystem: Could not match “f6a58cf7-b39b-489c-add5-444ceab8af9d” with a real deviceKickstart: is it possible to partition without a mount point?Xen domU not resizing diskPartitioning an external HDD using GPT and with a “Microsoft Reserved” partition?Kickstart not installing X on rhel 7.2A part of my hard drive isn't accessible and doesn't seem to be mounted. It happens if I reduce the size of theKVM And Kickstart - Failing to turn offExclude packages in kickstart file





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I started with this in my kickstart file:



%pre

#***********************************************
#
# Get disk name to generate partition
#
#***********************************************
DIR="/sys/block"

# minimum size of hard drive needed specified in GIGABYTES
MINSIZE=50

ROOTDRIVE=""

# /sys/block/*/size is in 512 byte chunks

for DEV in xvda sda sdb sdc sdd; do
if [ -d $DIR/$DEV ]; then
REMOVABLE=`cat $DIR/$DEV/removable`
if (( $REMOVABLE == 0 )); then
echo $DEV
SIZE=`cat $DIR/$DEV/size`
GB=$(($SIZE/2**21))
if [ $GB -gt $MINSIZE ]; then
echo "$(($SIZE/2**21))"
if [ -z $ROOTDRIVE ]; then
ROOTDRIVE=$DEV
fi
fi
fi
fi
done

echo "ROOTDRIVE=$ROOTDRIVE"

cat > /tmp/ks-partition.txt <<EOF

# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=$ROOTDRIVE

# Clear the Master Boot Record
zerombr

# Partition clearing information
clearpart --all

# Disk partitioning information
part /boot --fstype=ext4 --ondisk=$ROOTDRIVE --size=1000
part pv.00 --fstype="lvmpv" --ondisk=$ROOTDRIVE --size=1024 --grow
volgroup vg00 pv.00
logvol swap --fstype="swap" --size=4096 --name=swap --vgname=vg00
logvol /var/log/audit --fstype="ext4" --percent=10 --name=var_log_audit --vgname=vg00
logvol /var/log --fstype="ext4" --percent=10 --name=var_log --vgname=vg00
logvol /var --fstype="ext4" --percent=10 --name=var --vgname=vg00
logvol /opt --fstype="ext4" --percent=30 --name=opt --vgname=vg00
logvol / --fstype="ext4" --size=1000 --grow --name=root --vgname=vg00
EOF

%end


And wittled it all the way down to what you see below before it would work (many partial changes in between). Every time I kicked it I would see something like "is_valid_stage1_device: False" in the anaconda.log and it would ask me to manually configure partitioning to continue. Any ideas?



Using 7.2 and the thing i'm kickstarting is a VM. To be clear the below works like a champ but I need/want to automate like the above.



# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=xvda

# Clear the Master Boot Record
zerombr

# Partition clearing information
clearpart --all

# Disk partitioning information
part /boot --fstype=ext4 --ondisk=xvda --size=1000
part pv.00 --fstype="lvmpv" --ondisk=xvda --size=1024 --grow
volgroup vg00 pv.00
logvol swap --fstype="swap" --size=4096 --name=swap --
vgname=vg00
logvol /var/log/audit --fstype="ext4" --percent=10 --name=var_log_audit --vgname=vg00
logvol /var/log --fstype="ext4" --percent=10 --name=var_log --vgname=vg00
logvol /var --fstype="ext4" --percent=10 --name=var --vgname=vg00
logvol /opt --fstype="ext4" --percent=30 --name=opt --vgname=vg00
logvol / --fstype="ext4" --size=1000 --grow --name=root --vgname=vg00









share|improve this question































    0















    I started with this in my kickstart file:



    %pre

    #***********************************************
    #
    # Get disk name to generate partition
    #
    #***********************************************
    DIR="/sys/block"

    # minimum size of hard drive needed specified in GIGABYTES
    MINSIZE=50

    ROOTDRIVE=""

    # /sys/block/*/size is in 512 byte chunks

    for DEV in xvda sda sdb sdc sdd; do
    if [ -d $DIR/$DEV ]; then
    REMOVABLE=`cat $DIR/$DEV/removable`
    if (( $REMOVABLE == 0 )); then
    echo $DEV
    SIZE=`cat $DIR/$DEV/size`
    GB=$(($SIZE/2**21))
    if [ $GB -gt $MINSIZE ]; then
    echo "$(($SIZE/2**21))"
    if [ -z $ROOTDRIVE ]; then
    ROOTDRIVE=$DEV
    fi
    fi
    fi
    fi
    done

    echo "ROOTDRIVE=$ROOTDRIVE"

    cat > /tmp/ks-partition.txt <<EOF

    # System bootloader configuration
    bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=$ROOTDRIVE

    # Clear the Master Boot Record
    zerombr

    # Partition clearing information
    clearpart --all

    # Disk partitioning information
    part /boot --fstype=ext4 --ondisk=$ROOTDRIVE --size=1000
    part pv.00 --fstype="lvmpv" --ondisk=$ROOTDRIVE --size=1024 --grow
    volgroup vg00 pv.00
    logvol swap --fstype="swap" --size=4096 --name=swap --vgname=vg00
    logvol /var/log/audit --fstype="ext4" --percent=10 --name=var_log_audit --vgname=vg00
    logvol /var/log --fstype="ext4" --percent=10 --name=var_log --vgname=vg00
    logvol /var --fstype="ext4" --percent=10 --name=var --vgname=vg00
    logvol /opt --fstype="ext4" --percent=30 --name=opt --vgname=vg00
    logvol / --fstype="ext4" --size=1000 --grow --name=root --vgname=vg00
    EOF

    %end


    And wittled it all the way down to what you see below before it would work (many partial changes in between). Every time I kicked it I would see something like "is_valid_stage1_device: False" in the anaconda.log and it would ask me to manually configure partitioning to continue. Any ideas?



    Using 7.2 and the thing i'm kickstarting is a VM. To be clear the below works like a champ but I need/want to automate like the above.



    # System bootloader configuration
    bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=xvda

    # Clear the Master Boot Record
    zerombr

    # Partition clearing information
    clearpart --all

    # Disk partitioning information
    part /boot --fstype=ext4 --ondisk=xvda --size=1000
    part pv.00 --fstype="lvmpv" --ondisk=xvda --size=1024 --grow
    volgroup vg00 pv.00
    logvol swap --fstype="swap" --size=4096 --name=swap --
    vgname=vg00
    logvol /var/log/audit --fstype="ext4" --percent=10 --name=var_log_audit --vgname=vg00
    logvol /var/log --fstype="ext4" --percent=10 --name=var_log --vgname=vg00
    logvol /var --fstype="ext4" --percent=10 --name=var --vgname=vg00
    logvol /opt --fstype="ext4" --percent=30 --name=opt --vgname=vg00
    logvol / --fstype="ext4" --size=1000 --grow --name=root --vgname=vg00









    share|improve this question



























      0












      0








      0








      I started with this in my kickstart file:



      %pre

      #***********************************************
      #
      # Get disk name to generate partition
      #
      #***********************************************
      DIR="/sys/block"

      # minimum size of hard drive needed specified in GIGABYTES
      MINSIZE=50

      ROOTDRIVE=""

      # /sys/block/*/size is in 512 byte chunks

      for DEV in xvda sda sdb sdc sdd; do
      if [ -d $DIR/$DEV ]; then
      REMOVABLE=`cat $DIR/$DEV/removable`
      if (( $REMOVABLE == 0 )); then
      echo $DEV
      SIZE=`cat $DIR/$DEV/size`
      GB=$(($SIZE/2**21))
      if [ $GB -gt $MINSIZE ]; then
      echo "$(($SIZE/2**21))"
      if [ -z $ROOTDRIVE ]; then
      ROOTDRIVE=$DEV
      fi
      fi
      fi
      fi
      done

      echo "ROOTDRIVE=$ROOTDRIVE"

      cat > /tmp/ks-partition.txt <<EOF

      # System bootloader configuration
      bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=$ROOTDRIVE

      # Clear the Master Boot Record
      zerombr

      # Partition clearing information
      clearpart --all

      # Disk partitioning information
      part /boot --fstype=ext4 --ondisk=$ROOTDRIVE --size=1000
      part pv.00 --fstype="lvmpv" --ondisk=$ROOTDRIVE --size=1024 --grow
      volgroup vg00 pv.00
      logvol swap --fstype="swap" --size=4096 --name=swap --vgname=vg00
      logvol /var/log/audit --fstype="ext4" --percent=10 --name=var_log_audit --vgname=vg00
      logvol /var/log --fstype="ext4" --percent=10 --name=var_log --vgname=vg00
      logvol /var --fstype="ext4" --percent=10 --name=var --vgname=vg00
      logvol /opt --fstype="ext4" --percent=30 --name=opt --vgname=vg00
      logvol / --fstype="ext4" --size=1000 --grow --name=root --vgname=vg00
      EOF

      %end


      And wittled it all the way down to what you see below before it would work (many partial changes in between). Every time I kicked it I would see something like "is_valid_stage1_device: False" in the anaconda.log and it would ask me to manually configure partitioning to continue. Any ideas?



      Using 7.2 and the thing i'm kickstarting is a VM. To be clear the below works like a champ but I need/want to automate like the above.



      # System bootloader configuration
      bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=xvda

      # Clear the Master Boot Record
      zerombr

      # Partition clearing information
      clearpart --all

      # Disk partitioning information
      part /boot --fstype=ext4 --ondisk=xvda --size=1000
      part pv.00 --fstype="lvmpv" --ondisk=xvda --size=1024 --grow
      volgroup vg00 pv.00
      logvol swap --fstype="swap" --size=4096 --name=swap --
      vgname=vg00
      logvol /var/log/audit --fstype="ext4" --percent=10 --name=var_log_audit --vgname=vg00
      logvol /var/log --fstype="ext4" --percent=10 --name=var_log --vgname=vg00
      logvol /var --fstype="ext4" --percent=10 --name=var --vgname=vg00
      logvol /opt --fstype="ext4" --percent=30 --name=opt --vgname=vg00
      logvol / --fstype="ext4" --size=1000 --grow --name=root --vgname=vg00









      share|improve this question
















      I started with this in my kickstart file:



      %pre

      #***********************************************
      #
      # Get disk name to generate partition
      #
      #***********************************************
      DIR="/sys/block"

      # minimum size of hard drive needed specified in GIGABYTES
      MINSIZE=50

      ROOTDRIVE=""

      # /sys/block/*/size is in 512 byte chunks

      for DEV in xvda sda sdb sdc sdd; do
      if [ -d $DIR/$DEV ]; then
      REMOVABLE=`cat $DIR/$DEV/removable`
      if (( $REMOVABLE == 0 )); then
      echo $DEV
      SIZE=`cat $DIR/$DEV/size`
      GB=$(($SIZE/2**21))
      if [ $GB -gt $MINSIZE ]; then
      echo "$(($SIZE/2**21))"
      if [ -z $ROOTDRIVE ]; then
      ROOTDRIVE=$DEV
      fi
      fi
      fi
      fi
      done

      echo "ROOTDRIVE=$ROOTDRIVE"

      cat > /tmp/ks-partition.txt <<EOF

      # System bootloader configuration
      bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=$ROOTDRIVE

      # Clear the Master Boot Record
      zerombr

      # Partition clearing information
      clearpart --all

      # Disk partitioning information
      part /boot --fstype=ext4 --ondisk=$ROOTDRIVE --size=1000
      part pv.00 --fstype="lvmpv" --ondisk=$ROOTDRIVE --size=1024 --grow
      volgroup vg00 pv.00
      logvol swap --fstype="swap" --size=4096 --name=swap --vgname=vg00
      logvol /var/log/audit --fstype="ext4" --percent=10 --name=var_log_audit --vgname=vg00
      logvol /var/log --fstype="ext4" --percent=10 --name=var_log --vgname=vg00
      logvol /var --fstype="ext4" --percent=10 --name=var --vgname=vg00
      logvol /opt --fstype="ext4" --percent=30 --name=opt --vgname=vg00
      logvol / --fstype="ext4" --size=1000 --grow --name=root --vgname=vg00
      EOF

      %end


      And wittled it all the way down to what you see below before it would work (many partial changes in between). Every time I kicked it I would see something like "is_valid_stage1_device: False" in the anaconda.log and it would ask me to manually configure partitioning to continue. Any ideas?



      Using 7.2 and the thing i'm kickstarting is a VM. To be clear the below works like a champ but I need/want to automate like the above.



      # System bootloader configuration
      bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=xvda

      # Clear the Master Boot Record
      zerombr

      # Partition clearing information
      clearpart --all

      # Disk partitioning information
      part /boot --fstype=ext4 --ondisk=xvda --size=1000
      part pv.00 --fstype="lvmpv" --ondisk=xvda --size=1024 --grow
      volgroup vg00 pv.00
      logvol swap --fstype="swap" --size=4096 --name=swap --
      vgname=vg00
      logvol /var/log/audit --fstype="ext4" --percent=10 --name=var_log_audit --vgname=vg00
      logvol /var/log --fstype="ext4" --percent=10 --name=var_log --vgname=vg00
      logvol /var --fstype="ext4" --percent=10 --name=var --vgname=vg00
      logvol /opt --fstype="ext4" --percent=30 --name=opt --vgname=vg00
      logvol / --fstype="ext4" --size=1000 --grow --name=root --vgname=vg00






      rhel partition kickstart installer-anaconda






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 19 mins ago









      0xSheepdog

      1,76811025




      1,76811025










      asked Nov 8 '17 at 22:16









      levilevi

      113




      113






















          1 Answer
          1






          active

          oldest

          votes


















          1














          Got it! It wasn't the %pre config at all... I missed the %include for the partition file... dumb.



          Here's the line I added (outside of the %pre - above it in my case.)



          %include /tmp/ks-partition.txt





          share|improve this answer
























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "106"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f403421%2fkickstart-failing-partition-creation%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            Got it! It wasn't the %pre config at all... I missed the %include for the partition file... dumb.



            Here's the line I added (outside of the %pre - above it in my case.)



            %include /tmp/ks-partition.txt





            share|improve this answer




























              1














              Got it! It wasn't the %pre config at all... I missed the %include for the partition file... dumb.



              Here's the line I added (outside of the %pre - above it in my case.)



              %include /tmp/ks-partition.txt





              share|improve this answer


























                1












                1








                1







                Got it! It wasn't the %pre config at all... I missed the %include for the partition file... dumb.



                Here's the line I added (outside of the %pre - above it in my case.)



                %include /tmp/ks-partition.txt





                share|improve this answer













                Got it! It wasn't the %pre config at all... I missed the %include for the partition file... dumb.



                Here's the line I added (outside of the %pre - above it in my case.)



                %include /tmp/ks-partition.txt






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 10 '17 at 22:05









                levilevi

                113




                113






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f403421%2fkickstart-failing-partition-creation%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

                    Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

                    Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...