| 13 Dec 2023 |
matthewcroughan | amazing | 18:28:15 |
matthewcroughan | lassulus: after the past 3-4 hours of debugging, it turns out that the raspberry pi 3 needs the fat32 partition to be the first partition which is impractical to work around with disko atm | 20:27:32 |
matthewcroughan | ditching gpt is the only sensible way, even with hybrid mbr it's just totally messed up | 20:27:50 |
matthewcroughan | sgdisk --hybrid puts the protective mbr (0xee) as the first partition, but the pi's firmware (bootcode.bin) doesn't like that | 20:28:58 |
lassulus | There is priority | 20:31:09 |
lassulus | And you shouldn't put the protective mbt first | 20:31:37 |
lassulus | * And you shouldn't put the protective mbr first | 20:31:52 |
matthewcroughan | sgdisk -h seems to do that for us | 20:31:55 |
lassulus | -h takes a mapping? | 20:32:09 |
matthewcroughan | omg.. | 20:34:08 |
matthewcroughan |
ou may optionally specify a final partition "EE" to indicate that the EFI GPT (type 0xEE) should be placed last in the table, otherwise it will be placed first
| 20:34:17 |
matthewcroughan | *
You may optionally specify a final partition "EE" to indicate that the EFI GPT (type 0xEE) should be placed last in the table, otherwise it will be placed first
| 20:34:20 |
matthewcroughan | It was even in the PR I was trying to refactor, clearly my mind is somewhere else | 20:34:30 |
matthewcroughan | Command (m for help): M
Entering protective/hybrid MBR disklabel.
Command (m for help): p
Disk /dev/sda: 14.89 GiB, 15987638272 bytes, 31225856 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 63487 61440 30M c W95 FAT32 (LBA)
/dev/sda2 63488 6289407 6225920 3G 83 Linux
/dev/sda3 1 2047 2047 1023.5K ee GPT
| 20:53:22 |
matthewcroughan | yep, that put it on the end | 20:53:25 |
matthewcroughan | Okay, looks like it's futile anyway lassulus although U-Boot works now, it behaves differently when the disk is GPT and ignores MBR, so hybrid breaks it a little bit. | 21:24:21 |
matthewcroughan | I'm going to be able to work around it, but hybrid is very confusing | 21:24:50 |
lassulus | Yeah hybrid is weird | 21:25:05 |
lassulus | So you think msdos would be better? | 21:25:15 |
matthewcroughan | I think it'd be really great if disko supported both, because it allows you to reproduce things you need to support embedded | 21:25:35 |
matthewcroughan | otherwise, you're forced to deal with hybrid which is a middle/purgatory that is difficult to be in, new territory | 21:25:51 |
matthewcroughan | you can easily follow raspberry pi docs if you have access to the older msdos tools, otherwise you run into weird edge cases | 21:26:19 |
matthewcroughan | * you can easily follow raspberry pi docs if you have access to the older msdos tools, otherwise you run into weird edge cases with hybrid | 21:26:21 |
lassulus | Alright. We can add an msdos type and then deprecate the legacy type | 21:26:24 |
lassulus | * Alright. We can add an msdos type and then deprecate the legacy table type | 21:26:51 |
lassulus | sgdisk can't do msdos and the other tools suck | 21:31:29 |
matthewcroughan | it's a nightmare, a real nightmare | 21:31:41 |
lassulus | A google search just revealed http://www.rodsbooks.com/gdisk/mbr2gpt.html#gpt2mbr | 21:31:55 |
matthewcroughan | If I want to do hybrid, I actually have to recompile u-boot to disable EFI mode, because it's entering EFI mode due to the existence of gpt on disk. | 21:32:03 |
lassulus | Maybe we can do an msdos type with more constraints | 21:32:15 |