Solved

How to remove OS from 2nd hard-drive

Dents:

My workstation has two 1-T HDDs. First one holds UBUNTU and that's OKey. But the 2nd drive ... I accidentally installed an OS onto that "data-drive". It's mounted at some unspeakable 15-letter /dev/ point. Why or how I don't know. Seems to me the tool **gparted** should allow me to remove those OS files and return the drive to a single 1-T ext4 data partition with a reasonable mount-point: something like /dev/Secondvolume.

But, viewing the gparted tool output, and GOOGLING for tutorial help leaves me totally in-the-dark. Mumbo-jumbo. I don't know how to accomplish the tasks.

What concrete steps should I take to wipe clean that drive , establish a single partition, allow manual mounting and leave it with a "simple" mount-point?
5 answers Last reply Best Answer
More about remove 2nd hard drive
  1. Can you execute and post results from following commands:
    
    $ sudo fdisk -l
    $ sudo mount
    

    These commands assume your setup is Ubuntu / Debian. If "sudo" part is not working, start first with "su -" to get "#" prompt", then proceed without "sudo" part.
  2. Here is the output from: sudo fisk -l:
    ************************************************


    Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00050927

    Device Boot Start End Blocks Id System
    /dev/sda1 * 2048 1903288319 951643136 83 Linux
    /dev/sda2 1903290366 1953523711 25116673 5 Extended
    /dev/sda5 1903290368 1953523711 25116672 82 Linux swap / Solaris

    Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disk identifier: 0x00000846

    Device Boot Start End Blocks Id System
    /dev/sdb1 * 2048 1903288319 951643136 83 Linux
    /dev/sdb2 1903290366 1953523711 25116673 5 Extended
    Partition 2 does not start on physical sector boundary.
    /dev/sdb5 1903290368 1953523711 25116672 82 Linux swap / Solaris


    Alabalcho said:
    Can you execute and post results from following commands:
    
    $ sudo fdisk -l
    $ sudo mount
    

    These commands assume your setup is Ubuntu / Debian. If "sudo" part is not working, start first with "su -" to get "#" prompt", then proceed without "sudo" part.
  3. Here is the output from sudo mount:
    ***************************************************
    /dev/sdb1 on / type ext4 (rw,errors=remount-ro)
    proc on /proc type proc (rw,noexec,nosuid,nodev)
    sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
    none on /sys/fs/fuse/connections type fusectl (rw)
    none on /sys/kernel/debug type debugfs (rw)
    none on /sys/kernel/security type securityfs (rw)
    udev on /dev type devtmpfs (rw,mode=0755)
    devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
    tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
    none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
    none on /run/shm type tmpfs (rw,nosuid,nodev)
    binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
    gvfs-fuse-daemon on /home/me/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=me)

    Alabalcho said:
    Can you execute and post results from following commands:
    
    $ sudo fdisk -l
    $ sudo mount
    

    These commands assume your setup is Ubuntu / Debian. If "sudo" part is not working, start first with "su -" to get "#" prompt", then proceed without "sudo" part.
  4. Best answer
    You should be able to do this with gparted.
    You first you need to unmount the partitions you want to remove as you can't remove something that is possibly running. Right Click on each partition in gparted then unmount from the menu.

    After all of the partitions are unmounted then you can either delete them or Device - New Partition Table Lets say you delete. Click on the check mark to run the operation. After that completes you should have 100% un-allocated space and have a virgin drive with nothing on it. Now click on the un-allocated space and create a new partition. You are presented with options, in your case you want to format to ext4 and you may name it as you wish. Then click the check mark again to run and when finished you should be good to go.
  5. sB:

    Thanks so much. I followed your prescription to good effect. That 2nd HDD is now cleaned-off ready for data, with one-big (ext4) ~980G partition mounting at /media/Secondvolume. Credit solution to you.

    After a // CHOWN -R me.me /media/Secondvolume // all's well. For those who have followed my stumbling HW/SW upgrade path ... from UBUNTU_12.04 and back again there was certainly too much drama. Thanks again ... on the several threads ... to the many concerned & knowlegeable posters who made my build-out possible.


    stillblue said:
    You should be able to do this with gparted.
    You first you need to unmount the partitions you want to remove as you can't remove something that is possibly running. Right Click on each partition in gparted then unmount from the menu.

    After all of the partitions are unmounted then you can either delete them or Device - New Partition Table Lets say you delete. Click on the check mark to run the operation. After that completes you should have 100% un-allocated space and have a virgin drive with nothing on it. Now click on the un-allocated space and create a new partition. You are presented with options, in your case you want to format to ext4 and you may name it as you wish. Then click the check mark again to run and when finished you should be good to go.

Ask a new question