Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Recover deleted Linux partitions when returning to OS X UNIX
I ran into some problems when I tried to return to OS X and remove a Debian GNU/Linux basic installation from my PowerBook 667. Three partitions (7.9G) became invisible to OS X, and the partition table was not writeable with Darwin's pdisk in single user mode. I restored my partitions with these steps:
  1. I downloaded from debian.org the following files:
    • linux.bin
    • yaboot
    • yaboot.conf
    • images-1.44/root.bin
    As written on the debian.org page Install Debian without physical media, and I copied them to / (root diretory of OS X) with sudo cp linux.bin yaboot yaboot.conf root.bin /
  2. I booted to open firmware by holding Command-Option-O-F during boot. Once there, I booted the Debian install disk by typing boot hd:X,yaboot, where X was the partition number of Mac OS X - "9" for me).
  3. After linux's usual boot, I chose the language for the Debian installer, then selected "Partition hard disk" from the menu. Now you can delete partitions (choice D), create new Apple partition (C, and set the type to "Apple_HFS"), re-write the partition table (W), and quit (Q) Debian's pdisk.
  4. Stop the installation steps (before it's too late) by selecting "Reboot system" and confirm from menu.
  5. Hold Command-S to boot in single-user-mode, and run newfs_hfs -w -v MyNewVolume /dev/disk0sNN, where NN is the slice created with Debian's installer.
  6. Type reboot, and the volume will be back after login. Remember to remove the files copied to the root directory in the first step).
[robg adds: This originally ran in the "Is it a hint?" category, and the comments were split about evenly between "yes" and "no." In the end, I decided to run it, as it might prove helpful to someone who was trying to return to OS X after running Linux on their machine. It won't apply for most users, but if someone needs it, now it's in the database.]
    •    
  • Currently 1.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[6,181 views]  

Recover deleted Linux partitions when returning to OS X | 5 comments | Create New Account
Click here to return to the 'Recover deleted Linux partitions when returning to OS X' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Recover deleted Linux partitions when returning to OS X
Authored by: stang7423 on Aug 25, '03 11:44:49AM
For simply accessing linux (ext2 filesystem) partitions you can use this utillity (ext2fsx). It allows you to mount linux style filesystems ounder OS X.
I figure once you were able to mount the filesystem it would show up in disk utillity but I haven't tested to see if thats true.

[ Reply to This | # ]
Recover deleted Linux partitions when returning to OS X
Authored by: johndrake on Aug 25, '03 04:17:09PM

Hi:

This topic is slightly mislabelled, I believe ? I ran into the same issues with the Yellowdog Linux 3.0 installer (initial release), and what happens is that under certain conditions the linux install mistakenly changes the label (name) ONLY of the initial partition, such that OSX can no longer recognize other partitions on the drive, including and especially bootable OSX partitions. Nothing is deleted, but you can only access the volumes via another OS, like OS9 or ppc linux.

YDL was kind enough to update and publish an OSX-compatible version of the pdisk program which is capable of correcting the problem. In my case, I downloaded this pdisk onto a zip disk (though any readable filesystem+device would do), booted the install CD, got a terminal, and then ran pdisk as indicated. All was magically better.

Original problem (google cache):

http://216.239.53.104/custom?q=cache:Vqz3F7GBmFAJ:www.yellowdoglinux.com/support/solutions/ydl_3.0/dualdrive_applepartmap.shtml+pdisk&hl=en&ie=UTF-8

MacOSX fix + updated pdisk link:

http://lists.terrasoftsolutions.com/pipermail/yellowdog-general/2003-May/007922.html

Linux-side fix + updated pdisk link:

http://lists.terrasoftsolutions.com/pipermail/yellowdog-general/2003-April/007186.html

Just wanted to mention a possibly more straightforward way of stating the problem and *a* solution.

Thanks to all for your insights,

J.



[ Reply to This | # ]
Recover deleted Linux partitions when returning to OS X
Authored by: osxpounder on Aug 25, '03 05:49:05PM

What do you mean by the "'Is it a hint?' category"? Is that some part of this website? I've never noticed it before. You mentioned that people had a chance to comment on this, so I assume it must have been posted somewhere .... if "Is it a hint?" is a portion of this site, I can't seem to find it. Just curious,

osxpounder

---
--
osxpounder



[ Reply to This | # ]
Recover deleted Linux partitions when returning to OS X
Authored by: Cameroon on Aug 25, '03 09:13:42PM

There's a much easier way to accomplish this (I was just messing with Debian on this iBook as well).

Stick the Mac OS X install CD in. Restart with C key held down. As soon as the machine starts booting (right about the time the screen goes gray), hold down Cmd-S to boot into single user mode. This will put you into the command line, but from software running off the CD.

Now, run pdisk and edit the partition table of your hard drive.

When pdisk starts, edit the disk

e /dev/rdisk0 (that's what mine was).

Then delete the offending partitions and create (using capital C) a partition in their place as Apple_HFS. Then write the partition changes and exit pdisk. Exit out of the shell and the boot will continue. (This procedure is much like the one used when installing Linux in the first place [as noted in the linked HOWTO].)

When the installer opens, open Disk Utility and erase the "blank" partition. That's it, disk parititon fixed.



[ Reply to This | # ]
Recover deleted Linux partitions when returning to OS X
Authored by: gabrielef on Jan 14, '04 06:59:24AM

neither osx's install disc or (mac)pdisk (singleuser startup) worked for me, disk was not-writeable to mac after debian.
Worked only with debian's install-like way.



[ Reply to This | # ]