PDA

View Full Version : Tutorial: Paritioning A Single Drive With Disk Utl



gmask1
27th April 2005, 07:25 PM
Umm, so this is my contribution for the 'getting ready for Tiger' week... I have screenies for the figures, if Disko wants to add them all in (or I can host them offsite)...
----
In order to properly prepare for the arrival of Tiger, I decided that it was time to do a task that I had been putting off... properly partitioning the hard disk.

None of the servers that I or anyone else deploy at work leave the user home directories on the boot partition. Where preferable, we always span user home directories, and application home and/or data directories across as many partitions (and disks) as possible. In the home environment this is much less useful, and can lead to confusion and even losing data in a mess of drives, folders and files. However, it is still worthwhile having at least two partitions on a computer - one for the system and applications, and a second for user data. This way, the system can be rebuilt without the fear of accidentally losing data.

I decided to set up an 80 gigabyte disk for two 40 gigabyte partitions. Having hunted around for partitioning tools, I figured I'd just bite the bullet, back everything up, and start from scratch. Given that I had only an inkling of how to do the partitioning in OSX 10.3, but having done countless fdisk's in Windows World, here's what I did:

1. Insert the Grey OSX CD that was shipped with my trusty Powerbook.
2. Restart the laptop with the CD in the drive.
3. As soon as the boot-up 'gong' sounded, hold the 'c' key down; I don't know exactly how long, I kept it down until the grey boot-up screen appeared.
4. Cue lots of CD-churning. OSX is loading from the cd, and soon presents the 'Preparing System' screen. (Fig. 1)
5. Shortly you're invited to select a language (Fig. 2). I was tipped off that I should be looking for drop-down menus at this point, and I find one at the top of the screen (Fig. 3). 'Open Disk Utility' is the likely option, so give it a click.
6. The Disk Utility opens, and reports that it is 'Gathering disk information...'. Shortly it displays the disk utility (Fig. 4), with the disks arranged in a tree down the left hand side of the window. Each partition currently on the disks is also displayed. According to this diagram, I have a single partition on the 74.5 GB Fujitsu drive called 'Macintosh HD'. I want to repartition the 74.5 GB drive, so I click on it...
7. (Fig. 5) The center area of the screen displays options that are relevant to the drive I clicked. One such tab across the top of the panel is 'Partition', so I'll click that.
8. Now I'm in business. The drive is displayed in a graphical form, along with it's attributes - Volume name, Size and Format. There are a couple of options I didn't know about, such as Scheme and Split; For starters, I'll try a split (Fig. 7).
9. Oooh, it cut the existing partition into equal halves, and gave each half a new name. Neat. I notice that the revert button is available, which resets my mucking about back to the original setup. What about schemes?
10. (Fig. 8) Now this is showing off - disk utility can divide up the drive in a variety of neat ways. I just want the two partitions, so I'll just stick with the '2 Partitions' option.
11. (Fig. 9) I've got my partitions, and I'm going to rename them so I recognize which is which. I click on the top partition, and type the new name 'Boot'. Then I click the bottom partition, and type the name 'Data' (Fig. 10). I could change capacities if I wanted to, but I'll leave it as is.
12. I'm ready to partition, so I click the partition button, and receive my final warning (Fig. 11) - cue ominous music...
13. I'm good to go, so OSX runs off and formats the disk for me. Note that it says 'Formatting Disk', implying that the whole disk, and all partitions are being formatted at once (Fig. 12).
14. Once it's all done, I can quit the disk utility (Fig. 13), and continue the OSX installation. Notice that the installer shows exactly what I partitioned earlier (Fig. 14).

The rest of the installation is child's play, and not really relevant to my preparation. What is important is that I create a home folder on the data partition, and figure out how to link the user to it...

1. In Finder, I create in the data partition the folder structure /user/home/gregaskew which is the location I want the new home folder for me to be.
2. Again in Finder, run the 'NetInfo Manager', found by default in the Applications - Utilities folder.
3. This is the NetInfo Manager (Fig. 15). In the center pane, click on the users folder, then select the user whose home folder you are moving.
4. Click on the lock icon in the lower left corner, and authenticate as required (Fig. 16).
5. The properties for that user can now be changed. One of these is the home property (Fig. 17). To set this to the new home folder, I enter the complete path of the new folder, which is /Volumes/Data/user/home/gregaskew. Hit enter, and logout.
6. When you log in, you can go straight into the Finder, and marvel that OSX has automatically created the correct structure (Documents, Desktop folders, etc). If you have any files in your old home directory, you will need to move them yourself however.

And you're done!

back2mac
27th April 2005, 09:33 PM
Hi gmask1,

Thank you for your post.
It is an issue I have been toying with since 'switching' earlier this year.
As an 'old' Windows user - I had partitioned my XP box many times but having a go in osx has daunted me.

Your explanation is very clear and helpful.

I have a G5 iMac, 160 gig HDD. What partition sizes would you suggest and would you have a separate partition for Apps [ as was recommended for a Windows box?

Would welcome your thoughts.

gmask1
27th April 2005, 09:53 PM
I know the feeling totally, as I'm sure many on this board do. Having just re-installed Panther (10.3) and only a handful of other applications, I've used 7.4 GB of space on my boot partition. I'm actually thinking that I've been generous in sizing the boot partition, and might go through the motions again! I'm thinking 30Gb/50Gb next time.

Some OSX applications refuse to install on partitions that do not have an OSX installation, which I suppose is analogous to not having c:\winnt or c:\windows on the same partition. Having a single drive negates the performance benefits derived from having apps on separate partitions anyway, so I wouldn't worry too much about that. With 160Gb, I might do a 40Gb system drive, 100Gb for data (maybe split in two), and possibly some 4 or 8 Gb partitions for mounted CD or DVD images. This setup would let me scrub the system drive without losing data or my important images.

There are programs which will resize partitions dynamically, rather than the bulldozer technique I used, perhaps take a look at those also (iPartition springs to mind).