2021-01-09
00:02bear24rw_ has joined #asahi
00:02bear24rw has quit [Read error: Connection reset by peer]
00:06bear24rw_ has quit [Remote host closed the connection]
00:06bear24rw has joined #asahi
00:15bear24rw has quit [Remote host closed the connection]
00:16bear24rw has joined #asahi
00:18raster has joined #asahi
00:26bear24rw has quit [Remote host closed the connection]
00:27bear24rw has joined #asahi
00:30bear24rw has quit [Remote host closed the connection]
00:31bear24rw has joined #asahi
00:39modwizcode has quit [Quit: Later]
00:40stormclad has joined #asahi
00:47stormclad has quit [Remote host closed the connection]
00:47stormclad has joined #asahi
01:06amw1 has joined #asahi
01:07bear24rw has quit [Remote host closed the connection]
01:07bear24rw has joined #asahi
01:09jkkm has joined #asahi
01:12amw1 has quit [Ping timeout: 256 seconds]
01:15aratuk has quit [Read error: Connection reset by peer]
01:16aratuk has joined #asahi
01:20aratuk has quit [Read error: Connection reset by peer]
01:21aratuk has joined #asahi
01:26aratuk has quit [Read error: Connection reset by peer]
01:27aratuk has joined #asahi
01:41krbtgt has quit [Quit: leaving]
01:43choozy has quit [Remote host closed the connection]
01:46czero64 has joined #asahi
01:46krbtgt has joined #asahi
01:51stormclad has quit [Ping timeout: 264 seconds]
01:56marcan"booting" from external storage is, apparently, actually a recovery feature where it copies the boot-related stuff from external storage into internal storage
01:58marcanrobinp: that's basically my plan, except copying screen and script from macOS so I can have a proper tty
02:16stormclad has joined #asahi
02:25rwhitbymarcan: do you think it would be useful to create a wiki page that tells people how to prepare their device to be able to participate in the project while still having access to macOS data (either in internal or external disk) and how to recover from worst case scenarios? Put all the various information into one place specific to this project?
02:26stormclad has quit [Ping timeout: 260 seconds]
02:26davidrysk[m]The first part, we're not 100% on that yet
02:27davidrysk[m]The second part, a second Mac (relatively recent Intel Mac is fine) and a link to the DFU instructions, well that should recovery a worst case scenario
02:27davidrysk[m]recover*
02:28davidrysk[m]I'd start with seeing how to install multiple instances of macOS on the Mac
02:28davidrysk[m]e.g. 11.0.1 and 11.1, in separate APFS containers
02:28davidrysk[m]Are you familiar with installinstallmacos.py? That's another useful tool — it allows for the creation of a bootable install USB (though I'm not 100% sure it will boot on M1)
02:34rwhitbyI'm currently assuming that nothing that's not a utility that already exists on the M1 will be of any use for dual-booting etc.
02:37davidrysk[m]Apple claims that you're supposed to be able to have multiple macOS installs
02:37Alex[m]17<marcan "Alex: it is not. read the articl"> marcan: i dont know what article you are referring to. but good to hear there is a recovery mode irrelevant to booting from external storage.
02:37davidrysk[m]but people have reported problems with external boot (which doesn't appear to be direct external boot)
02:38rwhitbyok, so I successfully reinstalled macOS on an external TBT3 SSD according to https://discussions.apple.com/thread/252222611 and have been (as expected) able to select it as a startup disk. All this is of course expected. Next step is to DFU recover from scratch, and then see if it's still possible to boot from the external SSD after that.
02:38davidrysk[m]there is a startup disk preference panel in macOS
02:40roxfan has quit [Remote host closed the connection]
02:41rwhitbyYes, that's the normal way to select startup disks. The same options (internal SSD and external SSD) are also available in 1TR alongside the Options.
02:41aratuk has quit [Ping timeout: 246 seconds]
02:42davidrysk[m]do you have a usb-c drive you can test with?
02:42davidrysk[m]people report mixed success and failure
02:42rwhitbyI'm testing with TBT3 SSD (Samsung X5). I can also test with USB3 10Gb/s SSD (Sandisk Extreme 900).
02:43roxfan has joined #asahi
02:46aratuk has joined #asahi
02:47aratuk_ has joined #asahi
02:48aratuk_ has quit [Read error: Connection reset by peer]
02:48aratuk__ has joined #asahi
02:49aratuk__ has quit [Read error: Connection reset by peer]
02:49aratuk_ has joined #asahi
02:50aratuk has quit [Ping timeout: 246 seconds]
02:51rwhitbyAs expected, booting from internal SSD or external SSD also works from 1TR selection screen. Nothing new here.
02:56Namidairo has quit [Quit: ZNC - https://znc.in]
02:56Namidairo has joined #asahi
03:00rwhitbyLooks like it will take an hour to install macOS on the USBC SSD, will report results of booting from it after that.
03:04marcanrwhitby: sure! there is already https://github.com/AsahiLinux/docs/wiki/SW%3AGetting-started but that is *not* intended towards otherwise normal macOS end-users
03:05marcandavidrysk[m]: so one problem with the APFS containers which makes this finicky is that I already tried adding a partition and it broke recovery mode
03:06marcan(it didn't break macOS, so I was able to delete the partition and get it back without DFU)
03:06rwhitbymarcan: that's what I'm in a position to test now if you need anything tested. I have a fully expendable (as long as it can be recovered) macOS install at the moment.
03:06marcanso for dual-booting, of course, one way would be to have our bootloader be able to chainload macOS
03:09marcanfeeling good about progress today, going to reply to an important email or two and get down to work
03:10marcanhahaha, I would be *very* surprised if any of us managed to brick the things so that they can't be DFU'd
03:10rwhitbyyeah, but I want to personally prove that process today before I start to rely on it working at some point in the future :-0
03:11marcanthough one interesting question is whether Apple can do product data repair in Apple Stores - probably not is my guess, so if we manage to nuke that they probably have to go back to the mothership for repair
03:12marcanrwhitby: feel free to hack around; I don't have anything specific to want to test right now, other than seeing if I can get recovery to work with an extra partition
03:12marcanwhat I did was use disk utility in macOS to partition the disk, splitting the macOS container into two. that's somewhat broken, you can pick HFS and then it goes and formats it as APFS anyway. it errored out for me, but actually did the split properly
03:12rwhitbyyeah, that's my goal - work out how to have an extra partition that Linux can use while macOS remains where it is
03:16marcanI wonder if Apple Configurator 2 actually does any PD stuff against a target Mac, if you use a proper C-C cable
03:16davidrysk[m]Back for a while
03:17davidrysk[m]marcan: you being on Japan time is kinda inconvenient for me :D
03:17davidrysk[m]rwhitby: It might be worth seeing if you can have multiple macOS APFS containers with different OS volumes on the internal disk
03:17davidrysk[m]and still have recovery function
03:17marcanI'm mostly interested in PD; I think we mostly know how DFU works, and I have a USB2 analyzer I can use for that bit
03:18davidrysk[m]marcan: unimplemented. I think it might support T2
03:19marcanI think that kickstarter deserves an award for being the most delayed hardware project that actually shipped all rewards
03:20czero64 has quit [Ping timeout: 260 seconds]
03:20davidrysk[m]I mean, between it and the Open Locksport kickstarter, for which Jason Scott stepped in to help complete
03:20marcanrwhitby: not sure tbh, haven't looked into it. OV is a nice architecture, but I also want to design Glasgow revD/E, and revE will be a perfectly fine backend for an analyzer
03:20marcanactually I kinda wonder if a USB "hat" for revC would make sense... next to no buffer memory is a problem though
03:21davidrysk[m]Some Apple documentation (IIRC WWDC2020 videos) hints that you can have multiple OS versions within the same APFS container, but that really doesn't help us
03:21davidrysk[m]I wish Apple didn't put so much of their documentation in videos
03:21davidrysk[m]it's awfully inconvenient
03:22stormclad has joined #asahi
03:22marcanthose are the units Ben had stashed away, we finally got them into good hands semi-recently
03:23marcanseriously, I can't thank both of them enough for everything they've done for this project and so many others
03:23rwhitbyI've been looking for a good USB sniffer, was waiting for Luna but may push the button on that one earlier
03:24marcanjust keep in mind the software is a bit hacky, last I remember we were discussing how to properly integrate it with pcap/wireshark
03:27marcanI haven't used it recently, last time I used it I was just dumping USB frames to stdout :)
03:28davidrysk[m]I think most of the time when I've needed to do USB tracing I've used the VMware facilities for it, but they're nowhere near as good as hardware
03:28marcanI should actually look into who github.com/openvizsla is, we should convert that to an organization
03:32Necrosporusrwhitby, maybe this question is naive, but is it possible to boot OSX from $5 USB flash drive? Are you required to have something like thunderbolt SSD? Also... given it's supposedly super fast, how long does it take to get you from power on to login screen / desktop?
03:33davidrysk[m]Necrosporus: you're supposed to be able to boot from a $5 USB flash drive (but performance will suck, so you might not want to), but people were reporting it to be broken
03:33rwhitbyI'll be testing 10Gb/s USBC SSD soon, and have tested 20Gb/s TBT3 SSD. Can time both of them if you like.
03:33davidrysk[m]I've had okay performance on my intel macs with the sandisk extreme pro usb 3.1 (or 3.2) drives
03:34Necrosporusrwhitby, can you time internal storage?
03:34davidrysk[m]rwhitby: do you have any lower-end USB media like the drives I refer to?
03:34NecrosporusAlso you do already have working external medium, right? So can you just dd it over an USB flash?
03:35davidrysk[m]Necrosporus: you can't just dd it over a usb flash, you have to use the mac os installer app. now if you dd that, that probably can be portable to another usb flash
03:35NecrosporusI mean that thing, yes
03:36Necrosporususing installer, then dd whatever there is to other external drive
03:36NecrosporusHow much space is required by the installer?
03:36NecrosporusCan it install to 8Gb medium? Or 16Gb?
03:37davidrysk[m]the big sur installer is much more inefficient than previous ones
03:37Bastian[m]the hackintosh instructions say 8+GB
03:37davidrysk[m]16GB usde to work
03:37davidrysk[m]8GB won't
03:38davidrysk[m]that's for the USB installer disk
03:39davidrysk[m]not for the target
03:39Bastian[m]oh, misread my bad
03:39NecrosporusSo you cannot use $5 USB flash drive
03:39davidrysk[m]IIRC the minimum was around 60-70GB
03:40davidrysk[m]it used to be 16GB before big sur, but the big sur installer is extremely inefficient
03:40davidrysk[m]it unpacks itself twice over
03:46davidrysk[m]people reported difficulty with USBA drives
03:47Necrosporusrwhitby, and boooting from it too?
03:47davidrysk[m]I'm not sure if they meant using the USBA ports on mac minis, or USBC adapters for them
03:47davidrysk[m]the mac mini USBA ports are weird because they're behind those Fresco Logic controllers — it's possible that Apple didn't fully implement boot support for them
03:48davidrysk[m]I guess the next thing
03:48davidrysk[m]use Disk Utility to shrink the APFS container on the 480GB to 240GB and make a second one and name it differently
03:48davidrysk[m]install macOS onto it and see what the partition layout looks like
03:48davidrysk[m]then try the same on the internal
03:49davidrysk[m]see if you can stuff two separate OS installs on the same disk... and see if recovery and all still work
03:50NecrosporusThat's quite a lot, I think
03:50NecrosporusI mean Windows XP on my old computer with slow 40GB ide HDD took about 30 seconds to boot
03:51rwhitbyThat's weird - I got a "The version of macOS on the selected disk needs to be reinstalled" when booting from the TBT3 SSD, even though it previously had no issue booting from it multiple times.
03:51davidrysk[m]rwhitby: if that happens, go back to the boot selector and try again
03:51davidrysk[m]that can mean the incorrect volume is selected
03:51davidrysk[m](and can also be triggered by bootchain related bugs, of which there are still some)
03:54stormclad has quit [Ping timeout: 240 seconds]
03:57rwhitby32s from reboot to login for TBT3 SSD, roughly same as USBC SSD, so it's not transport or disk speed limited (I know that TBT3 SSD is at least twice as fast as USBC SSD using BlackMagic speed test.
03:57marcandavidrysk[m]: there is no boot support for *any* external storage; all of that is handled via macOS
03:57davidrysk[m]rwhitby: is it any faster on reboot?
03:58davidrysk[m]marcan: via macOS in recovery?
03:59davidrysk[m]marcan: that's why I wonder what will happen if you make a second APFS container with a second independent copy of macOS on the internal SSD
03:59davidrysk[m]I can dump my gpt :)
03:59davidrysk[m]but I think I can also make diskutil do that
04:00davidrysk[m]did y'all see that Apple got rid of old fashioned raw target mode?
04:00davidrysk[m]modern target mode is SMB server based
04:01rwhitbyfinal figures are 14s internal chime to login, 22s USBC chime to login, 22s TBT3 chime to login.
04:02davidrysk[m]marcan: well it *was* an enormous pile of junk
04:03davidrysk[m]and the updater was unreliable too
04:03marcanbtw, another useful thing: amfi_get_out_of_my_way=1 on boot-args should get rid of all of the entitlement junk I *think*
04:03davidrysk[m]what happens if you put a second apfs volume on the disk
04:04davidrysk[m]hm, disk utility won't let you
04:05davidrysk[m]it lets you add volumes to the main container
04:05davidrysk[m]it does not let you add another main container
04:05marcanright now my mac mini looks like [iSC][macOS]<empty space>[Recovery] (I'm not sure what the physical partition entry indexes are in GPT at this point)
04:05* davidrysk[m]uploaded an image: Screen Shot 2021-01-08 at 11.04.52 PM.png (1356KiB) < https://matrix.org/_matrix/media/r0/download/matrix.org/ySRJCOrkUBESDbvDfCoaRDwJ/Screen Shot 2021-01-08 at 11.04.52 PM.png >
04:06Shizi'm very mddy on what happen once it found the preboot partition and next state img4 hash :)
04:06davidrysk[m]marcan: the window to do that is as above, it says the minimum is the size of the disk (2TB) and won't let me shrink it
04:07davidrysk[m] the add button is greyed out
04:07davidrysk[m]I've done this in Intel
04:08davidrysk[m]hm maybe it's because I haven't shut off all security :)
04:08davidrysk[m]Shiz: enabling verbose boot and capturing the boot log would be useful
04:09rwhitbydavidrysk[m] install size is 30GB on internal disk, and 44GB on external disks. Not sure how much extra it needs during the process.
04:09davidrysk[m]yeah I think that's on the wiki
04:09davidrysk[m]rwhitby: wow. that's significantly larger than <=10.15
04:09davidrysk[m]it's a PITA, but they did it to improve security and update reliability
04:09davidrysk[m](though the first few update versions were still unreliable)
04:12davidrysk[m]what does the partition layout look like on these externally installed disks
04:12davidrysk[m](that'd be worth adding to the wiki)
04:12davidrysk[m](as would capturing the verbose boot log be, which would probably give away how it's copying stuff to recovery)
04:13davidrysk[m]interesting
04:13davidrysk[m]wonder if 11.1 fixed some of those bugs.
04:14rwhitby(of course that's not a flash stick, but means that it's not doing any USB-C/PD stuff, it's just all plain USB3.
04:14davidrysk[m]`sudo nvram boot-args=”-v”` (in recovery) to enable boot logging
04:14davidrysk[m]yeah.
04:14CamdenB[m] has joined #asahi
04:15raster has quit [Quit: Gettin' stinky!]
04:15davidrysk[m]https://eclecticlight.co/2020/11/28/startup-modes-for-m1-macs/ claims that it's not ignored
04:15davidrysk[m]I'm EST so I'll have to get some sleep soon :/
04:33NecrosporusSomebody should dump nvram and post it on wiki I guess. nvram command should have some options to list all variables and values
04:34davidrysk[m]`nvram -p`, but note that some of the nvram contents includes wifi network details
04:34davidrysk[m]so you might want to redact that
04:35Necrosporus( I don't have any apple-made computers )
04:38aead has joined #asahi
04:58DarthCloud has quit [Remote host closed the connection]
04:58DarthCloud has joined #asahi
05:18Tokamak has quit [Ping timeout: 246 seconds]
05:29Tokamak has joined #asahi
05:31rwhitbyM1 doesn't like being told to boot from an external disk but then unplugging the external disk. Doesn't seem to default back to the internal disk automatically.
05:33rwhitbyhttps://gist.github.com/rwhitby/31527292d1b3dd9456e3604d32282967 - partitions on external install of macOS from M1
05:33ransom has quit [Quit: Textual IRC Client: www.textualapp.com]
05:34davidrysk[m]what's in the EFI?
05:34davidrysk[m]anything at all?
05:35davidrysk[m]those look like plain volumes that are set up in the same way intel mac bootable external volumes would be set up
05:37davidrysk[m]rwhitby:
05:37davidrysk[m]rwhitby: can you mount it as a FAT32 partition and recursively list the contents?
05:50artemistIIRC Apple loves putting an ESP on every GPT thing, even if it's just a flash drive you don't intend to be bootable
05:51davidrysk[m]they use it for firmware updates and apparently a log of some sort, on pre-T1 Intel Macs
05:54rwhitbyconfirmed - if you boot from an external drive, and then reboot without that drive attached, then you get into a boot loop that eventually results in a Recovery Assistant screen which says you have to reinstall and does not have the option to boot from the internal drive. you have to power cycle into 1TR to see the internal drive again and boot from it.
05:55Necrosporusrwhitby, thanks. Does EFI partition made by M1 have any files on it?
05:55Necrosporusis it fat32?
05:56NecrosporusAh, wait already answered
05:56aratuk has joined #asahi
05:57NecrosporusDo you know what are those volumes for? Like VM, and unlabeled disk9s2
05:58NecrosporusDo preboot and VM volumes have any files?
05:58ShizPreboot is used in the boot process and contains iBoot, the device tree and the kernel cache
05:59NecrosporusSo, they are as files?
05:59Necrosporusdid anybody upload them?
05:59davidrysk[m]Necrosporus: you can extract them from an ipsw (also, -re)
06:00aratuk_ has quit [Ping timeout: 272 seconds]
06:00davidrysk[m]rwhitby: that sounds like a bug that should be filed with apple...
06:02rwhitbyso, next step is to try and add a partition to an external drive and see if it still boots from that drive?
06:02davidrysk[m]okay I really have to go
06:02davidrysk[m]night :)
06:03Necrosporusdavidrysk[m], or to remove ESP
06:06aratuk has quit [Remote host closed the connection]
06:06davidrysk[m]I would expect adding an APFS volume to not be a problem
06:06aratuk has joined #asahi
06:09marcandevicetrees and such are data-like enough to be probably okay, but we're not going to put iBoot executables on the internet
06:11marcanI wonder if I can install macos to an "external disk", then replace the kernel with mini, then just not plug in said disk. that should actually work, given what we know about how this works
06:11rwhitby(just using plain Disk Utility to do this, in the hope that it will keep everything blessed)
06:11aratuk has quit [Ping timeout: 264 seconds]
06:12marcanin principle doing that should result in the secondary install/kernel ending up in the internal storage anyway
06:20rwhitbymarcan https://gist.github.com/rwhitby/31527292d1b3dd9456e3604d32282967 at the end is the resulting partition map with a Linux APFS Volume and a Linux FAT32 Partition on a bootable external disk.
06:23rwhitbycan someone who knows add the commands to https://github.com/AsahiLinux/docs/wiki/SW:Getting-started to put the device back into the secure factory state? or is it a one-way modification?
06:24davidrysk[m]disabling the signed system volume is kinda a one way modification
06:24davidrysk[m]reinstalling macOS should restore that part
06:24davidrysk[m]the other things can be reverted
06:24davidrysk[m](without reinstall)
06:25davidrysk[m](signed system volume == authenticated-root)
06:25rwhitbyok, going to add the same volume and partition to the internal disk now and see if that still boots. if it doesn't, then I'll have an excuse to do a recovery :-)
06:25davidrysk[m]if you didn't mount it as read/write and edit the system volume, just re-enabling it might work
06:26davidrysk[m]rwhitby: also see if you can still access macOS Recovery
06:26rwhitbyIs it possible that the trick is simply to do the partitioning before disabling the security?
06:27davidrysk[m]and test the different combinations of [Apple_APFS_ISC] [Apple_APFS] [Apple_APFS_Recovery] [Linux], [Apple_APFS_ISC] [Apple_APFS] [Linux] [Apple_APFS_Recovery], and Apple_APFS_ISC] [Linux] [Apple_APFS_Recovery]
06:27davidrysk[m]I think OS firmware might be stored in [Apple_APFS] though :|
06:28rwhitbyoh, I'm just being a dumb end-user and using the Disk Utility GUI to add these things. I'm not placing the new partitions in specific places.
06:28davidrysk[m]which means testing with that partition in place, but with the large system and data volumes deleted and the partition itself shrunk, might be worth it
06:28davidrysk[m]ahhhh :)
06:28davidrysk[m]disk utility is low on features but it does have better error handling
06:28davidrysk[m]anyway now I really need to go
06:32rwhitbyso that's a clear macOS bug then. A user adds partitions using disk utility GUI and their device no longer boots as a result.
06:42_whitelogger has joined #asahi
06:44rwhitbyyes, it was the other bug manifesting. there seems to be no issue with additional partition/volume on internal disk or external disk (note that security has not been disabled yet)
06:45kkd has joined #asahi
06:48rwhitbymarcan: I went into Disk Utility GUI, and first added an APFS volume, and then added a partition. All using the GUI only.
06:49rwhitbyYes, select Container disk3, click partition, say "yes, I do want partition, not volume", select the size and format type.
06:50rwhitbythen wait as it resizes, after it warns you it can take a long time on a live filesystem (it didn't take more than 5 minutes)
06:50marcanmine actually failed at some point, but the resize worked, but I had chosen HFS+ and it decided to make it APFS anyway, then I reformatted it as HFS+, then rebooted, 1TR broken
06:52marcanoh lol, at some point an OSX update must've decided to remove my partitioning anyway. lovely.
07:21bear24rw has quit [Remote host closed the connection]
07:22bear24rw has joined #asahi
07:24marcanfunny, all the apple types here starts with ASCII, and so do iSC and recovery, *except* for APFS: https://en.wikipedia.org/wiki/GUID_Partition_Table
07:39_alicearen’t big sur images universal anyways? so it’d make sense to have both the Intel and arm64 boot artifacts on disk
07:40_aliceiirc back in the day, you could take a universal OS X install from an Intel machine and go boot it on a PPC machine and vice versa
07:40Shizanother note: the APFS GPT partition that itself has multiple subvolumes is mounted too as /System/Volumes/xarts
07:48marcanthey also do rollback protection, I believe there should be a secure EEPROM/element IC somewhere (could be in-package) that talks to the SEP
07:49marcanwe also don't *really* know for a fact that /dev/disk0 is really the whole storage, for all we know the SEP could have a partition behind the scenes at a lower level
07:51marcanShiz: but yeah this is looking like the SEP store, which presumably is actually proxied through the OS
07:51marcanI think this is a common scheme in android too, let the OS drive the eMMC and proxy e.g. baseband storage through
07:52Shizi mean it makes sense, no need to add a bunch of storage to the SEP if you can just store it elsewhere encrypted :)
07:53Shizthrew me off that the synthesized disk1 didn't appear in diskutil, wonder what's up with that
07:57ShizI just dumped the disk1 with dd and used hdiutil attach -imageKey CRawDiskImage -nomount, which also showed details :p
07:58marcanalso I faked the header to that (I had already partitioned my disk), please sanity check that gdisk output
08:06Shizthere was a small diff in free space in your GPT header, I replaced it with dumps from mine
08:06Shizas well as added the iSC info, and replaced the macOS info with mine (mostly small UUIDs and size diffrences, but eliminates the 256GB disclaimer)
08:26bear24rw has quit [Remote host closed the connection]
08:26bear24rw has joined #asahi
08:32bear24rw has quit [Ping timeout: 260 seconds]
08:51Necrosporus_ has joined #asahi
08:51Necrosporus is now known as Guest90598
08:51Necrosporus_ is now known as Necrosporus
08:51Guest90598 has quit [Killed (card.freenode.net (Nickname regained by services))]
08:56bear24rw has joined #asahi
08:56jabashque has joined #asahi
09:02amw1 has joined #asahi
09:13Tokamak has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
09:14jaXvi has quit [Ping timeout: 246 seconds]
09:44bear24rw has quit [Remote host closed the connection]
09:44bear24rw has joined #asahi
09:49bear24rw has quit [Ping timeout: 265 seconds]
10:02amw1 has quit [Ping timeout: 246 seconds]
10:10maor26 has joined #asahi
10:56marcan changed the topic of #asahi to: Asahi Linux: porting Linux to Apple Silicon macs | General project discussion | Topics: #asahi-dev #asahi-re #asahi-gpu #asahi-offtopic | Keep things on topic | GitHub: https://alx.sh/g | Logs: https://alx.sh/l/asahi
10:59marcan changed the topic of #asahi to: Asahi Linux: porting Linux to Apple Silicon macs | General project discussion | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Topics: #asahi-dev #asahi-re #asahi-gpu #asahi-offtopic | Keep things on topic | Logs: https://alx.sh/l/asahi
11:01marcan(it's existing infra I had for mrcn.st, I just registered a domain and copypasta'd it; so far it's the only bit of AsahiLinux infra that's hosted on my personal infra, other than DNS, but I might figure some way to separate it later)
11:02marcanalso, eventually, the installer will probably be something like curl https://alx.sh | sh :p
11:08marcan(even though ls gets angry at me and shows them bright red because it think symlinks should point to files, for some reason)
11:12mrasmusHuh. How does that check out on e.g. a windows system? That feels like something that could get munged by poor client assumptions, in some way.
11:12mrasmus(I'll be honest, have not worked extensively in the intersection of git and symlinks, heh.)
11:16mrasmusBetter than trying to check them out as... what are they called in ntfs-land, junctions? Those map better to hard links iirc?
11:17mrasmusNo wait, I did know that. I was conflating when I had to work with junction crap for other reasons; my last gig actually involved mklink and the like.
11:20mrasmusLook, I try not to remember that gig. Got stuck as the build engineer for an eng org that didn't know Windows but was building entirely on a Windows stack. There's a lot of reasons I did not stick around. >.>
11:20mrasmusAnyway now I'm curious how other git clients handle the symlink thing, might have to hack around and find out at some point.
11:22konstater has joined #asahi
11:22raster has joined #asahi
11:31GrumbleTurtle has joined #asahi
12:05amw1 has joined #asahi
12:08aratuk has joined #asahi
12:12aratuk has quit [Ping timeout: 240 seconds]
12:41elkaps[m] has joined #asahi
12:50ronyrus[m] has joined #asahi
12:57ohdii has joined #asahi
12:57ohdii has left #asahi [#asahi]
12:59rafaelmartins has quit [Quit: https://rgm.io/]
13:00rafaelmartins has joined #asahi
13:03marcanalso it seems diskutil in recovery no longer shows the iSC stuff? I could've sworn it used to, might be something else that changed
13:06frode_oxa has joined #asahi
13:07frode_oxa has quit [Client Quit]
13:07frode_oxa has joined #asahi
13:07frode_oxa has quit [Client Quit]
13:07frode0xa has joined #asahi
13:08frode0xa has quit [Client Quit]
13:08frode_oxa has joined #asahi
13:09frode_oxa has quit [Remote host closed the connection]
13:18amw1 has quit [Ping timeout: 256 seconds]
13:18jamadazi has joined #asahi
13:25marcanShiz: ok, so the UUID relationships actually matter, so I'm going to munge the info on that page to be consistent with my system :p
13:26ulaas has joined #asahi
13:29amw1 has joined #asahi
13:35davidrysk[m]diskutil in OS does show me the iSC stuff
13:35davidrysk[m]With all security still on
13:54amw1 has quit [Ping timeout: 256 seconds]
14:00aratuk has joined #asahi
14:00brinly has quit [Quit: Connection closed for inactivity]
14:05aratuk has quit [Ping timeout: 246 seconds]
14:18federico has joined #asahi
14:24davidrysk[m]The main recovery partition does have a hidden second volume called Update
14:41reispflanze[m] has joined #asahi
15:03marcanso one takeaway from this is that iBoot2 (the OS loader) is packaged with macOS, and logically part of the "OS" install even though we can't touch it
15:04marcanthat means that if we want to "dual-boot" properly, we will need two partitions: an APFS container containing at least the Preboot stuff (and possibly other dummy volumes), where we copy over the Preboot part of a macOS install, and replace only the kernelcache
15:05marcanhopefully if we do it this way it will play nice with the macOS updater (and it also means it won't update our device firmwares for us, thus won't break our drivers when macOS gets updated)
15:06marcanso the next thing to play around with is whether this is possible - whether I can manually copy over a macOS preboot layout and convince SFR to boot it
15:13davidrysk[m]I’ll paste my diskutil output in a bit
15:14davidrysk[m]then what loads the firmware for us?
15:14davidrysk[m]Or do we read it off recovery and load it from there?
15:14davidrysk[m]That would be one way to get around the firmware distribution problem
15:17raster has quit [Ping timeout: 240 seconds]
15:19GrumbleTurtle has quit [Quit: WeeChat 2.9]
15:25raster has joined #asahi
15:25czero64 has joined #asahi
15:30stemnic has quit [Quit: The Lounge - https://thelounge.chat]
15:31stemnic has joined #asahi
15:40stemnic has quit [Ping timeout: 256 seconds]
15:42TheJollyRoger has quit [Remote host closed the connection]
15:42davidrysk[m]ok right, diskutil only shows me the Apple_APFS_ISC partition (disk0s1), because the APFS container is unmounted, and the OS will not allow mounting it.
15:43davidrysk[m]However, I can use dd to create an image of it and then use hdiutil to mount that
15:43TheJollyRoger has joined #asahi
15:43davidrysk[m](with a bit of finagling -- I used `hdiutil attach -verbose -imagekey diskimage-class=CRawDiskImage -nomount -readonly imagename.img`
15:44davidrysk[m]The same is true with the Apple_APFS_Recovery partition, disk0s3
15:45davidrysk[m]the APFS volumes only get synthesized when the container is mounted
15:59czero64 has quit [Quit: Session terminated!]
16:01aratuk has joined #asahi
16:06aratuk has quit [Ping timeout: 272 seconds]
16:10davidrysk[m]hm yeah, then it is diskutil being silly
16:12jamadazi has quit [Ping timeout: 264 seconds]
16:13modwizcode has joined #asahi
16:16bear24rw has joined #asahi
16:20bear24rw has quit [Ping timeout: 265 seconds]
16:23marcanlol, I tried to do a mildly complex repartition with Disk Utility and of course it failed (after attempting to do it in a ridiculously inefficient way)
16:24mah has joined #asahi
16:26davidrysk[m]the Disk Utility UI is terrible, and the CLI is clunky
16:26brentr123[m]i like how the windows partition manager is
16:26brentr123[m]in microsoft windows
16:36modwizcodeI don't, it gets annoyed if the disk isn't partitioned just right and refuses to work at all.
16:36davidrysk[m]UI wise it's fine, but I find it to be unstable and hang a lot
16:36jamadazi has joined #asahi
16:37davidrysk[m]it's also lacking knobs
16:37davidrysk[m]so I very often have to resort to using diskpart
16:37modwizcodeSometimes you just can't delete partitions that are on secondary disks even just because it's marked in such a way that windows thinks it should be protected. So you have to use diskpart which is way less safe
16:43mah has quit [Ping timeout: 246 seconds]
16:45mah has joined #asahi
16:51modwizcodemarcan: possibly slightly unrelated but do you have like an active copy of the codebase for mini that you start with somewhere? I assume the version you linked me from the SPMP isn't the most current
16:51marcanhttps://github.com/fail0verflow/mini should be pretty much up to date. it hasn't been touched in a looong time
16:52modwizcodeAh okay I figured you touched it since
16:52davidrysk[m]marcan: (you might know this already but) it's probably best to set it up as a new repo and not a fork on GitHub because forks lack some critical features
16:52marcanmini? I wasn't planning on forking it, it's going to be mangled too much to be worth having history
16:53davidrysk[m]for one, you cannot search the code of forks using the search box on the github website
16:53modwizcodeDid they change that?
16:53modwizcodeYou used to, I always get fork results and it was annoying
16:53jn__(not being able to search them is pretty terrible for the 30k linux kernel forks on github)
16:53davidrysk[m]I mean if you're searching for code within a specific repo
16:53modwizcodeThat must be new
16:54modwizcodeBecause every time I tried to find strange code I'd get 30000x copies of the same forked repo
16:54modwizcodeOhhh
16:54modwizcodeI had it backwards for what wasn't working lol
17:03Bublik has joined #asahi
17:07ransom has joined #asahi
17:08Bublik has quit [Ping timeout: 264 seconds]
17:10mah has quit [Ping timeout: 256 seconds]
17:11jamadazi has quit [Ping timeout: 264 seconds]
17:17marcanhttps://mrcn.st/t/Screenshot_20210110_021701.png this is definitely going to work, right? :D
17:19davidrysk[m]marcan: it's probably trying to use the `bless` command
17:19marcanboot in recovery mode, `rec term rsh` then in another window `1trsh` and I get a nice shell with tty capabilities
17:20davidrysk[m]OR IS IT
17:20davidrysk[m]what invocation of bless?
17:20marcanI'm trying to see how much of osx I need to rip off (manually) to convince iBoot to launch
17:21marcanso far I copied the Preboot volume, /Library/CoreServices/, and /usr/standalone/, and did the bless and apfs preboot update stuff
17:21marcanbuild a "stub" macos volume with just iBoot and enough files to convince macOS that it's something that looks like an OS
17:22marcanin principle it's like installing macOS to a separate partition, then just deleting most of macOS :p
17:23davidrysk[m]Shiz: all the iBoot components on iOS are encrypted
17:23Bublik has joined #asahi
17:23davidrysk[m]and the only way to get the encryption keys is by exploiting iBoot
17:24dffthis has probable been asked a million times, but does this involve a hack or will new gen macs allow an unsigned os to boot?
17:25davidrysk[m]or one of the other pages
17:26marcanbut what I'm trying to do is build a "fake" macOS install side by side, to avoid having to do that
17:28davidrysk[m]does bless --verbose provide any interesting output?
17:28dffi wish you good fortune on getting good trackpad integration. that has held me off linux on laptop since forever.
17:30davidrysk[m]Shiz: I think that's a good idea, referencing e.g. theiphonewiki and security research that has looked at the iOS bootchain when needed
17:30davidrysk[m]dff: that's ... some ways down the road :)
17:34lev[m]1 has joined #asahi
17:43bublik_ has joined #asahi
17:46Bublik has quit [Ping timeout: 240 seconds]
17:48raster has quit [Remote host closed the connection]
17:48marcan2021-01-09 17:47:08.895765+0000 0x174e Default 0x0 418 0 storagekitd: (Bootability) [com.apple.mac.install:Bootability] BootPolicy: SEP command 18 (v2) returned 6: bpbc 1637, 0, 0, 0
17:48marcan2021-01-09 17:47:08.895800+0000 0x174e Default 0x0 418 0 storagekitd: (Bootability) [com.apple.mac.install:Bootability] BootPolicy: assert: bpe == 0 (/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/BootPolicy/BootPolicy-76.60.12/dylib/dylib.c:3050)
17:48marcanit actually got as far as talking to the mothership and getting an OK to boot this OS on this machine
17:48ransom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:50raster has joined #asahi
17:53davidrysk[m]it shouldn't need to talk to the mothership after you set the boot policy to permissive
17:54davidrysk[m]but that's specific to kmutil configure-boot which is not yet implemented
17:54davidrysk[m]oh, this is for installing a new iBoot, rather than using the existing one to boot a third party kernel?
17:54davidrysk[m]think activation lock
17:55marcanotherwise you could just wipe a device and install any random vulnerable software and pwn it
17:58brentr123[m]for ios it is "shsh2"
17:59svendidn't they at some point generate a random nonce during installation in the SEP(?) to prevent the ticket caching stuff?
17:59davidrysk[m]they added anti-downgrade a few times
18:01davidrysk[m]eta: it's been patched since the newer chip models though right?
18:01mah has joined #asahi
18:03marcanbut in this case, since I just duct-taped this thing together, it's basically a new volume
18:04raster has quit [Quit: Gettin' stinky!]
18:08raster has joined #asahi
18:12davidrysk[m]marcan: ah damn, I totally missed that flag
18:12davidrysk[m]oh I got the master.passwd (and commented on it here) early on
18:12davidrysk[m]but I missed the UsePam=no
18:12davidrysk[m]master.passwd is covered in the passwd(5) manpage
18:13davidrysk[m]use ssh-keygen from a macOS volume, it works
18:13davidrysk[m]just note that anything you do will get reverted on reboot
18:14davidrysk[m]yes, you should :)
18:14davidrysk[m]this project is not good for my sleep patterns
18:14davidrysk[m]I end up stayingup way too late
18:17alexx2[m] has joined #asahi
18:20mrgs has joined #asahi
18:27jamadazi has joined #asahi
18:28davidrysk[m]you didn't know about master.passwd, I didn't know about UsePAM=no
18:35aead has joined #asahi
18:35aead has quit [Changing host]
18:37stormclad has joined #asahi
18:49stormclad has quit [Ping timeout: 256 seconds]
19:14flokk[m] has joined #asahi
19:24sib1234[m] has joined #asahi
19:30Finde has joined #asahi
19:32karthek has joined #asahi
19:34karthek has quit [Remote host closed the connection]
20:00bear24rw has joined #asahi
20:03aratuk has joined #asahi
20:07aratuk has quit [Ping timeout: 260 seconds]
20:07bear24rw has quit [Remote host closed the connection]
20:09TheJollyRoger has quit [Ping timeout: 240 seconds]
20:10TheJollyRoger has joined #asahi
20:23DarthCloud has quit [Read error: Connection reset by peer]
20:25DarthCloud has joined #asahi
20:27choozy has joined #asahi
20:28bitcoinr has joined #asahi
20:33Icewind[m] has joined #asahi
20:41klaus has joined #asahi
20:59ephe_meral has joined #asahi
21:19bitcoinr has quit [Ping timeout: 245 seconds]
21:37choozy has quit [Ping timeout: 260 seconds]
21:41aratuk has joined #asahi
21:47aratuk has quit [Ping timeout: 256 seconds]
22:03aratuk has joined #asahi
22:04stormclad has joined #asahi
22:07aratuk has quit [Ping timeout: 240 seconds]
22:09stormclad has quit [Ping timeout: 260 seconds]
22:10choozy has joined #asahi
22:23mah has quit [Quit: Lost terminal]
22:29jamadazi has quit [Ping timeout: 260 seconds]
22:49raster has quit [Quit: Gettin' stinky!]
23:22maor26 has quit [Ping timeout: 260 seconds]
23:29bear24rw has joined #asahi
23:33ephe_meral has quit [Ping timeout: 246 seconds]
23:34bear24rw has quit [Ping timeout: 240 seconds]
23:42federico has quit [Quit: WeeChat 2.8]
23:52raster has joined #asahi