Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mac-fdisk partition table not writing properly [solved]
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message

Joined: 28 May 2007
Posts: 35

PostPosted: Fri Aug 17, 2007 8:35 pm    Post subject: mac-fdisk partition table not writing properly [solved] Reply with quote

I am installing Gentoo on an old iMac. I first made the mistake of using fdisk to overwrite the partition table, and I ran into problems configuring yaboot. Now I am trying to do it properly with mac-fdisk. Interestingly, the old Macintosh partition table is still visible when I run mac-fdisk (even though fdisk and 'ls /dev' show the hda1,hda2,hda3 that I partitioned with fdisk). However, when I write a partition table with mac-fdisk, Linux still sees the table I wrote with fdisk. Originally, Linux could see the Mac partition scheme, but since I overwrote it with fdisk I can't seem to undo what fdisk has done. What could be the problem there?

Somehow I managed to overwrite the fdisk partition table. I'm not sure precisely how I did it. It might have been by initializing a new partition table in mac-fdisk? In any case, the problem fixed itself somehow.
Back to top
View user's profile Send private message

Joined: 29 Jan 2007
Posts: 546
Location: Titan

PostPosted: Fri Aug 17, 2007 10:39 pm    Post subject: Reply with quote


Honestly oconnor663 I'd start from the beginning. fdisk and mac-fdisk work in subtely different ways. I myself used 'Disk Setup' to setup the partition and then just changed their type with mac-fdisk. You can do this all with mac-fdisk but the it's more difficult.

When the Gentoo Linux Wiki is back up you can look at how I installed on first-gen iBook.

HOWTO Install Gentoo - From Stage1 on an iBook G3 - Gentoo Linux Wiki

A few of the notes from it:

Partition with MacOS install CD

A note to the wise, partitioning does erase what ever you have on your system, backup first!

Hold C on boot

partitioned into 3 volumes with Disk Setup
2.7G / - Unallocated
384MB swap - Mac OS Extended
2.6G / - Mac OS Extended

Install MacOS now on the final-partition.

Restart and Zap PRAM

Start the Gentoo LiveCD
(the Minimal CD is all that is necessary)

Hit Enter for default installer.
LiveCD may hang sometimes. Try to boot once more.

NOTE: If you have a dead battery like my iBook has, you'll need to set the clock for the LiveCD (or Gentoo) to boot. To do this from Open Firmware start the computer and hold down Apple + O + F.

To set the time to: 1:23:45 June, 7th, 2000
decimal dev rtc 45 23 1 6 7 2000 set-time

You might see this message after LiveCD boot. It's not big deal.
"Error, timed out waiting for a valid DHCP server response
Network is down."

Firing Up the network
Most networks are detected. If not try typing "net-setup". I use airport:
modprobe airport

I remotely installed Gentoo from my MacBook.
This makes it easy to cut-paste commands into the terminal and and follow the guide. So I had to set up ssh:

On the iBook start ssh and give the LiveCD a password:
 /etc/init.d/sshd start

type ifconfig to find your internet address:

On the remote computer:
ssh -l root

Preparing Disk and Filesystem

Set the hard disk setting temporarily for the install.
hdparm -d1c1u1m16 /dev/hda

Defining the Partition Map

The partition map we already created with Disk Setup. mac-fdisk will be used to specify what each partition will be used for.
mac-fdisk /dev/hda

   p   #print current partition map

   Create Apple_Bootstrap
   b   #for Apple_Bootstrap select
   8p   #selects eighth block device

   root setup
   c   #custom setup
   9p   #first start block, 9th partition
   9p    #end block, 9th partition
   /   #name of root partition

   swap setup
   swap   #name of partition
   w   #write changes to disk
   y   #to write partition map
   q   #quit

Formatting the Partitions
mkfs.ext3 /dev/hda9

Make your swap partition and activate it.
mkswap /dev/hda10
swapon /dev/hda10

Make the root partition ready to use and enter the directory
mount /dev/hda9 /mnt/gentoo && cd /mnt/gentoo

Helpful Linux Tidbits
Back to top
View user's profile Send private message

Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Sat Aug 18, 2007 1:33 pm    Post subject: Reply with quote

Moved from Installing Gentoo to Gentoo on PPC.
Better off here.
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum