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

booting from disk on a rs6000 model 43p-150 SOLVED


A while back I sent a note to this list detailing my procedure for booting
my RS6K from the network.  RE:

Now, I have a RS6K which boots from disk!

I could not have gotten this to work without the gracious help of
Hollis Blanchard, benh, and others in the #mklinux and #debianppc
channels on freenode.

Below is a copy of my unedited notes.  For now, I am keeping a copy
of these notes at this URL:

Notes about linux on a RS/6000 Model 43p 150

These are my notes from working with linux on the 150.  At this time, it is
unedited.  If you are only interested in the settings/procedure for booting 
from disk, skip to the bottom.

Things which should work and I was able to verify:
	kernel 2.4.19
	kernel 2.6.3
	boot from network
	boot from disk.

Things which should work but I was unable to verify:
	X windows

How to access the openfirmware prompt:

	Press F8 as soon you see hear the first beep and see the icons in
	open firmware.  The last icon shown at this time is the scsi icon.  Later, the
	speaker icon will display and it will play the first few notes of a song.  If
	you haven't pressed F8 by the time the song plays it is too late and it will
	try to boot the OS.

How to access the openfirmware sms menu:

	Press F1.

Notes about openfirmware:
	location of the official reference:

	In open firmware "boot disk" works with the kernel image at the top of the 
	linux src tree.  ie. Use /usr/src/linux/vmlinux in conjunction with 
	yaboot to boot from disk.  In open firmware, "boot net" works with the kernel
	image in /usr/src/linux/arch/ppc/boot/images/zImage.chrp-rs6k

		shows the device tree

		show info about the current device node?

		shows the pci functions

	dev /pci
		moves you to the /pci node.

	dev /
		takes you to the root node.

	ls dev/pci

		ls won't do anything now.

	devalias shows the device alias list.

	devalias can also be used to specify an alias.
		In my setup, I have the following:
			SCSI ID 3 = cdrom  aka linux /dev/cdrom
			SCSI ID 4 = disk1  aka linux /dev/sda
			SCSI ID 5 = disk2  aka linux /dev/sdb
			SCSI ID 6 = disk3  aka linux /dev/sdc
		devalias disk /pci@80000000/scsi@10/sd@5,0 
			will set the boot disk to be disk2.  Note, I could not get this setting
			stick between power cycles.  ie. I had to set it each time I powered on 
			and off the unit.  Afterwards, I learned that you can set this using SMS
			via the select boot sequence menu.

	boot net
		boots kernel via network using tftp.  If you dont have the dhcpd server
		running prior to issuing the boot net command, it will not work even
		though it seems likes it trying to retry the operation.  When I was
		using tcpdump, I never saw any packets so I wonder what its doing.
		Shows you the settings for a particular variable.  You can issue the
		command without arguments if you want to see all settings.  Or, you
		can issue the command with arguments if you want to see a particular
		setting.  ie. printenv boot-file will display only the value
		of the boot-file variable.

	setenv  <variable> <value>
		allows you to set a variable.

	how do you interrupt the boot net command?

	How do you unset a setenv string?  	
		setenv boot-file <cr>

Video Cards:
	The box shipped with a Fire GL1 video card.  I don't know what the model 
	number is but that's what it showed when I did a lspci.   It worked well
	in console except it didn't seem to scroll very fast.  I also could not
	get X to work with it.

	I swapped it out with an ATI pci rage video card for mac.  Since its a mac
	it will show the openfirmware screen when the rs6k boots.  I've been told
	you can use a pc version card once you get to linux, but it will not display
	the open firmware screens.  Anyway, this card has a slightly different look
	but it updates the screen faster.  I have not been able to get it work with
	X however.  That is a todo.

Partition tools info:
	cfdisk works
	fdisk, pdisk does not.
		Actually, fdisk will work but it will complain about the AIX disk label.
		Then it will not print the partition info created with cfdisk.  So, 
		use fdisk to create the intial "dos label".  Then use cfdisk later
		if you want the simplicity of cfdisk.

		yabootconfig will complain about a missing prep partition even though
		it exists if the AIX disk label remains on the disk.  ie. if you create
		the partition using cfdisk you will lose.  You must create the partition
		with fdisk.

Notes about getting package not found error:
	Hit f1 to get sms menu.
	Hit select software and get "word called in boot-manager package not found"
	Failed to Boot
	0 >	_

	The fix is to go to sms and select boot sequence.  Make sure the first disk is
	the one with yaboot installed.

