Debian on Power 740
Thanks a lot!!! That was the missing piece of the puzzle. I have Debian 6 now running on a Power 740 LPAR, booting correctly with Software RAID, LVM, the works. Thank you all for tips, howtos and pdf-guides. This helped me a lot to better understand the problem, yaboot (knew only Grub before) and the PPC boot process. For documentation purposes here the details of what I did: - created an LPAR with 2 hard disks and compatibility mode "power 6" - downloaded Debian 6 netinstall cd (http://cdimage.debian.org/debian-cd/6.0.2.1/powerpc/iso-cd/) - uploaded it to the IVM and put it into the "optical media library", assigned it to the LPAR - activated the LPAR, opend SMS menu, selected cd as boot medium and did a normal boot - selected "expert64" in the boot manager and performed a normal installation till partitioning - partitioned the first hdd with a prep-boot partition (~7MB), second a boot partition for the kernels (~100MB), rest as logical partition for LVM, with logical volumes for swap, root and home and whatever else is desired. - continue installation until prompted for the boot loader installation. Switched with "exit" to main menu and selected "execute a shell". - chroot to /target. - downloaded and installed newer yaboot from http://ftp.debian.org/pool/main/y/yaboot/ - exit chroot and shell back to the installer, install the boot loader and before exit installation go back to main menu, select to start a shell again and chroot again. - edit /etc/yaboot.conf to this: boot=/dev/sda1 root="/dev/mapper/rootvg-root" timeout=50 install=/usr/lib/yaboot/yaboot enablecdboot image=/vmlinux label=Linux read-only initrd=/initrd.img image=/vmlinux.old label=old read-only initrd=/initrd.img.old where "boot" must point to the partition with the kernel images (i.e. what gets mounted as /boot later), root must point to the logical volume of the root file system (here it is LV "root" in VG "rootvg"), the "image" and "initrd" paths must point to the kernel and initial ramdisk on the disk identified by "boot" (hence the "/vmlinux" and not "/boot/vmlinux", the later is just the mounted path). - save yaboot.conf and install yaboot again with new configuration with "ybin" - to make sure that yaboot later definitely finds its config, make an /boot/etc/ and copy /etc/yaboot.conf to /boot/etc/yaboot.conf (yaboot initially only has the disk under "boot" available and can't access LVs, hence the copy). - exit back to the installer and finish installation with subsequent reboot. Now the LPAR boots to yaboot on the disk (first disk, first prep partition) and after a small delay it boots the "Linux" entry from yaboot.conf, doing the normal Linux startup. If you have created a second hdd and want to use it for redundancy, do the following: - install packages "gnu-fdisk" and "mdadm" - (careful!!! check for correct devices in the next steps!) get the partition information from the first hdd: "sfdisk -d /dev/sda
/tmp/part.txt" and apply it to the second hdd "sfdisk /dev/sdb
</tmp/part.txt". If sfdisk complains, force the change. - copy the prep partition from the first hdd to the second: dd if=/dev/sda1 of=/dev/sdb1 bs=1024 - unmount /boot, copy it to the second hdd and remount: dd if=/dev/sda2 of=/dev/sdb2 bs=1024 Now in case of a fatal error with the first hdd you should be able select the second hdd and its prep partition from the SMS menu, do a "normal boot". yaboot supposedly looks on the disk for the first primary partition with the boot flag of which there is also one on sdb, it got copied there earlier. - now create a software RAID with one missing device, (RAID1 in this example): mdadm --create --verbose /dev/md0 --auto=yes --level=1 --raid-devices=2 /dev/sdb5 missing - make the md0 a physical volume for LVM: pvcreate /dev/md0 - move the rootvg (and any additional VGs) to the RAID: pvmove /dev/sda5 /dev/md0 - remove sda5 from the VGs as it will become part of the RAID next: vgreduce rootvg /dev/sda5 - add the now free sda5 to the RAID making it complete: mdadm --add /dev/md1 /dev/sda5 Thats it! After your RAID has synced everything is good to go. Should one drive fail the RAID will keep the VGs running and you can still boot from the copy of the preg and boot partition. Cheers! Benedikt
© 2002-2012 Jeroen Diederen. Drupal theme by Kiwi Themes.