Having Trouble Understanding the Disk Partition dual-booting Linux
1 Attachment(s)
I have quite a situation. The first time I installed Linux I did Ubuntu 11.10 overwriting the whole disk. I didn't create a swap folder, root, or home folder. A few months later I installed Ubuntu 10.10 as a dual-boot, and it seemed, at the time (still somewhat unaware of a swap, root, and home folder), to create those folders on their own. If you take a look at the picture in the attachment you see there are two swap folders so that must mean both partitions have them.
I do not know why there are 3 sizes of hard drive space. There is dev/sda1 (105 GiB), dev/sda2 (43.79 GiB- none of which is being used), and dev/sda6 (36.33 GiB). In a tutorial on Youtube he said to open "System Monitor" under the tab "System" there is "Hardware" > "Memory" and that is the amount of space he gives before his partition. This is why I stopped and asked for help. None of my other partitions have any space before the partition. The only space is after 10.10. There is 3.00 MiB of free unallocated space, and a 1.60 GiB, and 5.86 GiB space for each swap folders. The current distro I am trying to install is LMDE Xfce. Originally I had planned to overwrite the 105 GiB space. Now I am not sure. I think I would rather just use some free space from that partition if it is possible. If anybody knows of some good links with detailed tutorials, or can give a pretty good novice step-by-step guide. That would be most awesome. |
1 Attachment(s)
OP said, "The current distro I am trying to install is LMDE Xfce. Originally I had planned to overwrite the 105 GiB space. Now I am not sure. I think I would rather just use some free space from that partition if it is possible."
The 105GB partition is a Primary partition, which cannot be easily divided or shrunk. The /dev/sda2 partition is an Extended partition, inside of which as many as four patitions per distro may be made. An you are correct in assuming each distro has its own swap (called Logical partitions when inside an Extended). Instead of overwriting, why not first back up all data to be saved and repartition and reinstall? You are learning one of the first lessons Linux has to offer, so do not be discouraged. It's fun, isn't it? (lol) While multi-booting is possible, I would suggest another hard drive for a third distro of any sort, since your present hard drive is rather small to have more than two. The Rule of Thumb is to create one Primary for /, a swap (no need for much more than about 2GB nowadays) and another partition for /home. However, two smallish Primaries (one each of about 16GB for ubuntu and LMDE) and an Extended containing one each of the other, with the /home Logical partitions being the largest, should be sufficient for your purposes. / (root) and /home are best put into the ext4 filesystem, IMO. Put GRUB (or whatever boot loader) in the / of the second install and NOT the Master Boot Record (MBR). Below is an example jpg of my dual-boot antiX-M11 and Win7 on a 500GB laptop. Granted, the 8GB / for antiX is small, but it can handle it just fine! |
1 Attachment(s)
Ok what I did was just shrink the original partition at 105 GiB down to 60.42 GiB, as shown in the attachment. This left me with 44.84 GiB in between the left partition and the 36.33 GiB partition on the right.
So now I am trying to figure out how to select the right amount of space for a root, home, and swap folder, if all 3 of these are necessary? You're right hilyard, to backup my data on a HDD erase and reinstall is my plan. The HDD will be here next week which is almost double this hard drive space; its a work in progress... So, I am just a bit confused on this root, home, and swap folder part. I do not think it is really that complicated. Quote:
Does the "preceding" or "following" space come into play at any point here? 2. I do not understand this part here> "However, two smallish Primaries (one each of about 16GB for ubuntu and LMDE) and an Extended containing one each of the other, with the /home Logical partitions being the largest, should be sufficient for your purposes." Do you mean that each partition on the left and right both need a smaller Primary partition of about 16 GiB? Because that will leave me without any extra room for LMDE. I know the HDD is small, but I have been waiting a very long time and I am almost installed, I just want to install it for now to see how I like LInuxMint. I will probably just overwrite everything on the left partition if I do. 3. "Put GRUB (or whatever boot loader) in the / of the second install and NOT the Master Boot Record (MBR)"<< I have never seen this! When do I see this after I have applied the partitions? I have been watching videos practically all of yesterday, I have a Linux class in college where we discussed this, and I have been searching all morning. Yes, fun, I am still not completely understanding, and its vital that I do it right the first time! |
Quote:
In any case, a partition ios something you set up at install time (in a utility called a partitioner, which might be a clue) and the areas on disk are allocated for a particular purpose. Folders (directories, if you want to sound as if you know what you are doing,,,this part is optional) get names at install time, or later, and, generally, can grow and shrink depending on usage and within the partition in which they are located. So at install time you will decide that, eg, sectors 1 - 115 are used for some particular purpose, and it will stay that way until you run the partitioner again. OTOH, initially a directory might use space scattered around those sectors, and grow (and/or shrink as you use more or less space. For swap, the conventional situation is to use a dedicated partition; traditionally, using a swap file, rather than a dedicated partition was slower, but it is alleged that this is no longer the case, but I have had no reason to test that assertion, so I can't say. In any case, to decide on the amount of space that you need for swap, you have to first ask whether you intend to suspend to disk; if you do, you will need enough space to swap to, and this might be somewhat larger than the size of RAM that you have. if you do not intend to suspend to disk, then the 2 G seems like a reasonable rule of thumb for the size of swap that you might want; it depends on what you do, and whether you ever want to 'over-fill' your RAM (ie, use more than you actually have), but beyond 2 or 3 Gig, your performance is likely to be so poor that you probably won't want to bother. If you decide on an amount of swap that is too small, you can always allocate another partition for swap, and have two, or more, of them. Quote:
Quote:
'Swap' we have dealt with; if you define no other partitions, everything goes into '/' somewhere (I'm avoiding the word 'root' because '/' is the root of the filesystem, and there is a directory, owned by the root user, called /root, and we want to be clear; while, essentially, we will be able to ignore /root for this discussion, it is necessary top know that you aren't thinking about the wrong one). My advice is to only create the partitions that you know you ahve a need for, and not create extra partitions just 'for the hell of it'. The argument for creating a separate partition for /home is that it can make your life easier when you upgrade or install a new distro; you tell the installer to use existing partitions for their existing purposes, but not to re-format /home. This makes it easier, if nothing goes wrong, to make the new install (you still need a good backup though, just in case you do something wrong, or the installer gets confused). Quote:
Quote:
Quote:
something like fdisk -l (potentially, sudo /sbin/fdisk -l) will give the information about the current partition layout (and that isn't a '1' but an 'l'...and post in code tags, of course); and would have the advantage that someone reading the thread doesn't have to open a graphical object and that does mean that someone replying could read it whilst writing their reply. Quote:
|
Can experiment with Gparted and not do any permanent changes.
You can experiment with Gparted by not writing the changes to Disk. It is possible to layout the entire Drive as how you in-vision it before choosing to Write Changes to Disk or whatever the actual name of the (button) Command is. This will gain you experience with Gparted's GUI. Gparted has a window with sliders on the side when you are editing a partition or Logical Volume so you can move it where you want to on the Disk. In other words if you want a certain sized partition at a certain memory location use the slider,arrow buttons.
Linux does not have to be on a primary partition so if it has to be on a Logical-Volume (basically the same thing) there is no problem. I believe the same goes for a swap partition/Logical-Volume as well. |
@salasi By trying to correct everything I said while at the same time trying to explain it, all you did was make everything more confusing... or is it 'made' everything more confusing ...errr, we don't want confuse that with /made, so we'll just leave it at "making"<<< basically thats what most of your response looks like.
Calling it a "folder", calling it an "install", calling it "root", calling it "space-before (after I already clarified the "preceeding" and "following" spaces)", is 100% and completely IRRELEVENT to the post. Its a complicated subject, obviously I didn't understand you said because after you got done explaining how I said incorrectly you didn't even explain it clearly yourself..! Just because this is something you have understood from past experience doesn't give you the right to talk down to people like you are an English major now. I've studied writing, and been a forum moderator, incl owning my own forum.. So, you think you know how to partition, or install, or MAKE a download on a hard drive then good for you. It wont matter to me because I have never had a reply from your egotistical repsones, but for anybody else you talk to like this. I feel sorry for. You act entitled like the posting guru partition master...and so what, at one time you didn't know either, and your post was of no help. Quote:
______________________________________________________________ Quote:
|
Better off not allowing Gparted to Automatically Partition your Drives.
If Gparted or yourself has already made an extended partition chances are you can not create another Primary partition without resizing or editing it.Some of the structure of your MBR can not be changed with out changing other things, they are dependent an each other which may (probably) wipe out the data on your other partitions. When you chose to NOT do a Custom Partition scheme Gparted or whatever does it in a stupid way in my opinion which usually limits; or makes it more involved,in making Primary Partitions later on.
Heres the rundown on Partitioning. A Primary Partition is only really needed by Windows to boot correctly. What makes a Primary Partition what it is ,is that the MBR can hold the data for it in the actual MBR (Master Boot Record). A Partitioner Tool (Gparted) Edits the MBR. A Logical Volume is the same as a Primary Partition only it does not have flags to set like (Boot From) or whatever the actual flag/s name is. Linux does not need these flags.The other big difference between a Primary Partition and a Logical Volume is that the data for a primary partition is directly located inside the MBR. The Data for the Logical Volume has to be somewhere ;what sectors it starts from ,how big it is etcetera , so one of the spaces that would normally hold this data for a Primary Partition instead holds a location (pointer) to where the data is stored for this area of your Hard Drive (a Logical Volume. This is why you can only have Four Primary Partition. If you want to break the Hard Drive into more pieces you can only have Three Primary Partitions and designate one of theses spaces in the MBR to hold the location of one Logical Volume. The other Logical volumes if you have any has what basically amounts to a MBR stored in area just before where the Logical Volume is on disk.So the One area of Data storage in the MBR is Reserved to hold the location of where one Logical Volume is and a small space before this Logical Volume holds the data of where the next (if there is one)Logical volume is. They daisy Chain sort of speak. The last basic part of Partitioning is that an Extended Partition does not really exist and is just part of an accounting measure for Gparted or whatever your favorite tool is. A Extended partition takes a Number from the sequence for it's self. Four primary partitions are possible but nothing else is. If you want to break the hard drive up more you can create Three Primary Partitions and reserve the last one (space)to hold data for a Logical volume that can daisy chain other Logical Volumes. The extended partition just robs you of a sequence number. If you skip the total amount of Possible Primary Partitions (Three) and create a Extended Partition (which just holds Logical Volumes) the Extended Partition will take the last un-used number in sequence after the number of the last Primary Partition. The Logical Volumes will however skip numbers not already used and start at number five. The Extended Partition size is the size of all of the Logical Volumes enclosed in it ,or free Space left combined. I don't have the time to write a tutorial/Guide so I may have made some mistakes on this rundown. I posted this because I think this thread needed to have the basics addressed. I apologize for some of the redundancy but it is to avoid confusion. Installation Disks can usually shrink a Partition. If you have enough room just use a Logical Volume. If it is not a big deal start from scratch and create Three Primary Partitions and one Extended one. This way you can make as many Logical Volumes as you want and you have not limited yourself to the Amount of Primary Partitions later on. Again you only need a Primary for a Windows O.S. :hattip: Edit: The part about Partitioning numbering is not totally correct and I wanted to post these links as well . http://gparted.sourceforge.net/displ...me=help-manual http://gparted.sourceforge.net/larry...e/resizing.htm and http://www.ibm.com/developerworks/li...s-1/index.html From these guides it looks like you don't want to move the beginning of where the O.S is located or else it may not boot without intervention. To be totally safe you should back up all data and or clone the O.S already installed. Second Edit: A install disk has a Gparted already on it. It is possible to shrink your primary partition and install a O.S just to make the Shrinking feature work. You would then have an extra O.S installed but by reformatting/resizing this space it would basically delete it. When you are ready ,Shrink the first partition and let it follow through by installing the O.S on the space it took from this.DO NOT install the Boot loader. If you do not have a choice install it to the partition you just made but not to the first partition. Then reformat ,resize or repartition this space that you installed this O.S on. Read the links I posted , back up and understand the consequences if something goes wrong. |
OP -- yes, all of this is confusing. A Partition is an arbitrary section of a hard drive (or a 'slice' when using the pie analogy); moving and resizing partitions takes a long time and this is why I suggested saving and then starting over.
Download SystemRescueCD from sourceforge and learn how to use it -- it contains gparted and other utilities you will find useful when working with hard drives [To get to gparted, hit Default (Enter) a few times until reaching page with multi-colored prompt asking user to type in either "wizard" or "startx;" type in the desired "startx" and eventually a yellow-colored window with another prompt will pop up; at this prompt, type "gparted."] Burn ISO at no more than 8-10X for integrity purposes. Here's a good tutorial or How2 on gparted. More in a few Just experiment! ____________________________________________________________________________________________________ EDIT Your image shows sda1 as / for first distro installed. You also have a swap for it in the Extended partition. So, it is functional (or should be). Your /home is contained within /dev/sda1, at present. You do not need another partition for /home to be functional, unless desired to store files onto. Tell us what you wish to do with the Unallocated space. |
Moderator response
Hi,
Quote:
I agree all should try to compose in a understandable, congenial manner but sometimes when explaining a technical oriented compose then things can seem terse or sometimes rude. When actually the tone is just that technical. So to all participants: LQ is a world community and sometimes the attempt(s) to speak at the same tone can be difficult for others to understand our actual meaning. English is the official language here at LQ; Quote:
Let's get back on topic instead of bickering! :hattip: |
All times are GMT -5. The time now is 06:30 AM. |