hfsplus blues - Powerpc

This is a discussion on hfsplus blues - Powerpc ; I did the stupid thing, used hpmount with /dev/hda and now have no partition map on my ibook (as I discovered when I rebooted!). Anyway that I can get my partition map back would be greatly appreciated, as the machine ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: hfsplus blues

  1. hfsplus blues

    I did the stupid thing, used hpmount with /dev/hda and now have no
    partition map on my ibook (as I discovered when I rebooted!). Anyway
    that I can get my partition map back would be greatly appreciated, as
    the machine boots into MacOS *only* at the moment. I would really like
    not to lose everything under my ext2 partitions.

    Cheers,

    Adam

  2. Re: hfsplus blues

    Hi,

    Adam a écrit:
    > I did the stupid thing, used hpmount with /dev/hda and now have no
    > partition map on my ibook (as I discovered when I rebooted!). Anyway
    > that I can get my partition map back would be greatly appreciated, as
    > the machine boots into MacOS *only* at the moment.


    Be carefull : only reboot in Mac OS X doesn't mean you're partition map
    is lost...Perhaps you only need to do an ybin -v ...

    To see your partition map in MacOS, you can try to use pdisk in a
    terminal...

    If you can see all the partitions, you can boot with a CD, mount all
    your ext2 partitions (all the needed in fact) use chroot to can use ybin -v.


    I would really like
    > not to lose everything under my ext2 partitions.


    ....If you don't see more your ext2 partitions...in this case, it's more
    complicated :


    First : if you can use the disk in a Linux ppc other machine, the gpart
    utility can probably help you too.


    Secondly : no matter to use the first solution...

    Remember :

    - fdisk : is for change/know partition type ;
    - mke2fs -n : try to format a partition, *but do nothing*

    And testing to format a partition with a bad size (starting and ending
    blocks) give the corrects blocks :-)


    boot with a CD, open a shell. (use a Debian CD for example)


    begin with fdisk /dev/hda (or /hdb...)

    p print you the existing partition map
    q for quit, ? for help

    make (by hand ?) a copy of this one

    For the ext2 partitions :

    try to format them with the -n option of mke2fs. Every time you do this,
    you are using the existing (wrong for you) size in the partition table.

    mke2fs -n /dev/hda(n) # (n) is the first "free" partition

    The answer give you (if I correctly remember) the real size with the
    corrects starting en ending blocks of the first ext2 ...



    READ THE MAN PAGE OF FDISK, AND A DISK-PARTIONNING HOWTO BEFORE THE NEXT
    STEP...



    modify the partition table with the correct blocks ; reboot with a CD

    try to mount it....if all is OK the partition will be usable, with the
    datas on it.


    Repeat the mke2fs -n */dev/hda(n+1)* operation until you retrieve every
    ext2 partition.


    So, [I hope] you can retrieve the good partition map.

    When all the partition are good (I wish you to obtain this, of course),

    boot with a CD, mount all ext2 partitons, do a chroot and do :

    ybin -v

    That's all

    I've retrieven 40Go of data (excepted 1 file :-) )using this way.





    Hope this help



    P.S. : next time, do a "fdisk -l /dev/hda > table.txt", copy it in all
    existing partitions of the disk and print it...

    --
    NO ePATENTS / NON AUX BREVETS SUR LES LOGICIELS. Voir / See
    http://swpat.ffii.org/

    eric b


  3. Re: hfsplus blues

    Dear Eric,

    Thanks for all of that. I have tried pdisk under the MacOS (9.1) and
    had no luck, as it just says that there is a bad block that stops it
    reading the table. I can use the virtual emergency disk that Debian
    supplies to boot through open firmware and can get a console, so I
    will try your other advice to get the partition map. Then, if I
    understand correctly, I can use 'i' under pdisk to initialise the
    table and build a new one.

    I'll let you know how I go.

    Adam

    s270540@mail.stud.uni-goettingen.de (Adam) wrote in message news:<122ff3b6.0309222039.33c0f53d@posting.google.com>...
    > I did the stupid thing, used hpmount with /dev/hda and now have no
    > partition map on my ibook (as I discovered when I rebooted!). Anyway
    > that I can get my partition map back would be greatly appreciated, as
    > the machine boots into MacOS *only* at the moment. I would really like
    > not to lose everything under my ext2 partitions.
    >
    > Cheers,
    >
    > Adam


  4. Re: hfsplus blues

    Sadly I've tried all of this and none of it works. The partition map
    is completely gone. I'll have to trash it and re-install when I next
    have access to a fast connection.

    Thanks anyway,

    Adam

    ericb wrote in message news:<3f6ffa46$0$13302$626a54ce@news.free.fr>...
    > Hi,
    >
    > Adam a écrit:
    > > I did the stupid thing, used hpmount with /dev/hda and now have no
    > > partition map on my ibook (as I discovered when I rebooted!). Anyway
    > > that I can get my partition map back would be greatly appreciated, as
    > > the machine boots into MacOS *only* at the moment.

    >
    > Be carefull : only reboot in Mac OS X doesn't mean you're partition map
    > is lost...Perhaps you only need to do an ybin -v ...
    >
    > To see your partition map in MacOS, you can try to use pdisk in a
    > terminal...
    >
    > If you can see all the partitions, you can boot with a CD, mount all
    > your ext2 partitions (all the needed in fact) use chroot to can use ybin -v.
    >
    >
    > I would really like
    > > not to lose everything under my ext2 partitions.

    >
    > ...If you don't see more your ext2 partitions...in this case, it's more
    > complicated :
    >
    >
    > First : if you can use the disk in a Linux ppc other machine, the gpart
    > utility can probably help you too.
    >
    >
    > Secondly : no matter to use the first solution...
    >
    > Remember :
    >
    > - fdisk : is for change/know partition type ;
    > - mke2fs -n : try to format a partition, *but do nothing*
    >
    > And testing to format a partition with a bad size (starting and ending
    > blocks) give the corrects blocks :-)
    >
    >
    > boot with a CD, open a shell. (use a Debian CD for example)
    >
    >
    > begin with fdisk /dev/hda (or /hdb...)
    >
    > p print you the existing partition map
    > q for quit, ? for help
    >
    > make (by hand ?) a copy of this one
    >
    > For the ext2 partitions :
    >
    > try to format them with the -n option of mke2fs. Every time you do this,
    > you are using the existing (wrong for you) size in the partition table.
    >
    > mke2fs -n /dev/hda(n) # (n) is the first "free" partition
    >
    > The answer give you (if I correctly remember) the real size with the
    > corrects starting en ending blocks of the first ext2 ...
    >
    >
    >
    > READ THE MAN PAGE OF FDISK, AND A DISK-PARTIONNING HOWTO BEFORE THE NEXT
    > STEP...
    >
    >
    >
    > modify the partition table with the correct blocks ; reboot with a CD
    >
    > try to mount it....if all is OK the partition will be usable, with the
    > datas on it.
    >
    >
    > Repeat the mke2fs -n */dev/hda(n+1)* operation until you retrieve every
    > ext2 partition.
    >
    >
    > So, [I hope] you can retrieve the good partition map.
    >
    > When all the partition are good (I wish you to obtain this, of course),
    >
    > boot with a CD, mount all ext2 partitons, do a chroot and do :
    >
    > ybin -v
    >
    > That's all
    >
    > I've retrieven 40Go of data (excepted 1 file :-) )using this way.
    >
    >
    >
    >
    >
    > Hope this help
    >
    >
    >
    > P.S. : next time, do a "fdisk -l /dev/hda > table.txt", copy it in all
    > existing partitions of the disk and print it...


  5. Re: hfsplus blues

    Hi,

    Adam a écrit:
    > Dear Eric,
    >
    > Thanks for all of that. I have tried pdisk under the MacOS (9.1) and
    > had no luck, as it just says that there is a bad block that stops it
    > reading the table. I can use the virtual emergency disk that Debian
    > supplies to boot through open firmware and can get a console, so I
    > will try your other advice to get the partition map. Then, if I
    > understand correctly, I can use 'i' under pdisk to initialise the
    > table and build a new one.


    Don't forget that initialize your partition map, will NOT erase the
    datas presents on the disk !

    They're always recoverable....the biggest problem is to rewrite
    *exactly* what the partition map was.


    The only way I know to loose all the data is to use a hammer.
    Even write again on the same place is not a complete garanty to erase
    the datas !....

    Be positive and try again :


    First :

    1) rebuild the "desktop" in Mac OS

    This will write on the partition table, and do a clen partition map.

    Secondly :

    2) boot with the Mac OS CD inside ("C" key on boot) and use disk utility
    to verify the disk.

    3) reboot with a Debian CD, open a shell, and try my method, for
    retrieve the good partition map.



    --
    NON AUX BREVETS SUR LES LOGICIELS. Voir http://swpat.ffii.org/

    eric b


  6. Re: hfsplus blues

    Hi,

    Adam a écrit:

    > Dear Eric,
    >
    > Thanks for all of that. I have tried pdisk under the MacOS (9.1) and
    > had no luck, as it just says that there is a bad block that stops it
    > reading the table. I can use the virtual emergency disk that Debian
    > supplies to boot through open firmware and can get a console, so I
    > will try your other advice to get the partition map. Then, if I
    > understand correctly, I can use 'i' under pdisk to initialise the
    > table and build a new one.



    Don't forget that initialize your partition map, will NOT erase the
    datas presents on the disk !

    They're always recoverable....the biggest problem is to rewrite
    *exactly* what the partition map was.


    The only way I know to definitively loose all the data is to use a hammer.
    Even write again on the same place is not a complete guarantee to erase
    the datas !....

    Be positive and try again :


    First :

    Rebuild the "desktop" in Mac OS

    This will write on the partition table, and do a clean partition map.

    Secondly :

    Reboot with the Mac OS CD inside ("C" key on boot) and use disk utility
    to completely verify the disk.

    Finaly :

    Reboot with a Debian CD, open a shell, and try my method, for retrieve
    the good partition map.



    --
    NON AUX BREVETS SUR LES LOGICIELS. Voir http://swpat.ffii.org/

    eric b


  7. Re: hfsplus blues

    Dear Eric,

    Thanks for your further ideas. I have tried rebuilding the desktop
    (including totally scrapping it with Techtool to force it to build a
    new one), but sadly it hasn't helped. If I boot with the MacOS cd and
    use Disk First Aid, the drive is still not available, and the drive
    set-up utility only shows it as being able to be initialised, not as
    being mountable.

    Any further suggestions are appreciated.

    Thanks again,

    Adam
    ericb wrote in message news:<3f7140c2$0$13297$626a54ce@news.free.fr>...
    > Hi,
    >
    > Adam a écrit:
    >
    > > Dear Eric,
    > >
    > > Thanks for all of that. I have tried pdisk under the MacOS (9.1) and
    > > had no luck, as it just says that there is a bad block that stops it
    > > reading the table. I can use the virtual emergency disk that Debian
    > > supplies to boot through open firmware and can get a console, so I
    > > will try your other advice to get the partition map. Then, if I
    > > understand correctly, I can use 'i' under pdisk to initialise the
    > > table and build a new one.

    >
    >
    > Don't forget that initialize your partition map, will NOT erase the
    > datas presents on the disk !
    >
    > They're always recoverable....the biggest problem is to rewrite
    > *exactly* what the partition map was.
    >
    >
    > The only way I know to definitively loose all the data is to use a hammer.
    > Even write again on the same place is not a complete guarantee to erase
    > the datas !....
    >
    > Be positive and try again :
    >
    >
    > First :
    >
    > Rebuild the "desktop" in Mac OS
    >
    > This will write on the partition table, and do a clean partition map.
    >
    > Secondly :
    >
    > Reboot with the Mac OS CD inside ("C" key on boot) and use disk utility
    > to completely verify the disk.
    >
    > Finaly :
    >
    > Reboot with a Debian CD, open a shell, and try my method, for retrieve
    > the good partition map.


  8. Re: hfsplus blues

    Dear ERic,

    Ok, I've had a breakthrough and need some advice. FWB's Hard-Drive
    tookit shows all (11) of the partitions. My boot-strap partition has
    simply disappeared! It shows no free space but only 11 partitions
    rather than in original twelve. It was located at the end of my MacOs
    partition, so I am tempted to shrink that by 800k and make a new
    partition there and then use pdisk to re-order it to be the first
    partition (as it was originally set up).

    Your thoughts appreciated. Once I have the right number of partitions
    again and boot with the debian cd and get the shell up, what do I do
    again from there?

    Adam

    s270540@mail.stud.uni-goettingen.de (Adam) wrote in message news:<122ff3b6.0309242135.5061e7bd@posting.google.com>...
    > Dear Eric,
    >
    > Thanks for your further ideas. I have tried rebuilding the desktop
    > (including totally scrapping it with Techtool to force it to build a
    > new one), but sadly it hasn't helped. If I boot with the MacOS cd and
    > use Disk First Aid, the drive is still not available, and the drive
    > set-up utility only shows it as being able to be initialised, not as
    > being mountable.
    >
    > Any further suggestions are appreciated.
    >
    > Thanks again,
    >
    > Adam
    > ericb wrote in message news:<3f7140c2$0$13297$626a54ce@news.free.fr>...
    > > Hi,
    > >
    > > Adam a écrit:
    > >
    > > > Dear Eric,
    > > >
    > > > Thanks for all of that. I have tried pdisk under the MacOS (9.1) and
    > > > had no luck, as it just says that there is a bad block that stops it
    > > > reading the table. I can use the virtual emergency disk that Debian
    > > > supplies to boot through open firmware and can get a console, so I
    > > > will try your other advice to get the partition map. Then, if I
    > > > understand correctly, I can use 'i' under pdisk to initialise the
    > > > table and build a new one.

    > >
    > >
    > > Don't forget that initialize your partition map, will NOT erase the
    > > datas presents on the disk !
    > >
    > > They're always recoverable....the biggest problem is to rewrite
    > > *exactly* what the partition map was.
    > >
    > >
    > > The only way I know to definitively loose all the data is to use a hammer.
    > > Even write again on the same place is not a complete guarantee to erase
    > > the datas !....
    > >
    > > Be positive and try again :
    > >
    > >
    > > First :
    > >
    > > Rebuild the "desktop" in Mac OS
    > >
    > > This will write on the partition table, and do a clean partition map.
    > >
    > > Secondly :
    > >
    > > Reboot with the Mac OS CD inside ("C" key on boot) and use disk utility
    > > to completely verify the disk.
    > >
    > > Finaly :
    > >
    > > Reboot with a Debian CD, open a shell, and try my method, for retrieve
    > > the good partition map.


  9. Re: hfsplus blues

    Hi,


    Adam a écrit:
    > Dear ERic,
    >
    > Ok, I've had a breakthrough and need some advice. FWB's Hard-Drive
    > tookit shows all (11) of the partitions. My boot-strap partition has
    > simply disappeared! It shows no free space but only 11 partitions
    > rather than in original twelve.


    Can you print the partition table in this forum please ?

    For file redirection try this :

    fdisk -l /dev/hda > table.txt


    If you've found again all the partitions, excepted the boostrap one,
    you've made a very big step... :-p

    FYI, you can reorder the partition map with fdisk and the r option. I
    think the partitions map use pointers. more usable than for x86 :-)


    For helping you, here is mine (on my ibook) :

    popom:/home/eric# fdisk -l /dev/hda
    /dev/hda
    # type name length base
    ( size ) system
    /dev/hda1 Apple_partition_map Apple 63 @ 1
    ( 31.5k) Partition map
    /dev/hda2 Apple_Driver43 Macintosh 54 @ 64 ( 27.0k) Driver 4.3
    /dev/hda3 Apple_Driver43 Macintosh 74 @ 118 ( 37.0k) Driver 4.3
    /dev/hda4 Apple_Driver_ATA Macintosh 54 @ 192 ( 27.0k) Unknown
    /dev/hda5 Apple_Driver_ATA Macintosh 74 @ 246 ( 37.0k) Unknown
    /dev/hda6 Apple_FWDriver Macintosh 200 @ 320 (100.0k) Unknown
    /dev/hda7 Apple_Driver_IOKit Macintosh 512 @ 520 (256.0k) Unknown
    /dev/hda8 Apple_Patches Patch Partition 512 @ 1032 (256.0k) Unknown

    /dev/hda9 Apple_Bootstrap bootstrap 1600 @ 17531165 (800.0k) NewWorld
    bootblock
    /dev/hda10 Apple_HFS Macintosh HD 15890432 @ 1544 ( 7.6G) HFS
    /dev/hda11 Apple_HFS Passe plat 1639189 @ 15891976 (800.4M) HFS
    /dev/hda12 Apple_UNIX_SVR2 / 614400 @ 17532765 (300.0M) Linux native
    /dev/hda13 Apple_UNIX_SVR2 /home 20971520 @ 18147165 ( 10.0G) Linux native
    /dev/hda14 Apple_UNIX_SVR2 /var 1024000 @ 39118685 (500.0M) Linux native
    /dev/hda15 Apple_UNIX_SVR2 /usr 18462413 @ 40142685 ( 8.8G) Linux native
    /dev/hda16 Apple_Free 22 @ 58605098 ( 11.0k) Free space

    Block size=512, Number of Blocks=58605120
    DeviceType=0x0, DeviceId=0x0
    Drivers-
    1: @ 64 for 23, type=0x1
    2: @ 118 for 36, type=0xffff
    3: @ 192 for 21, type=0x701
    4: @ 246 for 34, type=0xf8ff


    It was located at the end of my MacOs
    > partition, so I am tempted to shrink that by 800k and make a new
    > partition there and then use pdisk to re-order it to be the first
    > partition (as it was originally set up).


    Do nothing before I see your partition map, except if you know what you
    do and are sure it's to do.....

    >


    Cheers




    --
    NON AUX BREVETS SUR LES LOGICIELS. Voir http://swpat.ffii.org/

    eric b


+ Reply to Thread