I have been following the instructions on using kickstart to create a custom install at : http://www.smorgasbork.com/2012/01/04/building-a-custom-centos-7-kickstart-disc-part-3/
I got an unattended install working, but now the machine won't boot when it's started.
Grub(2) loads but doesn't automatically load the kernel (I guess I need to create a config file to automate this - not really worried about that at this stage) so I issue the following commands to boot:
set root=(hd0,msdos1)
set prefix=(hd0,msdos1)/boot/grub2
insmod vbe.mod
insmod mmap.mod
insmod relocator.mod
insmod linux.mod
insmod lvm.mod
linux (hd0,msdos1)/vmlinuz root=/dev/mapper/centos_partition1-root
initrd (hd0,msdos1)/initrd-plymouth.img
boot
This results in a kernel panic, output of which is preceded by the following:
md: waiting for all devices to be available before auto detect
md: if you don’t use raid, use raid=noautodetect
md: Autodetecting RAID arrays.
md: Scanned 0 and added 0 devices.
md: autorun ...
md: ... autorun DONE.
List of all partitions:
No filesystem could mount root, tried:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
I also tried using initramfs instead of initrd-plymouth but this produced a similar problem, although this time the output is:
dracut: FATAL: No or empty root= argument
I've worked a bunch of things out to get to this point but I just don't see where to go from here. Help appreciated.
ks.cfg
#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
cdrom
# Use graphical install
# graphical
# Use text install
text
# Make kickstart non-interactive
autostep
# Run the Setup Agent on first boot
#firstboot --enable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=gb --xlayouts='gb'
# System language
lang en_GB.UTF-8
# Network information
network --bootproto=dhcp --device=enp2s0 --onboot=off --ipv6=auto --activate
network --device=lo --hostname=partition1
#Root password
rootpw --lock
# System timezone
timezone Europe/London --isUtc
user --groups=wheel --name=adm --password=() --iscrypted --gecos="admin"
# System bootloader configuration
#bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
bootloader --location=mbr
autopart --type=lvm
# Partition clearing information
clearpart --drives=sda --all --initlabel
%packages
@^minimal
@core
kexec-tools
openscap
openscap-scanner
scap-security-guide
%end
%addon org_fedora_oscap
content-type = scap-security-guide
profile = standard
%end
%addon com_redhat_kdump --enable --reserve-mb='auto'
%end
edit:
I've been through the process I used to get this far and I think the anaconda script was missing some items, which I ended up doing manually before the reboot following the automated install. I had also issued the following commands:
mount /dev/block/8:1 /mnt
grub2-install --boot-directory=/mnt/boot /dev/sda
cp /run/install/repo/vmlinuz /mnt
md
RAID come from? I don't see it in the kickstart config.