Hi everyone,
I'm working with libguestfs 1.30.3 on Centos 7 host.
I encountered a problem when I wanted to install extlinux with guestfish as
a bootloader for my guests and I always get this error:
SYSLINUX 4.05 EDD 0x54f93f16 Copyright (C) 1994-2010 H. Peter Anvin et al
ERROR: No configuration file found
No default or UI configuration directive found!
boot: _
*This is how I create the virtual machines:*
lvcreate -n vm_name -L 9G vm_volumes
parted /dev/vm_volumes/vm_name mklabel msdos
parted -a optimal /dev/vm_volumes/vm_name mkpart primary ext4 0% 100%
parted /dev/vm_volumes/vm_name set 1 boot on
kpartx -av /dev/vm_volumes/vm_name
mkfs.ext4 /dev/mapper/loop0p1
mount /dev/mapper/loop0p1 /mnt/clone
tar -zxf /root/centos7_template.tar.gz -C /mnt/clone/
umount /mnt/clone
kpartx -dv /dev/vm_volumes/vm_name
/root/libguestfs-1.30.3/run guestfish -i -a /dev/vm_volumes/{vm_name}
<< _EOF_ \n\
#####mbr.bin and syslinux already existant in centos7_template.tar.gz####
copy-file-to-device /boot/mbr.bin /dev/sda size:440 \n\
extlinux /boot \n\
part-set-bootable /dev/sda 1 true \n\
_EOF_
*And this is the syslinux.cfg file:*
DEFAULT linux
LABEL linux
SAY Booting the kernel
KERNEL /boot/vmlinuz-3.10.0-229.el7.x86_64
INITRD /boot/initramfs-3.10.0-229.el7.x86_64.img
APPEND ro root=UUID={{ UUID }}
The strange thing is that before I was using a ubuntu 14.04 host with
libguestfs 1.24.5 and everything was working fine all my guests worked
with extlinux as a bootloader and it's a better solution than grub but
when I changed to a Centos7 host the same vm creation script didn't
work.
I don't know where is the problem, is it from guestfish?? or
extlinux?? is there an additional package that I need to install??
Thank you for your time.
Best regards, Slim TABKA