Did something stupid with my partitions

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

Did something stupid with my partitions

Postby wm009 on Fri Nov 30, 2012 7:31 pm

Well, I didn't realize I couldn't put more than 4 partitions on a hard drive. I ended up dual booting Windows and Linux Mint. Plus there is a swap partition and another 100mb sys partition. I'm not sure what that last one is for. Anyway, I'm stuck with 30 gb of unallocated space. Since I can't have another partition, I want to just add the extra 30gb to my linux installation.

I tried doing this in gparted, while I live booted off the linux mint disc. And it wouldn't combine the partitions. It seemed like it only wanted to install partitions that are "beside" each other in gparted.

Here's a screenshot of gparted. http://i.imgur.com/hjH1x.png

Does anyone know how I can start using this hard drive space? I really don't want to reformat the drive and start from scratch as I got linux running the way I like it. But I realize that if I have to, I have to.

Thanks in advance.
wm009
Level 1
Level 1
 
Posts: 6
Joined: Fri Nov 30, 2012 7:23 pm

Linux Mint is funded by ads and donations.
 

Re: Did something stupid with my partitions

Postby 741cc on Fri Nov 30, 2012 9:46 pm

Firstly, back up any files if not already done.
Boot up with your live media and open gparted or disk-utility.
Delete the swap partition (sda5) and then delete the extended one (sda4).
Extend your Mint partition (sda3) leaving a couple of GB's (or whatever you choose) space at the end.
Create a swap partition in the empty space at the end.
Done. hth
741cc
Level 3
Level 3
 
Posts: 153
Joined: Mon Sep 03, 2012 8:00 am

Re: Did something stupid with my partitions

Postby mank_in on Sat Dec 01, 2012 7:01 am

Your hard drive already has 3 primary partition and 1 extended partition . Hard disk formated with Master Boot Record partitioning scheme can have to 4 primary partition or 3 primary partition and 1 extended partition. Extended partition can have multiple logical partition. See : http://en.wikipedia.org/wiki/Disk_partitioning
Gparted is possibly best to use because disk utility didn't have option to created extended partition.
You can try 741cc suggestion or :
- deleted sda5 and sda 4
- create new extended partition (sda4 ) using all unused partition
- create 8 GB logical drive (sda5) for swap file
- now you can used all unallocated disk space to create logical drive sda6
You cannot deleted swap file from installed linux .You must use live cd to perform this action .
Remember , after create new linux-swap ,boot from harddrive and activate new swap partition.
Tutorial Activating the swap partition is here .
Image
Sorry for my bad English , I am Indonesian.
User avatar
mank_in
Level 6
Level 6
 
Posts: 1346
Joined: Wed Nov 16, 2011 2:29 pm
Location: Bali

Re: Did something stupid with my partitions

Postby mintybits on Sat Dec 01, 2012 7:36 am

You can delete swap but not when it is active. So first open a terminal and deactivate it:
Code: Select all
sudo swap-off /dev/sda5


Then run GParted and do what 741cc says. You will need to edit /etc/fstab to change the UUID of the swap partition. You can find the new swap UUID using
Code: Select all
sudo blkid


Don't touch the first two, Windows partitions!

It is normal and better to put all your linux partitions inside an extended partition container because it provides more flexibility, but it is difficult to change what you have now. You would have to delete sda5 and then sda4, then shrink sda3 to, say, 20GB. Then move sda3 to the end of the disk. Then create an extended partition container between sda2 and sda3. Then create a logical partition, sda5. Then copy the contents of sda3 into sda5. then delete sda3. Then resize the extended to the end of the disk. then create a swap partition at the end then resize sda5. Then it won't boot so you'll have to use a live CD to fix grub using chroot.

:-) so you may prefer to forego all this.
mintybits
Level 5
Level 5
 
Posts: 836
Joined: Fri Jan 27, 2012 5:09 pm

Re: Did something stupid with my partitions

