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

Re: Debian on Power 740: yaboot can't open device



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




Am Montag, den 12.09.2011, 17:41 +0300 schrieb Gasha:
> Make sure, you select Power6 compat mode in Processing TAB for this LPAR.
> Otherwise, installer will install 32-bit kernel, which produces errors 
> like this.
> 
> After installation, you can revert back to Power7 mode.
> 
> Gasha
> 
> On 09/12/2011 04:25 PM, Benedikt Wegmann wrote:
> > Thanks everybody for you quick replies.
> > I think I understand the problem better now.
> >
> > I followed the guids and instructions on how to update yaboot from
> > within the installation process. It has worked in so far as that yaboot
> > now gives a version of 1.3.16 when booting the lpar. It now also seems
> > to find and read the kernel image.
> > However, as soon as Linux starts booting the console gets filled with
> > error messages like the ones below (two messages each from different
> > boots).
> >
> > I have never seen this kind of error with Linux before can't make heads
> > or tail whether it is related to yaboot, the kernel the hardware or
> > whatnot. Any ideas?
> > As always, booting rescue64 from the Debian install disk and chroot in
> > the system is all fine, no problems. This is the most confusing aspect.
> >
> > Thanks for all the advise and help.
> > It would benefit my project a lot if I could put this Linux server on an
> > lpar instead a seperate machine.
> >
> > Best regards,
> > Benedikt
> >
> >
> > *****
> > error messages:
> > **
> >
> > Detected bad memory access to address: ffffffffff0f8b98
> > Package path = /aliases
> > Return Stack Trace
> > ------------------
> > @  - c3e530
> > find-method  - c48b9c
> > (poplocals)  - c3c9e8
> > $call-method  - c48c54
> > (poplocals)  - c3c9e8
> > key-fillq  - c491dc
> > ?xoff  - c492e8
> > (poplocals)  - c3c9e8
> > (stdout-write)  - c49914
> > (emit)  - c49a14
> > space  - c47970
> > quit  - c4cc98
> > quit  - c4cb40
> > _syscatch  - c50720
> > _syscatch  - c50720
> > invalid pointer - 388600017d484378
> > invalid pointer - 5508043eb10316b8
> > invalid pointer - 7d0c29ae81230008
> > invalid pointer - a14316b8554ac23e
> > invalid pointer - 7d4931ae90830014
> >
> >
> > Detected bad memory access to address: ffffffffff0f8b98
> > Package path = /packages/boot-mgr
> > Return Stack Trace
> > ------------------
> > @  - c3e530
> > find-method  - c48b9c
> > (poplocals)  - c3c9e8
> > $call-method  - c48c54
> > (poplocals)  - c3c9e8
> > key-fillq  - c491dc
> > ?xoff  - c492e8
> > (poplocals)  - c3c9e8
> > (stdout-write)  - c49914
> > (emit)  - c49a14
> > space  - c47970
> > quit  - c4cc98
> > quit  - c4cb40
> > _syscatch  - c50720
> > _syscatch  - c50720
> > invalid pointer - 388600017d484378
> > invalid pointer - 5508043eb10316b8
> > invalid pointer - 7d0c29ae81230008
> > invalid pointer - a14316b8554ac23e
> > invalid pointer - 7d4931ae90830014
> >
> >
> > *****
> >
> >
> >
> >
> >
> >
> > Am Mittwoch, den 07.09.2011, 16:27 +0300 schrieb Gasha:
> >    
> >> short:
> >> install yaboot 1.3.16 (from latest/unstable)
> >>
> >> long:
> >> see e-mail from 24.08.2011 in list archives
> >> subject:
> >> Debian 6.0.2 on Power7 LPAR - it work - little howto
> >>
> >> Gasha
> >>
> >> On 09/07/2011 03:56 PM, Benedikt Wegmann wrote:
> >>      
> >>> Hello everybody!
> >>>
> >>> I'm in the process of installing Debian Stable on a Power 740 system.
> >>> I'm familiar with the installation on x86 systems and the installation
> >>> process of Debian ppc thus looked familiar.
> >>>
> >>> I installed using the "install64" option. Disk partition was "guided -
> >>> use whole disk, with separate /home". Installation concluded
> >>> successfully but after a reboot yaboot loads and offers the choice of
> >>> "Linux" and "old" - as per standard configuration I learned - but
> >>> booting "Linux" fails:
> >>>
> >>> Config file read, 4096 bytes
> >>>
> >>> Welcome to yaboot version 1.3.13
> >>> Enter "help" to get some basic usage information
> >>> boot:
> >>>     Linux                      old
> >>> boot:
> >>> Please wait, loading kernel...
> >>> Can't open device</vdevice/v-scsi@30000002/@1:0>
> >>> /vdevice/v-scsi@30000002/@1:2,/boot/vmlinux: Unable to open file, Invalid device
> >>> boot:
> >>>
> >>> The device however is valid - I can see it in the SMS menu - and I can
> >>> successfully boot into the rescue system via the Debian cd ("rescue64")
> >>> and subsequently chroot into my installed system, no problem.
> >>> However, I can never boot straight into it with yaboot.
> >>>
> >>> Some information about the system:
> >>>
> >>> root@debian:/# cat /proc/partitions
> >>> major minor  #blocks  name
> >>>
> >>>      8        0    6291456 sda
> >>>      8        1       7168 sda1
> >>>      8        2    1902592 sda2
> >>>      8        3          1 sda3
> >>>      8        5     262144 sda5
> >>>      8        6    4115456 sda6
> >>>
> >>>
> >>> root@debian:/# cat /etc/yaboot.conf
> >>> ## yaboot.conf generated by debian-installer
> >>> ##
> >>> ## run: "man yaboot.conf" for details. Do not make changes until you have!!
> >>> ## see also: /usr/share/doc/yaboot/examples for example configurations.
> >>> ##
> >>> ## For a dual-boot menu, add one or more of:
> >>> ## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ
> >>>
> >>> boot="/dev/disk/by-id/scsi-SAIX_VDASD_00f6c18700004c0000000130f6e6a926.4-part1"
> >>> device=/vdevice/v-scsi@30000002/@1
> >>> partition=2
> >>> root="UUID=1017dfc6-257e-433f-9247-6676b732630a"
> >>> timeout=50
> >>> install=/usr/lib/yaboot/yaboot
> >>> enablecdboot
> >>>
> >>> image=/boot/vmlinux
> >>>           label=Linux
> >>>           read-only
> >>>           initrd=/boot/initrd.img
> >>>
> >>> image=/boot/vmlinux.old
> >>>           label=old
> >>>           read-only
> >>>           initrd=/boot/initrd.img.old
> >>> root@debian:/#
> >>>
> >>>
> >>> root@debian:/# mount
> >>> /dev/sda2 on / type ext3 (rw,relatime,errors=remount-ro,data=ordered)
> >>> /dev/sda6 on /home type ext3 (rw,relatime,errors=continue,data=ordered)
> >>> tmpfs on /dev type tmpfs (rw,relatime,mode=755)
> >>> proc on /proc type proc (rw,relatime)
> >>> sysfs on /sys type sysfs (rw,relatime)
> >>> devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
> >>>
> >>>
> >>> root@debian:/# ls -lR /boot/
> >>> /boot/:
> >>> total 18364
> >>> -rw-r--r-- 1 root root  1214811 Jun 14 14:44 System.map-2.6.32-5-powerpc-smp
> >>> -rw-r--r-- 1 root root    93218 Jun 14 14:44 config-2.6.32-5-powerpc-smp
> >>> lrwxrwxrwx 1 root root       31 Sep  7 09:44 initrd.img ->   initrd.img-2.6.32-5-powerpc-smp
> >>> -rw-r--r-- 1 root root 10216212 Sep  7 09:44 initrd.img-2.6.32-5-powerpc-smp
> >>> lrwxrwxrwx 1 root root       28 Sep  7 09:44 vmlinux ->   vmlinux-2.6.32-5-powerpc-smp
> >>> -rw-r--r-- 1 root root  7233739 Jun 14 14:44 vmlinux-2.6.32-5-powerpc-smp
> >>>
> >>>
> >>> root@debian:/# uname -a
> >>> Linux debian 2.6.32-5-powerpc64 #1 SMP Tue Jun 14 11:04:52 UTC 2011 ppc64 GNU/Linux
> >>>
> >>>
> >>> I'm at a loss as to what the problem might be. The installation looks
> >>> fine within the chroot environment, I just can't get it to boot.
> >>>
> >>> I also tried an install as per the wiki site
> >>> (https://www.ibm.com/developerworks/mydeveloperworks/wikis/home?lang=en#/wiki/Debian%206%20on%20Power7%20LPAR/page/Start%20installation) with updating yaboot during the install as described but without lick. The only aspect where my install differs is with regard to the use of multipath. I use a plain old scsi disk and only have one VIOS in the machine.
> >>>
> >>> Any suggestions would be much appreciated.
> >>> Thanks!
> >>>
> >>>
> >>>
> >>>        
> >>
> >>      
> >    
> 
> 

-- 
Benedikt Wegmann
benedikt.wegmann@gwdg.de
+49 (0)551 201-1870
bwegman1@jabber.gwdg.de

.........................
Gesellschaft für wissenschaftliche Datenverarbeitung mbH Göttingen
(GWDG)
Am Fassberg 11, 37077 Göttingen
URL: http://www.gwdg.de <http://www.gwdg.de/> , E-Mail: gwdg@gwdg.de
Tel.: +49 (0)551 201-1510, Fax: +49 (0)551 201-2150
Geschäftsführer: Prof. Dr. Oswald Haan, Dr. Paul Suren
Aufsichtsratsvorsitzender: Prof. Dr. Christian Griesinger
Sitz der Gesellschaft: Göttingen, Registergericht: Göttingen
Handelsregister-Nr. B 598
.........................
Die digitale Unterschrift dieser Mail kann anhand des Zertifikats des
DFN überprüft werden:
https://ca.gwdg.de/certs/

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Reply to: