Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Partitioning an empty drive on x86
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
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1563
Location: Germany

PostPosted: Thu Jan 26, 2006 5:14 pm    Post subject: Partitioning an empty drive on x86 Reply with quote

Hello.
I try to copy an old 20G to an 80G drive, which is now built into an x86. Before installing into the iBook I want to prepare the drive.
Running Mandriva on x86 I first had to compile mac-fdisk (with mac-fdisk_0.1-11.diff patch), so with gentoo's mac-fdisk should be no difference:
Code:
[root@MaB01 mac-fdisk-0.1.orig]# ./pdisk /dev/hde
/dev/hde
Command (? for help): p
No partition map exists
Command (? for help): i
size of 'device' is 4194304 blocks:
new size of 'device' is 4194304 blocks
Command (? for help): b
First block: 2p
Command (? for help): p
/dev/hde
        #                    type name                length   base    ( size )  system
/dev/hde1     Apple_partition_map Apple                   63 @ 1       ( 31.5k)  Partition map
/dev/hde2         Apple_Bootstrap bootstrap             1600 @ 64      (800.0k)  NewWorld bootblock
/dev/hde3              Apple_Free Extra              4192640 @ 1664    (  2.0G)  Free space

Block size=512, Number of Blocks=4194304
DeviceType=0x0, DeviceId=0x0

Command (? for help):

But the drive should have 80G.
I also tried the blocks fdisk tells me:
Code:
 [root@MaB01 mac-fdisk-0.1.orig]# fdisk /dev/hde

Befehl (m für Hilfe): n
Befehl  Aktion
   e      Erweiterte
   p      Primäre Partition (1-4)
p
Partitionsnummer (1-4): 1
Erster Zylinder (1-9729, Vorgabe: 1):
Benutze den Standardwert 1
Letzter Zylinder oder +Größe, +GrößeK oder +GrößeM (1-9729, Vorgabe: 9729):
Benutze den Standardwert 9729

Befehl (m für Hilfe): p

Platte /dev/hde: 80.0 GByte, 80026361856 Byte
255 Köpfe, 63 Sektoren/Spuren, 9729 Zylinder
Einheiten = Zylinder von 16065 × 512 = 8225280 Bytes

Gerät  boot.     Anfang        Ende     Blöcke   Id  System
/dev/hde1               1        9729    78148161   83  Linux
Code:
[root@MaB01 mac-fdisk-0.1.orig]# ./pdisk /dev/hde
/dev/hde
Command (? for help): i
size of 'device' is 4194304 blocks: 78148161
new size of 'device' is 78148161 blocks
Command (? for help): b
First block: 2p
Command (? for help): p
/dev/hde
        #                    type name                 length   base     ( size )  system
/dev/hde1     Apple_partition_map Apple                    63 @ 1        ( 31.5k)  Partition map
/dev/hde2         Apple_Bootstrap bootstrap              1600 @ 64       (800.0k)  NewWorld bootblock
/dev/hde3              Apple_Free Extra              78146497 @ 1664     ( 37.3G)  Free space

Block size=512, Number of Blocks=78148161
DeviceType=0x0, DeviceId=0x0
No I have 38G, but still not 80G. Gentoos doc sais: Not delete Apple_partition_map. But how do I start with an empty disc?
_________________
ppc:PowerBook5,8 15"(1440)-G4/1.67,2G|amd64:HP EliteBook 8560w,i7-2620M,16G|Acer Z5610 (Core2QuadQ8200),8G|amd64-prefix:OpenSuse|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Lila-Theme
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Thu Jan 26, 2006 6:52 pm    Post subject: Reply with quote

Is parted available for use? If so, try using that instead, just make sure that you use Apple partition types.
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1563
Location: Germany

PostPosted: Thu Jan 26, 2006 11:31 pm    Post subject: Reply with quote

With mklabel mac I have
Code:
1       1kB     32kB    32kB                 Apple
But how do I make the Apple_Bootstrap?
If I go back to mac-fdisk after that I see ( 74.5G) Free space. And I could continue with mac-fdisk then.
_________________
ppc:PowerBook5,8 15"(1440)-G4/1.67,2G|amd64:HP EliteBook 8560w,i7-2620M,16G|Acer Z5610 (Core2QuadQ8200),8G|amd64-prefix:OpenSuse|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Lila-Theme
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Thu Jan 26, 2006 11:42 pm    Post subject: Reply with quote

For general parted and mac info:
http://www.gnu.org/software/parted/manual/html_mono/parted.html#SEC53
Bootstrap partition:
http://www.gnu.org/software/parted/manual/html_mono/parted.html#TOC37
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1563
Location: Germany

PostPosted: Fri Jan 27, 2006 9:42 am    Post subject: How to create a HFS+ fs? Reply with quote

Ok, I created the new partitions on the new drive. It will be different than the old drive, and I am not sure I I will be able to boot OSX after cp all files from the HFS-Partition.

Old drive
Code:
        #                    type name                 length   base     ( size )  system
/dev/hda1     Apple_partition_map Apple                    63 @ 1        ( 31.5k)  Partition map
/dev/hda2         Apple_Bootstrap bootstrap              1600 @ 64       (800.0k)  NewWorld bootblock
/dev/hda3         Apple_UNIX_SVR2 swap                 819200 @ 1664     (400.0M)  Linux swap
/dev/hda4         Apple_UNIX_SVR2 root               31980576 @ 820864   ( 15.2G)  Linux native
/dev/hda5               Apple_HFS MacOSX              6268632 @ 32801440 (  3.0G)  HFS
/dev/hda6              Apple_Free                           8 @ 39070072 (  4.0k)  Free space

Block size=512, Number of Blocks=39070080
DeviceType=0x0, DeviceId=0x0
New drive
Code:
        #                    type name                length   base    ( size )  system
/dev/hde1     Apple_partition_map Apple                   63 @ 1       ( 31.5k)  Partition map
/dev/hde2         Apple_Bootstrap bootstrap             1600 @ 64      (800.0k)  NewWorld bootblock
/dev/hde3         Apple_UNIX_SVR2 swap                819200 @ 1664    (400.0M)  Linux swap
/dev/hde4         Apple_UNIX_SVR2 root               18874368 @ 820864  (  9.0G)  Linux native
/dev/hde5         Apple_UNIX_SVR2 var                6291456 @ 19695232 (  3.0G)  Linux native
/dev/hde6         Apple_UNIX_SVR2 home               121634816 @ 25986688 ( 58.0G)  Linux native
/dev/hde7         Apple_UNIX_SVR2 MacOSX             8679984 @ 147621504 (  4.1G)  Linux native

Block size=512, Number of Blocks=156301488
DeviceType=0x0, DeviceId=0x0

But how do I create the HFS+ filesystem? Even parted sais "filesystem hfs not implemented".
_________________
ppc:PowerBook5,8 15"(1440)-G4/1.67,2G|amd64:HP EliteBook 8560w,i7-2620M,16G|Acer Z5610 (Core2QuadQ8200),8G|amd64-prefix:OpenSuse|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Lila-Theme
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Fri Jan 27, 2006 2:59 pm    Post subject: Reply with quote

I ported the Apple tools to Linux:
https://bugs.gentoo.org/show_bug.cgi?id=46342
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
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