1

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
  • Posting the kickstart configuration used might be informative. – thrig May 24 '16 at 15:45
  • I've pasted ks.cfg below the original post. – Brongers Croste May 24 '16 at 16:11
  • So where did that md RAID come from? I don't see it in the kickstart config. – thrig May 24 '16 at 16:35
  • it's not in the kickstart config, and it isn't a RAID machine. – Brongers Croste May 25 '16 at 8:10
  • I don't know where else the md RAID would be? Is it a default part of the kernel or plymouth? – Brongers Croste May 25 '16 at 8:33
0

I guess the post install commands I was having to issue where a bit of a clue. Following another "successful" install I checked the contents of /mnt/sysimage/var/log/anaconda/anaconda.log which indicated that no kernel was being installed.

Sure enough I hadn't added the kernel package into the repo on my ISO - so I added in the kernel package (and grubby, which is a dependency), rebuilt the repo and installed. This time the install correctly installed and configured the bootloader.

Thanks for looking.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.