Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: How to Delete Linux

  1. #1
    Join Date
    Nov 2018
    Beans
    39

    How to Delete Linux

    How do you delete linux? I came to this point:

    Code:
    ivan@ivan-desktop:~$ sudo fdisk /dev/sda1
    [sudo] password for ivan:                 
    
    Welcome to fdisk (util-linux 2.31.1).
    Changes will remain in memory only, until you decide to write them.
    Be careful before using the write command.
    
    The old ext4 signature will be removed by a write command.
    
    Device does not contain a recognized partition table.
    Created a new DOS disklabel with disk identifier 0x0c46d6de.
    
    Command (m for help): m
    
    Help:
    
      DOS (MBR)
       a   toggle a bootable flag
       b   edit nested BSD disklabel
       c   toggle the dos compatibility flag
    
      Generic
       d   delete a partition
       F   list free unpartitioned space
       l   list known partition types
       n   add a new partition
       p   print the partition table
       t   change a partition type
       v   verify the partition table
       i   print information about a partition
    
      Misc
       m   print this menu
       u   change display/entry units
       x   extra functionality (experts only)
    
      Script
       I   load disk layout from sfdisk script file
       O   dump disk layout to sfdisk script file
    
      Save & Exit
       w   write table to disk and exit
       q   quit without saving changes
    
      Create a new label
       g   create a new empty GPT partition table
       G   create a new empty SGI (IRIX) partition table
       o   create a new empty DOS partition table
       s   create a new empty Sun partition table
    
    
    Command (m for help): p
    Disk /dev/sda1: 111,8 GiB, 120031543296 bytes, 234436608 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
    Disklabel type: dos
    Disk identifier: 0x0c46d6de
    
    Command (m for help): d
    No partition is defined yet!
    Could not delete partition 1
    
    Command (m for help):

    The reason I want to delete Linux is that I'm having some problems, I'm not sure hardware of software, and I want to install Windows alongside it but when booting my keyboard is unresponsive so I can't press any key when it says to press any key to boot from CD. It just boots straight into Linux.

    Thank you
    Last edited by ivan23m; June 6th, 2020 at 04:21 AM.

  2. #2
    Join Date
    Aug 2017
    Location
    melbourne, au
    Beans
    Hidden!
    Distro
    Lubuntu Development Release

    Re: How to Delete Linux

    You don't need to delete Zorin (which is not Ubuntu, nor a flavor of Ubuntu), you just install windows and it'll overwrite Zorin identically to if it wasn't there.

  3. #3
    Join Date
    Nov 2018
    Beans
    39

    Re: How to Delete Linux

    Like I said above. I am unable to start a Windows installation from CD. When booting it says to press any key to boot from CD but I can't do that, my keyboard is unresponsive during the boot process. Instead of starting a Windows installation it boots to Linux. So the only option is to delete Linux and then I'll be able to install Windows. I've found something. Should I click on ''Delete this partition'' on Settings > Disks or perhaps ''Unmount selected partition'' before deleting it with fdisk?
    Attached Images Attached Images
    Last edited by ivan23m; June 6th, 2020 at 04:22 AM.

  4. #4
    Join Date
    Aug 2017
    Location
    melbourne, au
    Beans
    Hidden!
    Distro
    Lubuntu Development Release

    Re: How to Delete Linux

    Your issue is hardware or firmware related in my opinion, ie. you need to press a key message is from the windows install media to start it (or from BIOS/firmware). If you don't press a key, and you've removed whatever is installed on your hdd/ssd (which windows will overwrite anyway during install), you'll get a boot failure and a message to insert media & press a key to retry (or whatever message your firmware has encoded to display).

    Removing the partition will just brick your machine I suspect. Your best fix is via UEFI/BIOS change to allow the keyboard to work (ie. hardware/firmware change).

    Your image looks like you've started `gnome-disks`, but being Zorin that I'm not really familiar with I won't advice sorry. Your mouse appears to be over "Unmount selected partition" but I'm guessing.

  5. #5
    Join Date
    Nov 2018
    Beans
    39

    Re: How to Delete Linux

    The keyboard part, although important, is not the main focus of this thread, rather it is how to delete Linux using fdisk. I have already copied the point on terminal I came to so I'm asking for advice on what to do next. After the "d" command what it should ask me (from my very limited understanding acquired through googling) the number of partition I want to delete but instead I got the message " No partition is defined yet! Could not delete partition 1".

    The way I installed Linux was the usual way. ISO file, burned on CD, inserted it, no need to press a key for Linux to show up and you install it. I'm having some other potential problems with it, Linux, so I wanted to install Windows but now, all of a sudden, I put the ISO file Windows CD and it asks me to press a key to boot from CD. I read a few minutes ago that's a feature of Windows bootable CDs.

    I'm assuming you said that removing the partition will leave my PC bricked because I'll be left without a system and I can't press the key to install a new one, this time Windows, right? I don't think it'll get bricked because I don't have problems with installing Linux, I can just install a new one.
    It's only the Windows I'm having problems installing currently.

    Two main questions, how do I proceed with deleting a partition using f disk?
    And you wrote, " Your best fix is via UEFI/BIOS change to allow the keyboard to work". What are the steps to do that?
    Last edited by ivan23m; June 6th, 2020 at 04:22 AM.

  6. #6
    Join Date
    Nov 2018
    Beans
    39

    Re: How to Delete Linux

    I've managed to solve the keyboard not working during the boot part. Immediately at the start of boot I pressed Delete to enter setup, chose "Integrated Peripherals", then marked "USB Keyboard Support" as enabled. And that was it, the keyboard works during boot, you can press a key to start the boot from CD. I still don't know how to uninstall Linux but it was answered that it's not necessary, it'll overwrite the existing system. The question from the title hasn't been answered, but I've got this breakthrough with the keyboard, should I mark as solved? If you wish you can respond to my question about how to proceed with Linux uninstall, maybe someone will find it useful but I think I might not need it anymore.

  7. #7
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: How to Delete Linux

    If Linux was residing on the partition that Linux names /dev/sda2, you could reformat the partition and overwrite whatever is there with
    Code:
    sudo mkfs -t ext4 /dev/sda2
    Boot from an Ubuntu CD/DVD in "Try Ubuntu" mode, then run that command.

    You could choose ntfs or vfat instead of ext4. If you go that route, you probably want to mark the partition as holding the type of filesystem you intend to put there. In fdisk, use "t" to pick a type. Use "l" to show the list of types. When you're done, make sure to choose "w" to commit your changes to the device.

    There are also ways to write zeros to the entire partition or other more intensive ways to delete its contents. Reformatting it will certainly do the trick.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  8. #8
    Join Date
    Aug 2017
    Location
    melbourne, au
    Beans
    Hidden!
    Distro
    Lubuntu Development Release

    Re: How to Delete Linux

    In bricked I meant that it won't work by itself (due to no OS), not that a new OS cannot be installed on it. A poor choice of words on my behalf, sorry.

  9. #9
    Join Date
    Oct 2004
    Location
    Albuquerque New Mexico, U
    Beans
    1,189
    Distro
    Ubuntu Development Release

    Re: How to Delete Linux

    fdisk will do what you want, but when you invoked it above you told it a partition was a disk (fdisk /dev/sda1).

    Try invoking it with the command:

    sudo fdisk /dev/sda

    and see if that works better.
    regards

  10. #10
    Join Date
    Nov 2018
    Beans
    39

    Re: How to Delete Linux

    This is what I did, as Seiji suggested above:

    Code:
    mint@mint:~$ sudo mkfs -t ext4 /dev/sda
    mke2fs 1.44.1 (24-Mar-2018)
    Found a dos partition table in /dev/sda
    Proceed anyway? (y,N)
    Also, as rbmorse suggested I wrote sda instead of sda1. Is this going to delete the installed system, Zorin?

    I`m booting with Mint, I`m having problems with Zorin, I`m gonna deinstall it.

    And yes, I know I can just overwrite the installed system, I`m asking in case I want to use the command in the future.
    Last edited by ivan23m; June 6th, 2020 at 11:07 PM.

Page 1 of 2 12 LastLast

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
  •