Re: partitioning bug on IBM hardware

2001-09-26 Thread Stew Benedict


On Tue, 25 Sep 2001, Todd Inglett wrote:

 Stew Benedict wrote:
 
 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??
 

Possibly - but I think believe I've setup fdisk'ed partition table before
on PPC.  I've got an external SCSI drive I think I can sacrifice - let me
try something out and get back to you.

Stew Benedict

-- 
MandrakeSoftOH/TN, USA  http://perso.mandrakesoft.com/~sbenedict/
PPC Faq: http://marc.theaimsgroup.com/?l=mandrake-cooker-ppcm=99441208917647w=





Re: partitioning bug on IBM hardware

2001-09-25 Thread Stew Benedict


On Mon, 24 Sep 2001, Todd Inglett wrote:

 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.
 

Does that warning stop the process?  I'm pretty sure I've seen that on a
regular Apple machine too, with no ill effects.

Stew Benedict

-- 
MandrakeSoftOH/TN, USA  http://perso.mandrakesoft.com/~sbenedict/
PPC Faq: http://marc.theaimsgroup.com/?l=mandrake-cooker-ppcm=99441208917647w=





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-13 Thread Stew Benedict


On Wed, 12 Sep 2001, Todd Inglett wrote:

 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...
 

Here's where I think you're going to need to make a change:
(partition_table_raw.pm)

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;
require(partition_table_$type.pm);
bless $hd, partition_table_$type;
$hd-{primary} = $hd-clear_raw();
delete $hd-{extended};
}

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};
}

I can't test this right now as the current CVS doesn't even run on PPC =(

PS - I did cobble together a script yesterday that seemed to be able to
brute force install a list of RPM's.  Does anyone have a ddebug.log (in
/root) from a standard install of the final release?

Stew Benedict

-- 
MandrakeSoftOH/TN, USA  http://perso.mandrakesoft.com/~sbenedict/
PPC Faq: http://marc.theaimsgroup.com/?l=mandrake-cooker-ppcm=99441208917647w=






Re: partitioning bug on IBM hardware

2001-09-12 Thread Stew Benedict


On Tue, 11 Sep 2001, Todd Inglett wrote:

 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
 

Yes,

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:

partition_table_dos
partition_table_sun
partition_table_mac

In our case partition_table_mac, which expects to see a Mac style
partition table.  In your case it's a DOS style one.  What I would need to
do is:

1) detect it's a non Mac PPC machine (I think we discussed some methods I
could use to identify IBM hardware)
2) then use partition_table_dos

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.

At this point this leaves you kind of stuck.  It's crude, but it might be
possible to boot the rescue image, mount your partitions and install the
packages using rpm --root, working your way down depslist.ordered, at
least through basesystem. Or I could grep out the installed files in their
order from my ddebug.log and do a quick script that would install them.

This might at least give you something to start using.  I think I need to
get my hands on one of these machines to really get the installer up to
snuff.

Let me know if you want to go this route.

Stew Benedict

-- 
MandrakeSoftOH/TN, USA  http://perso.mandrakesoft.com/~sbenedict/
PPC Faq: http://marc.theaimsgroup.com/?l=mandrake-cooker-ppcm=99441208917647w=





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