Re: MDK8 installation on an RS/6000?

2002-03-09 Thread Todd Inglett

Stew Benedict wrote:

>On Tue, 5 Mar 2002, Tirs Abril wrote:
>
>>Hi everybody! After almost six months working in a project abroad, I am back 
>>home and I'm continuing what I left, namely the installation of Mandrake 
>>Linux 8.0 PPC on an IBM RS/6000 43P-150.
>>
>>My question is very simple: Where do I begin? I have the two CDs, and none of 
>>them boot. I am afraid maybe they are intended for a MacIntosh BIOS and I 
>>have been looking for a bootable floppy image or something similar, but I 
>>couldn't find it. Can somebody put me on track? Is there anybody out there 
>>who has installed Mandrake PPC on an RS/6000 and wants to share experiences?
>>
>
>We did have someone on the list who was working their way through this,
>and I made some diskdrake changes to accomodate those machines, but they
>dropped out so the project never finished, as I don't have hardware here.
>They had rolled their own kernel/bootdisk to get the install kicked off.
>
That would be me :).  The 43P-150 should be the easy one to get going. 
 The only thing I see wrong is with yaboot.  You will need a yaboot 
modified for the IBM machines(*) and paths in yaboot.conf must refer to 
"cdrom" instead of "cd".

A better approach to start with an IBM box would be to make a 
zImage.initrd.chrp-rs6k (containing all.rdz-2.4.13-12mdkBOOT).  The 
43P-150 boots as chrp.  Hit F8 on boot to get to the open firmware prompt.

-todd

(*) yaboot must have a "note" that declares that it runs in "real mode" 
which is how IBM OpenFirmware runs (as opposed to Macs which run in 
"virtual mode").  The trouble is that if you use a mac yaboot on an IBM 
box or vice-versa you can really screw up the firmware (pulling the cmos 
battery fixes it).  So be very careful with yaboot!  Likewise, use care 
to boot zImage.initrd.chrp-rs6k (it is ok to rename it of course), and 
*do not* try to boot this zImage on a mac.

There is a bit of a catch-22 here.  If you do get this all to work it 
might be worth putting the chrp-rs6k version of yaboot (or zImage) on 
the 2nd CD and tell everyone to boot the first cd on a mac and the 
second cd on an IBM machine.  But I think that's still a long way off... :(







Re: R: MDK8 installation on an RS/6000?

2002-03-09 Thread Todd Inglett

BTW, is there any chance that Mandrake will install over a serial 
console?  This could be useful for servers where you typically don't 
bother installing a display adapter.  I was just looking for the source 
for /sbin/init in the ramdisk to see what it does and couldn't find it 
anywhere

-todd








Re: R: R: MDK8 installation on an RS/6000?

2002-03-09 Thread Todd Inglett

Roger Cassatella wrote:

>As I wrote on my first message, I know what to install, but I don't know how
>to start the installation procedure without boot from the 1st CD.
>
Well, one way to start is to build a zImage kernel with 
 "all.rdz-2.4.13-12mdkBOOT" as an initrd.  Last time I did this with the 
32-bit ppc code you'd drop this into arch/ppc/boot/prep as 
"ramdisk.image.gz" and then make zImage.initrd.

I did the initial port of Linux to the 43p/140 but I did it as chrp so 
it fit rather well with Mandrake.  But paulus decided to redo it as prep 
(the hardware defaults to a "prep" memory map even though it does have 
OpenFirmware).  So this will make it into a strange animal.  If you grab 
the zImage.initrd from arch/ppc/boot/prep/zImage.initrd you might be 
able to boot it into the Mandrake installer.  Stew might be able to 
build this for you (Stew?).

Once you get this zImage you can boot it from the open firmware prompt. 
 Hit F8 as the machine boots (after the keyboard icon appears during the 
self-test).  You'll drop to a "0> " prompt.  Now type:

0> boot cdrom:,zImage rw root=/dev/fd0 load_ramdisk=1 ramdisk_size=36000 
text

assuming the zImage is at the top of a cdrom (standard iso9660 format -- 
note that IBM calls the device "cdrom" while the mac uses "cd").  The 
rest of the args are stolen from Stew's yaboot.conf.  You might have to 
use root=/dev/ram3 -- dunno.  Stew might be able to test this technique 
on a mac with a chrp zImage with initrd to make sure the args are right.

Unfortunately, yaboot won't work.  This isn't a big deal, other than it 
is very nice for booting vmlinux's and add initrd's at runtime, not to 
mention selecting alternative kernels.

Last I tried this I got stuck in fdisk, but Stew got that fixed.  But at 
that point I lost access to my 140 :(.

Hope this helps a little.  Once you get through an install it should 
work provided you can find a kernel that will boot ok on the 140.  Make 
sure you have a supported video adapter, also, and put it in either slot 
1 or 2.  The best video adapter for the 140 was the GXT120P (a 2MB 
Matrox mystique).

It may not be worth doing this unless someone is already trying to get 
Mandrake to work on other prep hardware.

-todd

BTW, a "hack" approach would be to install on a mac, tar the entire 
contents of the drive and drop it into an fdisk partitioned scsi drive. 
 Move that drive to the 140 and boot it up.  Scary, but you might be 
able to see it run :).






Re: partitioning bug on IBM hardware

2001-09-25 Thread Todd Inglett

Stew Benedict wrote:

>>Ok, I'm back on it again :).  I had already brute forced this with a 
>>simple $type = "dos".  Now I still get a "warning: bad magic number at 
>>/usr/bin/perl-install/partition_table_emtpy.pm line 31."  It looks like 
>>this code is looking for a zero block on the drive but I don't see 
>>offhand where it is called
>>
>>BTW, it does say it found a dos partition table at sector 0, but they 
>>may be simply due to my hack.  I haven't read the code close enough to 
>>know for sure.
>>
>
>Does that warning stop the process?  I'm pretty sure I've seen that on a
>regular Apple machine too, with no ill effects.
>
Hmm...good point.  It does go on (briefly).  It gives the same exact 
warning for /dev/sdb and also says it found a valid partition table at 
sector 0 (repeat of /dev/sda msgs).  Finally it says:

* error reading partition table: partitions sector #1040187392 (1TB) and 
sector #815466240 (470GB) are overlapping!

These are both 2GB drives (same model).  It doesn't say which drive it 
couldn't read but I suspect it is back to /dev/sda again.  Note that 
fdisk -l /dev/sda and fdisk -l /dev/sdb show perfectly good tables.

So I ALT-F2 and manually clear both partition tables with fdisk.   Then 
I rebooted the installer.  This time it got through and suggested some 
default partitions (the log shows "solutions found: Use free space (all 
solutions found: Use free space)\n* solutions: 1\nHERE: Use free space", 
etc.  I don't recall the sizes, but it chose a reasonable '/' and swap 
size on the first drive, and gave the second drive to /home.  So I went 
with the defaults.