Postby wm009 on Sat Dec 01, 2012 10:55 am

Thanks for the advice everyone. I'll give the suggestions a try, but this looks like the way to go.

It is normal and better to put all your linux partitions inside an extended partition container because it provides more flexibility, but it is difficult to change what you have now. You would have to delete sda5 and then sda4, then shrink sda3 to, say, 20GB. Then move sda3 to the end of the disk. Then create an extended partition container between sda2 and sda3. Then create a logical partition, sda5. Then copy the contents of sda3 into sda5. then delete sda3. Then resize the extended to the end of the disk. then create a swap partition at the end then resize sda5. Then it won't boot so you'll have to use a live CD to fix grub using chroot.



How should one normally have their partitions set up? I was reading that you should have / on one partition and /home/ on another. For me, I don't know what is the best way to go. I suppose I'm willing to start fresh to have it set up right. I don't mind restarting with it if I can make things work properly and the best, so over the long run into stupid problems.
wm009
Level 1
Level 1
 
Posts: 6
Joined: Fri Nov 30, 2012 7:23 pm

Re: Did something stupid with my partitions

Postby 741cc on Sat Dec 01, 2012 12:14 pm

Back up any files.

Boot live media and shrink sda3 down to 15-20GB.
Expand sda4 to fill the empty space.
Move sda5 to the far right. Turn it off and remove it, then remake it if won't slide.
Make new NTFS logical partition, sda6, in the ~60Gb empty space.
Edit /etc/fstab to mount it at boot-up if you like.

Dump all your files in sda6. Now you have a partition containing your files that you can access from both Windows and Linux.
hth
741cc
Level 3
Level 3
 
Posts: 153
Joined: Mon Sep 03, 2012 8:00 am

Re: Did something stupid with my partitions

Postby srs5694 on Sat Dec 01, 2012 1:35 pm

mintybits wrote:It is normal and better to put all your linux partitions inside an extended partition container because it provides more flexibility, but it is difficult to change what you have now. You would have to delete sda5 and then sda4, then shrink sda3 to, say, 20GB. Then move sda3 to the end of the disk. Then create an extended partition container between sda2 and sda3. Then create a logical partition, sda5. Then copy the contents of sda3 into sda5. then delete sda3. Then resize the extended to the end of the disk. then create a swap partition at the end then resize sda5. Then it won't boot so you'll have to use a live CD to fix grub using chroot.


