[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: installing on PPC Mac Mini without any OS installed




Just to be absolutely clear, the "NewWorld bootblock" partition I am talking about, and I assume Gary is talking about, is the /dev/hda2 partition in the following display, with type "Apple_Bootstrap". This is quite distinct from the "/boot" directory in your root partition. It is only used during bootstrap and it's not normally mounted when Linux is running. The stuff it contains is crafted by the "/usr/sbin/ ybin" program, based on what it finds in /etc/yaboot.conf .

:~# mac-fdisk -l /dev/hda
/dev/hda
# type name length base ( size ) system /dev/hda1 Apple_partition_map Apple 63 @ 1 ( 31.5k) Partition map /dev/hda2 Apple_Bootstrap boot 1954 @ 64 (977.0k) NewWorld bootblock /dev/hda3 Apple_UNIX_SVR2 rootbak 19531250 @ 2018 ( 9.3G) Linux native /dev/hda4 Apple_UNIX_SVR2 untitled 7812501 @ 19533268 ( 3.7G) Linux native /dev/hda5 Apple_UNIX_SVR2 root 1953126 @ 27345769 (953.7M) Linux native /dev/hda6 Apple_UNIX_SVR2 newusr 19531251 @ 29298895 ( 9.3G) Linux native /dev/hda7 Apple_UNIX_SVR2 newvar 19531251 @ 48830146 ( 9.3G) Linux native /dev/hda8 Apple_UNIX_SVR2 newtmp 39062501 @ 68361397 ( 18.6G) Linux native /dev/hda9 Apple_UNIX_SVR2 roottest 20971520 @ 107423898 ( 10.0G) Linux native /dev/hda10 Apple_UNIX_SVR2 home 191777638 @ 128395418 ( 91.4G) Linux native

Block size=512, Number of Blocks=320173056
DeviceType=0x0, DeviceId=0x0


It's formatted HFS (*not* HFS-plus) even on NewWorld machines,

:~# mount -v /dev/hda2 /mnt
mount: you didn't specify a filesystem type for /dev/hda2
       I will try type hfs
/dev/hda2 on /mnt type hfs (rw)

 and it contains only a minimum of stuff -- specifically:

:~# ls -lA /mnt
total 151
-rw-r--r-- 1 root root   2865 Feb 17 19:37 ofboot.b
-rw-r--r-- 1 root root 149832 Feb 17 19:37 yaboot
-rw-r--r-- 1 root root    928 Feb 17 19:37 yaboot.conf

Which easily fits into 800KB.

What the files do:

ofboot.b -- an open-firmware script that loads yaboot and passes it control yaboot -- the "real" Linux bootloader. It reads yaboot.conf and does what it says to do based on user input and options. yaboot.conf -- a copy of /etc/yaboot.conf that was in effect when "ybin" was last run.

Yaboot knows how to parse an ext[23] filesystem{1} given an OF description of where it's located. Yaboot then finds and loads the kernel and initrd files mentioned in yaboot.conf, then passes off control to them.

{1} but, apparently, *not* ext4 -- at least it didn't work when I tried it{2}. I've never tried XFS, ReiserFS, JFS, or any of the more exotic variants, so I can't say about them.

{2} The work-around is to create a /boot partition where you put your kernel and initrd files and format it as ext2. This partition may need to be fairly large (some tens of MB: do "du -ms /boot" on your running system to get an idea.)

Enjoy!

Rick



Reply to: