Skip to content
Snippets Groups Projects
Commit 0f350e73 authored by Jeffrey Tolar's avatar Jeffrey Tolar
Browse files

Fix issues with new VirtualBox

- Switch to grub instead of syslinux
- Use LTS kernel since 4.7 has issuesm with VirtualBox 5.1
parent 6aa2fe29
No related branches found
No related tags found
No related merge requests found
......@@ -10,10 +10,11 @@ ROOT_PASSWORD=uiuc
PACKAGES=(# Core packages
base
base-devel
syslinux
linux-lts{,-headers} # use lts because current VirtualBox (~5.1.2) doesn't play nicely with the new (4.7) kernel
grub
ifplugd
# X things
virtualbox-guest-modules
virtualbox-guest-dkms
virtualbox-guest-utils
xfce4
sfml
......@@ -99,6 +100,9 @@ else
fi
sudo arch-chroot root/ <<chrootEOF
# Remove the non-lts kernel
pacman -R --noconfirm linux
# random setup - hostname, timezone, locales
echo cs2xx-vm > /etc/hostname
ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime
......@@ -122,14 +126,14 @@ pacman-key --populate archlinux
# install bootloader
syslinux-install_update -i -a -m
uuid=\$(blkid -o value -s UUID ${loopdev}p1)
sed -i '/APPEND/ s+root=[^ ]*+root=UUID='\$uuid'+' /boot/syslinux/syslinux.cfg
sed -i '/TIMEOUT/ s+GRUB_TIMEOUT=.*+GRUB_TIMEOUT=2+' /etc/default/grub
grub-install --target=i386-pc ${loopdev}
grub-mkconfig -o /boot/grub/grub.cfg
# fix a bug when running in QEMU - the 'block' hook has to be included in the initcpio
sed -i '/^HOOKS/ s/autodetect \\(.*\\) block/block autodetect \\1/' /etc/mkinitcpio.conf
mkinitcpio -p linux
mkinitcpio -p linux-lts
# create default user, set passwords
......@@ -266,6 +270,7 @@ sudo umount ${loopdev}p1
sudo losetup -d $loopdev
trap - EXIT
set -e
rm -f $DISK.vmdk
VBoxManage convertfromraw $DISK $DISK.vmdk --format VMDK
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment