Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Remove all partitions not windows or ubuntu 12.10, including separate home partition.

  1. #1
    Join Date
    Jun 2011
    Beans
    12

    Remove all partitions not windows or ubuntu 12.10, including separate home partition.

    Looking for a safe way to clean out old partitions. I can't find which partition is which even for the separate home directory I want to remove. Don't want to remove boot record's partition.
    Can I delete with gparted from live cd 12.10 everything that's not running with the little key showing beside it aside from windows' partitions?

  2. #2
    Join Date
    May 2006
    Location
    Alberta, Canada
    Beans
    620
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Remove all partitions not windows or ubuntu 12.10, including separate home partit

    Hey Rick, I am not 100% sure but I don't think that's quite the best solution. Others will likely clarify for us here, but I think the first thing you want to do is have a look at your FSTAB file to see which partition is which.

    Code:
    gedit fstab
    (it should be read-only without sudo, so this is safe to run).

    In there will a reference to your hard drive partitions and how they are mounted in Ubuntu. Your Windows partition(s) will most likely be formatted to NTFS or FAT32 or some other Microsoft filesystem, and those should be indicated when you fire up GParted.

    Removing the /home partition on Ubuntu (or any Linux) could potentially be disastrous by breaking a number of configuration settings.

    I hope that gets you some points to start from. With any luck, someone else will chime in ...
    • Note To Self:gksudo is safer than sudo for graphical apps!

  3. #3
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    1,273
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Remove all partitions not windows or ubuntu 12.10, including separate home partit

    Please tell us your objective and give your current system layout. If objective is to remove older versions of Ubuntu, then you must be sure how your system is set up so that you remove only those partitions that are not essential to 12.10 and Windows. If this is a virgin install of 12.10 with no prior Linux system, then there is nothing that can be removed.

    Your stated approach is dangerous and will likely end in tragedy. When you boot from a Live-CD, every partition in your HDD is open to deletion. This includes Windows and Ubuntu 12.10. Therefore, you must first determine which are your indispensable partitions before even thinking about modifying them. Here are the steps I would recommend:

    1. Back up all of your important data to an external drive/USB stick and check that the backup is good. This is by far the most important step. With a good backup even the worst screw-up becomes an annoying inconvenience whereas without a backup, it's a disaster.

    2. In a terminal, type (or copy and paste) the following:

    Code:
    sudo parted /dev/sda print > ~/Desktop/partition_table
    This should generate a file on your desktop with the name "partition_table" that contains your partition info. It will look something like the following (yours will look different depending on what and how you installed):

    Code:
    Disk /dev/sda: 500GB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos
    Number  Start   End    Size    Type      File system  Flags
     1      1049kB  105GB  105GB   primary   ntfs         boot
     2      105GB   205GB  100GB   primary   ext3
     3      205GB   207GB  1999MB  primary   linux-swap
     4      207GB   500GB  293GB   extended               lba
     5      207GB   500GB  293GB   logical   ntfs
    We are trying to understand your partition layout first before modifying or deleting anything.

    3. Post this info back to this thread. Either attach the file or post its contents.

  4. #4
    Join Date
    Jun 2011
    Beans
    12

    Re: Remove all partitions not windows or ubuntu 12.10, including separate home partit

    Model: ATA TOSHIBA MK2035GS (scsi)
    Disk /dev/sda: 200GB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos

    Code:
    Number  Start   End     Size    Type      File system     Flags
     1      1049kB  10.5GB  10.5GB  primary   fat32           boot, diag
     2      10.5GB  105GB   94.8GB  primary   ntfs
     3      105GB   109GB   3696MB  primary   ntfs
     4      109GB   200GB   91.1GB  extended
     8      109GB   123GB   13.9GB  logical   ext3
     9      123GB   128GB   5126MB  logical   ext4
    19      128GB   134GB   5574MB  logical   ext4
    15      134GB   142GB   8036MB  logical   ext4
    11      144GB   149GB   4987MB  logical   ext4
    17      154GB   155GB   1062MB  logical   linux-swap(v1)
    16      155GB   164GB   8709MB  logical
    12      165GB   166GB   937MB   logical   linux-swap(v1)
    10      166GB   168GB   1892MB  logical   linux-swap(v1)
     6      168GB   173GB   5280MB  logical   ext4
    18      173GB   183GB   10.2GB  logical   ext4
    13      183GB   191GB   7572MB  logical   ext4
    14      195GB   196GB   577MB   logical   linux-swap(v1)
     7      196GB   197GB   1250MB  logical   linux-swap(v1)
     5      197GB   200GB   3076MB  logical   linux-swap(v1)

    See, what a mess. I'm so ashamed. I have a separate home partition set up for personal pictures and stuff I never use. It says it's 14GB but I can't tell which one it is.
    Thanks for helping.
    Last edited by coffeecat; November 29th, 2012 at 12:41 PM. Reason: code tags for clarity

  5. #5
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    1,273
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Remove all partitions not windows or ubuntu 12.10, including separate home partit

    No need to be embarrassed. I'm sure many people have even more convoluted partition tables. I take it that you have installed many versions of Linux over time and each time chosen the "install alongside" option?

    First, a brief explanation of what this info is telling us:

    Partitions 1, 2 and 3 contain your Windows installation and must not be deleted. Partition 4 is an extended partition that has been subdivided into all of those numerous logical partitions and contains all of your Linux installations including the Ubuntu 12.10 you want to keep. If we determine which partitions belong to 12.10, then we can delete the rest without impacting your usability. And just so you know, you cannot simply delete your /home partition because Ubuntu uses it to store your profile including such essential things as your desktop, email, etc. These are in hidden directories, so they are not easily noticeable to you.

    Please boot into your 12.10 installation (it's very important that you boot into the installation that you want to keep) and type the following:

    Code:
    df -l > ~/Desktop/disk_layout
    This will produce a file named "disk_layout" on your desktop. Post that info back to this thread.

    We are very close to knowing what we need to know. Just a little housekeeping (along with proper backup) will soon tidy everything up.
    Last edited by DuckHook; November 29th, 2012 at 06:05 AM. Reason: typo

  6. #6
    Join Date
    Apr 2008
    Location
    Australian in Germany
    Beans
    4,010
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Remove all partitions not windows or ubuntu 12.10, including separate home partit

    Quote Originally Posted by Rick Campbell View Post
    Code:
    Number  Start   End     Size    Type      File system     Flags
     1      1049kB  10.5GB  10.5GB  primary   fat32           boot, diag
     2      10.5GB  105GB   94.8GB  primary   ntfs
     3      105GB   109GB   3696MB  primary   ntfs
     4      109GB   200GB   91.1GB  extended
     8      109GB   123GB   13.9GB  logical   ext3
     9      123GB   128GB   5126MB  logical   ext4
    19      128GB   134GB   5574MB  logical   ext4
    15      134GB   142GB   8036MB  logical   ext4
    11      144GB   149GB   4987MB  logical   ext4
    17      154GB   155GB   1062MB  logical   linux-swap(v1)
    16      155GB   164GB   8709MB  logical
    12      165GB   166GB   937MB   logical   linux-swap(v1)
    10      166GB   168GB   1892MB  logical   linux-swap(v1)
     6      168GB   173GB   5280MB  logical   ext4
    18      173GB   183GB   10.2GB  logical   ext4
    13      183GB   191GB   7572MB  logical   ext4
    14      195GB   196GB   577MB   logical   linux-swap(v1)
     7      196GB   197GB   1250MB  logical   linux-swap(v1)
     5      197GB   200GB   3076MB  logical   linux-swap(v1)
    ...It says it's 14GB but I can't tell which one it is.
    The only one that is 14GB is number 8.

    Do what Duck Hook is suggesting, though. Don't just start erasing things blindly.
    Michael

  7. #7
    Join Date
    May 2009
    Location
    Indiana
    Beans
    1,825
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Remove all partitions not windows or ubuntu 12.10, including separate home partit

    Quote Originally Posted by audiomick View Post
    Don't just start erasing things blindly.
    Indeed. I once erased my Windows partition by mistake. The only consolation there was that it took a couple months to realize the mistake.
    Jane, stop this crazy thing!

  8. #8
    Join Date
    May 2007
    Location
    The New Forest
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Remove all partitions not windows or ubuntu 12.10, including separate home partit

    I'd start by looking at what these tell you, should be able to see which is your home and /
    Code:
    cat /etc/fstab 
    
    df -h

  9. #9
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Remove all partitions not windows or ubuntu 12.10, including separate home partit

    Quote Originally Posted by Elfy View Post
    I'd start by looking at what these tell you, should be able to see which is your home and /
    Code:
    cat /etc/fstab 
    
    df -h
    +1

    @Rick Campbell, also - you have 6 swap partitions. If you are clearing out everything except your 12.10 installation, you will only need the swap partition associated with 12.10. In addition to everything else suggested, run:

    Code:
    sudo blkid
    That will list all the UUIDs for the partitions. Find the UUID for swap for the system(s) that you want to keep in /etc/fstab and keep that one. The others can go. It's better to check the UUID because, although there will be a comment line in /etc/fstab telling you which partition number (e.g. "/dev/sda7") swap is, subsequent partition manipulation may have renumbered that one. Better to rely on UUID.

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

  10. #10
    Join Date
    Nov 2005
    Location
    Washington State
    Beans
    2,324
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Remove all partitions not windows or ubuntu 12.10, including separate home partit

    1) Back up whatever personal data you have in your 12.10 install.
    2) Using the Ubuntu LiveCD or a GParted LiveCD, delete every partition inside the extended partition. Keep the extended partition, don't delete that.
    3) Install Ubuntu to the free space inside the extended partition.

    Wouldn't that be much simpler, and less likely to cause problems with a confused GRUB and/or fstab file, than trying to remove all the unwanted partitions? Also avoiding potential problems if/when the OP attempts to expand the one desired installation into the freed-up space...

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •