Hi, I have a test system that booted fine using "Legacy Bios? mode and using the following Kickstart snippet configured the disks correctly:- # Clear the Master Boot Record zerombr # Partition clearing information clearpart --all --initlabel # Disk partitioning information part raid.01 --fstype="raid" --ondisk=sda --size=500 part raid.02 --fstype="raid" --grow --ondisk=sda --size=1 part raid.03 --fstype="raid" --ondisk=sdb --size=500 part raid.04 --fstype="raid" --grow --ondisk=sdb --size=1 raid /boot --device=0 --fstype="xfs" --level=RAID1 raid.01 raid.03 raid pv.01 --device=1 --level=RAID1 raid.02 raid.04 For UEFi I changed it to the following:- # Clear the Master Boot Record zerombr # Partition clearing information clearpart --all --initlabel # Disk partitioning information part raid.01 --fstype="raid" --ondisk=sda --size=500 part raid.02 --fstype="raid" --grow --ondisk=sda --size=1 part raid.03 --fstype="raid" --ondisk=sdb --size=500 part raid.04 --fstype="raid" --grow --ondisk=sdb --size=1 raid /boot --device=0 --fstype="xfs" --level=RAID1 raid.01 raid.03 part /boot/efi ?fstype=?efi? --grow --maxsize=200 --size=20 raid pv.01 --device=1 --level=RAID1 raid.02 raid.04 The install fails under UEFi due to the fact the partitions are not cleared, and it doesn?t have any space to continue. Is there an extra step I need to do to remove the original partitions before the new layout will work ? Thanks
On 08/19/2016 11:35 PM, Phil Manuel wrote:> The install fails under UEFi due to the fact the partitions are not cleared, and it doesn?t have any space to continue. Is there an extra step I need to do to remove the original partitions before the new layout will work ?Yes. If you have pre-existing RAID partitions, they'll automatically assemble before Anaconda runs, and the installer won't be able to remove them. It's easiest to handle this interactively, using wipefs to clear the filesystems, RAID metadata, and disks. Because my systems are fairly predictable, I have a function in my kickstart file that I run from the %pre script when I specify a keyword in the boot parameters. You'll want to do something similar... Stop logical volumes if present. Wipe filesystems with wipefs, and then stop the RAID volumes. Finally, wipe the disk partition table. wipedisks() { vgchange -a n test -b /dev/md/efi && wipefs -a /dev/md/efi && mdadm --stop /dev/md/efi test -b /dev/md/boot && wipefs -a /dev/md/boot && mdadm --stop /dev/md/boot test -b /dev/md/primary && wipefs -a /dev/md/primary && mdadm --stop /dev/md/primary for x in /dev/md/* do mdadm --stop $x done for x in ${drives[@]} do for p in /dev/${x}[0-9]* do wipefs -a $p done wipefs -a $x done }
On Sun, 21 Aug 2016 at 12:51 Gordon Messmer <gordon.messmer at gmail.com> wrote:> On 08/19/2016 11:35 PM, Phil Manuel wrote: > > The install fails under UEFi due to the fact the partitions are not > cleared, and it doesn?t have any space to continue. Is there an extra step > I need to do to remove the original partitions before the new layout will > work ? > > > Yes. If you have pre-existing RAID partitions, they'll automatically > assemble before Anaconda runs, and the installer won't be able to remove > them. It's easiest to handle this interactively, using wipefs to clear > the filesystems, RAID metadata, and disks. Because my systems are > fairly predictable, I have a function in my kickstart file that I run > from the %pre script when I specify a keyword in the boot parameters. > You'll want to do something similar... > > Stop logical volumes if present. Wipe filesystems with wipefs, and then > stop the RAID volumes. Finally, wipe the disk partition table. > > wipedisks() { > vgchange -a n > test -b /dev/md/efi && wipefs -a /dev/md/efi && mdadm --stop > /dev/md/efi > test -b /dev/md/boot && wipefs -a /dev/md/boot && mdadm --stop > /dev/md/boot > test -b /dev/md/primary && wipefs -a /dev/md/primary && mdadm > --stop /dev/md/primary > for x in /dev/md/* > do > mdadm --stop $x > done > for x in ${drives[@]} > do > for p in /dev/${x}[0-9]* > do > wipefs -a $p > done > wipefs -a $x > done > } >Hi Gordon Thanks for your help. unfortunately it is still complaining. Currently, I try to install and it fails, I remove all the partitions from ALT-F3 console using wipefs, check with parted -l that the partitions and labels are wiped and then reboot. It fails again with:- ERR ananconda: Bootloader setup failed: failed to find a suitable stage1 device INFO anaconda: fs space: 0 B needed: 2861.02 MiB If I reboot, select legacy BIOS it works The only differences in the Kickstart files are as follows: legacy KS bootloader --location=mbr --boot-drive=sda --driveorder=sda,sdb --append="console=tty0 console=ttyS1,9600 console=ttyS2,115200" clearpart --all --initlabel --- UEFi Ks below: bootloader --location=partition --boot-drive=sda --driveorder=sda,sdb --append="console=tty0 console=ttyS1,9600 console=ttyS2,115200" clearpart --all --initlabel --drives=sda,sdb part /boot/efi --fstype="efi" --size=200 --ondisk=sda And I have tried the latter with location as mbr still fails What am I missing ? Thanks