Workaround for Install crash in "Disk Partitioning" screen

davidwr yellowdog-general@lists.terrasoftsolutions.com
Mon May 5 22:42:01 2003


Problem, workaround, and beg-and-plea for fix in next release (heck, maybe I'll
work on that fix myself...):


Date:  May 5, 2003
Issue:  Disk Druid crashes during install
Alternate:  Pdisk crashes during install
Alternate:  When I choose "automatic disk partitioning" I get a crash

Reproduction sequence:

On a machine that's susceptible (see below):

Boot with the Yellow Dog Linux 3.0 CD.
Boot to either the graphical or the text-based installer.
Go through the first few screens.
Stop at the "Installation Type"
Choose an installation type.
NOTE:  I have only tried "Server" and "Personal Workstation."
At the "Disk Partitioning" screen, choose any disk partitioning method.

Symptoms:

You will get an error message that contains the following traceback
information:
---cut here---
File "/usr/lib/anaconda/gui.py", line 6534, in nextClicked
  self.dispatch.gotoNext()
File "/usr/lib/anaconta/dispatch.py", line 150, in gotoNext
  sef.moveStep()
File "/usr/lib/anaconta/partioning.py", line 57, in partionObjectInitialize
  partitions.setFromDisk(diskset)
File "/usr/lib/anaconda/partition.py", line 114, in SetFromDisk
 
ptype=fsseet.fileSystemTypeGet(partedUtils.map_forign_to_fsname(part.mac_native_type))
File "/usr/lib/anaconda/fsset.py", line 61, in fileSystemTypeGet
  return fileSystemTypes[key]
KeyError:  Apple HFS
---cut here---

Workaround:

This workaround assumes you are familiar with Linux, the command prompt, pdisk,
yaboot.conf, and ybin.

This workaround temporarily deletes partition entries in the partition table. 
You should back up important data and have a restore-from-scratch plan before
proceeding in case something goes bad before you recreate them.

Before installing Yellow Dog 3.0, use your favorite MacOS9, MacOS X, Darwin, or
Linux utility to create the following partitions.  You may use existing
partitions if you like.  You may also create the partitions during installation
using pdisk if you like.
1) an Apple_HFS partition to hold the Yaboot bootloader.
2) one or more Apple_UNIX_SRV2 partitions for Linux.

If you have Linux installed, run "pdisk -L" as root and print out the file or
copy it to another computer or floppy, it will save some work later.  Do this
AFTER you create the partitions.

Boot with the Yellow Dog Linux 3.0 Install CD 1.
Go through the screens until you get to the "Disk Partitioning" screen.
Hit CTRL-ALT-2 (or CTRL-COMMAND-2 on an Apple keyboard).
You will be at a "root" command prompt.  It will look something like this:

~/bin/sh-2.05b#

Run pdisk.

If you did not create partitions earlier, create them now.  Record partition
information for ALL partitions EXACTLY.  *THIS IS VERY IMPORTANT, YOU WILL NEED
THIS INFORMATION LATER.*
If you are not creating new partitions in this step, use "pdisk -l /dev/hda"
(and /dev/hdb, etc. if needed) and compare your information with your printout
from earlier.  If there are any differences, write down the new information.
Delete all partitions EXCEPT:
Apple_partition_map
The bootloader and Linux partitions you created earlier.

Reboot the computer.
You should be able to install Linux on your new partitions.
IMPORTANT:  Do NOT create or delete any partitions during the install.
For now, have the bootloader only boot the new Linux partition.

YOU ARE NOT DONE YET!

You need to restore the partition information.

Run pdisk.
Create "new" partitions, entering the base, length, name, and partition-type so
they EXACTLY match what they were earlier.
Save your changes.  If pdisk asks you to reboot, do so.

To install your MacOS and other Linux kernels and partitions into the
bootloader, read the manual for yaboot.conf and ybin.

What machines are susceptable/what is the cause?

Not yet known.  I haven't investigated this very much.  It isn't a hardware
issue.
I'm pretty sure it's related to existing partitions that anaconda can't make
sense of.
I've had anaconda trip up like this on Darwin partitions and on FWB Hard Disk
Toolkit driver component partitions.


Recommended fix philosophy for the very nice person who fixes this:

If there's a partition that anaconda can't recognize, it should, at a minimum,
alert
the user that the partition shouldn't be messed with.
Even better, it would NOT allow that partition to be deleted without some kind
of confirmation.  This probably isn't possible without changing other programs
like Disk Druid.


----------- Additional debugging information -------------

Output of "pdisk /dev/hda"

Partition map (with 512 byte blocks) on '/dev/hda'
 #:                type name                    length   base      ( size )
 1: Apple_partition_map Apple                       63 @ 1        
 2:      Apple_Driver43*Macintosh                   56 @ 64       
 3:      Apple_Driver43*Macintosh                   56 @ 120      
 4:    Apple_Driver_ATA*Macintosh                   56 @ 176      
 5:    Apple_Driver_ATA*Macintosh                   56 @ 232      
 6:      Apple_FWDriver Macintosh                  512 @ 288      
 7:  Apple_Driver_IOKit Macintosh                  512 @ 800      
 8:       Apple_Patches Patch Partition            512 @ 1312     
 9:          Apple_Free Extra                     8416 @ 1824      (  4.1M)
10:     Apple_Bootstrap bootstrap                20481 @ 10240     ( 10.0M)
11:          Apple_Free Extra                     1023 @ 30721    
12:           Apple_HFS "Macintosh HD"        20480000 @ 31744     (  9.8G)
13:          Apple_Free Extra                 21462016 @ 20511744  ( 10.2G)
14:           Apple_HFS "extra partition"     12288000 @ 41973760  (  5.9G)
15:          Apple_Free Extra                 10877824 @ 54261760  (  5.2G)
16:           Apple_HFS "Linux"                 204800 @ 65139584  (100.0M)
17:           Apple_HFS "HFS_1GB"              2204800 @ 65344384  (  1.1G)
18:           Apple_HFS "5.5GB"               11081148 @ 67549184  (  5.3G)
19:          Apple_Free Extra                  1061444 @ 78630332  (518.3M)
20:     Apple_UNIX_SVR2 linux_root            12267521 @ 79691776  (  5.8G)
21:     Apple_UNIX_SVR2 linux_root_mol        12267521 @ 91959297  (  5.8G)
22:     Apple_UNIX_SVR2 linux_emergency_boot   2097153 @ 104226818 (  1.0G)
23:           Apple_HFS "HFS_2GB"              4000000 @ 106323971 (  1.9G)
24:           Apple_HFS darwin602              2000000 @ 110323971 (976.6M)
25:     Apple_UNIX_SVR2 ydl30_root             1048577 @ 112323971 (512.0M)
26:     Apple_UNIX_SVR2 ydl30_usr              6291456 @ 113372548 (  3.0G)
27:     Apple_UNIX_SVR2 test                    204800 @ 119664004 (100.0M)
28:          Apple_Free Extra                 36432684 @ 119868804 ( 17.4G)

Device block size=512, Number of Blocks=156301488 (74.5G)
DeviceType=0x0, DeviceId=0x0
Drivers-
1:  23 @ 64, type=0x1
2:  36 @ 120, type=0xffff
3:  21 @ 176, type=0x701
4:  34 @ 232, type=0xf8ff

Output of "pdisk /dev/hdb"

Partition map (with 512 byte blocks) on '/dev/hdb'
 #:                  type name                    length   base     ( size )
 1:   Apple_partition_map Apple                      100 @ 1       
 2: FWB Driver Components FWB Driver Components     1024 @ 101     
 3:      Apple_Driver_ATA*Macintosh                   76 @ 1125    
 4:       Apple_UNIX_SVR2 ext2_10gb             20971520 @ 1201     ( 10.0G)
 5:       Apple_UNIX_SVR2 B                      2097152 @ 20972721 (  1.0G)
 6:             Apple_HFS "IBM-5GB"             10485760 @ 23069873 (  5.0G)
 7:       Apple_UNIX_SVR2 ydl23_root             1048577 @ 33555633 (512.0M)
 8:       Apple_UNIX_SVR2 ydl23_boot             2097153 @ 34604210 (  1.0G)
 9:       Apple_UNIX_SVR2 ydl23_home             6291457 @ 36701363 (  3.0G)
10:       Apple_UNIX_SVR2 ydl23_usr             16777217 @ 42992820 (  8.0G)
11:       Apple_Bootstrap ydl23_yaboot             20481 @ 59770037 ( 10.0M)
12:            Apple_Free Extra                   245962 @ 59790518 (120.1M)

Device block size=512, Number of Blocks=60036480 (28.6G)
DeviceType=0x1, DeviceId=0x1
Drivers-
1:  76 @ 1125, type=0x701

Information from clicking "debug" at the crash screen:
(Pdb) p part.num
24
(Pdb) p part.mac_native_type
1044 
Note:  I think 1044 an HFS partition

Partition 24 is a Darwin 6.02 partition, formatted the Darwin 6.02 binary CDROM
downloaded from Apple's web site.  Note that this is the only Apple_HFS
partition without quotes around the name.

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com