Hello, On 6/1/23 1:59 AM, Linux User #330250 wrote:
The only thing that I can think of that might make the script slightly better was if you used &device; for \grub, because this should default to the current partition (where stage1 is on), and this is presumably where GRUB is as well... I.e., the line stating with ": bootgrub" would look like this: : bootgrub " Loading GRUB..." .printf 100 ms load-base release-load-area " &device;,\grub" $boot ; I'll definitely use this when I get around to installing Linux on my Clamshell...
Thanks! I've got a final script attached that takes that into account, and now all you'd need to modify is which partition OS X is on, unless it's different than 3 which is the most common one I saw. I also added a nice Debian logo to the badge shown in the OS picker. All you have to do after installing Debian alongside OS X is replace /boot/grub/System/Library/CoreServices/BootX with this file, rebless it if needed, and now you have an easy dual-boot solution! -- Ben Westover
<CHRP-BOOT> <COMPATIBLE> MacRISC MacRISC3 MacRISC4 </COMPATIBLE> <DESCRIPTION> PowerPC GNU/Linux First Stage Bootstrap </DESCRIPTION> <BOOT-SCRIPT> : .printf fb8-write drop ; : bootgrub " Loading GRUB..." .printf 100 ms load-base release-load-area " &device;,\grub" $boot ; : bootmacosx " Booting Mac OS X..." .printf 100 ms load-base release-load-area " hd:3,\\:tbxi" $boot ; : bootcd " Booting CDROM..." .printf 100 ms load-base release-load-area " cd:,\\:tbxi" $boot ; " screen" output variable interactive 1 interactive ! 0 interactive @ = if bootgrub then dev screen " "(0000000000aa00aa0000aaaaaa0000aa00aaaa5500aaaaaa)" drop 0 7 set-colors " "(5555555555ff55ff5555ffffff5555ff55ffffff55ffffff)" drop 8 15 set-colors device-end f to foreground-color 0 to background-color " "(0C)" .printf " First Stage Debian GNU/Linux Bootstrap"(0d 0a)" .printf " "(0d 0a)" .printf " Press l for GNU/Linux,"(0d 0a)" .printf " x for Mac OS X,"(0d 0a)" .printf " c for CDROM."(0d 0a)" .printf " "(0d 0a)" .printf " Stage 1 Boot: " .printf get-msecs d# 10 3E8 * + begin key? if key case ascii l of " l "(0d 0a)" .printf bootgrub endof ascii x of " x "(0d 0a)" .printf bootmacosx endof ascii c of " c "(0d 0a)" .printf bootcd endof endcase then dup get-msecs < until drop " "(0d 0a)" .printf bootgrub </BOOT-SCRIPT> <OS-BADGE-ICONS> 1010 00000000003E3E3E3A3E3A1100000000 000000003E3E3E3E3E3E3E3E3E000000 0000003E3E3E3E0000003A3E3E3E0000 00003E3E3E3E00000000003E3E3E0000 00003A3E3E00003E3E3E3E003E3E0000 00003E3E0000003A000036003E3A0000 00003E3A00003E3E00003A003E3E0000 00003E0000003E3E000036003E3A0000 00003E3E00003A3E003A003E3A000000 00003E3A0000363A3E3E3E3E3E000000 00003E3E1100003E3E3E3E0000000000 00003E3E3E0000000000000000000000 0000003E3E0000000000000000000000 000000003E3E00000000000000000000 000000003E3E3A000000000000000000 0000000000003E3E3E00000000000000 0000000000C1C1C1C5C1C5EE00000000 00000000C1C1C1C1C1C1C1C1C1000000 000000C1C1C1C1000000C5C1C1C10000 0000C1C1C1C10000000000C1C1C10000 0000C5C1C10000C1C1C1C100C1C10000 0000C1C1000000C50000C900C1C50000 0000C1C50000C1C10000C500C1C10000 0000C1000000C1C10000C900C1C50000 0000C1C10000C5C100C500C1C5000000 0000C1C50000C9C5C1C1C1C1C1000000 0000C1C1EE0000C1C1C1C10000000000 0000C1C1C10000000000000000000000 000000C1C10000000000000000000000 00000000C1C100000000000000000000 00000000C1C1C5000000000000000000 000000000000C1C1C100000000000000 0000000000FFFFFFFFFFFFFF00000000 00000000FFFFFFFFFFFFFFFFFF000000 000000FFFFFFFF000000FFFFFFFF0000 0000FFFFFFFF0000000000FFFFFF0000 0000FFFFFF0000FFFFFFFF00FFFF0000 0000FFFF000000FF0000FF00FFFF0000 0000FFFF0000FFFF0000FF00FFFF0000 0000FF000000FFFF0000FF00FFFF0000 0000FFFF0000FFFF00FF00FFFF000000 0000FFFF0000FFFFFFFFFFFFFF000000 0000FFFFFF0000FFFFFFFF0000000000 0000FFFFFF0000000000000000000000 000000FFFF0000000000000000000000 00000000FFFF00000000000000000000 00000000FFFFFF000000000000000000 000000000000FFFFFF00000000000000 </OS-BADGE-ICONS> </CHRP-BOOT>
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature