Partitioning
Introduction - 5 Minutes
- About Me
- Course Overview
Partitioning basics - 10 Minutes
- Tools
- Primary, Extended, and Logical
Creating Partitions - 15 Minutes
- Creating a Windows(NTFS) Partition on an empty HD.
Fig.A
Fig.B
Fig.C
- HD with Windows, Resize Partition
Fig.D
Fig.E
- Creating an Extended Partition
Fig.G
Fig.F
Moving Partitions - 10 Minutes
- Moving Partitions
Fig.G
Fig.H
Fig.I
Formatting Partitions - 10 Minutes
- Formatting Partitions
Deleting Partitions - 10 Minutes
- Deleting Partitions
Closing & Q&A - 5 Minutes + Extra
- Closing comments and then questions.
Links & Materials
Good Partitioning Guide
Partitioning Basics
Linux Partitioning Guide
Gparted General How-To
Ubuntu Guide - Multiple OS installation
Shrinking Windows7/Vista Partition
Moving A Partition
Partition Editors and Backup Tools
Lecture Draft
Session Logs
1 === cjohnston changed the topic of #ubuntu-classroom to: Ubuntu Classroom || Ubuntu User Days | Current Session: Partitioning 101 ~~ Presented by duanedesign || Please ask questions in #ubuntu-classroom-chat || Ubuntu User Days Survey: http://www.surveymonkey.com/s/WQWHJQY
2 [19:59] <MagicFab> My direct phone number is at https://edge.launchpad.net/~magicfab - honestly I'll answer all questions about this if anyone want to call (weekdays) :)
3 [20:00] <cjohnston> Up next we have duanedesign..
4 [20:01] <cjohnston> duanedesign is a last minute fill in due to someone else not feeling well, so I will let him introduce himself.
5 [20:01] <cjohnston> duanedesign it's all you. :-)
6 [20:01] <duanedesign> thank you cjohnston
7 [20:01] <cjohnston> Also, duanedesign has built in time for questions, so please wait to ask your questions until he asks for them
8 [20:02] <duanedesign> I am contact for the OKlahoma loCo. Proud member of the Ubuntu Beginners team. From my perch on the BT, as we call it, I participate in many parts of the community
9 [20:03] <duanedesign> from Bug Triage to Launchpad Answers, wiki work, ect
10 [20:03] <duanedesign> I am here today to talk to you guys about Partitioning
11 [20:04] <duanedesign> There are three types of partitions Primary, Extended, and Logical
12 [20:04] <duanedesign> The original partitioning scheme for PC hard disks allowed only four partitions, thus you are allowed up to 4 primary partitions. Linux numbers primary partitions 1-4.
13 [20:04] <duanedesign> You can only create 4 Primary Partitions on a single physical hard drive
14 [20:04] <duanedesign> To overcome this limitation, extended partitions are used. An Extended partition creates a space where you can have more partitions beyond the 4 Primary Partitions. Partitions made within the Extended Partition are called Logical Partitions
15 [20:05] <duanedesign> Only one extended partition may be created on a hard drive. This Extended Partition will occupy one of the four Primary Partition slots. Any number of Logical partitions may be created within an Extended partition, and they may be formatted with any filesystem.
16 [20:06] <duanedesign> the usual suspects when it comes to filesystems are NTFS for Windows and ext4 for Ubuntu
17 [20:07] <duanedesign> i am going walk you through creating some partitions
18 [20:08] <duanedesign> you can visit this page for screenshots that might help illustrate some of the points made
19 [20:08] <duanedesign> https://wiki.ubuntu.com/UserDays/01232010/Partitioning
20 [20:09] <duanedesign> most, and this is an assumption on my part, people come to Ubuntu with a Windows install
21 [20:09] <duanedesign> However i will start with a blank Hard Drive, making that Windows partition
22 [20:10] <duanedesign> just to cover all the bases :)
23 [20:11] <duanedesign> your partition tool from the Live Cd is accessed System/Administration/Partition Editor. In this first scenario the drive is empty, so you will be greeted with a window that looks like this Fig.A
24 [20:11] <duanedesign> NOTE: FigA corresponds to the screenshots on the link i posted
25 [20:12] <duanedesign> you will Select the partition you wish to reformat by right clicking either on the graphical display or on the line below it that corresponds to the partition. If the partition is mounted (you will know because all your options except 'Unmount' will be greyed out), you must unmount it first Click on the "Unmount" option in the menu.
26 [20:13] <duanedesign> Click the "New" option in the menu. And you will be greeted with Fig.B
27 [20:13] <duanedesign> Position your cursor over the "Filesystem" Menu. Select "NTFS" from the list. Notice the "Create As" line above the file types. This is where we select the type of parition we are creating. We will let this stay as Primary.
28 [20:14] <duanedesign> NTFS remember because we are creating the windows partition first
29 [20:15] <duanedesign> your Windows install will always be on a primary partition so we will leave it primary in this scenario
30 [20:15] <duanedesign> Click the "Apply" button and, once the creation process is complete the partition is created Fig.C
31 [20:16] <duanedesign> you will notice that the unallocated entry is now NTFS
32 [20:16] <duanedesign> this is what most people with a Windows computer will start with
33 [20:17] <duanedesign> now you must decide if you want to dual boot and keep your windows install or remove it and go all the way Ubuntu
34 [20:18] <duanedesign> first i will walk you through resizing the windows partition to make room for Ubuntu
35 [20:19] <duanedesign> if you have XP this will be a bit easier thatn if you have Vista/Win7
36 [20:20] <duanedesign> If using Windows XP you can resize the partition within Ubuntu
37 [20:20] <duanedesign> So to to resize
38 [20:21] <duanedesign> Select the partition you wish to reformat by right clicking either on the graphical display or on the line below it that corresponds to the partition that you wish to resize. If the partition is mounted, you must unmount it first. Click on the "Unmount" option in the menu.
39 [20:21] <duanedesign> i should of prefaced all this with the very important statement. Always back up data if oyu have any on a computer you are doing any partitioning
40 [20:22] <duanedesign> Once you are sure the partition is unmounted, right click on the partition you wish to resize and select "Resize/Move" from the menu Fig.E
41 [20:22] <duanedesign> you have 2 options when it comes to resizing
42 [20:23] <duanedesign> Dragging and sliding. Position the cursor over the arrow on either side of the graphical bar, left click and hold, then drag the arrow; away from the edge for shrinking or towards the edge (into the free space, if available) to expand it.
43 [20:23] <duanedesign> this can be seen in Fig.E
44 [20:23] <duanedesign> https://wiki.ubuntu.com/UserDays/01232010/Partitioning
45 [20:23] <duanedesign> at this link (for anyone just joining)
46 [20:23] <duanedesign> Changing the "New Size" or the "Free Space Preceeding/Following" sizes.
47 [20:24] <duanedesign> This is done either by using the up/down arrows to the right of the "New Size" window, or by directly editing the size itself in that Window.
48 [20:24] <duanedesign> After changing the size of the partition, just click the "Resize/Move" button, and the changes will be recorded and visible in a window at the bottom. When you are sure that you have resized it as you desire, you click the "Apply" button at the top and the partition will be resized. Fig.D
49 [20:25] <duanedesign> now you have a nice area for an Ubuntu install
50 [20:25] <duanedesign> as seen in Fig.D
51 [20:26] <duanedesign> Now if you are coming from Vista or Windows 7 it is recommended that you do this resizing in Windows
52 [20:27] <duanedesign> The Windows partition must be resized from within Windows Vista and Windows 7 using the shrink/resize option:
53 [20:27] <duanedesign> Administrative Tools --> Disk Management tool -> Shrink Volume
54 [20:28] <duanedesign> sounds easy enough right
55 [20:28] <duanedesign> well almost
56 [20:28] <duanedesign> Unlike Windows XP, Vista and Windows 7 does not allow you to move the MFT (Master File Table) that controls the NTFS file structure. Inexplicably, Microsoft locates this near the middle (or end) of the partition, somewhat limiting the ability to resize (shrink) the partition completely. Although you will be able to gain some hard drive space from the "Shrink Volume" command, it will be limited
57 [20:30] <duanedesign> Ive never had a problem with this. However someone who seemed to know what they were talking about filled me in on this :)
58 [20:30] <duanedesign> On the link i have posted with the screenshots there will be links you can use to get more detailed info
59 [20:31] <duanedesign> including this topic. However i will walk you through the steps to
60 [20:31] <duanedesign> get the maximum shrinkage out of your Vista Win7 partition
61 [20:32] <duanedesign> 1. Run the Disk Cleanup Wizard, making sure to remove the hibernation file and all restore points.
62 [20:33] <duanedesign> now remember we are in Windows right now
63 [20:33] <duanedesign> 2. Disable System Restore
64 [20:33] <duanedesign> 3. Disable the pagefile ( Open up System in Control Panel, then Advanced System Settings \ Advanced \ Performance \ Advanced \ Change \ No Paging File.
65 [20:33] <duanedesign> 4. In the same Advanced Settings, go to Startup and Recovery \ Settings and then change the Write debugging information drop-down to ?None? to disable the kernel memory dump.
66 [20:33] <duanedesign> 5. Disable Hibernation mode in your power options \ advanced power options screen.
67 [20:33] <duanedesign> 6. Reboot the machine, and then delete your c:\pagefile.sys file,
68 [20:34] <duanedesign> After resizing the Windows Partition Reboot Windows a couple of times. This allows the Windows system to automatically rescan the newly-resized partition (using chkdsk in earlier versions or a similar utility in later versions) and write changes to its own bootloader configuration files. If you start mucking around with other partitions before Windows has a chance to reset itself, the Windows bootloader will not be able to read
69 [20:35] <duanedesign> considering all this, remember you have the option of backing up your data and formatting the whole drive and beginning from a clean slate
70 [20:36] <duanedesign> that is your decision to make. You should of already backed up all your data ;)
71 [20:36] <duanedesign> ok
72 [20:36] <duanedesign> now we have resized our windows partition
73 [20:36] <duanedesign> Fig.D
74 [20:37] <duanedesign> you can reference the figur numbers at https://wiki.ubuntu.com/UserDays/01232010/Partitioning
75 [20:37] <duanedesign> for those just getting here :)
76 [20:37] <duanedesign> as we talked about you are limited to 4 primary partitions
77 [20:38] <duanedesign> well we would quickly reach that with our uBUNTU install
78 [20:38] <duanedesign> so we are going to create an Extended Partition
79 [20:38] <duanedesign> Creating an Extended Partition is done the same way as creating a Primary partition. Remember the "Primary" type in the menu, this time you will select "Extended"
80 [20:39] <duanedesign> so just as we created the Primary partition for windows in the first step
81 [20:39] <duanedesign> When Extended is selected, all the file types in the menu below will be greyed out. There is no file type associated with an Extended partition. An Extended Partition is basically a container
82 [20:40] <duanedesign> so if you look at Fig.B those filetype options willo not be available
83 [20:40] <duanedesign> an extended partition is a container
84 [20:40] <duanedesign> for ourAn Extended Partition is basically a container for any number of Logical partitions, which can be of any file system format.
85 [20:41] <duanedesign> So we are booted up in our LiveCD after shrinking our Windows partition.
86 [20:41] <duanedesign> Or this is where you would pick up if you are doing a straight Ubuntu install
87 [20:42] <duanedesign> Select the unallocated partition you wish to reformat by right clicking either on the graphical display or on the line below it that corresponds to the partition.
88 [20:42] <duanedesign> Click the "New" option in the menu.
89 [20:42] <duanedesign> Position your cursor over the "Create As" Menu. Select "Extended Partition" from the list.
90 [20:43] <duanedesign> you will want to make this extended partition the rest of the drive
91 [20:44] <duanedesign> all the partitions we are going to create for Ubuntu will go inside it.
92 [20:45] <duanedesign> after you create the Extended partition you will end up with an unallocated space in the Extended partition See Fig.G
93 [20:46] <duanedesign> notice its the same size as our Extended Partition
94 [20:46] <duanedesign> now we need to fill it with our Logical Partitions
95 [20:47] <duanedesign> For an Ubuntu install I will recommend the following partition scheme
96 [20:48] <duanedesign> = root min size 5 GB (Yes, I know you can go smaller if needed), 15-20 Gb may be better if you have the HD space.
97 [20:48] <duanedesign> actually 20 is a bit overkill
98 [20:48] <duanedesign> Swap X 1.5 RAM at least the size of RAM for Suspend to Disk
99 [20:49] <duanedesign> some people will say 2X. thst is too much
100 [20:49] <duanedesign> at least the size of RAM
101 [20:49] <duanedesign> Rest for /home
102 [20:50] <duanedesign> ok so the short of it is. the root partition contains Linux and your apps. The home drive is you personal files. And swap is an area the computer uses like RAM on your Hard Drive
103 [20:50] <duanedesign> you will want an extra /home partition
104 [20:50] <duanedesign> this makes it easy to reinstall if something goes wrong
105 [20:51] <_marx_> QUESTION No partition for /root?
106 [20:51] <duanedesign> you will preserve all your settings and pictures of your cats
107 [20:52] <duanedesign> /root partition is usually between 10-15GB
108 [20:52] <duanedesign> / = root min size 5 GB (Yes, I know you can go smaller if needed), 15-20 Gb may be better if you have the HD space.
109 [20:52] <duanedesign> you will notice root is mentioned as /
110 [20:52] <duanedesign> that is how you will set the mount point
111 [20:53] <duanedesign> R-click the unallocated space in your Extended partition and get to work :)
112 [20:53] <duanedesign> for example
113 [20:54] <duanedesign> to reiterate, because this is important and a lot of questions get asked
114 [20:54] <duanedesign> 10 / = root
115 [20:54] <duanedesign> RAM = swap
116 [20:54] <duanedesign> rest /home
117 [20:54] <duanedesign> you will specify this under mount point
118 [20:55] <duanedesign> you will create these Partitions just like the others.
119 [20:55] <duanedesign> Specifying Ext.4 for the filesystem
120 [20:55] <duanedesign> and Logical for the type
121 [20:56] <duanedesign> i am running out of time
122 [20:56] <duanedesign> so i will leave a few minutes for questions
123 [20:56] <duanedesign> fire away in #ubuntu-classroom-chat
124 [20:57] <duanedesign> here is the link to the wiki page for this session. I will have links to all the resources i used
125 [20:57] <duanedesign> https://wiki.ubuntu.com/UserDays/01232010/Partitioning
126 [20:57] <duanedesign> Guys, do I still have to make the swap space the same size of the RAM if I'm on the 64 bit system? I've got 6GB of Ram, and that would be a lot!
127 [20:58] <duanedesign> Question^^
128 [20:58] <duanedesign> if you ever desire to Suspend to disk the answer is yes
129 [20:58] <duanedesign> otherwise that is a bit much
130 [20:59] <duanedesign> I have heard this rule before RAM > 1 Gb swap = 2 Gb
131 [20:59] <duanedesign> AmrH: so that might be a good guide
132 [21:00] <duanedesign> swap is one of those topics that is debated at length in the community
133 [21:00] <duanedesign> thank you everyone
134 [21:00] <cjohnston> Thanks duanedesign !