Ask Your Question
0

Fedora 24 AArch64: failed to find a suitable stage1 device

asked 2016-09-09 04:51:27 -0600

socminarch gravatar image

I am trying to install Fedora 24 Cloud into a VM using a kickstart script:

install
url --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch

text
lang en_GB.UTF-8
keyboard gb
timezone --utc Europe/London

selinux --enforcing
rootpw --lock root

firewall --disabled

bootloader --timeout=1 --append="no_timer_check console=tty1 console=ttyAMA0,115200n8"

network --bootproto=dhcp --device=link --activate --onboot=on
services --enabled=network,sshd,rsyslog,cloud-init,cloud-init-local,cloud-config,cloud-final

zerombr
clearpart --all
part /boot --fstype=ext4 --size=500 --fsoptions="noatime,discard"
part /boot/efi --fstype=vfat --size=100 --fsoptions="noatime,discard"
part btrfs.01 --grow --fsoptions="noatime,discard"
btrfs none --label=fedora btrfs.01
btrfs / --subvol --name=root fedora
btrfs /home --subvol --name=home fedora

poweroff

%packages --excludedocs

kernel-core
@^cloud-server-environment
systemd-udev

-dracut-config-rescue

-biosdevname
-NetworkManager
-iprutils
-uboot-tools
-kernel

efibootmgr
grub2-efi
-syslinux-extlinux

%end

%post --erroronfail

echo -n "Setting default runlevel to multiuser text mode"
rm -f /etc/systemd/system/default.target
ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
echo .

echo "Removing linux-firmware package."
rpm -e linux-firmware

echo "Removing firewalld."
dnf -C -y erase "firewalld*"

echo "Removing authconfig."
dnf -C -y erase authconfig

find /usr/share/locale -mindepth  1 -maxdepth 1 -type d -not -name en_GB -exec rm -rf {} +
localedef --list-archive | grep -v ^en_GB | xargs localedef --delete-from-archive
mv -f /usr/lib/locale/locale-archive /usr/lib/locale/locale-archive.tmpl
build-locale-archive
echo '%_install_langs C:en:en_GB:en_GB.UTF-8' >> /etc/rpm/macros.image-language-conf
awk '(NF==0&&!done){print "override_install_langs='$LANG'";done=1}{print}' \
    < /etc/yum.conf > /etc/yum.conf.new
mv /etc/yum.conf.new /etc/yum.conf


echo -n "Getty fixes"
sed -i '/^#NAutoVTs=.*/ a\
NAutoVTs=0' /etc/systemd/logind.conf

echo -n "Network fixes"
cat > /etc/sysconfig/network << EOF
NETWORKING=yes
NOZEROCONF=yes
DEVTIMEOUT=10
EOF

rm -f /etc/udev/rules.d/70*
ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules

cat > /etc/sysconfig/network-scripts/ifcfg-eth0 << EOF
DEVICE="eth0"
BOOTPROTO="dhcp"
ONBOOT="yes"
TYPE="Ethernet"
PERSISTENT_DHCLIENT="yes"
EOF

cat > /etc/hosts << EOF
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

EOF
echo .

echo "Disabling tmpfs for /tmp."
systemctl mask tmp.mount

echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot

# Uncomment this if you want to use cloud init but suppress the creation
# of an "ec2-user" account. This will, in the absence of further config,
# cause the ssh key from a metadata source to be put in the root account.
#cat <<EOF > /etc/cloud/cloud.cfg.d/50_suppress_ec2-user_use_root.cfg
#users: []
#disable_root: 0
#EOF

echo "Removing random-seed so it's not the same in every image."
rm -f /var/lib/random-seed

echo "Cleaning old dnf repodata."
dnf clean all
truncate -c -s 0 /var/log/dnf.log
truncate -c -s 0 /var/log/dnf.rpm.log

echo "Import RPM GPG key"
releasever=$(rpm -q --qf '%{version}\n' fedora-release)
basearch=$(uname -i)
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch

echo "Packages within this cloud image:"
echo "-----------------------------------------------------------------------"
rpm -qa
echo "-----------------------------------------------------------------------"
rm -f /var/lib/rpm/__db*

echo "Fixing SELinux contexts ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-09-15 17:41:05 -0600

cmurf gravatar image

Try reqpart instead of the line for /boot/efi. Looks like it's a stand alone line that will create required partitions for your platform, including the ESP. I don't think vfat supports either noatime or discard, they're not listed in mount, so I would drop those anyway, and I'm not really sure if the fstype is vfat, technically the EFI file system is a variant of vfat, while it gets formatted with the same mkdosfs command as vfat, I don't know if that's what anaconda calls it.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2016-09-09 04:51:27 -0600

Seen: 1,186 times

Last updated: Sep 15 '16