At "formatting device sdb1" it pukes.  It says "warning: swap area needs 
to be at least 40kB at /usr/bin/perl-install/swap.pm line 77." But I see 
the 2nd drive has no partition table at all (yet) and the first drive's 
partition table is corrupt.  Here's what came out of fdisk -l /dev/sda 
(I'm typing it in so hopefully no errors :)):

/dev/sda1 * 250407  429980  372973568  83 Linux

Partition 1 has different physical/logical beginnings (non-Linux?):
   phys=(0, 1, 1) logical=(250406, 14, 1)

...and similar for endings.  So we are making progress, I guess. 
 Perhaps an endian problem in the dos partition code??

-todd







Re: partitioning bug on IBM hardware

2001-09-24 Thread Todd Inglett

Stew Benedict wrote:

[...]

>What you may be able to do is use "get_mac_model" and change $type to dos:
>
>sub zero_MBR {
>my ($hd) = @_;
>#- force the standard partition type for the architecture
>my $type = arch() eq "alpha" ? "bsd" : arch() =~ /^sparc/ ? "sun" : \
>arch() eq "ppc" ? "mac" : "dos";
>#- IBM PPC machines use DOS partition table
>$type = "dos" if (detect_devices::get_mac_model =~ /^IBM/);
>require("partition_table_$type.pm");
>bless $hd, "partition_table_$type";
>$hd->{primary} = $hd->clear_raw();
>delete $hd->{extended};
>}
>
Ok, I'm back on it again :).  I had already brute forced this with a 
simple $type = "dos".  Now I still get a "warning: bad magic number at 
/usr/bin/perl-install/partition_table_emtpy.pm line 31."  It looks like 
this code is looking for a zero block on the drive but I don't see 
offhand where it is called

BTW, it does say it found a dos partition table at sector 0, but they 
may be simply due to my hack.  I haven't read the code close enough to 
know for sure.

-todd










Re: partitioning bug on IBM hardware

2001-09-12 Thread Todd Inglett

Stew Benedict wrote:

>That's pretty much where we left off.  You were my only test case on IBM
>hardware and you sort of disappeared on my during the beta.  I think what
>is happening is that drakx detects the architecture, then in the
>partitioning scheme, jumps to an appropriate piece of code:
>
Yeah...sorry about that.  It got pretty busy around here :(

Anyway, I think the thing to check is /proc/cpuinfo where machine 
contains "IBM".  That should be safe for macs and I'm pretty sure IBM is 
in the string for all IBM boxes (including ppc64).

>This is going to be further complicated as I had to put a number of things
>into diskdrake to deal with the way the Mac partition table also assigns
>device numbers to "holes", which are all keyed off of an: 
>
>if arch() =~ ppc
>
>Which would be true in your case, but not the desired behavior, so I'd
>need to check not only the arch but the machine type.
>
I am starting to hack this now but need to learn a little about the 
code.  I am hacking and net booting so the cycle isn't too bad.  I 
worked around the "hole" problem, but now it is still complaining about 
bad magic numbers.  How does "partition_table_empty.pm" get executed? 
 Must be indirect...

-todd







partitioning bug on IBM hardware

2001-09-11 Thread Todd Inglett

Hi all...

Finally getting back to some time trying Mandrake on IBM hardware.  I 
have a 43p 140 and got my own 2.4.10-pre4 kernel running on it.  I 
rsync'ed the latest ppc cooker from wtfo (yesterday) and used all-2.2.gz 
as the ramdisk 'cause the all.gz is a bit too big for a floppy :(.  This 
is probably my first mistake so holler if so.

I booted the zImage with root=/dev/fd0 load_ramdisk=1 ramdisk_size=6 
rw.

Now the machine has two 2GB scsi drives which happen to be already 
partitioned (DOS fdisk tables).  I did an ftp install and got pretty far 
into the installer (expert install).  It gave me the "I can't read your 
partition table..." dialog.  Here's the end of the log:

...
* step `miscellaneous' finished
* starting step `doPartitionDisks'
* warning: bad magic number at 
/usr/bin/perl-install/partition_table_empty.pm line 31.
* found a dos partition table on /dev/sda at sector 0
* PPC: found a hole on sda before 1040187392, skipping device...
* warning: bad magic number at 
/usr/bin/perl-install/partition_table_empty.pm line 31.
* found a dos partition table on /dev/sdb at sector 0
* error reading partition table: partitions sector #104187392 (1TB) and 
sector #815466240 (470GB) are overlapping!

now this is pretty much were I left off a couple months ago :(.

# fdisk -l /dev/sda

Disk /dev/sda: 67 heads, 62 sectors, 1017 cylinders
Units = cylinders of 4154 * 512 bytes

  Device BootStart   EndBlocks   Id  System
/dev/sda1 1 2  4123   41  PPC PReP Boot
/dev/sda2 366132928   82  Linux swap
/dev/sda367  1017   1975227   83  Linux