Re: Booting OS X from grub
Hello, On 10/2/24 5:57 AM, Ed Robbins wrote: > Hi Adrian, > > On Wed, 2 Oct 2024 at 12:42, John Paul Adrian Glaubitz > wrote: >> >> Hello Ed, >> >> On Wed, 2024-10-02 at 12:35 +0100, Ed Robbins wrote: >>> Picking up from the other thread... this is about booting OS X on >>> apple ppc hardware when grub is being used to boot Linux. >> >> Ah, that's a completely different problem then. I don't actually know whether >> GRUB can load other bootloaders when using Open Firmware (ieee1275). >> It apparently can't. At least it can't boot Mac OS (9.2.2) or Mac OS X (10.4.11) on a Pismo PowerBook (error messages have been documented elsewhere). > I think Ben's solution (the BootX file he shared) is just an > openfirmware script that runs before grub, which allows you to choose > between a grub/os x/CD. And it is also how yaboot handled this (I > think his script is a modification of the yaboot one). But I am not > sure how to make that script run by default instead of jumping > straight to grub. > >> This is probably something that needs to be asked on the grub-devel mailing >> list. > > Although grub shows options for the other installed operating systems > (i.e. OS X) it indeed seems unable to boot them. I am not sure if this > is supposed to work. > >> >> Adrian >> ... As a test, I installed Debian SID (from the 6-18-2023 netinst CD) on a Pismo (500 MHz, 512 MiB). This system is dedicated to testing things such as GRUB, as well as new releases of Debian, Gentoo, etc. The Pismo started with Mac OS 9.2.2 and Mac OS X 10.4.11 Tiger, and a blank Apple_Bootstrap partition (so one can switch between Mac OS 9 and Mac OS X Tiger using the Startup Disk control panel). Linux-related partitions were configured but left blank: # parted -l Model: ATA ST9120821A (scsi) Disk /dev/sda: 120GB Sector size (logical/physical): 512B/512B Partition Table: mac Disk Flags: Number Start End SizeFile system Name Flags 1 512B32.8kB 32.3kB Apple 2 32.8kB 61.4kB 28.7kB Macintosh 3 61.4kB 90.1kB 28.7kB Macintosh 4 90.1kB 119kB 28.7kB Macintosh 5 119kB 147kB 28.7kB Macintosh 6 147kB 410kB 262kB Macintosh 7 410kB 672kB 262kB Macintosh 8 672kB 934kB 262kB Patch Partition 9 934kB 68.0MB 67.1MB hfs Apple_Bootstrap boot 10 68.0MB 1142MB 1074MB hfs+MacOS 11 1142MB 8590MB 7448MB hfs+MacOSX 12 8590MB 25.8GB 17.2GB ext3Debian_sid 13 25.8GB 42.9GB 17.2GB ext3Gentoo 14 42.9GB 44.0GB 1074MB linux-swap(v1) swap swap 15 44.0GB 120GB 76.0GB ext3data My initial installation failed. I used a default installation with manual partitioning. It failed because I asked it to format the Apple_Bootstrap partition as HFS (I believe the reasons that this fails have been documented elsewhere). Going back to Mac OS 9.2.2, I changed the type of the Apple_Bootstrap partition from Apple_Bootstrap to Apple_HFS, and that allowed me to format it as HFS; I then changed the partition type back to Apple_Bootstrap. Note that parted doesn't distinguish between "Apple HFS" and "Apple_Bootstrap" partitions; both are simply "hfs". Installation then worked (by specifying /dev/sda9 above as the /boot/grub partition without formatting it). There are, of course, alternatives to GRUB that don't seem to have the HFS formatting issue. I use a relatively static installation of yaboot on all of my other Apple Mac powerpc (ppc-32) and G5 (ppc-64) systems. It appears that the yaboot binaries and scripts (including ybin) were installed but aren't used, and I didn't test them. Yaboot has the advantage of being able to boot any Linux distribution, Mac OS 9 or Mac OS X from the menu, and any of these can be booted by default. I realize that yaboot is no longer supported, but it works and will continue to work as long as ext3 filesystems are supported by the Linux kernel. GRUB won't boot Mac OS X on ppc-32 or ppc-64. GRUB on x86-64 and i386 also has issues, such as wrong volume UUIDs that have to be corrected manually in the grub.cfg file. I'll look into reporting those issues and the Apple Mac issues on the the grub-devel mailing list. For now, it would certainly be helpful to have a menu that lets users choose their own bootloader, maybe with the limitations of each listed. Since any use of yaboot would be specific to ppc-32 and ppc-64 systems, updates to yaboot likely won't get much attention except from Debian ports (and it's fine if nobody does anything as long as yaboot isn't prevented from working). My installation on the Pismo was otherwise uneventful, except that Xfce isn't working. I'll continue to investigate that (I suspect something simple like a missing kernel option). I also see some odd ra
Possible issue with lightdm in powerpc (was Re: Booting OS X from grub)
On 10/17/24 12:45 PM, Stan Johnson wrote: > ... > My installation on the Pismo was otherwise uneventful, except that Xfce > isn't working. I'll continue to investigate that ... After installing and using wdm instead of lightdm, Xfce is now working, though very slowly. So there may be a bug in lightdm, Xorg, or some part of systemd. I don't know how to debug that, but I'll keep an image of my currrent installation available before I switch to sysvinit in case anyone is interested in running any tests. -Stan
Re: apm_emu module missing
On Thu, 17 Oct 2024 at 17:54, Ed Robbins wrote: > > On Thu, 17 Oct 2024 at 16:51, John Paul Adrian Glaubitz > wrote: > > > > Hi Ed, > > > > On Thu, 2024-10-17 at 16:42 +0100, Ed Robbins wrote: > > > So I think that the apm_emu module should be included by default in > > > powerpc kernel builds. Is it possible to have it added to the kernel > > > config? > > > > Yes, this is possible. Someone needs to open a pull request with the > > corresponding change to the powerpc kernel configuration [1]. > > > > Adrian > > > > > [1] > > > https://salsa.debian.org/kernel-team/linux/-/blob/master/debian/config/kernelarch-powerpc/config?ref_type=heads > I spent some time looking at this again this evening, and it turns out that there is a much better solution. The macintosh PMU driver uses the Linux power supply subsystem and reports info about the battery, but it is not being picked up by the upower daemon because the driver does not give the battery type, so it comes out as "Unknown", and upower doesn't recognise it as battery: ed@powerbook12:~$ cat /sys/class/power_supply/PMU_battery_0/uevent DEVTYPE=power_supply POWER_SUPPLY_NAME=PMU_battery_0 POWER_SUPPLY_TYPE=Unknown ... ed@powerbook12:~$ sudo journalctl -u upower ... Oct 13 20:00:24 powerbook12 upowerd[994]: did not recognise type Unknown, please report ... ed@powerbook12:~$ upower -e /org/freedesktop/UPower/devices/line_power_pmu_ac /org/freedesktop/UPower/devices/DisplayDevice It turns out that adding a single line in the driver (drivers/power/supply/pmu_battery.c) is enough to fix this: pbat->bat_desc.type = POWER_SUPPLY_TYPE_BATTERY; After recompiling the module upower can see the battery and the default GUI indicators work as well. I will try to submit this change upstream. Ed
Re: apm_emu module missing
Hi again, On Sun, 13 Oct 2024 at 22:04, Ed Robbins wrote: > > Hi all, > I believe that the apm_emu module is required for battery > indicator/monitoring on certain powerbooks? > > It seems to be missing on latest kernels (6.3, 6.11). Can it be > enabled for our config? > > Or, is there an alternative way to enable battery indicators? I recompiled the 6.11.2 kernel and added the apm_emu module. It does give extra compatibility with battery indicator software. xbattbar works, and although xfce4 battery plugin removed support for APM on Linux a couple of versions ago, I was able to build an older version (1.1.1) and it works perfectly with the latest xfce4, as long as apm_emu is present. So I think that the apm_emu module should be included by default in powerpc kernel builds. Is it possible to have it added to the kernel config? Thanks, Ed > > Thanks, > Ed
Re: apm_emu module missing
Hi Ed, On Thu, 2024-10-17 at 16:42 +0100, Ed Robbins wrote: > So I think that the apm_emu module should be included by default in > powerpc kernel builds. Is it possible to have it added to the kernel > config? Yes, this is possible. Someone needs to open a pull request with the corresponding change to the powerpc kernel configuration [1]. Adrian > [1] > https://salsa.debian.org/kernel-team/linux/-/blob/master/debian/config/kernelarch-powerpc/config?ref_type=heads -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `-GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Re: apm_emu module missing
On Thu, 17 Oct 2024 at 16:51, John Paul Adrian Glaubitz wrote: > > Hi Ed, > > On Thu, 2024-10-17 at 16:42 +0100, Ed Robbins wrote: > > So I think that the apm_emu module should be included by default in > > powerpc kernel builds. Is it possible to have it added to the kernel > > config? > > Yes, this is possible. Someone needs to open a pull request with the > corresponding change to the powerpc kernel configuration [1]. > > Adrian > > > [1] > > https://salsa.debian.org/kernel-team/linux/-/blob/master/debian/config/kernelarch-powerpc/config?ref_type=heads Thanks Adrian, I will try to do it! Ed
Re: Debian 12 installation on iMac G3
Hi again! I used the image you suggested, that worked (mostly) in a PowerBook G4 that I have over here. The installation of grub was this time interrupted by an error I managed to see in the logs: Oct 15 18:12:24 main-menu[252]: (process:1780): chroot: can't execute 'hmount': No such file or directory Oct 15 18:12:24 main-menu[252]: WARNING **: Configuring 'grub-installer' failed with error code 127 However, I omitted that step and finished the installation. Then, I booted in rescue mode and finished installing grub2 successfully. Is there any information on how to be successfull the same way with the iMac G3 ? Regards, El vie, 11 oct 2024 a las 15:17, Manuel Molina Cuberos () escribió: > Hi Ed! > > Thanks for the hint. > I toasted another CD with the image you suggested. > Launched the installation and everything was working up to the mirror > selection stage. > I added one mirror (deb.debian.org) but from the error reported and the > looks of the log, it seems that the current contents of the mirror show an > inconsistent situation for installing gcc-14. > > I clicked back, reconfigured APT for using only the CD and continued. > Then it reached the stage of grub installation. Same issue: it hangs up. > > In the console log I can find this: > > INFO: task grub-install:17327 blocked for more than 483 seconds. > Not tainted 6.3.0-1-powerpc #1 Debian 6.3.7-1 > "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disabled this message. > task:grub-installstate:D stack:0 pid:17327 ppid:17214 > flags:0x0 > Call Trace: > [f3cf1b30] [0004] 0x4 (unreliable) > ... > (it goes on) > > I managed to capture the current versions of the packages, according to > /target/var/log/dpkg.log contents: > > grub-common:powerpc 2.06-13 > grub2-common:powerpc 2.06-13 > grub-ieee1275-bin:powerpc 2.06-13 > > Anything I've missed? > > Regards, > > > El vie, 11 oct 2024 a las 8:08, Ed Robbins () > escribió: > >> Hi Manuel >> >> On Thu, 10 Oct 2024 at 23:50, Manuel Molina Cuberos >> wrote: >> > >> > Hi all! >> > >> > I have several PowerPC based computers. One of them is an iMac G3/500 >> DV SE (powermac2,2) with 1 GB RAM and 30 GB hard drive. >> > >> > I've had it with Ubuntu 14.04 LTS but it's out of support already. It >> worked fine from boot perspective, and it was using yaboot. >> > >> > I wanted to install Debian 12, now that I know that the architecture is >> being maintained. >> > I downloaded and installed it from this image: >> https://cdimage.debian.org/cdimage/ports/snapshots/2024-02-25/debian-12.0.0-powerpc-NETINST-1.iso >> . >> >> Grub right now only works on certain specially prepared CD images. You >> need to use this one, it should solve your issue >> >> https://cdimage.debian.org/cdimage/ports/snapshots/2023-06-18/debian-12.0.0-powerpc-NETINST-1.iso >> >> Best, >> Ed >> >> > >> > The disk layout for this installation was: >> > >> > Device / Size / Type / Mount point / Bootable >> > --- >> > /dev/sda13 128MB HFS /boot/grub yes >> > /dev/sda14 11GB ext4 / no >> > /dev/sda15 512MB swap no >> > >> > However, when it comes the time to install grub, the system hangs at >> 16% progress of that stage. >> > I opened a console and checked. The process hung was grub-ieee1275 >> > >> > The system log (Alt+F4) showed a dump of a killed process. >> > >> > I was able to kill that and finish the installation (users etcetera). >> > I booted in rescue mode. Then mounted and verified that /boot/grub was >> r/w. >> > Then tried to complete the installation, to no avail. The error message >> this time: >> > >> > Installing for powerpc-ieee1275 platform . Errors were encountered >> while processing grub-ieee1275 >> > >> > Any hint of what I'm missing or doing wrong? >> > Any hint will be very much appreciated. >> > >> > -- >> > Regards, >> > >> > Manuel Molina Cuberos >> > > > -- > Un saludo, > > Manuel Molina Cuberos (deluxe_) > -- Un saludo, Manuel Molina Cuberos (deluxe_)