cd testing
+ mkdir -p boot/efi
+
sudo bash -c 'echo live > etc/hostname'
sudo bash -c 'echo > etc/motd'
{
(
rm -rf EFI
- mkdir -p EFI/boot
+ mkdir -p EFI/boot EFI/debian
cp testing/usr/lib/grub/arm64-efi/monolithic/grubaa64.efi EFI/boot/bootaa64.efi
export INITRD=`ls -1 testing/boot/ | grep initrd`
export VMLINUZ=`ls -1 testing/boot/ | grep vmlinuz`
export UUID=`blkid media | awk -F\" '{print $2}'`
- cat > EFI/boot/grub.cfg <<EOF
+ cat > EFI/debian/grub.cfg <<EOF
search.fs_uuid ${UUID} root
-set prefix=(\$root)'/boot/'
-linux $VMLINUZ root=UUID=${UUID} ro
-inird $INITRD
+linux (\$root)/boot/${VMLINUZ} root=UUID=${UUID} rw
+initrd (\$root)/boot/${INITRD}
boot
EOF
tar czf efi.tgz EFI
echo Loading Kernel...
-linux (hd0,msdos1)/vmlinuz expert net.ifnames=0
+linux (hd0,msdos1)/vmlinuz expert
echo Loading initrd... Please wait
initrd (hd0,msdos1)/initrd.gz
boot
# Include files from /etc/network/interfaces.d:
source /etc/network/interfaces.d/*
-auto eth0
-iface eth0 inet dhcp
-
-auto wlan0
-iface wlan0 inet dhcp
+allow-hotplug wlp1s0f0
+iface wlp1s0f0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
my $firmware_tarball = '/boot/efi/linux-firmware.tar';
my $firmware_manifest = '/lib/firmware/ASAHI_FIRMWARE_MANIFEST';
+my $grubcfg = '/mnt/EFI/debian/grub.cfg';
sub
find_root_device
for my $dev (@candidates) {
system("mount -o ro $dev /mnt");
- if (-f '/mnt/EFI/boot/grub.cfg') {
- open(GRUBCFG, '<', '/mnt/EFI/boot/grub.cfg') || die ("Can't open /mnt/EFI/boot/grub.cfg: $!");
+ if (-f $grubcfg) {
+ open(GRUBCFG, '<', $grubcfg) || die ("Can't open $grubcfg: $!");
my @lines = <GRUBCFG>;
for (@lines) {
if (/${uuid_in_grub_cfg}/) {
system("echo 'grub-efi-arm64 grub2/update_nvram boolean false' | debconf-set-selections");
system("echo 'grub-efi-arm64 grub2/force_efi_extra_removable boolean true' | debconf-set-selections");
system("dpkg-reconfigure -fnoninteractive grub-efi-arm64");
+ system("update-grub");
}
sub