asahilinux / asahi-scripts Goto Github PK
View Code? Open in Web Editor NEWMiscellaneous admin scripts for the Asahi Linux reference distro
License: MIT License
Miscellaneous admin scripts for the Asahi Linux reference distro
License: MIT License
In this script, it might a good idea to verify that $root_dev
and $efi_dev
both have value before changing any of the UUIDs
If the efi partition wasn't mount for whatever reason, but root was -- then the UUID of the root partition would be modified, but /etc/fstab
wouldn't be modified.
I actually ran into this issue when building my own image (and incorporating your scripts). For some reason the efi partition wasn't mounted when the first-boot.service ran....
root_dev=$(findmnt -n -o SOURCE /)
efi_dev=$(findmnt -n -o SOURCE /boot/efi)
if [ -e "$root_dev" ]; then
echo 'Randomizing root filesystem UUID...'
tune2fs -U random "$root_dev"
root_uuid=$(blkid -c /dev/null "$root_dev" -o export | grep '^UUID=')
echo "Root filesystem: $root_uuid"
echo
fi
if [ -e "$efi_dev" ] && \
blkid "$efi_dev" | grep -q 'TYPE="vfat"'; then
echo Randomizing EFI system partition UUID...'
# Ugly... why isn't there a command to do this?
ssize=$(blockdev --getss "$efi_dev")
dd bs=1 seek=67 count=4 conv=notrunc if=/dev/urandom of="$efi_dev"
dd bs=1 skip=67 seek=$((67+6*$ssize)) count=4 conv=notrunc if="$efi_dev" of="$efi_dev"
efi_uuid=$(blkid -c /dev/null "$efi_dev" -o export | grep '^UUID=')
echo "EFI partition: $efi_uuid"
echo
fi
if [ ! -z "$root_uuid" ] && [ ! -z "$efi_uuid" ]; then
I'm testing out that dracut PR that was recently merged #9
It's failing on this ( cd /; cpio -i < "$VENDORFW/firmware.cpio" )
It seems like it can't extract the contents of firmware.cpio
to /
within initramfs
Jul 14 02:00:00 fedora dracut-pre-udev[354]: :: Asahi: Triggering early load of NVMe modules...
Jul 14 02:00:00 fedora dracut-pre-udev[354]: :: Asahi: Unpacking vendor firmware into initramfs...
Jul 14 02:00:00 fedora dracut-pre-udev[362]: Mounted System ESP /dev/nvme0n1p4 at /run/.system-efi
Jul 14 02:00:00 fedora dracut-pre-udev[373]: cpio: vendorfw not created: newer or same age version exists
Jul 14 02:00:00 fedora dracut-pre-udev[373]: cpio: vendorfw/brcm: Cannot mkdir: No such file or directory
Jul 14 02:00:00 fedora dracut-pre-udev[373]: cpio: vendorfw/brcm/brcmfmac4355c1-pcie.apple,hawaii-YSBC-m-2.3.txt: Cannot open: No such file or directory
Jul 14 02:00:00 fedora dracut-pre-udev[373]: cpio: vendorfw/brcm/brcmfmac4355c1-pcie.apple,hawaii-YSBC-m-2.5.txt: Cannot open: No such file or directory
Jul 14 02:00:00 fedora dracut-pre-udev[373]: cpio: vendorfw/brcm/brcmfmac4355c1-pcie.apple,hawaii-YSBC-u-4.1.txt: Cannot open: No such file or directory
Jul 14 02:00:00 fedora dracut-pre-udev[373]: cpio: vendorfw/brcm/brcmfmac4355c1-pcie.apple,hawaii-YSBC-u-4.3.txt: Cannot open: No such file or directory
Jul 14 02:00:00 fedora dracut-pre-udev[373]: cpio: vendorfw/brcm/brcmfmac4355c1-pcie.apple,hawaii.bin: Cannot open: No such file or directory
Jul 14 02:00:00 fedora dracut-pre-udev[373]: cpio: vendorfw/brcm/brcmfmac4355c1-pcie.apple,hawaii.clm_blob: Cannot open: No such file or directory
Jul 14 02:00:00 fedora dracut-pre-udev[373]: cpio: vendorfw/brcm/brcmfmac4355c1-pcie.apple,hawaii.txcap_blob: Cannot open: No such file or directory
Jul 14 02:00:00 fedora dracut-pre-udev[373]: cpio: vendorfw/brcm/brcmfmac4364b2-pcie.apple,ekans-HRPN-m-7.5.txt: Cannot open: No such file or directory
Jul 14 02:00:00 fedora dracut-pre-udev[373]: cpio: vendorfw/brcm/brcmfmac4364b2-pcie.apple,ekans-HRPN-m-7.7.txt: Cannot open: No such file or directory
Jul 14 02:00:00 fedora dracut-pre-udev[373]: cpio: vendorfw/brcm/brcmfmac4364b2-pcie.apple,ekans-HRPN-u.txt: Cannot open: No such file or directory
...
I'll continue to troubleshoot this and see what I can find. Just wondering whether anyone has experienced this before.
As discussed on https://discussion.fedoraproject.org/t/asahi-diagnose-firmware-warning/87508
Currently, asahi-diagnose
warns you if you're running an unsupported firmware version for your platform, which you're only able to do if choosing the expert install in the regular installer.
The Asahi Fedora remix installer did not present that option when installing on firmware version 13.5, and it appears 13.5 is going to be the default supported version too, which means the warning needs to be updated to reflect this.
I have seen cases on the Internet where Asahi users have been asked to send asahi-diagnose output to the public internet without being informed that the file contains personal / potentially identifying data (username, cellphone serial number (?), locale information, possibly others too?). People are implicitly expected to either not care about the issue, or manually remove personal details from the file before publishing.
I think this is a problem (bug) that should be fixed.
Suggestion:
Why is the username reported for instance? I'm guessing some bugs could be caused by "weird" usernames (spaces / non-american characters), but couldn't there be heuristics that check for problems instead of publishing the real username, etc?
While trying to setup a fully encrypted rootfs (with a separate /boot partition), I ended up getting dropped to a grub rescue-shell (see attached shitty pic)
Grub could not find normal.mod
I was able to fix it by changing the prefix variable.
Root cause is that the update-grub script hardcodes the following :
set prefix=(\$root)'/boot/grub'
Which breaks if grub is installed on partition separate from /
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.