ppcrcd/trunk/doc/README.install

sparky cvs at pld-linux.org
Wed Aug 9 19:26:25 CEST 2006


Author: sparky
Date: Wed Aug  9 19:26:22 2006
New Revision: 7634

Added:
   ppcrcd/trunk/doc/README.install
Log:
- added, PLD installation instructions, probably needs updating


Added: ppcrcd/trunk/doc/README.install
==============================================================================
--- (empty file)
+++ ppcrcd/trunk/doc/README.install	Wed Aug  9 19:26:22 2006
@@ -0,0 +1,371 @@
+=== How to install PLD on NewWorld Mac. ===
+
+    As for now the easiest way to do it is get PPCRCD, you can find recent
+version at http://ppcrcd.pld-linux.org/. When you will have ppcrcd.iso you must
+burn it on CD using image burning. You can do it using "Disk Manager" on
+MacOS X, or simply using 'cdrecord' on any computer with unix-based operating
+system.
+
+    When starting computer type and hold 'c' key to start from CDROM,
+type your PPCRCD options and wait until it boots.
+
+    I will try to install it on /dev/hda device, so lets check is it in
+my /dev:
+| [root at ppcrcd ~]$ <_<ls /dev/hd*>_>
+| /dev/hda
+
+= partitioning =
+
+    Ok, now we have to partition this disk, I prefer '<*<mac-fdisk>*>'
+to do it.
+
+    So, let's start:
+| [root at ppcrcd ~]$ <_<mac-fdisk /dev/hda>_>
+| /dev/hda
+| Command (? for help): <_<?>_>
+| Notes:
+|   Base and length fields are blocks, which are 512 bytes long.
+|   The name of a partition is descriptive text.
+| 
+| Commands are:
+|   h    help
+|   <*<p    print the partition table>*>
+|   P    (print ordered by base address)
+|   <*<i    initialize partition map>*>
+|   s    change size of partition map
+|   <*<b    create new 800K bootstrap partition>*>
+|   <*<c    create new Linux partition>*>
+|   C    (create with type also specified)
+|   d    delete a partition
+|   r    reorder partition entry in map
+|   w    write the partition table
+|   q    quit editing (don't save changes)
+
+
+    First check is there any partition, and if not create new partition table:
+| Command (? for help): <_<p>_>
+| No partition map exists
+| Command (? for help): <_<i>_>
+| size of 'device' is 253696 blocks: -<_<ENTER>_>-
+| new size of 'device' is 253696 blocks
+
+    As mac-fdisk can't guess many things; after each command you should check
+actual table, so 'p' once again.
+| Command (? for help): <_<p>_>
+| /dev/hda
+|         #                type name   length   base    ( size )  system
+| /dev/hda1 Apple_partition_map Apple      63 @ 1       ( 31.5k)  Partition map
+| /dev/hda2          Apple_Free Extra  <*<253632>*> @ <*<64>*>      (123.8M)  Free space
+| 
+| Block size=512, Number of Blocks=253696
+| DeviceType=0x0, DeviceId=0x0
+The numbers interesting us are 'legth' and 'base' of free space, "253632 @ 64"
+on my disk.
+
+    Now create special bootstrap partition so you will be able to boot your PLD.
+| Command (? for help): <_<b>_>
+| First block: -<_<ENTER>_>-
+| First block: <_<64>_>
+| Command (? for help): <_<p>_>
+| /dev/hda
+|         #                type name    length   base ( size ) system
+| /dev/hda1 Apple_partition_map Apple       63 @ 1    ( 31.5k) Partition map
+| /dev/hda2     Apple_Bootstrap bootstrap 1600 @ 64   (800.0k) NewWorld bootblock
+| /dev/hda3          Apple_Free Extra   252032 @ <*<1664>*> (123.1M) Free space
+As you can see pressing ENTER doesn't work, you have to type it manually. Use
+'base' of free space as first free block.
+
+    Now some swap:
+| Command (? for help): <_<c>_>
+| First block: <_<1664>_>
+| Length (in blocks, kB (k), MB (M) or GB (G)): <_<8M>_>
+| Name of partition: <_<swap>_>
+| Command (? for help): p
+| /dev/hda
+|         #                type name    length   base ( size ) system
+| /dev/hda1 Apple_partition_map Apple       63 @ 1    ( 31.5k) Partition map
+| /dev/hda2     Apple_Bootstrap bootstrap 1600 @ 64   (800.0k) NewWorld bootblock
+| /dev/hda3     Apple_UNIX_SVR2 swap     16384 @ 1664 (  8.0M) Linux swap
+| /dev/hda4          Apple_Free Extra   <*<235648>*> @ <*<18048>*> (115.1M) Free space
+
+    And two identical linux partitions, for mdadm example:
+| Command (? for help): <_<c>_>
+| First block: <_<18048>_>
+| Length (in blocks, kB (k), MB (M) or GB (G)): <_<117824>_>
+| Name of partition: <_<root1>_>
+| Command (? for help): <_<p>_>
+| /dev/hda
+|         #                type name    length   base ( size ) system
+| /dev/hda1 Apple_partition_map Apple       63 @ 1    ( 31.5k) Partition map
+| /dev/hda2     Apple_Bootstrap bootstrap 1600 @ 64   (800.0k) NewWorld bootblock
+| /dev/hda3     Apple_UNIX_SVR2 swap     16384 @ 1664 (  8.0M) Linux swap
+| /dev/hda4     Apple_UNIX_SVR2 root1   117824 @ 18048 ( 57.5M) Linux native
+| /dev/hda5          Apple_Free Extra   <*<117824>*> @ <*<135872>*> ( 57.5M) Free space
+| 
+| Block size=512, Number of Blocks=253696
+| DeviceType=0x0, DeviceId=0x0
+| 
+| Command (? for help): <_<c>_>
+| First block: <_<135872>_>
+| Length (in blocks, kB (k), MB (M) or GB (G)): <_<117824>_>
+| Name of partition: <_<root2>_>
+| Command (? for help): <_<p>_>
+| /dev/hda
+|         #                type name    length   base ( size ) system
+| /dev/hda1 Apple_partition_map Apple       63 @ 1    ( 31.5k) Partition map
+| /dev/hda2     Apple_Bootstrap bootstrap 1600 @ 64   (800.0k) NewWorld bootblock
+| /dev/hda3     Apple_UNIX_SVR2 swap     16384 @ 1664 (  8.0M) Linux swap
+| /dev/hda4     Apple_UNIX_SVR2 root1   117824 @ 18048 ( 57.5M) Linux native
+| /dev/hda5     Apple_UNIX_SVR2 root2   117824 @ 135872 ( 57.5M) Linux native
+| 
+| Block size=512, Number of Blocks=253696
+| DeviceType=0x0, DeviceId=0x0
+
+    Done, now write and quit.
+| Command (? for help): <_<w>_>
+| IMPORTANT: You are about to write a changed partition map to disk.
+| For any partition you changed the start or size of, writing out
+| the map causes all data on that partition to be LOST FOREVER.
+| Make sure you have a backup of any data on such partitions you
+| want to keep before answering 'yes' to the question below!
+| 
+| Write partition map? [n/y]: <_<y>_>
+| The partition map has been saved successfully!
+| 
+| Syncing disks.
+| 
+| Partition map written to disk. If any partitions on this disk
+| were still in use by the system (see messages above), you will need
+| to reboot in order to utilize the new partition map.
+| 
+| Command (? for help): <_<q>_>
+
+    Now check does kernel recognize new partition table, look at dmesg
+or to /dev directory.
+| [root at ppcrcd ~]$ <_<dmesg | tail -n 1>_>
+|  hda: [mac] hda1 hda2 hda3 hda4 hda5
+| [root at ppcrcd ~]$ <_<ls /dev/hda*>_>
+| /dev/hda  /dev/hda1  /dev/hda2  /dev/hda3  /dev/hda4  /dev/hda5
+
+    If you are mortal debian enemy, or mac-fdisk isn't working for you;
+you can use pdisk or parted for partitioning your disk. pdisk does not differ
+much from mac-fdisk but can guess even less things, and has no 'b' option.
+Using parted you can resize partitions and do other cool things but it is
+dangerous and has some problems with mac disk partition table.
+
+
+= mdadm =
+    mdadm doesn't differ from this on PC's, but you need to know one thing.
+PPCRCD is using udev, so even after loading modules there won't be /dev/md*
+devices in /dev directory; mdadm needs these nods to exist so you will have
+or create them or use --auto option in mdadm and it will create them.
+    Just check example:
+| [root at ppcrcd ~]$ <_<modprobe md>_>
+| [root at ppcrcd ~]$ <_<modprobe raid0>_>
+| [root at ppcrcd ~]$ <_<ls /dev/md*>_>
+| ls: /dev/md*: No such file or directory
+| [root at ppcrcd ~]$ <_<mdadm --create /dev/md0 -l0 -n2 /dev/hda4 /dev/hda5>_>
+| mdadm: error opening /dev/md0: No such file or directory
+| [root at ppcrcd ~]$ <_<mdadm --create /dev/md0 -l0 -n2 /dev/hda4 /dev/hda5 --auto>_>
+| mdadm: array /dev/md0 started.
+| [root at ppcrcd ~]$ <_<ls -l /dev/md*>_>
+| brw-rw----  1 root disk 9, 0 Apr 24 11:11 /dev/md0
+As you can see <*<after>*> creating device it was handled by udev (it has 
+'disk' group, and mdadm uses 'root' as group). You can check it in syslog too:
+| [root at ppcrcd ~]$ <_<grep udev /var/log/syslog | tail -n 1>_>
+| Apr 24 11:11:02 ppcrcd udev[4118]: creating device node '/dev/md0'
+So you don't have to worry about anything, just remember to add --auto, or
+--auto=yes to mdadm.
+
+    And remember to create /boot partition when you use raid different than 0.
+
+= before installing =
+    Now you have to set up networking unless you have some media with rpms
+for ppc, if you have rpms on CD you should start PPCRCD loaded to memory so
+you will be able to use your cd-rom.
+    Else, set up network, if it hasn't started automatically. The easiest
+way to do it is to use 'pldconf', I'm connected to internet throught router
+with IP 192.168.0.2, and it is my local dns server too. I'm doing:
+| Network -> Default gateway -> 192.168.0.2 -> [ Ok ]
+|         -> DNS setup       -> 192.168.0.2 -> [ Ok ]
+|         -> Ethernet cards  ->
+|                         IP address: 192.168.0.5
+|                         Module: sungem
+|                         Mask: 24
+|                         [ ] get from DHCP
+|                                           -> [ Ok ]
+And I have network.
+
+    If you have standard network card and you use dhcp probably it was
+recognized on startup.
+    Try 'dig' to check is everything ok.
+    And if you have other network connection you should be able to
+configure it in PPCRCD, but there's to much to describe, to fit everything
+in this howto.
+
+= installing =
+    For installing I will use this partition table:
+| /dev/hda1 Apple_partition_map Apple       63 @ 1    ( 31.5k) Partition map
+| /dev/hda2     Apple_Bootstrap bootstrap 1600 @ 64   (800.0k  NewWorld bootblock
+| /dev/hda3     Apple_UNIX_SVR2 swap     16384 @ 1664 (  8.0M) Linux swap
+| /dev/hda4     Apple_UNIX_SVR2 root    235648 @ 18048 (115.1M) Linux native
+
+    So let's start to install.
+
+    First format your root partition; it can be ext2/3, riserfs, xfs, jfs.
+Note: reiser4 isn't working well.
+| [root at ppcrcd ~]$ <_<mkfs.reiserfs /dev/hda4>_>
+| ...
+| ReiserFS is successfully created on /dev/hda4.
+
+    Prepare your new root. Perhaps you will have to specify filesystem type
+when mounting. Then check is all correct.
+| [root at ppcrcd ~]$ <_<mkdir /dest>_>
+| [root at ppcrcd ~]$ <_<mount /dev/hda4 /dest/>_>
+| [root at ppcrcd ~]$ <_<df | grep hda4>_>
+| /dev/hda4               117816     32840     84976  28% /dest
+| [root at ppcrcd ~]$ <_<ls /dest/>_>
+| [root at ppcrcd ~]$ <_<touch /dest/ble>_>
+| [root at ppcrcd ~]$ <_<ls -l /dest/>_>
+| ble
+Mount other partitions if you are using separate partition for /usr or /boot.
+
+    Prepare your swap partition too:
+| [root at ppcrcd ~]$ <_<mkswap /dev/hda3>_>
+| Setting up swapspace version 1, size = 8384 kB
+| no label, UUID=d4f4aaa1-dbe0-4b4a-8c78-ba29717a66b1
+Yau should activate it if you don't have much memory. May be useful for
+installation.
+| [root at ppcrcd ~]$ <_<swapon /dev/hda3>_>
+| [root at ppcrcd ~]$ <_<free | grep Swap>_>
+| Swap:         8184          0       8184
+
+    Now edit /etc/poldek.conf file. If you are installing from network you 
+may be interested in changing source to some mirror. If you are instaling
+from other source change change it's location to correct. Write changes.
+
+    Start poldek with /dest as root:
+| [root at ppcrcd ~]$ <_<poldek -r /dest>_>
+| Retrieving ftp://ftp.ppc.ac.pld-linux.org/dists/ac/PLD/ppc/PLD/RPMS/packages.dir.mdd...
+| </<[...]>/>
+| Loading ftp://ftp.ppc.ac.pld-linux.org/dists/ac/ready/ppc/packages.dir.gz...
+| 13145 packages read
+| Removed 18 duplicate packages from available set
+| Loading db packages [/dest/var/lib/rpm]...done
+| 0 packages loaded
+| 
+| Welcome to the poldek shell mode. Type "help" for help with commands.
+
+    Install most necessary packages, those are kernel, yaboot and mdadm
+if us use it. There will be lots of dependencies.
+| poldek> <_<install kernel-2.6.11.6-4 yaboot>_>
+| </<[...]>/>
+| Need to download about 31MB of archives. After unpacking about 62MB will be used.
+| Retrieving ftp://ftp.ppc.ac.pld-linux.org/dists/ac/ready/ppc/kernel-2.6.11.6-4.ppc.rpm...
+| </<[...]>/>
+| Retrieving ftp://ftp.ppc.ac.pld-linux.org/dists/ac/PLD/ppc/PLD/RPMS/setup-2.4.9-1.ppc.rpm...
+| ......................... 100.0% [192.3K (36.2K/s)]
+| Executing rpm --upgrade -vh --root /dest --noorder...
+| Preparing...                ########################################### [100%]
+|    1:setup                  ########################################### [  2%]
+|    2:FHS                    ########################################### [  4%]
+| </<[...]>/>
+|   50:geninitrd              ########################################### [ 98%]
+|   51:kernel                 ########################################### [100%]
+| <*</proc filesystem not mounted, may cause wrong results or failure.
+| ERROR: no argument passed to find_modules_for() - is your /etc/fstab correct?
+| mv: cannot stat `/boot/initrd': No such file or directory>*>
+| </<[...]>/>
+| Installing set #2
+| Processing dependencies...
+| yaboot-1.3.13-2 marks bash-2.05b-17 (cap /bin/bash)
+|   bash-2.05b-17 marks readline-4.3-11 (cap libhistory.so.4)
+| yaboot-1.3.13-2 marks hfsutils-3.2.6-3 (cap hfsutils >= 3.2.0)
+| yaboot-1.3.13-2 marks pmac-utils-2.1-6 (cap pmac-utils)
+| There are 5 packages to install (4 marked by dependencies):
+| I yaboot-1.3.13-2
+| D bash-2.05b-17, hfsutils-3.2.6-3, pmac-utils-2.1-6, readline-4.3-11
+| Need to download about 1MB of archives. After unpacking about 2MB will be used.
+| Retrieving ftp://ftp.ppc.ac.pld-linux.org/dists/ac/PLD/ppc/PLD/RPMS/yaboot-1.3.13-2.ppc.rpm...
+| ......................... 100.0% [145.6K (41.5K/s)]
+| </<[...]>/>
+| Retrieving ftp://ftp.ppc.ac.pld-linux.org/dists/ac/PLD/ppc/PLD/RPMS/readline-4.3-11.ppc.rpm...
+| ......................... 100.0% [163.8K (37.6K/s)]
+| Executing rpm --upgrade -vh --root /dest --noorder...
+| Preparing...                ########################################### [100%]
+|    1:readline               ########################################### [ 20%]
+| </<[...]>/>
+|    5:yaboot                 ########################################### [100%]
+| poldek> quit
+It is normal you will get errors about /proc not mounted when installing kernel.
+
+    Edit /dest/etc/fstab and add your partitions:
+| [root at ppcrcd ~]$ <_<vim /dest/etc/fstab>_>
+| /dev/hda3     swap                swap        defaults                0 0
+| /dev/hda4     /               reiserfs        defaults                1 1
+
+    Edit /dest/etc/mdadm.conf if necessary.
+
+    If you are using udev or devfs in your system bind actual /dev to /dest/dev.
+| [root at ppcrcd ~]$ <_<mount -o bind /dev /dest/dev>_>
+
+    Now chroot to your system. And mount /proc, /sys and /dev/pts.
+| [root at ppcrcd ~]$ <_<chroot /dest/ /bin/bash>_>
+| [root at ppcrcd ~]$ <_<mount /proc/>_>
+| [root at ppcrcd ~]$ <_<mount /sys/>_>
+| [root at ppcrcd ~]$ <_<mount /dev/pts/>_>
+
+    (in chroot) Generate initrd using geninitrd.
+| [root at ppcrcd ~]$ <_<ls -l /boot/>_>
+| total 9821
+| lrwxrwxrwx  1 root root      21 Apr 24 13:56 System.map -> System.map-2.6.11.6-4
+| -rw-r--r--  1 root root  886430 Apr  1 11:17 System.map-2.6.11.6-4
+| lrwxrwxrwx  1 root root      20 Apr 24 13:57 initrd -> <*<initrd-2.6.11.6-4.gz>*>
+| -rw-r--r--  1 root root 4577469 Apr  1 11:17 vmlinux-2.6.11.6-4
+| lrwxrwxrwx  1 root root      18 Apr 24 13:56 vmlinuz -> vmlinuz-2.6.11.6-4
+| -rw-r--r--  1 root root 4577469 Apr  1 11:17 vmlinuz-2.6.11.6-4
+| [root at ppcrcd ~]$ <_<geninitrd /boot/initrd-2.6.11.6-4.gz 2.6.11.6-4>_>
+| WARNING: rootfs on IDE device but no related modules found, loading ide-generic.
+| [root at ppcrcd ~]$ <_<ls /boot/initrd*>_>
+| /boot/initrd  /boot/initrd-2.6.11.6-4.gz
+
+    Configure yaboot now, do it out of chroot as you have editors installed
+there. Edit /dest/etc/yaboot.conf.
+    Important parts:
+| boot=/dev/hda2
+| device=hd:
+| partition=4
+| install=/lib/yaboot/yaboot
+| magicboot=/lib/yaboot/ofboot
+| 
+| image=/boot/vmlinuz
+|         label=PLD
+|         root=/dev/hda4
+| 	initrd=/boot/initrd
+|         read-only
+If you are using raid0 and not /boot as partition= type one of partitions
+formating raid and root=/dev/md0.
+
+    (in chroot) You have to start mkofboot and ybin now, but before it check
+is there $TMP dir, and if not, create it, or change its location, else ybin
+will fail.
+| [root at ppcrcd ~]$ <_<ls $TMP>_>
+| ls: /root/tmp: No such file or directory
+| [root at ppcrcd ~]$ <_<mkdir -p $TMP>_>
+| [root at ppcrcd ~]$ <_<mkofboot>_>
+| 
+| mkofboot: Create hfs filesystem on /dev/hdb2? [y/N] <_<y>_>
+| [root at ppcrcd ~]$ <_<ybin>_>
+
+    If there were no errors everything should work. You can exit from chroot.
+| [root at ppcrcd ~]$ <_<exit>_>
+| exit
+
+    You should install more important packages, like man, poldek, rpm,
+packages needed for your internet connection (eg. eagle-usb), some syslogger,
+pldconf, good editor (vim), your favorite shell and utilities for your
+filesystem.
+| poldek> <_<install poldek vim syslog-ng reiserfsprogs>_>
+Everything else try to install in your new system, after rebooting.
+
+= reboot and viola =


More information about the pld-cvs-commit mailing list