Everything works in the auto-generated kickstart file for installing centos-linux except for selecting target drive + boot dot

5,387

It looks like your part statements will not work.

You have deleted not only the lvm config but also the / root filesystem config (and also the swap partition config).

Without root filesystem your installation will not work. Swap is also recommended in most situations.

I am not sure about your two disk setup. More information on kickstart options you can find here

Share:
5,387

Related videos on Youtube

User3432423423
Author by

User3432423423

Updated on September 18, 2022

Comments

  • User3432423423
    User3432423423 over 1 year

    I discovered that if I copy the auto-generated kickstart file in CentOS Linux, I could re-install CentOS Linux without having to fill stuff, and so on..

    It appears centos saves the auto-generated kickstart file to /root/anaconda-ks.cfg

    Let's see what it looks like:

    # Kickstart file automatically generated by anaconda.
    
    #version=DEVEL
    install
    harddrive --partition=UUID=94A9-D1AE --dir=/
    lang en_US.UTF-8
    keyboard us
    network --onboot no --device eth0 --bootproto dhcp --noipv6
    network --onboot no --device wlan0 --bootproto dhcp --noipv6
    rootpw  --iscrypted $6$wWTsHJyQ8Fe88fWk$v6u7X.WanDxPm26FJCi9gCwWXlwRg9tQze25uGk150W4BHLKcGRkcgFn4lRGowrXl1C0LlBQCOLxR9sx3Rjw20
    firewall --service=ssh
    authconfig --enableshadow --passalgo=sha512
    selinux --enforcing
    timezone --utc America/New_York
    bootloader --location=mbr --driveorder=sda,sdb --append="crashkernel=auto rhgb quiet"
    # The following is the partition information you requested
    # Note that any partitions you deleted are not expressed
    # here so unless you clear all partitions first, this is
    # not guaranteed to work
    #clearpart --all --drives=sda
    #volgroup VolGroup --pesize=4096 pv.008002
    #logvol / --fstype=ext4 --name=lv_root --vgname=VolGroup --grow --size=1024 --maxsize=51200
    #logvol swap --name=lv_swap --vgname=VolGroup --grow --size=7840 --maxsize=7840
    
    #part /boot --fstype=ext4 --size=500
    #part pv.008002 --grow --size=1
    
    #part None --fstype=efi --label="LIVE" --onpart=sdb1 --noformat
    
    repo --name="CentOS"  --baseurl=hd:UUID=94A9-D1AE:/ --cost=100
    
    %packages --nobase
    @core
    %end
    

    To make this work better, I simply added

     interactive
    

    right above the install line on top. so that I can see what it is doing.

    Looks like it didn't auto fill the root-password. so let's remove the encrypted password and add a plain text password and then test again.

    Looks like it didn't select "use all space"

    So let's uncomment the commented lines towards the bottom portion.
    Looks like there are errors, I was forced to quit installation and reboot.

    Here is a final version that works okay. Only some lines were uncommented, and root password was changed to plain text. it is now

     Use All Space
    

    during the installation proces.

    I also added interactive line to it.

    # Kickstart file automatically generated by anaconda.
    
    #version=DEVEL
    interactive
    install
    harddrive --partition=UUID=94A9-D1AE --dir=/
    lang en_US.UTF-8
    keyboard us
    network --onboot no --device eth0 --bootproto dhcp --noipv6
    network --onboot no --device wlan0 --bootproto dhcp --noipv6
    rootpw  aaaaaa
    firewall --service=ssh
    authconfig --enableshadow --passalgo=sha512
    selinux --disabled
    timezone --utc America/Los_Angeles
    bootloader --location=mbr --driveorder=sda,sdb --append="crashkernel=auto rhgb quiet"
    # The following is the partition information you requested
    # Note that any partitions you deleted are not expressed
    # here so unless you clear all partitions first, this is
    # not guaranteed to work
    clearpart --all --initlabel
    part /boot --fstype=ext4 --size=500
    part None --fstype=efi --label="LIVE" --onpart=sdb1 --noformat
    repo --name="CentOS"  --baseurl=hd:UUID=94A9-D1AE:/ --cost=100
    %packages --nobase
    @core
    %end
    

    Everthing works great but it is not selecting the target hard drive, and placing a dot into the Boot thing.

    In other words the final step has to be done manually by hand.

    What should be done so that it can select the target drive and also ensure selected as the boot drive ?