Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Manage Partitions with GParted How-to

You're reading from   Manage Partitions with GParted How-to A task-based, step-by-step guide that empowers you to use your disk space effectively with this book and ebook.

Arrow left icon
Product type Book
Published in Nov 2012
Publisher Packt
ISBN-13 9781849519823
Pages 86 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Curtis Gedak Curtis Gedak
Author Profile Icon Curtis Gedak
Curtis Gedak
Arrow right icon
View More author details
Toc

Preparing for dual boot with GNU/Linux (Become an expert)


In this recipe we pre-create partitions for the GNU/Linux operating system, the virtual memory swap space, and data sharing.

Getting ready

Before performing this task, we highly recommend that you backup your data. This task involves moving the end of a partition boundary, which is a moderate risk activity.

How to do it...

  1. Select the current operating system primary partition.

  2. Choose the Partition | Resize/Move menu option and a Resize/Move window is displayed

  3. Click on the right-hand side of the partition and drag it to the left so that at least 10 percent free space remains in the partition.

    Note

    The 10 percent figure is a safe minimum to ensure that Windows runs properly. We need to balance the space allocated to Windows with the amount of space desired for a GNU/Linux installation (OS and swap space) plus a shared data partition. For example, with Ubuntu 12.04, the absolute minimum hard disk space needed for the operating system is 500 MB.

  4. Click on Resize/Move to queue the operation.

  5. Select the unallocated space.

  6. Choose the Partition | New menu option and a Create new partition window is displayed.

  7. Click on the right hand side of the partition and drag it to the left so that the partition is bigger than the minimum size required by the GNU/Linux distribution, but leaves some space for swap (for example, twice the RAM memory size) and data partitions (for example, any space left over).

  8. Click on the File system drop down list and select ext4.

    Note

    The ext4 file system is commonly used by many modern GNU/Linux distributions.

  9. Click on Add to queue the operation.

  10. Select the unallocated space.

  11. Choose the Partition | New menu option and a Create new partition window is displayed.

  12. Click on the Create as drop down list and select Extended Partition.

    Note

    At least one extended partition is needed because an msdos partition table does not permit more than 3 primary partitions and 1 extended partition. Inside the extended partition we can create multiple logical partitions.

  13. Click on Add to queue the operation.

  14. Select the unallocated space from the extended partition.

  15. Choose the Partition | New menu option and a Create new partition window is displayed.

  16. Click on the right-hand side of the partition and drag it to the left so that the new size is twice the amount of RAM in your computer (for example, 2 * 256 MiB = 512 MiB).

    Tip

    A value larger than the amount of RAM will enable the use of hibernation on devices such as laptop computers.

  17. Click on the File system drop down list and select linux-swap.

  18. Click Add to queue the operation.

  19. Select the unallocated space from the extended partition:

  20. Choose the Partition | New menu option and a Create new partition window is displayed.

  21. Click on the File system drop-down list and select fat32.

    Tip

    The fat32 file system is freely supported by a wide range of operating systems. If you need to create files larger than 4 GB, then consider choosing an NTFS file system instead. Modern GNU/Linux distributions can read from and write to NTFS file systems by using the ntfs-3g FUSE driver.

  22. Click on the Label text entry box and enter a label; for example, MYDATA.

  23. Click on Add to queue the operation.

  24. Choose the Edit | Apply All Operations menu option to apply the queued operations to disk.

  25. Click on Apply to apply operations to disk and click on Close to close the apply operations to disk window.

How it works...

This example uses several of the tasks that we covered earlier.

To make room for GNU/Linux we freed up unallocated space by shrinking the operating system primary partition. Then we created a partition with the ext4 file system, and another with linux-swap. The extra step to create a data partition in fat32 format adds flexibility because this partition can be shared with other operating systems.

Since the MSDOS partition table permits up to 4 primary partitions, we could have created the linux-swap and fat32 partitions as primary partitions too. However, this would prevent creating additional partitions in the future. That is why we chose to place these two file systems in logical partitions within an extended partition.

You are now ready to install GNU/Linux. Be sure to choose the manual partition option when installing your distribution. That way you can configure Linux to use the partitions you just created.

The following steps demonstrate how to choose a manual partition layout while installing Ubuntu 12.04.

  1. After you have downloaded the distribution .iso file and burned it to a CD, boot your computer using the Ubuntu Live CD.

  2. Choose your Language and the Install Ubuntu option.

  3. At the Preparing to install Ubuntu screen, click on Continue.

  4. At the Installation type screen, choose Something else and click on Continue.

  5. Select the ext4 partition (for example, sda2) and click on Change....

  6. Set Use as to Ext4 journaling file system, Mount point to / and click on OK.

  7. Scroll down and select the fat32 partition (for example, sda6) and click on Change....

  8. Set Use as to FAT32 file system, type in a Mount point (for example, /data), and click on OK.

  9. Note that you do not need to select the linux-swap partition (for example, sda5) to use as swap space because the Ubuntu installer will do this automatically.

  10. Ensure that the Device for boot loader installation is correct (for example, /dev/sda).

  11. Click on Install Now.

  12. When you are prompted Do you want to return to the partitioner, click on Continue.

  13. Follow the instructions on the remaining screens to choose your location, keyboard layout, your name, computer name, username, password, import accounts (if desired), and when the installation completes click on Restart Now.

All data stored in the fat32 partition will be available to both operating systems. In this example Ubuntu installation, the fat32 partition data is accessible in the top level /data directory. In Windows, it is accessible through a drive letter, such as the G: drive.

There's more...

Remember from previous recipes that if you resize a partition containing an NTFS file system, you should reboot into Windows twice. This permits Windows to perform file system consistency checks.

OEM Partition

Some personal computers have an Original Equipment Manufacturer (OEM) partition. This partition is usually at the start of the disk device and is often involved in the boot process. Most often the OEM partition contains tools to restore your PC to original factory condition. As such we suggest keeping this partition in case you ever need to restore your PC to factory condition.

You have been reading a chapter from
Manage Partitions with GParted How-to
Published in: Nov 2012
Publisher: Packt
ISBN-13: 9781849519823
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime