Help! My harddrive is a mess.

edited May 2011 in Tech & Games
Over the years, I've just been installing new OS's side by side and now my HDD is looking like a total partition mess.

jl.png

I want to KEEP the following;

Windows 7 (464GB Filesystem)
Ubuntu 11.04 (12GB Filesystem)

And the following should be removed...

Xubuntu (21GB Filesystem)
Backtrack (136GB Filesystem)

That leaves the 11GB filesystem left over, but I have no idea what the fuck that partition actually is :facepalm: All that's inside it is this...

8Td.png

Finally, here is what my HDD looks like in Gparted;

vI.png

And here is the output from running fdisk -l;
Device Boot Start End Blocks Id System
/dev/sda1 * 1 25583 205495416 7 HPFS/NTFS
/dev/sda2 25584 81977 452981607+ 7 HPFS/NTFS
/dev/sda3 81978 121483 317331945 5 Extended
/dev/sda5 118914 121483 20643493+ 83 Linux
/dev/sda6 117575 118913 10755486 7 HPFS/NTFS
/dev/sda7 81978 97485 124567947 83 Linux
/dev/sda8 116351 117574 9831748+ 82 Linux swap / Solaris
/dev/sda9 99048 115642 133299306 83 Linux
/dev/sda10 115643 116350 5686978+ 82 Linux swap / Solaris
/dev/sda11 97486 98975 11968393+ 83 Linux
/dev/sda12 98976 99047 578308+ 82 Linux swap / Solaris

Now, I'm trying to work out what's installed where. It's fucking confusing, I've made a right mess of it all :facepalm: From what I can tell...

sda 1 - Windows XP
sda 2 - Windows 7
sda 3 - I have no fucking idea what sda3 is (help please?)
sda 4 doesn't exist.
sda 5 - Xubuntu
sda 6 - I don't know what sda6 is.
sda 7 - NOT A FUCKING CLUE WHAT THIS IS
sda 8 - swap for above
sda 9 - Backtrack Linux
sda 10 - Swap for Backtrack
sda 11 - Ubuntu 11.04
sda 12 - Swap for Ubuntu 11.04

So, I've worked out that I need to remove the following;

sda 1
sda 5
sda 7
sda 8
sda 9
sda 10

And finally, onto my final question...

What's the best, safest method of removing these partitions? Should I use Gparted to delete them, or simply right click on each partition in the first screenshot and select the "format" option?

Comments

  • AmieAmie Regular
    edited May 2011
    You, sir, hit the issue spot on: your harddrive is a mess.

    You've made several key mistakes while organising your partitions, which resulted in a completely messed up layout of your partitions. I'm quite sure the fastest way to fix this is to make two backups of all your data, remove all partitions and start fresh. It is possible to keep the partitions you want to keep intact, but that's going to be a hell of a lot of work and it's going to take a VERY long time that way.

    To answer a couple of your questions:
    • GParted is the best tool to delete, move, format, create etc. partitions, but use it from a live disc when using it on your harddisk (duuh). BACKUP YOUR DATA FIRST! I cannot stress this enough. With the mess you've created the chances of something going wrong are too high to risk it.
    • sda3 is your extended partition. A harddisk can only contain 4 primary partitions. To create more than 4 partitions, one big "extended" partition is created: a big partition containing all of your free space in which other logical partitions are made. From sda5 on, all your partitions are logical partitions. Sda4 is absent because your extended partition is sda3 and logical partitions start counting from sda5.
    • sda 7 is the root partition of the ubuntu install you took the GParted screenshot on (notice the "mount point" collumn? Damn, do you really not have a clue how partitioning works?). I'm guessing that's the Ubuntu install you don't want to remove ...



    This here is the partition layout you should be aiming for:
    1. NTFS partition of between 50 and 150 Gb depending on the number of games & applications you install - for Windows 7 (If you start new, let the Windows 7 installer create this partition. That way, it will also create a small boot partition which is a good thing because it will be on the outermost sectors of your harddisk which means faster booting and it will enable bitlocker full disk encryption and other handy features. Only start creating your other partitions after Windows 7 has created it's partitions, leave the rest as free space during windows install, that's the easiest way).
    2. Linux boot partition. Between 100 and 250 MB, depending on how much linux's you plan on installing. Use the same /boot partition for every Linux distro you install (do not format during installation) and add the lines of your other OS's to the GRUB menu. That way, when you uninstall one (or several) of your OS's, the rest will still be bootable. Do NOT flag this partition as "boot", keep the boot flag where Windows put it, otherwise hibernation will not work in Windows anymore.
    3. Extended partition with the rest of the space.
    4. Linux swap partition - equal in size to your RAM to enable hybernation in linux. At the moment you have two swap partitions. Do realise that any Linux OS can use any swap partition, so the only reason to use several swap partitions is if you want to use hibernation on Linux ('cause when you hibernate everything in RAM is put on your SWAP space).
    5. Linux root partition - 20 gigs is plenty unless you know you need more, maybe create 2 or 3 if you like to try out lots of operating systems.
    6. NTFS data partition - For the love of god, seperate your data from your OS! Using a seperate data partition decreases fragmentation, increases your computer's responsiveness because you can keep OS and apps on the fastest sectors of your disc, makes sure your data is not lost when you reinstall your OS and it helps in sharing data between OS's because you just need to mount the one partition and create symlinks to your "downloads" "music" "document"s etc. folders in your linux home folder and you're good to go. Use NTFS because it can be read and written by any OS worth installing.

    Now if you wanna keep your installed systems and solve this mess by moving & resizing partitions (keep in mind this will take a LOT of time, aim for a couple days, because al lot of data will have to be moved during the moving / resizing of your partitions), here's how I would do it:
    1. Make a backup of all your data spread over all those partitions and put it all on an external HDD (seriously, do it!)
    2. Start by deleting the Windows XP partition and expanding the Windows 7 partition until it fills all free space.
    3. Next delete all extended partitions you don't want to keep, including all swap partitions, you'll make new ones later.
    4. Delete all data off your Windows 7 and your Ubuntu partition, you've got a backup and this wil seriously reduce the time it takes to get everything done.
    5. Defrag your Windows 7 partition with iobit smartdefrag free (deep optimize) to reduce the resizing time and then resize it to a more reasonable size (mine is 50GB and half of it is free, but I don't have any big applications / games installed, around 150 GB is probably plenty, 2-300 if you install lots of games).
    6. Create a /boot partition of 250 MB, primary partition.
    7. Expand your extended partition to contain any free space left.
    8. Create one or several SWAP partitions equal in size to your RAM.
    9. Move the Ubuntu partition to the beginning of your extended partition(well - right behind your SWAP partitions) and resize it to a more reasonable size (if you deleted all your data you should have a pretty clear picture of how much space you actually need).
    10. Create more root partitions if you want / need 'em.
    11. Create a data partition formatted in NTFS in the free space left.
    12. If all that went well and everything still boots fine, thank the lord and copy your data on your data partition and experience the joy and happiness a well organised HDD brings.

    I hope this helps.
  • edited May 2011
    Wow, that really helped :thumbsup: Now I realize just how much of a mess that all is... I'm not even sure how I let it get that bad to be honest, I just haven't really done anything properly since I got this machine. I think I'll format the whole thing and start fresh, like you said. I need to wait until I have an external HDD first though so I can back things up. The only problem I have with backing up is all my pirated games - I don't have the installation files for many of them any more, which is a total bitch :mad: I guess I'll just have to man up and get over it.

    Thanks for that massive reply, I needed that help pretty bad.
  • DfgDfg Admin
    edited May 2011
    Amie beat me to it.
    sda 3 is an extended partition which hosts logical partitions that if I am correct are non-bootable when it comes to Windows.


    Anyway, since I dead tired I can't help you much. The best thing you can do is, back everything you need and get rid of

    SDA 3 [Format/del]
    That will remove.
    sda 3 - I have no fucking idea what sda3 is (help please?)
    sda 4 doesn't exist.
    sda 5 - Xubuntu
    sda 6 - I don't know what sda6 is.
    sda 7 - NOT A FUCKING CLUE WHAT THIS IS
    sda 8 - swap for above
    sda 9 - Backtrack Linux
    sda 10 - Swap for Backtrack
    sda 11 - Ubuntu 11.04
    sda 12 - Swap for Ubuntu 11.04

    Next when the logical volumn is removed you will get 928+300+ GB unallocated space which will then merge with 2.28 MB of free space.

    So it will become like this.
    SDA 1
    SDA 2
    Unallocated

    Now next you will do is,
    Make one more primary partition [200 GB]
    SDA 1
    SDA 2
    SDA 3
    SDA 4 [Extended]
    SDA 5 [Logical]
    SDA 6 [swap]
    SDA 7 and so on.


    but since you want to remove windows Xp....

    In short, it might be best if start from scratch and work your way up. Like Install Windows 7 in SDA 1, install Unbuntu in SDA 2 , use SDA 3 as a primary partition for future OS, and then use SDA 4 for extended partition and add swap space in there.

    In that way you will have two durable OS'es out of your problem reach and you can mess around with other OS'es in other partition or just use Vmware or Virtualbox.
  • BaconPieBaconPie Regular
    edited May 2011
    Buy another HDD for messing around with other distro's and/or an external for backups.

    Or even better, like dfg said, use a VM.
  • LSA KingLSA King Regular
    edited May 2011
    BaconPie wrote: »
    Buy another HDD for messing around with other distro's and/or an external for backups.

    Or even better, like dfg said, use a VM.



    Yeah I was going to say this, and being on Linux just complicates the factor because so many tools I'm familiar with on Windows can clear that problem up with a few clicks. But yeah, in general dual boot and partition is dead and if it isn't it should be. Virtualization is the way to go, it's the future, and it's the least fuck upable method for running multiple operating systems with the bonus of having them run at the same time without a restart or partitioning needed.

    Hopefully it all gets sorted out but it seems like a lot less painful to move anything important off the drive and just reformat and get all your partitions back. Only time I'd ever partition a drive would be to organize clusters of files based off type (which is no longer needed these days) or for networking purposes.
  • bornkillerbornkiller Administrator In your girlfriends snatch
    edited May 2011
    You have ubuntu dude. Just use the disc manager tool in admin.
    Gparted is ok but the DM tool is faster.
  • edited May 2011
    After creating my Windows partition, I want to install Ubuntu. However, I have no idea how to create those other partitions (swap, boot, extended, etc). How do I do this?
  • bornkillerbornkiller Administrator In your girlfriends snatch
    edited May 2011
    trx100 wrote: »
    After creating my Windows partition, I want to install Ubuntu. However, I have no idea how to create those other partitions (swap, boot, extended, etc). How do I do this?
    I figured you'll be using 11.04 so I thought I better google it since I haven't tried it. This part of it looks a little different to other ubuntu distros.

    Check this out. :)
    http://www.psychocats.net/ubuntu/installing
  • edited May 2011
    ^ thanks for that link, was interesting :thumbsup: However, when it got to the part which mentioned setting up the partitions yourself, it assumes you know how to do it. I need a poke in the right direction here - how do I set up the other partitions and install Ubuntu to the correct one?

    Can I use the built-in disk doodah which comes in the Ubuntu installer Live CD?
  • AmieAmie Regular
    edited May 2011
    trx100 wrote: »
    Can I use the built-in disk doodah which comes in the Ubuntu installer Live CD?

    Yes you can. You can also do it during the installation procedure. Both are just gparted, a very goot GUI partitioning tool.

    When you're in GParted, you'll see your Windows 7 partitions. Usually 2 of them, one of about 100 MB, one however big you decided to make it.
    • If you need to resize your windows partition, do so first.
    • Next, if you're going to install multiple linux OS's, make a boot partition of let's say 250 MB; if not you can safely skip this part.
    • Then make an extended partition containing all of the free space of the disk.
    • In that partition you create a linux-swap partition equal in size to your RAM.
    • Then create one (or several) linux root partition of 15-20 GB formatted in Ext4
    • Then create an NTFS partition containing the rest of your free space.

    When you're in the installer, you'll need to assign the mount points. If you made a boot partition, assign it to /boot. Assign your first root partition the / mount point and I think you can assign swap to your swap. Then install.

    This is one of the things I hate about ubuntu: you've installed a couple of 'em already but you still know nothing about the way the system works, so when you try to do anything yourself or different from the ubuntu way, you're stuck. Read this page: http://www.faqs.org/docs/linux_admin/x264.html If you want to get into linux, read the whole guide.
  • edited May 2011
    Thanks for all that help, you're a life saver. I really hate how easy it is to install Ubuntu, and you're right - it's pretty much alienated me from normal Linux distro's which actually require some knowledge before installing. I'll give that whole guide a read through, I'm going to need it.

    Also, I don't suppose you could tell me how I'd go about installing a second Linux distro on my hard disk after installing Ubuntu?
  • AmieAmie Regular
    edited May 2011
    trx100 wrote: »
    I really hate how easy it is to install Ubuntu
    Try installing Gentoo if you want a challenge :D
    trx100 wrote: »
    Also, I don't suppose you could tell me how I'd go about installing a second Linux distro on my hard disk after installing Ubuntu?

    Easy, use the same /boot partition (but DON't format it during the installation, that way the bootloader will be overwritten but the kernel will be saved so your other system is still bootable) and a different root partition. Some installers automatically detect all other OS's and will add 'em to the bootloader menu, some won't. Before installing, make a backup of your grub configuration on a thumbdrive (/boot/grub/menu.lst or /boot/grub/grub.conf or /boot/grub/grub.cfg depending on distro and grub version) so you can add the right lines to the new configuration file if necessary.
  • edited May 2011
    Awesome. And I can use the same swap for both Ubuntu and the second distro, right?
  • AmieAmie Regular
    edited May 2011
    Yes, you can, with the one caveat mentioned before: swap space is used to store all the data from RAM during hibernation in Linux. So if you want to use hibernation in your primary linux OS, you can't use that same swap space for another distro or your hibernation files will be lost. Not a problem if you don't use hibernate in linux or you won't use a swap space with your second distro (in these days of multiple GBs of RAM, swap space is usually not necessary on a desktop even though they all say it is "not recommended" during the installation - but hibernation won't work).
  • edited May 2011
    Awesome. Well, I formatted the HDD this morning and so far I've installed Windows 7 and left the rest as free space. I'm going to get cracking with the Ubuntu partitioning and installation in a little while, then create myself an NTFS partition for my music and other shit.

    Thanks for the help!
  • edited May 2011
    Alright, now my HDD looks like this. Unfortunately Windows now doesn't boot, because I think I messed something up somewhere. Possibly the boot flag? I dunno.

    OE.png

    So, how can I get my Windows to boot when I select it from GRUB?

    EDIT: There's also a FAT32 partition on the end of my drive of 238GB - don't worry about that, I plan on formatting that to NTFS when I can boot into windows.
  • bornkillerbornkiller Administrator In your girlfriends snatch
    edited May 2011
    trx100 wrote: »
    OE.png

    Yo Dawg!! We heard you like partitions.
    So we put partitions in your partitions
    within your partitions....

    xzibit-watwat.jpg
  • edited May 2011
    Did I do something wrong? PLEASE tell me if that's wrong.

    Also, I've read that it's a common problem and that I simply need to pop a Windows repair disc in, fix the bootloader and then reinstall GRUB. Sound like a plan? :D
  • SlartibartfastSlartibartfast Global Moderator -__-
    edited May 2011
    Try updating grub without mucking about with windows, then do what you said.
  • edited May 2011
    Well, something appears to have messed up somewhere along the line. Apparently some system files have ended up corrupting (how the fuck did that happen? :facepalm:) but I'm going to just try and reinstall Windows, keeping the partition layout. Then I'll install GRUB and hopefully I'll be good to go.
  • AmieAmie Regular
    edited May 2011
    The 100mb NTFS partition at the beginning of your disc should have a boot flag, but it's not set anywhere else so I don't get why it's absent. Try giving it the boot flag (somewhere in the options when you right-click it in gparted).

    The thing I don't get is why it shows your windows partition as "unknown". It should show it as an NTFS partition. I'm affraid something went wrong while you created your ubuntu partitions and it corrupted your windows system partition. Try this thingy. If that does it, reinstall grub and you're good to go. If that doesn't do it, a reinstall might be in order.

    Also, you're going to have to resize your extended partition to contain all your free space or you won't be able to use it (you already have 4 primary partitions)

    And your Windows partition is way too big IMO, but that's just personal taste.
  • edited May 2011
    Thanks for the suggestion but I already tried the repair CD last night, as well as those command prompt solutions. None of them worked unfortunately, and I think I might as well just do another reinstall to fix it.

    I'm a bit confused with this extended partition too. How exactly do I extend that shit?

    Oh, and I install a LOT of Steam games on my Windows partition which is why I made it so big. Is that alright?
  • AmieAmie Regular
    edited May 2011
    trx100 wrote: »
    I'm a bit confused with this extended partition too. How exactly do I extend that shit?

    Oh, and I install a LOT of Steam games on my Windows partition which is why I made it so big. Is that alright?

    Just right-click it in the partition list and click "resize/move", then you should be able to resize it. But you will have to do it from a live disc, you can't edit an extende partition when you've got mounted logical partitions.

    And there's nothing wrong with a big windows partition, it's just a waste of space if you don't use it. If you think you need that much space all is good.
  • bornkillerbornkiller Administrator In your girlfriends snatch
    edited May 2011
    I got Arch, PClinuxOS, and *shudders* TinyXP on Oracle VM. Backtrack on a USB live. Bodhilinux on my main and Archbang on my secondary.
    At least with VM you can just out with the old and in with the new. I don't seem to have lag issues with VM either. Off topic a little but food for thought bro. :)
  • edited May 2011
    bornkiller wrote: »
    I got Arch, PClinuxOS, and *shudders* TinyXP on Oracle VM. Backtrack on a USB live. Bodhilinux on my main and Archbang on my secondary.
    At least with VM you can just out with the old and in with the new. I don't seem to have lag issues with VM either. Off topic a little but food for thought bro. :)

    Yeah, I've dabbled with VM in the past but I preferred to have a solid install :D Also, I tried another few times to get Ubuntu to install properly but it kept breaking Windows :facepalm: I ended up letting Ubuntu do all the partitioning itself, which was much easier despite it being totally gay.
  • bornkillerbornkiller Administrator In your girlfriends snatch
    edited May 2011
    Easy is always a good thing bro :)
  • edited May 2011
    bornkiller wrote: »
    Easy is always a good thing bro :)

    Well, it made my partitioning look really weird :(

    Why did it create one large partition for everything instead of giving me a boot partition, etc etc?

    I dunno. I'm fairly happy though, and I've got my data on a separate partition which makes everything a fuck load easier.
Sign In or Register to comment.