Difference between revisions of "Booting a Mac with Yellow Dog Linux"

From Organic Design wiki
(No difference)

Revision as of 09:47, 20 May 2005

Date: Tue, 8 Apr 2003 14:03:04 +0200 From: Alexander Holst <holst at fh-pforzheim dot de> Subject: Re: miboot documentation? (really minimal BootX) Hi everybody, here's a mini HOWTO for booting/installing via miboot (sorry for the long post): All my YDL boxes here are booted via miboot (exept for my ANS ;), so they don't have any Apple Software on them any more. Only step 1] and 2] usually require some form of MacOS. In my experience, miboot works very well for OldWorld machines, as well as for B/W G3s. It is customizable trough a conf file called "boot.conf, which must reside on the root level of the HFS (or HFS+) partition. My HFS partitions are usually between 20 and 30 MB, which is enough, as long as you are not experimenting with too many different kernels. If you only have one, known to work kernel, even as little as 15 MB could be enough. IMHO, HFS is recommended as you'll then be able to mount that partition under Linux and alter the boot.conf file, to reflect any changes like boot args and kernels. I usually use miboot for installation as well. All you have to do, is to copy the desired installer ramdisk to the root level of the HFS partition and specify it in the boot.conf file. I even did a graphical install on a PM8200 this way ;) In case you want to have a dual boot system, miboot serves well, as you will be able to choose the volume containing miboot as a startup disk - just make it the second (or more) partition on the drive, so holding down <CMD><ALT><P><R> will enable you to reset the PRAM and enable you to boot back into Mac OS, or doing it the good ole way, using two or more SCSI disks, holding down <CMD><ALT><SHIFT><Backspace><# of SCSI ID of BootDrive> will let you boot off your desired boot drive :) My usual steps in performing an install through miboot consist of the following: 1] Boot from a bootable CD containing any drive partitioning utilities to partition/initialize your disk. A MacOS 8.1 or higher install CD is recomended as you will be able to access any other stuff you will need through the network. Making 1 partition suffices completely: 1 HFS partition, rest empty (that will be used for Linux later). As with all the installs I have performed so far, all installers (YDL 2.0, 2.2 & 2.3) allowed me to partion the remaining space on the drive during installation. Make one partition that will become the HFS boot partition for the machine. Again, HFS is considered to be used rather than HFS+, for reasons explained above. Partition size: 15MB for machines with only one usable kernel, more for experimenting (take into consideration that each kernel requires between 3 and 5MB). 2] Copy all needed miboot stuff on the newly created HFS partition. I usually use the Systemfolder of an old LinuxPPC2000 Q4 CD, as it has proved to work flawlessly (if neccessary, I could provide that). Needed are the following components: a] a "System Folder" on the root level that contains "Finder" and "System", the actual miboot software. Be sure to open this "System Folder" at least once under MacOS, so it gets blessed, aka the icon of the folder in the Finder will contain a "Happy Mac", otherwise you won't be able to choose it as a boot drive in the StartupDisk control panel later on. b] a text file called boot.conf on the root level (this file can be in SimpleText format or Linux format - I usually create it with SimpleText the first time, then edit it with gEdit, pico ... when installation has finished). Mine looks as follows: init-message = "\nWelcome to YDL!\Press <TAB> for boot options.\n\n" timeout = 50 default = bootYDL image = vmlinux-2.4.18-0.8a label = bootYDL root = /dev/sdb8 append = "video=atyfb:vmode:18,cmode:24" image = vmlinux-2.4YDLinstall label = install_YDL initrd = ramdisk-text.image.gz initrd-size=16384 root = /dev/ram0 append = "video=atyfb:vmode:18,cmode:24" It looks much like a quik.conf file. The "default=bootYDL" is ignored! I kept that line in all my boot.conf files, as I have no idea whether leaving it out messes things up. Default will alwyas be the _first_ set of entries in this file. At least that's what I found out. All other sets will be displayed as options, when hitting the spacebar at the initial "Tux Scenery" screen. Note the second set of entries, labled "install_YDL" - these are required for installing YDL through this method. All mentioned kernels _must_ reside in a folder called "Linux Kernels" on the root level of that partition, hence step c]. The ramdisk image, needed for installation must also be on the root level of the HFS partition - hence step d]. Take note, althogh currently working under MacOS, case sensitivity must be observed, as later while booting into Linux, it is required to keep entries in boot.conf according to the "real" names of the items on the HFS partition (kernel names, ramdisk name). The "timeout = 50" entry specifies, how long the initial screen will be displayed before booting into the default settings. Time is in 1/10 secs, so 50 means 5 secs, 100 = 10s ... In case you have to specify custom kernel parameters, you can have a line like: append = "video=atyfb:vmode:18,cmode:24" (worked on my G3/233 DT ;) It works much better than specifying the vmode and cmode settings in the displayd screen of miboot - somehow, these get scrambled when entered at the boot options screen, at least in the version of miboot I use. Any custom kernel arguments can be passed to the kernel this way. (I am writing this out of my memory, so the append line may be wrong, choose proper values for your setup or leave the line awy, miboot will then use the video settings set by MacOS. These can be controlled from within Linux via nvvideo - see man nvvideo) c] a folder called "Linux Kernels" (note the space in that name) on the root level, containing your kernel/s. I usually have a second Mac that serves as a fileserver to get the stuff from the different CDs (YDL install CD ...). As of at least MacOS 8.1 and higher, the install CDs had a Chooser, so access to AFP servers is possible. It is possible to copy everything needed to a ZIP or such, before starting the process as well. You can use the supplied YDL kernel from a YDL install CD in most cases (exept for NuBus Macs, you definitely will need a custom kernel - if needed, I can supply one, as my Performa 5200 is running YDL 2.2 at the moment, waiting for 3.0 to be installed :) d] to be able to install, we need the appropriate ramdisk on the root level of this HFS partition too. Copy the desired one (text or X11 or both) from your YDL install CD to the partition - do _not_ unpack it/them, leave it/them as is. BTW, as of YDL 2.3, text as well as X11 worked fine for me - X11 needs more RAM, so in case you are short in RAM, use the text ramdisk image. 3] Open the StartupDisk control panel and select the newly generated StartupDisk as the default StartupDisk and reboot. Upon the miboot screen, press <Space> to get into the otions screen, unload whatever CD is in the drive and insert the YDL install CD, choose your "install set" and hit boot. Hopefully you will see Tux greeting you at the top of the screen followed by the usual console messages. 4] Everything from this point on should be according to YDL's documentation about installing YDL (or whatever distro you are installing - LPPC2kQ4 worked fine this way as well). Be sure to choose "Custom" as the install method, as the YDL installer will not recognize the "out of the ordinary" partitioning scheme, to be able to enter the correct mount points for your partitions later during the installation process. As for further partitioning your drive, _only_ alter the remaining free space of the drive, do _not_ alter any of your driver partitions (they are necessary for booting), nor delete or alter the HFS Boot partition you created earlier. In case you created two HFS partitions in step 1], simply delete the _last_ HFS partition (which you intended to use for Linux anyway) and create your swap and root partition. My drives look as follows (output from pdisk - I use /dev/sda2 for /home): Partition map (with 512 byte blocks) on '/dev/sda' #: type name length base ( size ) 1: Apple_partition_map Apple 63 @ 1 2: Apple_UNIX_SVR2*untitled 2110748 @ 64 ( 1.0G) Device block size=512, Number of Blocks=2110812 (1.0G) DeviceType=0x0, DeviceId=0x0 Drivers- 1: 23 @ 64, type=0x1 2: 36 @ 118, type=0xffff partition map (with 512 byte blocks) on '/dev/sdb' #: type name length base ( size ) 1: Apple_partition_map Apple 63 @ 1 2: Apple_Driver43*Macintosh 54 @ 64 3: Apple_Driver43*Macintosh 74 @ 118 4: Apple_Driver_IOKit Macintosh 512 @ 192 5: Apple_Patches Patch Partition 512 @ 704 6: Apple_HFS "Boot_Linux" 65536 @ 1216 ( 32.0M) 7: Apple_UNIX_SVR2 swap 262145 @ 66752 (128.0M) 8: Apple_UNIX_SVR2 untitled 3849977 @ 328897 ( 1.8G) Device block size=512, Number of Blocks=4178874 (2.0G) DeviceType=0x0, DeviceId=0x0 Drivers- 1: 23 @ 64, type=0x1 2: 36 @ 118, type=0xffff In the mount points section of the installer you can specify something like "/mnt/Boot_Linux" as mount point for the HFS BootPartition together with type HFS, then you'll be able to access that partition from within Linux (that's the reason why we initialized it as HFS and not HFS+ in step 1]). You will certainly want to alter the boot.conf file on that partition at some stage. Do _not_ mount that partition at /boot, it will most likely mess things up. Partitioning schemes with more than one partition (besides swap) are possible and up to your taste. Do not install any boot loaders from within the installer - not needed with miboot. I usually choose text as preferred login mehtod for the beginning untill I have solid XFree config files with proper screen resolutions - you may choose graphical in case you are sure your settings will work. 5] After finishing the install you will have to edit the boot.conf file on your HFS partition to reflect the root partition of your linux installation. It will be mentioned by the installer at the end of the installation process. Write it down and put it in the appropriate line of boot.conf. There are several ways to accomplish that. One would be to boot with a MacOS CD again by holding down <C> and use SimpleText to edit the file. Another would be to enter the options screen of miboot and enter the root partition in the proper field (a predefined set for booting into Linux in boot.conf helps a lot - you safe some typing/deleting in that screen, as it is very slow), boot into your newly installed Linux installation and use any editor of your preference for altering the boot.conf file or completely write a new one, to get around the line breaking issue (Macintosh vs. Linux line breaks). It seems that the format of line breaks does not affect the proper funtionality of miboot, it is just annoying to have everything in one line under Linux. I hope this will get your machine/s booted into Linux, using miboot as preferred booting mehtod. Greetings, Alex Alexander Holst Pforzheim University of Applied Sciences <holst at fh-pforzheim dot de>