Alright, here's the deal.

Don't ask me about my reasons for installing Mac OS X on this notebook, or how, please. I just need help with partitions.

I have an img file that I would like to use dd onto a partition on my harddrive.

However, I have no idea where to begin with creating a new partition, shrinking my current partition, and making a third one as well.

Currently, I have GParted installed, and it tells me that I have /dev/sda1, which is my ext partition, /dev/sda2, which is my extented partition, and /dev/sda5, a child partition to the extended partition, which is called "linux-swap".

I want to create two more. One for music, which would have to be about 15gb large, and one for my installation of Mac OS X. I have a pre-built .img file (6.0gb) of Mac OS X Tiger that I would like to use for this.

Once I create the music partition (which I would like to do first), I would drag all of my music onto this partition, and tell Amarok (under Ubuntu Linux) to read my music from there. Then, I would delete my /home/alex/Music/ folder, to free up that 10gb of space.

Then, I would create my 15gb partition for Mac OS X. After that, I would use dd to dump the image file onto the partition.

Just one problem -- How? I need instructions for shrinking /dev/sda1, as well as creating the other two partitions, and also how to dump my hard drive image onto the final-created partition.

And, how would I ask GRUB to display this operating system, once installed? Would it automatically come up?

Thank you, very much so, in advance.

EDIT: More info:

alex@alex-laptop:~$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1             73742752  32893224  37103576  47% /
varrun                  768376       256    768120   1% /var/run
varlock                 768376         0    768376   0% /var/lock
udev                    768376        60    768316   1% /dev
devshm                  768376         0    768376   0% /dev/shm
lrm                     768376     35120    733256   5% /lib/modules/2.6.22-14-rt/volatile
alex@alex-laptop:~$
alex@alex-laptop:~$ df -a
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1             73742752  32893232  37103568  47% /
proc                         0         0         0   -  /proc
/sys                         0         0         0   -  /sys
varrun                  768376       256    768120   1% /var/run
varlock                 768376         0    768376   0% /var/lock
udev                    768376        60    768316   1% /dev
devshm                  768376         0    768376   0% /dev/shm
devpts                       0         0         0   -  /dev/pts
lrm                     768376     35120    733256   5% /lib/modules/2.6.22-14-rt/volatile
securityfs                   0         0         0   -  /sys/kernel/security
binfmt_misc                  0         0         0   -  /proc/sys/fs/binfmt_misc
none                         0         0         0   -  /proc/fs/vmblock/mountPoint
alex@alex-laptop:~$

>I need instructions for shrinking /dev/sda1
GParted can resize ext2 and ext3 partitions. Read the documentation if you need more information on this (although the program UI is pretty straightforward).

>as well as creating the other two partitions
Use the "New" button/option in GParted, with the free space selected. Again, it's very straightforward if you have free space on your hard drive.

>how to dump my hard drive image onto the final-created partition.
Just the usual dd usage.

# dd if=partition.img of=/dev/sda2

>And, how would I ask GRUB to display this operating system, once installed?
Edit your /boot/grub/menu.lst file so that it chainloads the partition. Hint: look at your Windows menu option.

Thank you for your quick reply.

However, can I resize my ext3 partition while running that partition of Linux? ie: In realtime?

No, and even if you could, editing your partition table while a partition is in use is dangerous and should be avoided whenever possible. The easiest method is to boot off an Ubuntu Live CD and use GParted from there.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.