星期三, 12月 10, 2003
星期二, 11月 18, 2003
Install en pdf
3.7 Pre-Install Hardware and Operation System Setup
3.7.1 Invoking OpenFirmware
在PowerPC Macintoshes，進入OpenFirmware的方法是在開機時按下Command-Option-O-F。在開機“嗶－”一聲後，OpenFirmware會檢查User是否按下了這些按鍵。決定是否帶出OpenFirmware的Command Prompt。
在舊款的PowerPC，OpenFirmware的default console是serial port，在這種機器上啟動OpenFirmware，只會看到一片黑的螢幕。要用另一台電腦執行Terminal的程式連接到serial port上才行。
OldWorld Beige G3，OF verssion 2.0fl和2.4的OpenFirmware有問題，必須要patch後才能從hard driver開機。
3.7.2 Hardware Issue to Watch Out For
Optaining System Operation Media
4.1 Official Debian GNU/Linux CD-ROM Sets
如果有光碟機但是不支援光碟開機，就要利用floppy，hard driver或net-boot來開機並執行system installer。所有需要用來製造開機作業的工具也都附在CDROM中。Debian network archieve和CD的內容和路徑安排是完全相同的。當開機作業完成後，就可以由光碟機讀取的所有需要的檔案。
4.2 Download Files from Debian Mirrors
Download檔案時，要使用binary mode，不能使用text或automatic mode。最好是建立一個和Mirror Site一樣的目錄結構。這樣要找檔案時比較方便。You shuld start your local directory structure at the level under disks-powerpc,for example:
4.2.1 Installation Options
1. boot的程式（像rescur.bin, linux.bin 和root.bin）
3. Base system installation files（basedebs.tar）
如果有安裝linux kernel支援的ethernet card。那就只需要開機的檔案就夠了。安裝程式有網路安裝的功能。
Base system installation file（basedebs.tar）的大小大約是27M，所以安裝時最好是有CD-ROM或是網路功能，否則就需要download這個檔案（位置在：…/base-images-current/basedebs.tar）。這個檔案包含了linux系統在安裝時所需要的一些基本功能。在有網路功能時，安裝程式會在需要時自行由網路下載。
如果在另一台linux系統上自行build這個檔案，需要安裝debootstrap (apt-get install debootstrap)。命令是：
debootstrap binary-basedebs SUIT=woody VERSION=3.0 \
4.2.2 Choose The Right Installation Set
'powermac' 大多數Power Macintosh使用這一項，他是2.2版的kernel
'new-powermac' 用在非常新版的Power Macinsh上，使用2.4版的kernel
'apus' Amiga Power-UP系統（APUS）所使用的，kernel是2,2版
'chrp' 是給embedded CHRP computer使用，2.2版kernel
'prep' 是motorola和IBM RS/6000 PReP computer，2.2版的kernel
4.2.3 Where to Find Installation Files
rescue image (rescue.bin) and root image or tarball(root.bin):
Linux Kernel Files (linux.bin)
這些driver 檔在partition好hard driver，安裝好kernel後的安裝過程才會需要。如果有特殊的需要在initial-boot時想要access某些hardware，只有選擇一個已經將所需driver compile進去的kernel image，並且設定好boot parameters（ref: Boot Parameters）。
driver floppy images
需要經由floppy disk 安裝時，download這些檔案。
driver floppies archieve
不受floppy disk (size)的限制時，直接download這個檔案
boot-floppy-hfs images和rescue.bin都含有壓縮過的kernel image。boot-floppy-hfs僅是用來開機使用，當kernel已經安裝在hard driver上，rescue.bin可以作為濘一個取得kernel的來源。rescue.bin不能用來開機，另一個kernel image（未壓縮的）linux.bin是才是用來作hardware或CDROM開機使用。當用floppy開機時，使用boot-floppy-hfs，不用linux.bin。
星期一, 11月 17, 2003
even been started yet. I'd welcome any and all comments on this document. E-mail them to me at email@example.com.
Thanks for your patronage. ;)
modified to clarify yaboot's non-support of oldworld hardware
-- Ethan, 6/6/2000
modified the ybin section to document the new ybin 0.17 ofboot which is autoconfiguring. Also corrected the
explanation of the read-only keyword in /etc/yaboot.conf. Updated again to better reflect new features in current
versions of ybin and document ofpath.
-- Ethan, 2000/11/18
In this version, new or modified sections of text are marked by a dark red color.
* What is 'yaboot?'
* Why do I need 'yaboot?'
* What's a bootstrap partition?
* What's Open Firmware?
* Setting Up ybin
* If you're installing to an IDE hard drive
* If you're installing to an external SCSI drive
* If you're installing to a Zip disk
* Setting Up Configuration Files
* Changing the boot-device in Open Firmware
* Okay. I've downloaded it. What do I do now?
* How do I determine the boot path to an external SCSI drive?
* [Credits, far from done, these are basically notes to myself]
What is 'yaboot?'
From BenH's site (http://ppclinux.apple.com/~benh/), "yaboot is an OpenFirmware based bootloader for newworld
In layman's terms, it's an alternate method of booting into Linux.
NOTE: yaboot will NOT work on oldworld hardware
Why do I need 'yaboot?'
You don't have any other option for booting into Linux if you're using one of the NewWorld Macs (i.e., any colored
Mac) with MacOS 9.0.4 or higher. BootX, another bootloader from BenH, used to boot those machines, but changes made
to the MacOS in 9.0.4 (and possibly the earlier 9.0.x series) broke it completely. It worked in MacOS 9.0 and
earlier, but performance was sporadic and unpredictable. If you're using a NewWorld machine, we highly recommend
you use yaboot. Owners of earlier machines can probably get along just fine with BootX; if you experience odd
problems starting Linux, though, you should consider switching to yaboot (only if you have a newworld machine, if
you have an oldworld machine consider switching to quik).
What's a bootstrap partition?
(Please note: I've taken a few liberties with this explanation, and skipped over a few subtleties. This isn't
exactly what happens, but it should be close enough to satisfy most people. If you'd like more detailed technical
information, you're encouraged to search the various LinuxPPC lists for more information.)
When your Mac first starts up, Open Firmware begins checking your partitions, beginning with the one pointed to by
the environment variable "boot-device," for a blessed folder (in the case of the MacOS, this folder is titled
"System Folder," but the name is irrelevant). It looks inside each blessed folder it finds for a file of type
'tbxi.' Upon finding this file, it checks to ensure that the file is a CHRP script, which is a set of instructions
further directing Open Firmware on how to continue the start process. When you boot into the MacOS, the CHRP script
loaded by OF is the MacOS ROM file, and this file in turn places a copy of the Mac OS ROM into memory. From there,
the startup process you're used to seeing is under way.
In the case of yaboot, instead of loading the MacOS ROM, the CHRP script loads up yaboot and hands off the startup
process to it. Yaboot in turn asks which kernel image you wish to load, and boots into Linux from there.
From this, a reasonable person would assume that, to boot Linux, you'd simply point OF to a yaboot-loading CHRP
script, and this is exactly what we do. We "bless" the folder/partition containing the script, and instruct OF to
boot from that. However, we run into a problem the next time we boot into the MacOS: in all its greedy glory,
unblesses any folder/partition it finds which doesn't contain a valid MacOS, preventing you from booting from it
again. This is obviously undesirable. Several people have created methods for faking out the MacOS and tricking it
into loading yaboot using a "dummy" System Folder. The SuSE distribution does this using dummy Finder and System
files that are sufficiently hacked to trick the MacOS into thinking they're valid (although this doesn't always
work; by some reports it fails as much as 90% of the time). Another method involves ybin, created by Ethan Benson,
which we will get to later. We can avoid the entire "unblessing" process, however, by making the yaboot partition
on a drive a bootstrap partition of type "Apple_Bootstrap." The MacOS won't even try to mount a partition of this
type, and since it never mounts, it never unblesses it.
When you create a bootstrap partition, which you will likely do eventually, please note that it should never be
mounted directly, in either OS. If you're making a bootstrap partition, you're most likely using ybin anyway, and
it will take care of the work for you. We cover setting up ybin[not completed] and creating a partition[not
completed] in further detail elsewhere, so see those sections if you want more information.
What's Open Firmware?
Setting Up ybin
The first bit of advice I can offer for ybin is: don't uncompress it in the MacOS! Move the .gz archive into Linux
first, or download it from there in the first place. The archive contains some symlinks that aren't worth the
effort to recreate. You should also note that these instructions assume you have some method of booting into Linux,
be it from your distribution CD or from some other method you already have working. Installing yaboot shouldn't
break that method, but be forewarned that you may have to spend quite a bit of time fiddling to get things back the
way they were if something goes wrong here.
You'll first need to determine where you want to store your kernel images, as you'll need to pass this information
onto ybin and yaboot before you actually use them. yaboot, particularly in conjuction with ybin, offers you amazing
flexibity in where you store your kernel images. They can be kept on anypartition: ext2, HFS, or even HFS+. A
common misconception is that to use any kernel images downloaded in the MacOS, you have to first move them to an
HFS "exchange" partition. With yaboot, this is completely untrue. You can keep them, quite literally, anywhere.
The first bit of "down-and-dirty" work you'll have to do is actually partitioning your drive, if you haven't done
so already. Check out "How do I partition my drive?" for detailed information.
Once that's done, you'll need to determine the Open Firmware path to your boot device. You'll need to have a
bootstrap partition to do this (see "What's a bootstrap partition?" for pointers; I'll be adding actual
instructions soon). This bootstrap partition can be on any drive, but the steps for finding the OF path will vary
depending on what type of drive it is. If you'll be re-partitioning your internal hard drive anyway, the absolute
easiest thing to do is to make the first partition on that drive the bootstrap. See the section on drive
partitioning for details.
If you're installing to an IDE hard drive
If the bootstrap is on your Mac's internal hard drive, the device path is "hd:". Make a note of this and continue
to "Setting Up Configuration Files".
If you have another drive connected to your Mac's second IDE bus, then use "ultra1:" as your device path. If you're
using a slave drive on one of the IDE busses, then you'll have to display the path of hd and change the last bit
from "disk@0" to "disk@1." I'll have more detailed instructions on this later on.
If you're installing to an external SCSI drive
The simplest way to find the OpenFirmware device path to a given disk is to use the ofpath utility (included in
current ybin distributions) example: ofpath /dev/sda or to find the path to a partition: ofpath /dev/sda2
If you're installing to a Zip disk
The path is "zip:". Make note of it. You may proceed.
Setting Up Configuration Files
Download the ybin archive ("Where do I get ybin?"). In Linux, copy the .gz file to any directory. cd to that
directory, and type "tar -zxvpf ybin-0.30.tar.gz" This will uncompress and untar the archive. Now, cd to ybin-0.30,
and type "make install" This will install ybin and yaboot into their proper locations. You should receive a message
The ofboot script included with ybin 0.17 and later is automatically configured by ybin based on options in
/etc/yaboot.conf. It is capable of presenting a dual or tri-boot menu. To enable dual booting of GNU/Linux and
MacOS add "macos=hd:10" to /etc/yaboot.conf where "hd:10" is the OF path to a MacOS boot partition. If you want to
boot MacOSX you can also add a "macosx=hd:11" line. You can also use the unix device node for these options and
ybin will automatically find the OpenFirmware device path, example: "/dev/hda10". The default OS that is booted is
controlled by the "defaultos=" option, the default is GNU/Linux.
IMPORTANT: You should never edit this new ofboot script.
Now you're ready to edit yaboot.conf. Open /etc/yaboot.conf in your editor. Information on all the possible fields
in this file is available in the man page for yaboot.conf. The first part of the default yaboot.conf file looks
## Comment out if you have a newworld compatible nvsetenv (ybin can ## likely detect the incompatible version) when
commented out ybin ## will update the boot-device variable in OpenFirmware to the ## bootstrap partition. nonvram
Begin by changing the boot line to the Linux-style path to your bootstrap partition, such as "/dev/hda2" or
"/dev/sda9". Set device to the OF device-path to the drive where your kernel images are stored, followed by a
trailing ":". Don't add the partition number. install refers to the bootloader ybin will install, and magicboot
refers to the CHRP script; you can leave these at their defaults (inquiring users will want to look at the man
pages for more information). delay is the time in seconds ofboot will wait for you to choose an OS when the dual
boot menu is enabled. timeout is the time, in tenths of a second, before yaboot boots the default kernel image
(you'll set the default shortly). Comment out or delete the nonvram line if you have a up to date system, this will
allow ybin to automatically update the OpenFirmware boot-device variable to boot the bootstrap partition ensuring
you don't have to enter OpenFirmware and boot the system manually. Below the "header" information, you see an entry
that looks like this:
image is the location of the kernel image; if you're keeping them in /boot and making symlinks, this will be
"/boot/vmlinux". root is the Linux-style path to your root partition. read-only causes the root filesystem to be
mounted read-only to allow for fsck to run, and partition refers to the partition number the image is on; you can
usually set this to the digit in your root path. label is a name that you can assign to this particular kernel
configuration; make sure each config has a unique name!
Once you've set those options, go back up to the top of the file and add a line:
default = label
Change label to the label you assigned to your kernel configuration, change timeout to whatever length of time you
prefer (remember, it's measured in tenths of a second). Save and close yaboot.conf, and you're just about ready to
go. First, though, you have to create an HFS filesystem on the bootstrap partition. Ethan has included a utility to
do this for you. Please note that this will format the bootstrap partition, so if you have any useful information
on it, be sure to move it elsewhere before you have mkofboot prepare that partition. Run "mkofboot -v," and you
should be asked if you want to create an HFS filesystem on whatever device you indicated was your bootstrap
partition. Respond "y," and mkofboot should output something like the following:
mkofboot: Finding OpenFirmware device path to `/dev/hda2'...
mkofboot: Creating HFS filesystem on /dev/hda2...
mkofboot: Checking /dev/hda2 for valid HFS filesystem...
mkofboot: Copying /usr/local/lib/yaboot/yaboot to /dev/hda2...
mkofboot: Copying /etc/yaboot.conf to /dev/hda2...
mkofboot: Installing first stage bootstrap: ofboot...
mkofboot: Setting attributes on yaboot...
mkofboot: Setting attributes on yaboot.conf...
mkofboot: Setting attributes on ofboot...
mkofboot: Blessing /dev/hda2...
mkofboot: Cleaning up...
mkofboot: Updating OpenFirmware boot-device variable in nvram...
Of course, your partition numbers will be different, but you get the idea. If mkofboot executes with no errors,
you're almost ready to go! If you're on a G4, iMacDV, or Pismo laptop, you can restart while holding down the
option key, and you should be presented with two buttons: one for the MacOS, and one for Linux. Click the Linux
button, then the arrow, and you should boot into yaboot and from there into Linux. Ybin will update the boot-device
OpenFirmware variable automatically so you should boot right into yaboot without any extra effort.
Changing the boot-device in Open Firmware
(Remember, you can skip this section if you've re-partitioned your internal drive and made the first partition the
bootstrap. If this describes the steps you've taken, restart as usual, and your boot script should kick in; if it
does, you can skip this step.) You can also skip this step if you removed the nonvram line from /etc/yaboot.conf
and ybin did not complain about being unable to update OpenFirmware.
Important! Open Firmware can be pretty intimidating. If you follow these instructions carefully, you shouldn't have
any problems. However, if at any time you find yourself totally unable to boot into the MacOS, simply restart while
holding down command-option-O-F, and at the "0 >" prompt type "boot hd:X,\\:tbxi". X should be the partition number
of your MacOS partition (if you haven't re-partitioned your internal drive, you can leave the X off entirely). This
should take you back into the MacOS, where you can re-select your startup drive in the Startup Disk control panel,
and then have another go at it. It might also be a good idea to have a startup CD for your Mac handy, although you
probably won't need it if you use the "boot hd:X,\\:tbxi" command. You can also use the OF command "set-defaults"
to restore anything you may have changed back to their defaults. Use this if things really seem screwed up.
Reboot into Open Firmware (restart while holding down command-option-O-F). At the "0 >" prompt type:
setenv boot-device path-to-bootstrap-device:X,\\:tbxi
Replace path-to-bootstrap-device with, well, the OF path to your bootstrap device (determined earlier) and replace
X with the bootstrap partition number. Press return, and then type "boot". If your ofboot.b file was configured to
launch yaboot by default, you should be in yaboot. If you set the MacOS as the default, you should be in the MacOS.
Restart again and hold down the spacebar; you should switch into whichever OS you haven't already been in.
If, on the other hand, things don't seem to work quite right, try typing this at the OF prompt:
If yaboot.conf isn't configured properly, this should generate an OF error message that may be useful in tracking
down the error. If you're e-mailing me or one of the lists for assistance with your setup, please include this
error if at all possible; it makes it much easier for us to narrow down were the problem most likely is.
Why doesn't yaboot seem to use the changes I made to yaboot.conf?
You'll need to re-run ybin whenever you make changes to your configuration files. ybin will copy them to your
bootstrap partition and make other necessary modifications for them to be used by yaboot.
Okay. I've downloaded it. What do I do now?
*** I've removed this section. The ybin section has virtually all the information that used to be contained here.
If anyway wants instructions on yaboot alone back, please let me know.
How do I partition my drive?
This is probably the most vital part of setting up Linux on your system. However, since you're messing around with
some very powerful software, it can also be the most dangerous if you're careful. Before you begin partitioning,
make sure you have a backup of anything you can't stand to lose. If you don't, and something goes awry, you'll be
very, very angry at yourself; don't say I didn't warn you. ;)
[still not completed, but being worked on] For a basic tutorial on partitioning the hard disk using mac-fdisk (aka
pdisk) see mac-fdisk-basics
How do I determine the boot path to an external SCSI drive?
This section is obsolete, use the included ofpath utility find the OpenFirmware device path instead, its easier and
This is similar to setting up yaboot to use a non-adapted drive, except it takes a few more steps to determine the
boot device. (special thanks go to Joe M. for his excellent post dealing with this issue, on which these
instructions are heavily based )
1. Identify SCSI card name
First, open up the Apple System Profiler (probably on your Apple Menu, unless you moved it) and switch to the
"Devices and Volumes" tab. Find your SCSI card in the list, and click the exposure triangle to display detailed
information for it. You're interested in the "Card name" field. Make note of the name displayed there (I suggest
writing it down; you won't be able to access it in a text file or anything in Open Firmware, which you're about to
get into). It should be something cryptic looking like "ADPT,2930CU." (Note: That's the name of my card; yours may
vary.) You can skip this step if you've got a pretty good idea of what device name you'll be looking for in the
next step, but don't come cryin' to me when you waste several restarts switching back and forth to look the name
2. Determine Open Firmware device path
Restart your Mac, and hold down command-option-O-F. You should switch into the white, tiny-text-filled Open
Firmware screen (why it isn't a lower resolution, I'll probably never know). Type in "dev / ls", sans the quotes
but with the spaces on both sides of the '/,' and it should pop out an oppressive looking screen of information.
This is an ASCII "graphical" representation of all the hardware on your system. We're only interested in the
device that matches the card name you wrote above. Mine looks something like:
/pci@f2000000 ... /pci-bridge@d ... /ADPT,2930CU@2 /disk
where the elipses denote a bunch of other junk in between. Notice that, with the exception of an "@2" tacked on at
the end, we see the card name we wrote down earlier. This is the device we're looking for. Write down the path,
ignoring the levels after the card name (in this case we'd write down "/pci@f2000000/pci-bridge@d/ADPT,2930CU@2/";
of course, your system will probably be a little different). You'll now add a bit more information to your boot
path, and then create an alias for this device so you don't have to do so much typing later on (this is a common
and valuable technique in the Linux world, btw ;-).
3. Determine SCSI ID and HFS partition
There's just one last piece of information you need to determine the fully-qualified device path to your Linux
boot device (actually, two small pieces, but we'll pretend they go as a unit): the SCSI ID, and the partition ID
of the MacOS (HFS) partition that yaboot and the kernel images are stored on. The first one is usually pretty easy
to get (just check the back of your drive; there's usually a dial or switchable-number back there; that's your
SCSI ID), but the second requires a little more work. If you don't remember the partition number from when you
first partioned your drive (you have already partitioned it, haven't you?) then you'll have to boot back into the
MacOS - using either "boot" or "reset-all" - and launch pdisk and examine the partition map for your drive. If you
need help obtaining or using pdisk, please see "How do I use pdisk? [not completed]" for a mini-primer on the
venerable disk partitioning utility. You'll add the SCSI ID to the very end of the device-path you wrote down in
step 2, in this format:
So if, to continue the example above, my HFS partition is on SCSI device 6, so the complete device-path would be:
4. Adding a devalias
Now, when you're setting up yaboot.conf and ofboot.b, you have to type this path a lot, and who in their right
mind would want to type this monster out over and over? Fortunately, Open Firmware lets you create your own
aliases; unfortunately, it acts a little flaky with them sometimes. If these work for you the first time, then
great! If they don't, restart and try 'em again.
Still in Open Firmware, type:
setenv use-nvramrc? true
followed by a return, and then:
This assigns a new alias, sd, to the device path you determined above. Now, when setting up yaboot and ybin, when
I refer to your device path, I'm talking about "sd".
[Credits, far from done, these are basically notes to myself]
Ethan Benson (firstname.lastname@example.org)
Joe Mastroianni (joe@adaptive silicon.com)
Nelson Abramson (email@example.com)
Florin Oprina (firstname.lastname@example.org)
Chas Williams (email@example.com)
Mike McCallum (firstname.lastname@example.org)
Federico Heinz (Federico_Heinz@yahoo.com)
Gaby Levinson (email@example.com)
and the many other people, who for one reason or another, have not been mentioned. You know who you are. ;)
I'd like to close by thanking God for putting me here and bringing to where I am today. Without Him, we are
First of all, ofboot.b _is_ necessary for booting and it has
to have the proper type/creator code. It is a (text) file
containing an open firmware script. It is this file that tells
OpenFirmware to load yaboot for the boot process to continue.
I'm unfortunately still not able to create a bootable CD and I
don't know why.
Here is what I am using (and I would appreciate any help other
people can give) to create the cd:
mkisofs -hfs -map src/hfs.map -part -hfs-bless ./ppc/ -r -o cd.iso ./ppc/
The hfs.map is taken from the debian-cd project. The ppc
directory is the contents of the cd and here is what it looks
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
dumont:/tmp> ls -lAF ppc/
-rw-rw-r-- 1 rbrito rbrito 3573285 Apr 20 21:11 linux.bin
-rw-r--r-- 1 rbrito rbrito 219 Apr 20 21:14 ofboot.b
-rw-rw-r-- 1 rbrito rbrito 1474560 Apr 20 21:11 root.bin
-rw-rw-r-- 1 rbrito rbrito 150020 Apr 20 21:13 yaboot
-rw-rw-r-- 1 rbrito rbrito 235 Apr 20 21:15 yaboot.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
All binary files were taken from the current boot-floppies, to
make my proof-of-concept CD. The only files that I changed
were ofboot.b and yaboot.conf:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Rescue CD, based on Debian's debian-cd
" screen" output
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
## This yaboot.conf is for CD booting only, do not use as reference.
# It is important not to have a comma after cd:
this is pretty easy with current mkisofs (the one that ships in debian
woody is fine).
here is what you do:
1: create your CD hierarchy, at say ~/cd-master
2: create a boot directory; mkdir ~/cd-master/boot
3: create a boot/ofboot.b;
cat /usr/share/doc/yaboot/examples/simpleboot.chrp | \
sed -e 's/hd:2/cd:/' > ~/cd-master/boot/ofboot.b
(note if you don't use debian this path will be
4: copy yaboot binary; cp /usr/lib/yaboot/yaboot ~/cd-master/boot
5: create a `maps' file for mkisofs;
# EXTN XLate CREATOR TYPE Comment
.b Raw 'UNIX' 'tbxi' "bootstrap"
yaboot Raw 'UNIX' 'boot' "bootstrap"
linux Raw 'UNIX' 'boot' "kernel"
vmlinux Raw 'UNIX' 'boot' "kernel"
.conf Raw 'UNIX' 'conf' "bootstrap"
root.bin Raw 'UNIX' 'root' "root_image"
* Raw 'UNIX 'UNIX' "unix"
6: create ISO; mkisofs -hfs -part -map ~/maps -no-desktop \
-hfs-volid "Yaboot_Boot_CD" -hfs-bless ~/cd-master/boot \
-r -o yaboot-cd.iso ~/cd-master
7: burn .iso to CD; cdrecord -blahblah -data yaboot-cd.iso
note that step 3 is quite important, as is step 5. the sed command
just replaces the hard coded `hd:2' device with `cd:' which is
required for CD booting. the maps file ensures the correct HFS
type/creators are set on the right files. the ofboot.b is required
since some models (notably blue g3) refuse to boot binaries by
default, thus the ofboot.b first stage is necessary.
the resulting ISO will be bootable on all NewWorld powermacs by simply
holding down the C key during boot, you can mount it in *nix as
note that you *must* use a subdirectory in your CD tree, not the root of
the CD tree, mkisofs will ignore your -hfs-bless option if you attempt
to use the root of the cd mastering tree. check the output of mkisofs
for a `Blessing cd-master/boot' message, this is the only indication
of whether it worked, if it can't find the dir or some other error
occurs it just silently ignores that option and your CD won't be
bootable (i consider this a bug).
ah right, i knew i was forgetting something, yes you need to put the
yaboot.conf in the boot directory. it should look something like
with all the rest of the normal stuff, do not specify partition=
you can put kernels wherever you want on the CD, just use a full path.
星期四, 6月 12, 2003
選擇Video Card，iMac用install-atyfb (or install-aty128fb ?)。按Enter。
出現linux安裝畫面，用方向鍵選install method : CDROM driver。
選擇用按鍵替代3 button mouse的另外兩個按鍵的功能。
選擇要安裝的partition - Erase entire disk
Mandrake可以使用Single User Login Mode，選No
星期五, 4月 18, 2003
Serial Port的支援並不在JDK的標準中，Sun作了一個implementation（COMMAPI），放在exetention裡，所以在使用Serial Port時，要
首先藉由CommPortIdentifier的一個static method : getPortIdentifier( )取得SerialPort的使用權
CommPortIdentifier.getPortIdentifier( “COM1” );
需要傳入自己的application name，作為註冊用，還需要指定不成功時，等候timout的時間，這個function會傳會SerialPort object。之後所有的動作都是以這個object作reference。
SerialPort ComP = CommPortIdentifier.getPortIdentifier(“COM1”).open(“AppName,2000);
InputStream In = ComP.getInputStream( );
OutputStream Out = ComP.getOutputStream ( );
int In.available( )
(byte) In.read( )
因為read( )的return type是0~255的int，所以要轉型。
其中byte outdata[ ];
星期二, 4月 08, 2003
Option - Set Classpath
Option - Set Sourcepath
VM - Start VM的對話窗中加入要debug的class name和argument，確認。
在source code window中的Line Number地方按下，就可以設定斷點。
星期二, 2月 25, 2003
SIM Card要有接聽Modem傳輸資料的功能，必須要“非同號”數據通訊的功能，這個功能是在申請門號時勾選的，要另外付費。申請了之後SIM Card上就有兩個號碼，一個是Voice Call，一個是Data Call。
Device : Wavecom WMOD2
使用前要Enter PIN No，目前拿到的是0000
申請非同號通訊的SIM卡有兩個號碼，一個是for Voice，一個for Data，要撥for Data那一個
1. 要撥for Data的號碼
+CMTI: “SM”,3 收到簡訊，存在SIM Card，的memory 3位置
AT+CMGD=1 刪第一筆(record index=1)
在傳送SMS時，有PDU ( protocol description unit ) Mode和Text Mode可以選，實際上SMS Message都是用PDU Mode來傳送的，Text Mode只是Modem支援的輔助功能，將PDU Mode的內容翻譯成Text，並且將Text轉成PDU協定傳送出去。
SMS最多可以有160個character，character的size ( bit no) 可以是：
7bit ：一般的ascii code
- ► 2006 (434)
- ► 2005 (620)
- ► 2004 (552)