On Wed, May 31, 2000 at 10:52:33AM +0200, Andre Berger wrote: > Is there a way to change the partition scheme without data loss or > re-formatting? I have a PowerBook 3400/potato. My partition scheme is: im not a big fan of partition resizing, you really need to make a backup anyway becuase if anything goes wrong well... > /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_Patches Patch Partition 512 @ 320 (256.0k) Unknown > /dev/hda7 Apple_UNIX_SVR2 / 2137464 @ 832 ( 1.0G) Linux native > /dev/hda8 Apple_UNIX_SVR2 swap 163840 @ 2138296 ( 80.0M) Linux swap > /dev/hda9 Apple_HFS untitled 3 511973 @ 2302136 (250.0M) HFS > /dev/hda10 Apple_Free Extra 8291 @ 2814109 ( 4.0M) Free space > [snip fdisk crap] > > I would like to grow my ext2 /dev/hda7 at the expense of the mac > partition /dev/hda9 (for which 50mb should be enough). Plan B: If possible, I > would also like to add an Apple_Bootstrap partition for yaboot. are you planning on deleting macos permanently? or reinstalling it in a smaller partition? i am going to assume deletion as 250MB is already barly enough space for macos. i would say its possible, but you have to do it carefully and while quite sober ;-) first don't make the mistake of changing the partition size and then expecting the filesystem to suddenly have more space, it does not work that way. first you would have to resize the partition and then resize the filesystem with ext2resize. i would say you could delete hda8 and hda9 then resize hda7 to fill that space leaving 800K for bootstrap, add the bootstrap partition last in this case is fine since you have no more macos partitions. so you would have something like this: > /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_Patches Patch Partition 512 @ 320 (256.0k) Unknown > /dev/hda7 Apple_UNIX_SVR2 / 2137464 @ 832 ( 1.0G) Linux native > /dev/hda8 Apple_UNIX_SVR2 swap 163840 @ 2138296 ( 80.0M) Linux swap > /dev/hda9 Apple_Bootstrap bootstrap XXXXXX @ XXXXXXX ( 800K) Unknown the numbers are wrong, im too lazy/tired to calculate them, but your / partition would be about 254MB larger. at that point you would need to run ext2resize, from a boot floppy/CD whatever in order to actually reclaim the space. AFAIK that would work but i have never tried it, when i need to change partitioning i just clear the table and do it from scratch. that is really what i would reccommend you do, since i would NEVER attempt to screw with this without a complete backup of your data, and if you have a backup why not just do the partitioning right from scratch in the right order? also this is an example of why monolithic huge / partitions are bad, if you had farmed your partitions into / /var /usr /home it would probably be easier to make these adjustments without as much inconvenience. just my $0.02 > I could also swap my data to another HDD if necessary; it would be > fine to use this ext.HDD as a mirror for my int.HDD. Is there a tool > that mirrors /dev/hda7 including all ext2 permissions? if you make a filesystem you can just use cpio to exactly duplicate it, then cpio it back to the original, i used this method to transfer the contents of my old 6GB hard disk to a new 20GB, worked very well, no permissions or link problems at all. the other thing that might work is creating a tar archive directly to the raw disk device, i have never done that so im not sure that would work or not. (it works with tapes of course so i would think disks too...) if the disks are the same size (EXACTLY!) you can use dd, but i don't like that idea much. my advice is backup and partition like so: /dev/hda1 Apple_partition_map Apple /dev/hda2 Apple_Bootstrap bootstrap ( 800K) /dev/hda3 Apple_UNIX_SVR2 / ( 64MB) /dev/hda4 Apple_UNIX_SVR2 swap ( 96MB) /dev/hda5,6,7... Apple_UNIX_SVR2 /usr /var /home /usr/local and other assorted partitions none of that apple driver crap (unless you are installing macos again) partition tables look SOO much nicer without all that apple cruft in there ;-) -- Ethan Benson http://www.alaska.net/~erbenson/
Attachment:
pgp9kxtoroRy1.pgp
Description: PGP signature