Results 1 to 10 of 24

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

Hybrid View

  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
    639
    Distro
    Ubuntu 15.04 Vivid Vervet

    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
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    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
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    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,971
    Distro
    Ubuntu 14.04 Trusty Tahr

    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!

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
  •