2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-01-11 18:42:29 +00:00

Extract and use HWE by default for Ubuntu 24.04

This commit is contained in:
Jarrod Johnson
2025-08-11 13:55:36 -04:00
parent 836b629986
commit 465e985cc7
2 changed files with 24 additions and 10 deletions

View File

@@ -1,14 +1,23 @@
#!/bin/sh
sed -i 's/label: ubuntu/label: Ubuntu/' $2/profile.yaml && \
ln -s $1/casper/vmlinuz $2/boot/kernel && \
ln -s $1/casper/initrd $2/boot/initramfs/distribution && \
mkdir -p $2/boot/efi/boot && \
#!/bin/bash
set -e
sed -i 's/label: ubuntu/label: Ubuntu/' $2/profile.yaml
if [ -e $1/casper/hwe-vmlinuz ]; then
ln -s $1/casper/hwe-vmlinuz $2/boot/kernel
else
ln -s $1/casper/vmlinuz $2/boot/kernel
fi
if [ -e $1/casper/hwe-initrd ]; then
ln -s $1/casper/hwe-initrd $2/boot/initramfs/distribution
else
ln -s $1/casper/initrd $2/boot/initramfs/distribution
fi
mkdir -p $2/boot/efi/boot
if [ -d $1/EFI/boot/ ]; then
ln -s $1/EFI/boot/* $2/boot/efi/boot
elif [ -d $1/efi/boot/ ]; then
ln -s $1/efi/boot/* $2/boot/efi/boot
else
echo "Unrecogrized boot contents in media" >&2
echo "Unrecognized boot contents in media" >&2
exit 1
fi

View File

@@ -250,8 +250,13 @@ def extract_entries(entries, flags=0, callback=None, totalsize=None, extractlist
for entry in entries:
if str(entry).endswith('TRANS.TBL'):
continue
if extractlist and str(entry).lower() not in extractlist:
continue
if extractlist:
normname = str(entry).lower()
for extent in extractlist:
if fnmatch(normname, extent):
break
else:
continue
write_header(write_p, entry._entry_p)
read_p = entry._archive_p
while 1:
@@ -553,11 +558,11 @@ def check_ubuntu(isoinfo):
'method': EXTRACT,
'category': 'ubuntu{0}'.format(major)}
elif 'efi/boot/bootaa64.efi' in isoinfo[0]:
exlist = ['casper/vmlinuz', 'casper/initrd',
exlist = ['casper/*vmlinuz', 'casper/*initrd',
'efi/boot/bootaa64.efi', 'efi/boot/grubaa64.efi'
]
else:
exlist = ['casper/vmlinuz', 'casper/initrd',
exlist = ['casper/*vmlinuz', 'casper/*initrd',
'efi/boot/bootx64.efi', 'efi/boot/grubx64.efi'
]
return {'name': 'ubuntu-{0}-{1}'.format(ver, arch),