Things which I found helpful to read (in order of relevance):
	HOWTO-Booting with Yaboot on PowerPC
		That is the exact title.
	RS6000 yaboot notes by engebret@us.ibm.com and bergner@us.ibm.com.
		This was in my yaboot docs dir on Debian linux.  The file was
		called README.rs6000  I used their exact partition scheme.
	man yabootconfig
	man yaboot.conf
	man ybin
	man yaboot

How to get the rs6k to boot from disk.

	I probably did this the most insane way possible.  I installed my rs6k
	by first booting from net and used a floppy disk as my root filesystem.
	Then I used a debian ppc cdrom to get my base install on the hard disk.
	Because I didn't know how to partition the disk correctly, I had a working
	root filesystem via the hard disk but it would not allow me to boot from the

	See my debian mailing list post on how I did that.  

	Later, I created a proper partitioned disk on my second disk using the 
	README.rs6000 file described above as my guide.  I used fdisk to create the
	partitions because fdisk will erase the AIX label.  (see note above about fdisk
	and cfdisk.)

	After I had booted linux via network and partitioned the disk, I put linux in 
	single user mode and mirrored the entire filesystem (except /proc, /mnt, /tmp) 
	onto the second disk.  
	(My exact syntax was: tar -c `cat dirlist` -C /| tar -x -C /mnt/disk2)
	Note, once I had the rs6k booting from disk2, I remirrored it back to disk1
	with a proper partitioned disk.  Gotchas for the partitioning is that
	the prep partition needs to be less than 10MB, the partition needs to be
	bootable, and it needs to be the first partition.  (In my case, I made it

	Then I ran yabootconfig to install yaboot and kernel.  I had to edit the 
	yabootconfig script so that it would not try to perform the write to
	nvram since it would hang on my particular kernel level.  This is done
	by adding --nonvram.  ie. do this:
		mkofboot -f $YBINARGS --nonvram || exit 1

	Once you run yabootconfig, it will create a /etc/yaboot.conf file, copy the 
	yaboot boot loader to the prep partition, and enable you to boot the linux
	kernel you specified.  If you add changes to the /etc/yaboot.conf file so that
	you can boot a second kernel, do not rerun yabootconfig because it will erase
	your existing file instead of adding to it.  Instead run ybin.  Also, if you
	intend to run ybin, you should add the nonvram switch to the config file
	like they do in the README.rs6000 file.

	For reference, here is my final /etc/yaboot.conf file:




	Here is how my links for /vmlinux and /vmlinux.old look:

	r6:~# ls -l /vmlinux*
	lrwxrwxrwx    1 root     root           19 Mar 15 22:10 /vmlinux -> /boot/vmlinux-2.6.3
	lrwxr-xr-x    1 root     root           23 Mar 20 05:12 /vmlinux.old -> /boot/vmlinux-2.4

	Here is how my disk is partitioned:

	fdisk output:

	Disk /dev/sda: 18.2 GB, 18200739840 bytes
	64 heads, 32 sectors/track, 17357 cylinders
	Units = cylinders of 2048 * 512 = 1048576 bytes

   Device Boot      Start         End      Blocks   Id  System
	/dev/sda1   *           1           2        2032   41  PPC PReP Boot
	/dev/sda2               3       17168    17577984   83  Linux
	/dev/sda3           17169       17357      193536   82  Linux swap

	cfdisk output:

     Name           Flags         Part Type    FS Type              [Label]            Size (MB)
     sda1           Boot           Primary     PPC PReP Boot                                2.10
     sda2                          Primary     Linux ext3                               17999.86
     sda3                          Primary     Linux swap                                 198.19

	Here are my open firmware settings:

	printenv boot-file
		ie. its blank.
	printenv boot-device
		/pci@80000000/scsi@10/sd@4 /pci@80000000/ethernet@c /pci@80000000/scsi@10/sd@3:1,\ppcbootinfo.txt 
		/pci@80000000/isa@b/fdc@i3f0/disk@0 /pci@80000000/scsi@10/sd@5 
		This is to much to type in by hand. It was generated via sms menu.  However, it means boot from
		scsi disk id=4 first, then network, then cdrom, then floppy disk, and then scsi disk id=5.
		Looking at it in more detail, I think it means pci device, address 0x8000 0000, scsi, LUN 10 maybe,
		ID 4.  On the cdrom, it looks like it selecting partition 1.  I don't how it intends to boot from
		the text file though?

	devalias disk 
		devalias disk /pci@80000000/scsi10/sd@4,0
		This means to boot from scsi id 4 using partition 1 (its zero based count) ie the prep partition.
		If you want to boot from disk id=5 (/dev/sdb) you need to change this to sd@5,0. Once again, you can
		do this via sms or openfirmware using devalias command.


Happy Trails	

John F. Davis
ABC #6334 1992 R100GSPD                                  Durham, North Carolina

Reply to: