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

Re: regaining Debian after erasing boot disk.



On Sat, Apr 19, 2003 at 06:52:29PM -0700, Richard Cochinos wrote:
> 
> I mistakenly reformatted a drive containing my boot partition. Now I'm
> trying to gain it back so I can use yaboot (right now its defaulting to
> OSX).
> 
> So far I've redownloaded:
> root.bin, linux.bin, yaboot and yaboot.conf
> and placed them on a HFS partition.
> 
> Then I was using pdisk to find the partition number and it was spitting
> back:
> 
> Top level command (? for help): L
> /dev/rdisk0  map block size=512
>    #:                 type name                 length   base     ( size )
>    1:  Apple_partition_map Apple                    63 @ 1
>    2:            Apple_HFS linuxboot            209712 @ 64       (102.4M)
>    3:            Apple_HFS Charles            59826696 @ 209776   ( 28.5G)
>    4:           Apple_Free                           0+@ 60036472
> 
> Device block size=512, Number of Blocks=60036480
> DeviceType=0x0, DeviceId=0x0
> 
> /dev/rdisk1  map block size=512
>    #:                 type name                  length   base      ( size
> )
>    1:  Apple_partition_map Apple                     63 @ 1
>    2:            Apple_UFS Tiger              120103128 @ 64        (
> 57.3G)
> 
> Device block size=512, Number of Blocks=120103200
> DeviceType=0x0, DeviceId=0x0
> 
> /dev/rdisk2  map block size=512
>    #:                 type name                 length   base     ( size )
>    1:  Apple_partition_map Apple                    63 @ 1
>    2: Apple_Driver_OpenFirmware Macintosh              1024 @ 64
> 
> Device block size=512, Number of Blocks=66835440
> DeviceType=0x0, DeviceId=0x0
> 
> /dev/rdisk3  map block size=512
>    #:                 type name                  length   base      ( size
> )
>    1:  Apple_partition_map Apple                     63 @ 1
>    2:            Apple_HFS moose              120060792 @ 64        (
> 57.2G)
>    3:           Apple_Free                            0+@ 120060856
> 
> Device block size=512, Number of Blocks=120060864
> DeviceType=0x0, DeviceId=0x0
> 
> /dev/rdisk4  map block size=512
>    #:                 type name                length   base    ( size )
>    1:  Apple_partition_map Apple                   63 @ 1
>    2:       Apple_Driver43*Macintosh               54 @ 64
>    3:       Apple_Driver43*Macintosh               74 @ 118
>    4:   Apple_Driver_IOKit Macintosh              512 @ 192
>    5:        Apple_Patches Patch Partition        512 @ 704
>    6:            Apple_HFS snailbrain         4192189 @ 1216    (  2.0G)
>    7:           Apple_Free                          0+@ 4193405
> 
> Device block size=512, Number of Blocks=4193415
> DeviceType=0x0, DeviceId=0x0
> Drivers-
> 1: @ 64 for 23, type=0x1
> 2: @ 118 for 36, type=0xffff
> 
> and linuxboot(dev/rdisk0) is the one I want when I get into the firmware
> boot,
> 
> a. how do I get there?
> b. what commands do I use to regain yaboot?

Well, what you have to give OpenFirmware is the OF path
to the partition on which you've placed yaboot, not the
path for your target. Once you get the installer booted,
then you'll go thru the regular installation procedure
to first, create a new 800k bootstrap partition, then 
re-install Debian and finally at the end, install yaboot
to the bootstrap partition.

To figure out the OpenFirmware path to the partition
you put the four install files on, first break into
OpenFirmware, then use devalias and dev / ls to try
to figure out what the OF path to the yaboot file is.

The simple case is listed in the install manual, i.e.

boot hd:x,yaboot 

where x is the number of the partition on your one and
only hard drive. In your case, hd will probably be 
something else like ide0, ultra1, or who knows. Since 
you know the partition number of that HFS partition 
where you put it, you could just substitute aliases
and paths until you find the one that works.

-- 
http://Www.TruthAboutWar.org

Chris Tillman
- Linux Rox -



Reply to: