zongyongchun 发表于 2005-2-17 09:35:03

在IBM RS6000下怎么安装Gentoo?

机型7025-F50,我不清楚引导部分该怎么弄?
上次在ibm的中文网站上看到一篇,很不幸,现在找不到了……
TLDP上有IBM 7248-howto,但是他没有介绍Gentoo,而且机型不同。

linky_fan 发表于 2005-2-18 19:54:01

How I got Gentoo PPC on an IBM RS/6000 B50:
   1. Followed RS6000 boot disk build instructions from Rocklinux(http://www.rocklinux.net):
      Make boot disk with Kernel Image:
      
      mformat a:
      mcopy <Kernel-Image> a:zimage
      
      Burned the live.iso image from Gentoo PPC install cdrom at gentoo.org. Note this is a root ppc linux system, and not the original iso you download. IE, the live.iso is inside the Gentoo PPC install downloaded iso.

   2. Boot the RS/6000, and when Boot-Up Icons come up (Listen for a IBM boot up sound), Hit F8 to enter the Open Firmware. Prompt is a ">"; Type:
      
      boot floppy:,\ZIMAGE root=/dev/scd0 load_ramdisk=1
      
   3. This will load the kernel image from your floppy... then it'll attempt to mount root image off of the cdrom. If it all works, you'll see Gentoo booting up, but with some read-only type of errors. No show stoppers tho. Login as root, <enter> for a password.

   4. Because root (and /etc/) is mounted read-only, I can't setup DNS and resolv.conf file. So, below I created a ramdisk, copied /etc contents there, then over- mounted the ramdisk on top of /etc. See file:/usr/src/linux/Documentation/ramdisk.txt.
      
      dd if=/dev/zero of=/dev/ram2 bs=1k count=4096
      mke2fs -vm0 /dev/ram2 4096
      mount /dev/ram2 /mnt
      cp -prdv /etc /mnt
      umount /mnt
      mount /dev/ram2 /etc
      
      You may need to do this for /var too?!

   5. Now we can setup networking. The B50 has an AMD PCNet32 ethernet chip. Check "dmesg" output to make sure it was detected. For some reason my eth0 device didn't have a MAC address... so I picked one out of thin air:
      
      ifconfig eth0 hw ether 01:02:03:04:05:06
      
   6. Now you can continue with the regular Gentoo PPC Installation Steps to build a basic Stage1 system, which briefly are:
      
      /sbin/ifconfig $IFACE $IPNUM broadcast $BCAST netmask $NMASK
      /sbin/route add -net default gw $GTWAY netmask 0.0.0.0 metric 1
      ping -c 2 gentoo.org && echo hurray!
      fdisk /dev/sda # Create sda1 type=41, sda2 type=82, sda3 type=83
      mkswap /dev/sda2 && swapon /dev/sda2
      mke2fs /dev/sda3 && mount /dev/sda3 /mnt
      cd /mnt && wget <URL-of-gentoo-ppc-stage1, see reference>
      tar -xvjpf stage1-*.tbz2
      mount -o bind /proc /mnt
      cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
      chroot /mnt /bin/bash
      env-update
      source /etc/profile
      emerge rsync
      
   7. The promise of a Gentoo system is that it's highly optimized for your CPU. Edit the /etc/make.conf "nano -w FILENAME" and set below variables. These values are specific to a B50, and may be different for you. Check CPU info with "cat /proc/cpuinfo". Gcc options taken from http://www.dis.com/gnu/gcc/gcc_32.html#SEC32:
      
      CFLAGS=" -O2 -pipe -mpowerpc-gpopt -mcpu=604 -mmultiple -mstring "
      
   8. Now continue on with Stage2 stuff. See Rocklinux for a guide on the Kernel options. Get fancy by copying it to /usr/src/linux/.config and running "make oldconfig" then make menuconfig:
      
      cd /usr/portage
      scripts/bootstrap.sh
      emerge system
      ln -sf /usr/share/zoneinfo/path/to/timezonefile /etc/localtime
      emerge sys-kernel/ppc-sources
      make menuconfig
      make dep && make clean vmlinux modules modules_install
      cp vmlinux System.map /boot
      emerge app-admin/metalog
      rc-update add metalog default
      emerge sys-apps/vcron
      crontab /etc/crontab
      emerge vim
      
   9. Setup your mounts in /etc/fstab (/dev/sda3 is root /dev/sda2 is swap):
      
      vi /etc/fstab
      
10. Optionally Config /etc/yaboot.conf to point at your /boot/kernel and Install yaboot loader:
      
      dd if=/usr/lib/yaboot/yaboot of=/dev/sda1
      
      Or if you're like me, and couldnt get yaboot to work:
      
      dd if=/boot/kernel of=/dev/sda1
      
11. Finally, reboot to OpenFirmware, and run commands:
      
      setenv boot-device disk:1
      setenv boot-file root=/dev/sda3
      boot
      

References:

Stage-1-PPC-1.2 tarball

http://adequat.c2a.fr/linux/howtos/rs6000

http://www.fifi.org/doc/HOWTO/en-html/IBM7248-HOWTO/

http://www.solinno.co.uk/7043-140/walkthrough/suse73inst/

http://distro.ibiblio.org/pub/Linux/distributions/yellowdog/old_releases/champion-1.2/ppc/install/CHRP/

cnhnln 发表于 2005-2-18 20:59:43

RS6000 :shock: 羡慕一个

zongyongchun 发表于 2005-2-19 21:10:34

linky_fan:

那篇文章,我看过,可是它的核心文件链接已经丢失。

你能给我解释一下什么是PREP和CHRP吗?

谢谢!

zongyongchun 发表于 2005-2-19 21:14:20

RS6000 :shock: 羡慕一个


没什么好羡慕的,公司的烂机器一个,166Mhz,256k L2.

linky_fan 发表于 2005-2-19 22:08:17


Installing ROCK Linux on IBM RS/6000 B50 Servers               Clifford Wolf
================================================                  2000-10-15


Step 1. Prepare for Installation
--------------------------------

You need:

* An RS/6000 B50 Server
* A ROCK Linux for PowerPC CD-ROM
* Two 3.5" 1.44 MB floppy disks

First lets create a boot disk: Create an MS-DOS filesystem on the 1st floppy,
download an RS/6000 B50 Kernel Image from http://www.rocklinux.org/projects/
powerpc/powerpc.html and put it as 'zImage' on the floppy:

# mformat a:
# wget <URL-of-Kernel-Image>
# mcopy <Kernel-Image> a:zImage

Next let's create the root disk. A pre-built disk image can be found on the
CD-ROM. So just mount it and create the floppy like this:

# dd if=rock-powerpc-<version>/floppies/root-disk-small.img of=/dev/floppy/0

Now we can start the installation.


Step 2. Booting the Install System
----------------------------------

Turn on your B50 and wait for the boot screen (that may take a while). When you
see the boot screen, there will be icons popping up for various subsystems. As
soon as you see the keyboard icon, press F8 to enter the OpenFirmware.

Now insert the boot floppy and boot Linux by typing:

0 > boot floppy:,zImage root=/dev/fd load_ramdisk=1

Insert the root floppy when the Linux Kernel asks for it and press enter. When
the system asks you for a list of terminal devices, just press enter to use the
default values.


Step 3. Installing ROCK Linux
-----------------------------

This step is described in detail in the file 'Documentation/INSTALL' which
is included with ROCK Linux. Just the highlights again:

* Create the partition table with 'fdisk'
* Mount the target filesystem tree at /trg
* Mount the source media (CD-ROM) at /src
* Install with the 'Install' command
* Configure the system and unmount /trg

The first partition on the first hard disk must be a small (let's say 5 MB)
partition of the type 'PPC PReP Boot' (Id 41). It will contain the Linux
Kernel Image. Insert the boot floppy again and copy the Kernel Image to the
partition:

# mount -t msdos /dev/floppy/0 /mnt
# dd if=/mnt/zImage of=/dev/discs/disc0/part1
# umount /mnt

Now you can reboot and finish the installation.


Step 4. OpenFirmware Boot Configuration
---------------------------------------

Reboot and (again) enter OpenFirmware with F8. Now we need to tell the system
which kernel to boot on default and which kernel options should be used. If
your root partition is the second partition on the first hard disk, simply enter
the following OpenFirmware commands:

0 > setenv boot-device disk:1
0 > setenv boot-file root=/dev/discs/disc0/part2

and boot the system with

0 > boot

From now on it will automatically boot with those parameters. If you need any
other kernel parameters, just append them to the 'setenv boot-file ..' line.

Have a lot of fun with ROCK Linux on your RS/6000 B50.

- Clifford Wolf

去官方网站上转了一圈,只找到这句话,晕

Get in touch with Tom Gall, [email protected] for rs6000 and general IBM machines support


你能给我解释一下什么是PREP 和CHRP吗?

Sorry, i cant give some useful idea here. i am a stranger too (in RSIC)

zongyongchun 发表于 2005-2-20 17:37:08

Thank you all the same! :P

ajinn 发表于 2005-2-23 20:39:26

玩大了

zongyongchun 发表于 2005-6-29 14:35:24

现在终于有了新的进展!
Gentoo Linux PPC-32bit 2004.3
开机,E1F1-->F1,SMS-->进入ok>,
ok>devalias //可以列出所有设备别名
ok>boot cdrom:,\boot\pegasos /*ok,32位的pegasos核心开始引导,但是某些原因
,还是有其它的问题,我最终停留在这里;doc里有个pegasos readme,大概就是说核心后面不需要加任何参数,核心中已经加入了一些参数;*/

zongyongchun 发表于 2005-6-29 14:44:12

FC4-PPC发布了,我单下载了http://mirror.pacific.net.au/linux/redhat/fedora/4/ppc/os/images/pseries/boot.iso这个引导镜像,SMS里直接选者从CDROM引导安装,可以看见光盘格式被系统识别,能够正常引导进入yaboot,可惜,里面所给的核心是64-bit的,是给更高端的新机器用的.

我再考虑学着做FC4-PPC的iso格式,把gentoo ppc 32-bit 的pegasos核心放进去,目前没有进一步进展.

已经下载了gentoo ppc 2005.0,没有做进一步的试验.

等着我的好消息吧!

linky_fan 发表于 2005-6-29 22:37:29

:wink::wink:

zongyongchun 发表于 2005-7-22 10:16:23

接着来聊一聊,最近没什么新的进展,但是,我完全清楚了为什么以前一些不可引导的内核,现在都可以引导了;

我以前下载过许多ppc的linux版本,yellow dog 3.0.1,Gentoo PPC 2004.3,2005.0,Debian PPC sarge ,Fedora 4 PPC,以及一些国外pegasos社区的版本,废话少说,看看我以前和现在所做的步骤区别吧!

这里以Yellow Dog 3.0.1为例:

以前:
ok>boot cdrom:,\boot\vmlinux-2.4.22-2f

(这里顺便说一下vmlinux-2.4.22-2f与vmlinux-2.4.22-2fBOOT的区别:
vmlinux-2.4.22-2f 仅仅是一个linux内核,
vmlinux-2.4.22-2fBOOT是Yellow Dog 的安装内核,这个我也不是很清楚,是看的yaboot.conf里的信息猜测的,但是两个内核我都试过了。)

这里肯定不能引导,大概是因为内核大小超出限制,玩过pxe远程引导的人可能比较清楚关于大小的说法;但是你用gentoo ppc 里的pegasos就可以,可能因为那个内核小,或是做过一些处理?

现在:
(其实,也就是在遇到上述的不可直接引导的内核时,我的语言有些外行,大家请见谅,据说IBM没有公布关于RS6000系列的老的PCI架构的技术,所以,以这台cpu为32位604e的F50为例,支持他的linux少之又少,这些信息,我好像是在debian里看到的,当然debian里有人重新自己编译了内核,结果成功在F50上运行起了sarge.)

ok>dir cdrom:,\
ok>boot cdrom:,\boot\yaboot

boot:cdrom:,/boot/vmlinux-2.4.22-2f

好了,这里至少你可以看见一个linux的内核引导起来,运行起来了,

Linux can runs anywhere!

zongyongchun 发表于 2005-7-22 10:45:32

先保存一下,说话没什么逻辑顺序……

我发现

dir cdrom:,\

这条命令很有用,可以让你看见光盘目录和文件,由于OF只能把cdrom识别为iso9660的格式,所以一些文件的名字到了Open Firmware里可能会变得和以前不一样,这里要注意,文件名如果输入错误的话,还怎么可能引导呢?

上一篇说了yaboot引导器的功能,呵呵,可能是我现在才清楚引导器有什么用,顺便说一下,这个yaboot和lilo,grub是一样的概念。

其实,fedora 4 ppc 有为chrp类型的机器做内核,而且光盘结构符合RS6000 OF里yaboot 的使用情况,因为它的光盘根目录里有/etc/yaboot.conf,yaboot 可以直接读到配置文件;但是这chrp的内核只为新的高端机器所设,比如p630,而且是纯64位内核,你可以看见在32位的F50上yaboot引导时显示为ELF64,所以我想在新的RS6000 p系列的机器上安装linux将会很容易,因为有很多版本可以直接支持,比如fedora 4 ppc ,novell suse,gentoo,yellow dog,总之是我前面试过的不可能的版本,都会有可能。

zongyongchun 发表于 2005-7-22 11:16:59

上面说到

dir cdrom:,\

这条命令,所以有了这条命令,你可以不必重新去制作iso,重新调整光盘的目录结构,

以使yaboot.conf 所在的位置符合yaboot默认的读取要求;当然这里我仅仅是测试内核

能不能引导起来,所以忽略了ramdisk,或者叫initrd,如果你的内核能完全识别f50的总线结构,到了只需要进行initrd的时候,你就需要知道内核后面要接什么参数了,如果觉得参数敲得麻烦,写进yaboot.conf里,然后重新制作iso文件,刻盘引导,让yaboot管理器去处理这一切,倒是也很方便。

所以,这里我就没有继续去研究fedora 4 ppc 的iso制作方式,其实也很简单,只要是iso9660的格式就可以了,另外加上rockridge格式就行了;你不要以为我说的是那个FC4-ppc-disc1.iso 631M的文件,我说的是里面的images\pseries\boot.iso,不信,你用winrar打开一下,是不是打不开,但是ultraiso没问题,isobuster也没问题,更没问题的是OF,我猜是在linux下用mkiso做时参数的顺序影响了索引表??里面的mac,mac64里的boot.iso一样不能被winrar打开,,谁能告诉我为什么??这几个文件的格式明明和FC4-ppc-disc1.iso的格式一样啊?而且winrar支持iso9660.


还有没测试的版本有novell suse ppc ,因为很难下载,,redflag ppc,因为无法得到,话说回来,其实我们国家的redflag已经做的相当不错,又人性化,初学者不失为一个好选择。manderake ppc ,没空去找。

zongyongchun 发表于 2005-7-22 11:30:37

总之现在没什么新的进展,唯一得到的结论就是新的p系列将很容易安装linux,

而且,对老的p系列,了解的不少。

/*这里谈一下F50的历史,他是prep和chrp之交的产物,所以他没什么规范可言,

他的OF和普遍的mac,pegasos等都不同,不存在什么1.0,2.0

他和老式prep有很多共性,交界之期的产物通常是这样。*/

话说回来,我没有试过prep版的ppc.

以上纯属个人理解,且勿影响正确的真理。
页: [1] 2
查看完整版本: 在IBM RS6000下怎么安装Gentoo?