There is an easier way to do it. My FixParts utility (part of the "gdisk" or "gptfdisk" package on many distributions -- I'm not sure where Mint puts it, offhand) can convert primary to logical or vice-versa, albeit with caveats related to spacing between partitions and the number of available primary slots. In the case of wm009's setup, converting /dev/sda3 to logical might require shrinking /dev/sda2 by as small an amount as possible (or maybe not; it depends on the precise current spacing, which GParted doesn't show in the screenshot). Once that's done, FixParts could do the conversion in place, without further copying or moving. At this point, you could switch back to GParted (run from an emergency disc) to expand the extended partition, move the swap space, and expand the Linux partition (formerly /dev/sda3; but it'll be /dev/sda5 at this point).

wm009 wrote:How should one normally have their partitions set up? I was reading that you should have / on one partition and /home/ on another.


There's no one correct answer to this question. It's possible to make do with just one Linux partition, but that's inflexible. Mint uses a split of root (/) and swap by default. Many people (myself included) recommend separating out /home because that makes it easy to preserve your user files when doing radical system upgrades or switching distributions. I often recommend splitting off a 200-500MiB /boot partition, particularly on older BIOS-based computers or newer UEFI-based computers, since this helps with certain types of boot loader configurations. It's also possible to split off additional directories, like /var, /usr, /usr/local, /opt, and /tmp. Each of these has a specific purpose, most of which are relevant to particular types of configurations. A separate /var makes sense if you're running a server that makes heavy use of /var and you want to keep that data separate from the rest of the system, for instance. The problem with splitting off lots of partitions is that it becomes easy to mis-judge their sizes. If you make /var (for example) too big, it'll chew up disk space that you might need elsewhere and you'll run out of space somewhere else; and if you make it too small, you'll run out of disk space on /var too soon. You'll then be stuck having to create a workaround, resize your partitions, or add disk space sooner than you'd like.

If you're unsure, my recommendation is to use root (/), swap, /home, and perhaps /boot. This is sufficient for most casual and home users, and they're relatively easy to size -- 5-30GiB for root (/), 200-500MiB for /boot, 1-2x your RAM size for swap, and whatever's left for /home.

I might as well also mention that LVM is an option that can help with managing configurations that change frequently. Using LVM, you can split a single filesystem across multiple disks, resize multiple filesystems without moving any of their start points, and so on. Setting up LVM takes more effort initially, and there's a learning curve to overcome, so it may not be the best thing for a newbie to tackle. This is especially true in Mint, which doesn't provide good LVM support in its installer. (Fedora uses it by default, by contrast.) OTOH, once you're familiar with the more conventional partitioning tools, you might want to consider LVM for future installations.
srs5694
Level 6
Level 6
 
Posts: 1020
Joined: Mon Feb 27, 2012 1:42 pm

Re: Did something stupid with my partitions

Postby wm009 on Sat Dec 01, 2012 5:09 pm

If you're unsure, my recommendation is to use root (/), swap, /home, and perhaps /boot. This is sufficient for most casual and home users, and they're relatively easy to size -- 5-30GiB for root (/), 200-500MiB for /boot, 1-2x your RAM size for swap, and whatever's left for /home.

Okay. This sounds like the right thing to do. The problem is that it leaves no room for Windows. Unless we're talking about extended partitions, which I'll have to look into to further understand. I'll see what I can do first.

I want to get off of Windows, but there's a few things I haven't been able to get to work properly in linux yet to justify it. I'll see if I can get these things cleared up and give this set up a try.

Thanks.
wm009
Level 1
Level 1
 
Posts: 6
Joined: Fri Nov 30, 2012 7:23 pm

Re: Did something stupid with my partitions

Postby mintybits on Sat Dec 01, 2012 5:14 pm

There is no need for a separate boot partition unless you intend to do something exotic like encrypt your root partition. Keep it simple is my recommendation - root and swap. You can always alter it later when you are more knowledgeable.
mintybits
Level 5
Level 5
 
Posts: 836
Joined: Fri Jan 27, 2012 5:09 pm

Re: Did something stupid with my partitions

Postby srs5694 on Sat Dec 01, 2012 8:32 pm

wm009 wrote:
If you're unsure, my recommendation is to use root (/), swap, /home, and perhaps /boot. This is sufficient for most casual and home users, and they're relatively easy to size -- 5-30GiB for root (/), 200-500MiB for /boot, 1-2x your RAM size for swap, and whatever's left for /home.

Okay. This sounds like the right thing to do. The problem is that it leaves no room for Windows. Unless we're talking about extended partitions, which I'll have to look into to further understand. I'll see what I can do first.


Linux can install fine on logical partitions. Thus, you can use one or two (even three) primary partitions for Windows, set up an extended partition, and put Linux in logical partitions inside the extended partition.

mintybits wrote:There is no need for a separate boot partition unless you intend to do something exotic like encrypt your root partition. Keep it simple is my recommendation - root and swap. You can always alter it later when you are more knowledgeable.


Separate /boot partitions are useful for many more things than encrypting your root partition. Many of these things are system-specific, but between them they're common enough that creating a /boot partition is often advisable as a defult. Examples include:

  • Older computers -- Limitations on readable disk space in older BIOSes sometimes necessitate creating a /boot partition that's below whatever BIOS-specific limit exists. This is mainly an issue with older computers -- those released in the last half-decade or so aren't very limited. See the next point, though....
  • Over-2TiB disks -- 2TiB is an important limit for the Master Boot Record (MBR) partition table scheme and some BIOS boot loaders and BIOSes. I honestly don't know how common this limit is with modern BIOSes, but for safety, when installing on an over-2TiB disk, it's best to create a separate /boot partition below the 2TiB mark. (In my tests under VirtualBox, GRUB 2 failed to boot a kernel located above the 2TiB mark, but I don't know if that was a limit of VirtualBox's BIOS or or GRUB 2.)
  • Unusual disk layout choices -- As you noted, encrypted root filesystems can benefit from a separate /boot. So can LVM and RAID configurations when you're not using GRUB 2. These tend to be advanced configurations, though.
  • EFI setups with rEFInd, gummiboot, or ELILO -- These programs rely on the EFI to read the Linux kernel, which means that the kernel must reside on a filesystem that the EFI can read. Normally this means FAT, but with the help of drivers, EFI can also understand ext2fs, ext3fs, ReiserFS, and HFS+. (Macs can read HFS+ natively, too.) Thus, using a separate /boot partition with one of these filesystems increases your choices for what EFI boot loader to use. (Alternatively, you could use ext3fs or ReiserFS for your root filesystem, but most people seem to be using ext4fs these days.) Note that wm009's partition layout suggests that EFI is not in use, so this particular reason for using a separate /boot partition doesn't apply to that computer; but as EFI is becoming more common, it deserves mention in a discussion of reasons to split off /boot generally.

More broadly speaking, a separate /boot partition has gone in and out of fashion as technology has changed. In particular, BIOS limitations have come into play two or three times in Linux's history. Each time disk sizes have risen above BIOS limits, a /boot partition has become popular. As systems with limited BIOSes have been retired, using a separate /boot partition has faded in popularity. We've gone quite a while without such issues, although the 2TiB limit is starting to become relevant. The 2TiB limit, though, is coming along at the same time as EFI. EFI doesn't have disk-size limits per se, but as I've just described, using a separate /boot partition provides additional options for configuring your boot managers and boot loaders under EFI.

Given the sizes involved (200-500MiB for a /boot partition), IMHO it makes sense to set one aside as the default, and merge it into your main system only if you know you won't need it. A usable Linux installation will require at least 5GiB of disk space, and probably more like 15-20GiB, so the space required by a /boot partition is tiny by comparison.
srs5694
Level 6
Level 6
 
Posts: 1020
Joined: Mon Feb 27, 2012 1:42 pm

Re: Did something stupid with my partitions

Postby wm009 on Thu Dec 06, 2012 10:25 pm

So here's a question.

If I wanted to set up my partitions again (from scratch), where I had Linux Install, Home drive, Swap and Windows. How do you go about doing it that way? Would you have to install linux before windows?
wm009
Level 1
Level 1
 
Posts: 6
Joined: Fri Nov 30, 2012 7:23 pm

Re: Did something stupid with my partitions

Postby wayne128 on Thu Dec 06, 2012 11:06 pm

wm009 wrote:So here's a question.

If I wanted to set up my partitions again (from scratch), where I had Linux Install, Home drive, Swap and Windows. How do you go about doing it that way? Would you have to install linux before windows?



Partitioning is , well, really a personal choice.
If you ask 5 persons, there are likely 8 answers.
I used a few schemes and usually stay with two main schemes, that I am familiar with for old computers to relatively newer ones. All are in msdos format, not GPT.

Do I have to install WinOS first, well, no, I can handle installing WinOS/LinOS in any sequence, because I have used some simple methods to handle boot loader.

However, if you are new to dual boot ( winOS and LinOS) then it is easier for you to install WinOS first, and install LinuxOS second, and let LinuxOS's default boot loader ( majority grub2, some are grub legacy and some are lilo) to take over your hard disk MBR.

Here is just one simple partitioning scheme. For your reference
I do this for multiboot... so there are many small partitions inside extended partition
I always use simple method... that is, one partition for one OS, same for WinXp or 7.
Take note some manufacturer used 3 partitions to install winOS, some use 4 partitions, for me, I installed winOS to one partition, easier to manage in my multiboot hard disk. I store data in one to two data partition.

Of course, for dual boot, you just use sda1,2,3,4,5 and that is all you need.
In future if you want to extend to multiboot, just sharing sda5, leaving some unallocated space, then create small partition inside extended sda4 and install new Linux OS in the new partition without touching the main sda1 Linux OS and sda3 WinOS.

1. sda1 , Linux OS , usually ext4 format
2. sda2 , Linux Swap
3. sda3 , Windows OS, ntfs format
4. sda4 , extended, just a container to take in any logical partition
5. sda5 , data partition, shared by LinOS and WinOS. ntfs format
6. sda6,7,8,etc: small size, something like 5G to 15G each, for me to install and play with many Linux OS.

I thought just copy out parted -l to show you my current partition on this computer's 640G drive.
In this drive, there are two ntfs data partitions, sda5 and sda9.

# parted -l
Code: Select all
Model: ATA WDC WD6400AAKS-7 (scsi)
Disk /dev/sda: 640GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system     Flags
 1      32.3kB  10.5GB  10.5GB  primary   ext4
 2      10.5GB  15.7GB  5240MB  primary   linux-swap(v1)
 3      15.7GB  125GB   109GB   primary   ntfs
 4      125GB   640GB   515GB   extended
 5      125GB   337GB   212GB   logical   ntfs
 6      337GB   396GB   59.4GB  logical   ext4
 7      396GB   450GB   53.1GB  logical   ext4           
 8      450GB   472GB   22.1GB  logical   ext4
 9      472GB   609GB   137GB   logical   ntfs
10      609GB   624GB   15.2GB  logical   ext4
11      624GB   627GB   3601MB  logical   ext4
12      627GB   640GB   12.7GB  logical   ext4
wayne128
Level 10
Level 10
 
Posts: 3322
Joined: Tue Jul 13, 2010 12:15 am

Re: Did something stupid with my partitions

Postby wm009 on Thu Dec 06, 2012 11:19 pm

Thanks for the reply and the detailed response. For me, I guess this concept of extended partitions is new to me. Is this something that you can only do in linux? I've been reading up on it and I seen the suggesting of using two partitions; one for linux and one for windows. And use extended partitions for breaking it up for whatever.

Also the reason I asked about installing windows second is that (at least for me) usually installs another partition for whatever (I think it's boot related). I was thinking that if I did linux first that I could have a little more control over the partitions created. Though I realize that when Windows installs it boots automatically and you have to setup GRUB again.
wm009
Level 1
Level 1
 
Posts: 6
Joined: Fri Nov 30, 2012 7:23 pm

Re: Did something stupid with my partitions

Postby srs5694 on Fri Dec 07, 2012 2:01 am

wm009 wrote:Thanks for the reply and the detailed response. For me, I guess this concept of extended partitions is new to me. Is this something that you can only do in linux? I've been reading up on it and I seen the suggesting of using two partitions; one for linux and one for windows. And use extended partitions for breaking it up for whatever.


Extended partitions are a 30-year-old hack. The original partitioning scheme for MS-DOS (what's now usually called MBR partitions, although there are several other names for this scheme) supported only four partitions (what we now call primary partitions). Within nanoseconds of that system being released, though, somebody wanted to create more than four partitions, so it didn't take long for a workaround to be invented: Set aside one of those four primary partitions as an extended partition, which would serve as a placeholder in which an essentially unlimited number of logical partitions could be stored. Note that you don't use extended partitions directly to hold filesystems; the filesystems go in primary or logical partitions.

Linux doesn't really care about which partition type it uses -- it's as happy on logical partitions as on primary partitions. Windows is also quite capable of using logical partitions for data storage; however, Windows retains a dependence on primary partitions to hold its boot files on BIOS-based computers. The end result is that a dual-boot computer can have as few as one primary partition plus an extended partition and as many logical partitions as you like. For various reasons, many people end up with two or three primaries plus however many logicals are required.

The whole primary/extended/logical thing has been an annoyance for three decades, but not enough of an annoyance to force the industry to a new standard. The distinction is confusing to newbies and it complicates activities like partition resizing.

Ultimately, though, you should just figure out how many partitions you need and what sizes they should be. Make partitions primary if they need to be, and logical if they don't and if you can.

One final monkey wrench: With the last two or three versions of Windows, Microsoft's partitioning tools have been quietly converting regular MBR partitions into what Microsoft calls dynamic disks (aka Logical Disk Manager (LDM) partitions). This is really an overlay on conventional MBR partitions, but it's a Microsoft-specific way of laying out the disk. Windows only does this if you try to create more than four partitions. The problem is that the tools don't give you any warning about what they're doing, and since Linux doesn't work very well with LDM setups, unwary individuals who attempt to set up a disk for use in Linux by using Windows tools often end up shooting themselves in the foot; their carefully-designed partitioning schemes don't work, and they've got to use third-party tools to undo the damage. So if you decide to redo your partitions, use Linux tools to lay out the partitions; or at most, use Windows to set up no more than three partitions for Windows' own use, and leave the rest to Linux tools.

You might be interested to know that MBR partitions are finally going to go the way of the dodo, although it'll take a while to completely do them in. MBR has a hard limit of 2TiB (assuming 512-byte sector sizes), and with disks now exceeding that value, MBR is becoming increasingly inadequate. The replacement partitioning system is known as the GUID Partition Table (GPT), and in addition to breaking the 2TiB barrier, GPT also does away with the primary/extended/logical distinction. With GPT, you can create up to 128 partitions by default, and you can change that value with the right software. GPT is part of the EFI standard, so it's being used on (U)EFI computers even if their disks are smaller than 2TiB.
srs5694
Level 6
Level 6
 
Posts: 1020
Joined: Mon Feb 27, 2012 1:42 pm

Re: Did something stupid with my partitions

Postby mintybits on Fri Dec 07, 2012 8:26 am

wm009 wrote:For me, I guess this concept of extended partitions is new to me. Is this something that you can only do in linux?

The jargon is confusing. Disks have partitions on them no matter which formatting scheme is used. The difference is in the way the table of contents (TOC) works. The MS-DOS TOC, which is the one that has been used for decades originally had a limitation of entries for 4 partitions and is not designed for disks bigger than 2TiB. A long time ago the TOC design was altered to enable virtually unlimted partitions and the jargon surrounding this alteration is what is confusing you, rather than the partitions themselves. Imaging that the TOC has 4 primary entries for partitions and unlimted "secondary" (for some reason they have been called extended or logical) entries. It is not the case that logical partitions are literally "inside" an extended partition...this is just a conceptual thing.

The MS-DOS TOC works perfectly well for disks <2TiB and is very well supported and I use it. Because disk technology has advanced and some disks are now bigger a new TOC had to be designed. This new one is GPT, as srs5694 has said, and it is a cleaner and more extensible design with room for extra features. The problem is that it is not well supported by linux's boot loader and as far as I know it is still a right pain in the arse to make linux boot off a GPT TOC disk. It is no problem at all to have a GPT disk in your system for storing files and such, it is just a pain to install and boot off.

A good compromise if you have to put root on a big disk is to install linux to the GPT disk but put Grub on a different, MS-DOS (MBR) device, then boot using the MS-DOS device. But again, there is no need for all this palava if your root disk is <2TiB.

If you are new to linux and aren't a bleeding edge technology fetishist, I'd recommend keeping things simple for now. Use MS-DOS (aka MBR partitioning) and install Windows first, as has already been suggested. You then hve 2 primary slots for linux root and swap. Simple.
If you think you want more partitions in future then make one extended and then have as many partitions as you like.

Everything can be changed later, if you need to, so don't get too hung up about it.
mintybits
Level 5
Level 5
 
Posts: 836
Joined: Fri Jan 27, 2012 5:09 pm

Re: Did something stupid with my partitions

Postby wm009 on Fri Dec 07, 2012 9:28 am

Thanks guys for the explanation on the extended partitions. It makes sense. Coming from Windows it's not really something mentioned that often and it's really the first time that I ran into 4 partition limit.

I have a 139gb raptor harddrive that I've been thinking about.

Linux: 30gb
Windows: 60gb
Swap: 8gb ( have 8gb of RAM, 2xRAM seemed a bit high)
Share Partition: 10GB (Just a FAT32 or NTFS so I can share files between Linux and Windows)
Home: The Rest.

That's what I'm thinking about right now for an ideal setup. I think it means I need an extended partition. I also have three other larger hard drives that are used just for storing things. Debating whether I should break up the swap across all of them or maybe the benefits of doing that would be negligible.
wm009
Level 1
Level 1
 
Posts: 6
Joined: Fri Nov 30, 2012 7:23 pm

Re: Did something stupid with my partitions

Postby srs5694 on Fri Dec 07, 2012 11:37 am

mintybits wrote:Imaging that the TOC has 4 primary entries for partitions and unlimted "secondary" (for some reason they have been called extended or logical) entries.


Note that there is a difference between extended and logical partitions. An extended partition is essentially a special type of primary partition that serves as a placeholder for logical partitions. Aside from creating them in a partitioning utility, you don't work directly with extended partitions -- you don't create filesystems on them, for instance. For most purposes, it's primary and logical partitions that are important. Extended partitions just serve as a way to mark out space for the logical partitions on the primary partition table.

It is not the case that logical partitions are literally "inside" an extended partition...this is just a conceptual thing.


All data structures are conceptual -- physically speaking, it's all about magnetic alignment effects on disk platters. It's not generally useful to think in such terms, though (unless you're a hard disk engineer). If you consider the data structures to be "real," then logical partitions are literally inside extended partitions. Logical partitions occupy space on the disk that's allocated in the primary partition table by the extended partition. Even the data structures that define the logical partitions (known as Extended Boot Records, or EBRs) reside inside the extended partition space. You can read more about it on Wikipedia, among other places.

GPT...is not well supported by linux's boot loader and as far as I know it is still a right pain in the arse to make linux boot off a GPT TOC disk. It is no problem at all to have a GPT disk in your system for storing files and such, it is just a pain to install and boot off.


This isn't entirely accurate. On BIOS-based computers, GRUB 2 supports GPT just fine, and has for a long time. The official last version of GRUB Legacy doesn't support GPT, but versions that do are readily available. I've heard that even LILO works with GPT, although my one test with it was inconclusive. The main problems with GPT on BIOS-based computers are buggy BIOS implementations and lack of knowledge among users (and to some extent distribution maintainers). I describe the BIOS issue in detail here. In short, some BIOSes try to do too much and so won't work when booting a GPT disk. There are workarounds, but most users don't know about them. Fortunately, most computers aren't afflicted with buggy BIOSes. Because some are, though, unless you have a good reason to do so, I don't recommend using GPT as a boot disk on a BIOS-based computer; but it is possible to do so, and it's usually not very difficult to do so if you know the basics of how to do it. (Mainly you just need to ensure you've got a BIOS Boot Partition on the disk.) Also, although Linux can boot from a GPT disk on a BIOS-based computer quite readily, Windows can't (although Windows Vista and later can use GPT data disks). Thus, in a dual-boot configuration, you really should stick with MBR.

Most computers sold in the last 1-1.5 years have used UEFI rather than BIOS. Although these computers provide a BIOS/legacy boot mode, if they're booted in their native EFI mode, they should normally have GPT disks. Linux's EFI boot loaders all support GPT just fine. In fact, it's really more a matter of EFI supporting GPT, since under EFI, boot loaders rely on the firmware to understand the partition table. (This is unlike BIOS, which is too stupid to understand partition tables -- at least, the core BIOS functions are. Recent BIOSes tend to be much smarter, which is where they sometimes run into problems.) When installing Windows on an EFI computer, GPT is required (for the boot disk).

All this is largely academic to wm009, whose problems suggest (s)he's using a BIOS-based computer with MBR. It's worth keeping in mind for the future, though; computers that ship with Windows 8 logos must use Secure Boot, and therefore UEFI, and therefore GPT. There are a lot of headaches surrounding this because Linux distribution vendors haven't been pro-active enough in anticipating this important shift from BIOS to EFI. The problems are mostly related to the EFI firmware, though, not to the partition table type. The problems are getting ironed out, but it'll probably be another 6-18 months before installers and the boot process are really working smoothly on new computers.

If you are new to linux and aren't a bleeding edge technology fetishist, I'd recommend keeping things simple for now. Use MS-DOS (aka MBR partitioning) and install Windows first, as has already been suggested. You then hve 2 primary slots for linux root and swap. Simple.


I mostly agree with this if the computer is BIOS-based (as wm009's seems to be). I don't advise placing Linux on just two partitions (root and swap), though. A separate /home partition is very useful, even for relative novices, unless you expect most of your Linux data to be shared with Windows. Also, a separate cross-OS data exchange partition is useful -- forcing Linux to read and write the Windows boot partition to exchange files is asking for trouble. Thus, given that recent versions of Windows like to consume at least two primary partitions, you're up to a total of 5-6 partitions, meaning that you'll have to create some of them as logical partitions. (That bumps the total to 6-7 partitions, if you count the extended partition separately.)

Everything can be changed later, if you need to, so don't get too hung up about it.


This is true, although resizing partitions can be risky, and converting from primary to logical or vice-versa can be tricky. (For the latter, my FixParts program is useful.)
srs5694
Level 6
Level 6
 
Posts: 1020
Joined: Mon Feb 27, 2012 1:42 pm

Re: Did something stupid with my partitions

Postby mintybits on Fri Dec 07, 2012 12:14 pm

I don't want to get into a detailed discussion about disk drive formats here so I won't. :wink:

I am interested to know what works with GPT and UEFI with vanilla linux and what doesn't. I have not yet needed to install to GPT nor use UEFI. I know there are work-arounds and extra software that can be applied, but I don't know what works and what doesn't out of the box. For example, can a novice install Mint 14 "out of the box" to:
i) bios + GPT
ii) UEFI + GPT
iii) the above with Windows already installed
mintybits
Level 5
Level 5
 
Posts: 836
Joined: Fri Jan 27, 2012 5:09 pm

Re: Did something stupid with my partitions

Postby srs5694 on Fri Dec 07, 2012 6:09 pm

mintybits wrote:I am interested to know what works with GPT and UEFI with vanilla linux and what doesn't. I have not yet needed to install to GPT nor use UEFI. I know there are work-arounds and extra software that can be applied, but I don't know what works and what doesn't out of the box. For example, can a novice install Mint 14 "out of the box" to:
i) bios + GPT


Yes, with the caveat I've already noted that some BIOSes have GPT-related bugs.

ii) UEFI + GPT


Mint 14 has a bug on this score. Mint 14.1 is supposed to be better, but I've seen some complaints even about it, so I suspect the developers haven't fixed it. In theory it should work. Maybe it's a system-specific issue or maybe users are being led down the garden path to make mistakes.

iii) the above with Windows already installed


The issue with Windows is that Windows boots only from MBR disks in BIOS mode and only from GPT disks in EFI mode. It's very inflexible in this respect.
srs5694
Level 6
Level 6
 
Posts: 1020
Joined: Mon Feb 27, 2012 1:42 pm

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: Bing [Bot] and 32 guests