2022-11-30
01:17chadmed has joined #asahi-alt
02:27r0ni has joined #asahi-alt
03:00ma2 has joined #asahi-alt
03:07ma has quit [Ping timeout: 480 seconds]
07:30jamespmo_ has joined #asahi-alt
07:36jamespmorgan has quit [Ping timeout: 480 seconds]
08:28mps_ has joined #asahi-alt
08:30mps has quit [Ping timeout: 480 seconds]
10:57chadmed_ has joined #asahi-alt
11:36chadmed_ has quit [Remote host closed the connection]
15:23benzmac16v has joined #asahi-alt
15:54benzmac16v has quit [Ping timeout: 480 seconds]
16:18janrinze has joined #asahi-alt
16:24janrinzeinstalling Debian (using the instructions at https://git.zerfleddert.de/cgi-bin/gitweb.cgi/m1-debian) breaks a previous installed Asahi Linux.
16:26janrinzeThe boot entries 'Debian' and 'Asahi Linux' get mixed up. 'Asahi Linux' will boot Debian and the 'Debian' entry will hang with some 'Proxy' message.
16:32janrinzethe partition numbers have changed during the new install but the UUIDs still are correct
16:35_jannau_can you describe how you installed debian? did you resize you macos partition to create free space?
16:42janrinzeit looks like the boot entries are connected to the partition numbers instead of the partition UUIDs
16:43janrinzeall old partitions are still there (same old UUIDs) and seem to be unchanged (content not changed)
16:48_jannau_m1n1 and u-boot should use the partition uuids but grub maight have problems with renumbered partitions
16:48_jannau_but that doesn't explain why asahi in the boot picker boots debian and the debian boot picker is broken
17:03tobhe_ has joined #asahi-alt
17:07tobhe has quit [Ping timeout: 480 seconds]
17:13janrinzethere is another strange hint.. kernel is Linux debian 6.0.0-rc5-asahi-00001-gc62bd3fe430f #1 SMP Sun Sep 18 18:07:57 CEST 2022 aarch64 GNU/Linux
17:15tobhe has joined #asahi-alt
17:20tobhe_ has quit [Ping timeout: 480 seconds]
17:35jamespmorgan has joined #asahi-alt
17:41jamespmo_ has quit [Ping timeout: 480 seconds]
18:06janrinzethe old install has the UUID in the BOOTAA64.EFI appended. the new install does not have that. Is it still required?
18:20janrinze has quit [Remote host closed the connection]
18:20andi has joined #asahi-alt
18:21andi is now known as Guest468
18:21Guest468 is now known as ashi
18:22ashiOh wow, drm-asahi finally not crashing on Air M2 since todays commits, yay.... now... mesatime
18:30janrinze has joined #asahi-alt
18:35janrinzeinterestin observation: copying the old BOOTAA64.EFI of ARCHlinux to the boot/efi dir of Debian allows me to boot ARCHlinux from the Asahi Linux boot selection. this confirms that the Asahi Linux now points to the wrong partition.
18:38ashi has quit [Ping timeout: 480 seconds]
18:40dax has quit [Quit: dax]
18:49ashi has joined #asahi-alt
19:03ashi has quit [Quit: Leaving]
19:26mps_janrinze: BOOTAA64.EFI embeds partition on which it searches for grub, usually. and I think debian has patched it work differently
19:27cy8aer> there is another strange hint.. kernel is Linux debian 6.0.0-rc5-asahi-00001-gc62bd3fe430f #1 SMP Sun Sep 18 18:07:57 CEST 2022 aarch64 GNU/Linux
19:27cy8aer@Glanzmann did not build the new kernels into a deb package. But m1-debian (https://git.zerfleddert.de/git/m1-debian) allows to compile the new kernel on your running debian "dcp.sh" and it will then installed.
19:37jannaujanrinze: please post partition table with partition uuids and the output of `strings /proc/device-tree/chosen/asahi,efi-system-partition`
19:42janrinze has quit [Quit: Leaving.]
19:42janrinze has joined #asahi-alt
19:45janrinze/dev/nvme0n1p9: UUID="441232b8-6ec1-425b-84ef-2ce75c8b3d9f" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="cf5a0651-bc7b-2f45-8ada-cfe3a665ca3e"
19:45janrinze/dev/nvme0n1p7: LABEL_FATBOOT="EFI - ASAHI" LABEL="EFI - ASAHI" UUID="3215-B25E" BLOCK_SIZE="4096" TYPE="vfat" PARTUUID="0817df4d-467d-4a9d-ac70-30281a30d116"
19:45janrinze/dev/nvme0n1p3: UUID="526c6513-d0da-436f-96c7-323ff22d8a45" BLOCK_SIZE="4096" TYPE="apfs" PARTUUID="b10f529d-3752-45d6-ba6c-ca66c3481a46"
19:45janrinze/dev/nvme0n1p5: UUID="50a821f7-3e50-483d-9690-a1304a5205ad" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="f81f7d50-9fd1-4b86-8064-69e59581a29e"
19:45janrinze/dev/nvme0n1p1: UUID="de2d6d99-50ab-43fe-bd4e-8b1ec0679b5d" BLOCK_SIZE="4096" TYPE="apfs" PARTLABEL="iBootSystemContainer" PARTUUID="60d3a38e-dfe2-4f6d-9e99-22cf46633fef"
19:45janrinze/dev/nvme0n1p8: LABEL="asahi-root" UUID="9b2a4417-809b-43f6-bcd5-2e5980c1606b" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="bca4f806-bc97-4899-817c-5e0b9a9dfdbf"
19:45janrinze/dev/nvme0n1p10: UUID="c22ae11e-446d-41d6-91a9-9d97f52a9c31" BLOCK_SIZE="4096" TYPE="apfs" PARTLABEL="RecoveryOSContainer" PARTUUID="62c1ceff-c60d-4420-a80f-44875c6ac877"
19:45janrinze/dev/nvme0n1p6: UUID="541c5bf2-1c38-4960-9f7f-4e24350b26f5" BLOCK_SIZE="4096" TYPE="apfs" PARTUUID="74e25ab1-1556-493e-8e4b-0c2ef3ddf5cc"
19:45janrinze/dev/nvme0n1p4: LABEL_FATBOOT="EFI - DEBIA" LABEL="EFI - DEBIA" UUID="2A07-15E7" BLOCK_SIZE="4096" TYPE="vfat" PARTUUID="bf3a3050-63ce-4480-84e8-7c81f3110236"
19:45janrinze/dev/nvme0n1p2: UUID="f3759b74-7baf-4dfe-9d30-7b40a54b3998" BLOCK_SIZE="4096" TYPE="apfs" PARTLABEL="Container" PARTUUID="d8d57f0a-7b5f-4657-9c36-904f5192b7d9"
19:46janrinze/dev/nvme0n1p10: UUID="c22ae11e-446d-41d6-91a9-9d97f52a9c31" BLOCK_SIZE="4096" TYPE="apfs" PARTLABEL="RecoveryOSContainer" PARTUUID="62c1ceff-c60d-4420-a80f-44875c6ac877"
19:46janrinze/dev/nvme0n1p2: UUID="f3759b74-7baf-4dfe-9d30-7b40a54b3998" BLOCK_SIZE="4096" TYPE="apfs" PARTLABEL="Container" PARTUUID="d8d57f0a-7b5f-4657-9c36-904f5192b7d9"
19:46janrinze/dev/nvme0n1p1: UUID="de2d6d99-50ab-43fe-bd4e-8b1ec0679b5d" BLOCK_SIZE="4096" TYPE="apfs" PARTLABEL="iBootSystemContainer" PARTUUID="60d3a38e-dfe2-4f6d-9e99-22cf46633fef"
19:46janrinze/dev/nvme0n1p3: UUID="526c6513-d0da-436f-96c7-323ff22d8a45" BLOCK_SIZE="4096" TYPE="apfs" PARTUUID="b10f529d-3752-45d6-ba6c-ca66c3481a46"
19:46janrinze/dev/nvme0n1p4: LABEL_FATBOOT="EFI - DEBIA" LABEL="EFI - DEBIA" UUID="2A07-15E7" BLOCK_SIZE="4096" TYPE="vfat" PARTUUID="bf3a3050-63ce-4480-84e8-7c81f3110236"
19:46janrinze/dev/nvme0n1p5: UUID="50a821f7-3e50-483d-9690-a1304a5205ad" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="f81f7d50-9fd1-4b86-8064-69e59581a29e"
19:46janrinze/dev/nvme0n1p6: UUID="541c5bf2-1c38-4960-9f7f-4e24350b26f5" BLOCK_SIZE="4096" TYPE="apfs" PARTUUID="74e25ab1-1556-493e-8e4b-0c2ef3ddf5cc"
19:46janrinze/dev/nvme0n1p7: LABEL_FATBOOT="EFI - ASAHI" LABEL="EFI - ASAHI" UUID="3215-B25E" BLOCK_SIZE="4096" TYPE="vfat" PARTUUID="0817df4d-467d-4a9d-ac70-30281a30d116"
19:46janrinze/dev/nvme0n1p8: LABEL="asahi-root" UUID="9b2a4417-809b-43f6-bcd5-2e5980c1606b" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="bca4f806-bc97-4899-817c-5e0b9a9dfdbf"
19:46janrinze/dev/nvme0n1p9: UUID="441232b8-6ec1-425b-84ef-2ce75c8b3d9f" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="cf5a0651-bc7b-2f45-8ada-cfe3a665ca3e"
19:49scardracschadmed: I'm looking on your script... Can't you use the shell file provided by asahi linux? ':)
19:52cy8aeryeah looks good. There are situations where the order is mixed up and then the wrong partition can be selected. This is not the problem (and sorry for not warn about pasting)
19:54janrinzewhen you see the start positions you can see that p4,p5 and p6 are the newer partitions created during Debian install
19:54jannauthat suggests the partuuid selection in u-boot chainloaded from /dev/nvme0n1p7 doesn't work
19:57janrinzeDebian needs to select p4 but ends up selecting p7. That probably explains why it can't find the firmware for USB3 because the old ARCH install does not have that firmware.
19:58janrinzemy lazy solution would be to just copy everything from p4 to p7 and see if that solves the problem.
20:02janrinze has quit [Remote host closed the connection]
20:05janrinze has joined #asahi-alt
20:06janrinzesetting up p7 with the files from p4 rendered an unbootable situation for both Debian and ARCHLinux.
20:22ashi has joined #asahi-alt
20:34ashi has quit [Quit: Leaving]
20:40Glanzmann has joined #asahi-alt
20:41Glanzmannjanrinze: So the Debian u-boot does not have the chosen.asahi,efi-system-partition patch. That means if you have multiple installations, the Debian will always pick the first efi partition.
20:42Glanzmannjanrinze: The easiest way to recover, after you made backups of course, is that you delete the stub partition and recreate it using the asahi installer.
20:43janrinzeGlanzmann: the second efi partion appears to be chosen. Perhaps it iterates through the partition table and choses the last found?
20:43GlanzmannThan you boot using debian live system and reinstall grub, m1n1 and a matchting kernel. And you're good to go.
20:44GlanzmannAnyhow, if you want I can build you a second stage m1n1 u-boot with the choosen patch not reverted and you can use that and than it does exactly what you want.
20:45GlanzmannI choose not to use it because a lot of people installed Debian before the choosen efi partition patch was introduced and I would annoy them during the boot process, so I decided to back out the patch, same as OpenBSD.
20:45jannauGlanzmann: please post a large warning that the Debian installer is not suitable for installs with more than one other linux/*bsd installtion
20:49Glanzmannjannau: I don't understand. I tested the choosen patch immediately after you posted it and I tested it also with asahi installation and Debian installation.
20:50Glanzmannjannau: First one, Debian u-boot picks the first esp partition and newer versions of the Debian grub hard code the parition instead of the partuuid.
20:53Glanzmannjanrinze: Just to figure out what went wrong is the following correct: You installed Debian in July this year. You still have macos. Today you shrinked macos further to install the official asahi distribution?
20:53jannaunot using the patch should only cause problems for that specific system if the system is not using the first efi system partition
20:54Glanzmannjannau: Unless asahi harcodes the nvme partition in the grub config and does not use the nvme uuid.
20:55Glanzmannjannau: I see but then I think what happens, is that when you boot asahi, it laods m1n1/u-boot from asahi and than stage1 grub tries to load stage2 grub from Debian and crashes.
20:57Glanzmannjanrinze: I think what happens is m1n1(stage1) > m1n1(esp asahi) > u-boot (esp_asahi) > grub stage1 (asahi) > grub stage 2(Debian) big screwup.
20:57jannauI don't think we can now reconstruct error since both efi system partition are already manually changed
20:58GlanzmannI would like to reproduce it but problem is that I'm in Kaiserslautern with only a lte+ internet connection.
20:59Glanzmannjanrinze: But we get everything back. If the Debian is fresh, we can just kill it and than get the m1n1 of Asahi back and you should be good to go.
21:10Glanzmannjanrinze: So my best guess is that by installing Debian the asahi installer loads the wrong grub stage2 and than goes boom.
21:12Glanzmannjanrinze: I did not install the official asahi for a long time. But if my theory is correct. Than you should find a grub.cfg which has a partition number hardcoded and not its uuid.
21:12jannauI think the 1st stage m1n1 from the debian installtion fails to chainload the 2nd stage m1n1
21:13Glanzmannjannau: But than this has to be a recent incompatibility between m1n1 stage1 asahi and m1n1 stage2 Debian.
21:14jannaujanrinze: you can check "Finish Installation.app/Contents/Resources/boot.bin" on the asahi/debian apfs stub partitions (from macos or 1tr)
21:14janrinzejannau: it just uses the asahi linux u-boot and thus may cause issues with the newer kernel.
21:17janrinzejannau: which is the right stub partition? I have Asahi Linux - Data, Asahi Linux, Debian - Data, Debian
21:17jannaujanrinze: can record a video from booting debian install. if you have a smartphone with slow motion camera? use that
21:18Glanzmannjannau: Could you please run on an asahi install the following commands and paste the output: find /boot -name \*.cfg; strings /boot/efi/EFI/BOOT/BOOTAA64.EFI | grep gpt
21:23Glanzmannjannau: The last line could be an indicator for the issue we're seeing. On the other hand the second from last looks like that it used the partuiid.
21:25Glanzmann(air) [~] strings /boot/efi/EFI/BOOT/BOOTAA64.EFI | grep gpt | pbot - > https://pbot.rmdir.de/EI7qu2r6NViqW3-HOgQiFA
21:25GlanzmannSo if it would be the otherway around Debian first, asahi later, Debian would get it wrong ...
21:25jannaujanrinze: `strings boot.bin | tail -n2` should output a line with "chosen.asahi,efi-system-partition=..." and one with "chainload=..."
21:25GlanzmannIt used to be different, but the behaviour changed with a Debian update or something I did different when installing grub.
21:37GlanzmannIt will use the first esp partition that it finds, which in you case should be the right one.
21:43jamespmo_ has joined #asahi-alt
21:43janrinzepassword, users added, home directory mount point to have the old home available. then a reboot and if failed to boot
21:45Glanzmannjanrinze: So you installed Debian, Debian rebooted once by itself. Than you were able to log in. And than you rebooted after adding a mountpoint and it stopped working?
21:45GlanzmannBecause after the first boot it does not touch grub anymore. Strange. And when you boot Debian currently, what happens?
21:49jamespmorgan has quit [Ping timeout: 480 seconds]
21:53Glanzmannjanrinze: Probably the best plan of action, unless jannau has a better idea, is to wipe both asahi and debian. Than reinstall your distribution of choice and restore from the backups.
21:54Glanzmannjanrinze: Of course you could also manually install m1n1 stage1, if you want to try that. But I don't understand why after the second boot it can't find m1n1 anymore.
21:58janrinzethe Debian kernel reports from strings /proc/device-tree/chosen/asahi,efi-system-partition the EFI partition of Asahi Linux.
22:01Glanzmannjanrinze: That would support my theory stage stage1-asahi-grub loads stage2-debian-grub.
22:02GlanzmannThat means, that when marcan updates the installer, the debian installer is using that updated installer from the asahi cdn.
22:04Glanzmannjannau: I assue you install multiple 'asahis' all the time. You probably never saw that one asahi picks up the grub of another asahi?
22:06Glanzmannjanrinze: No, but I want to know from __jannau__ is, if he has ever seen one asahi grub-stage1 booting the grub-stage2 from another asahi. Because jannau tests a lot of releases and probably has often install multiple asahis at the same time on one machine.
22:12Glanzmannjanrinze: I'll try to reproduce your issue next week and report back if I was successfull.
22:20janrinzeI think deleting all partions except for the home partition and reinstalling Debian would be a good try.
22:20GlanzmannI'll try to reproduce the issue as soon as I have decent internet connection. This will probably be next week. Depeneding on how much more time I spend in Kaiserslautern.
22:21GlanzmannBut of course not without taking a backup first. But yes, keeping the home partition should work.
22:22Glanzmannjanrinze: My current working theory is, that Debian u-boot always boots the first esp parition and asahi grub hardcodes paritions after a grub update, which becomes a problem if the paritions a reassigned, but maybe I'm wrong.
22:23Glanzmannjanrinze: Yes, and for me the only explanation is that /boot/efi/m1n1/boot.bin was removed or corrupted.
22:27Glanzmannjanrinze: So make sure you have the Debian ESP. And put https://tg.st/u/59bff8b8a6b75ddf00d1d16141e7895e52bc6997036498dfbc80dc8e32d66473.bin
22:30Glanzmannjanrinze: I'll reproduce the issue next ween and report back here. If you want you can drop me an email at thomas@glanzmann.de
22:31Glanzmann has quit [Quit: n8]
22:39janrinzethe file you linked is smaller than the size in pastebin, the size is 1800901 (same as the old boot.bin) and your pastebin says 1954667. so i think you uploaded the wrong file.
23:08Dcow has quit [Remote host closed the connection]
23:09Dcow has joined #asahi-alt
23:20Dcow has quit [Ping timeout: 480 seconds]
23:37mps_ has quit [Remote host closed the connection]
23:37mps has joined #asahi-alt