LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   using fdisk painlessly ? (https://www.linuxquestions.org/questions/linux-general-1/using-fdisk-painlessly-738321/)

drmjh 07-07-2009 09:20 AM

using fdisk painlessly ?
 
My goal is to completely wipe the hard disk on my Desktop and install a new Ubuntu distro. It currently has Suse, Windows and a 64 bit ubuntu install that isn't working out (RAM issue).
I've read most of the threads on similar questions but they don't quite hit the mark.
I am logged in as Root, can boot up fdisk, list the partitions with df (it doesn't like some of them and lets me know it).
The syntax for fdisk is a bit opaque: i.e. the command fdisk /dev/sda1 gets me some info about sda1 but when I type: d /dev/sda1 to delete this partition, I get a response: "Partition number (1-4); I entered 1 and was directed to (m for help).

I tried to just install the 32 bit ubuntu and figured on asking it then to just hog the whole disk. The trouble is that I no longer have enough disk space to accomodate that.

"going round in circles"
Matthew

tredegar 07-07-2009 09:34 AM

You need to be root, then
Code:

fdisk /dev/sda
m  to list the commands
p  to list the partitions
d  to delete a partition (and next we have to give the partition number to be deleted)
1  to delete partition /dev/sda1
p  to list the partitions
d  to delete a partition etc
 and finally:
w  to write the partition table and exit


shane25119 07-07-2009 09:34 AM

I've always found FDISK to be a bit of a pain. Your best bet if you want to just do simple partitioning (ie: delete the Ubuntu partition and install something else there) is to use the built in partitioner in the Linux installer- just make sure to select manual. If you want to resize partitions- i.e. change the Ubuntu partition from 40gb to 30gb without deleting anything- then download and burn a bootable copy of Gparted.

H_TeXMeX_H 07-07-2009 10:10 AM

Try cfdisk, it's probably included, I think it's much more intuitive to use, it has curses-like interface.

nowonmai 07-07-2009 10:51 AM

Quote:

Originally Posted by drmjh (Post 3599692)
fdisk /dev/sda1 gets me some info about sda1 but when I type: d /dev/sda1 to delete this partition, I get a response: "Partition number (1-4); I entered 1 and was directed to (m for help).

/dev/sda1 is the partition, you need to fdisk the drive: /dev/sda

P to view all partitions
D (repeatedly) to delete each partition
W to write

Done...

PTrenholme 07-07-2009 10:57 AM

Why not just install Ubuntu and let the installer use the whole disk? As far as I can recall, there is no need for you to do any "wipe" before you install.

drmjh 07-07-2009 11:22 AM

Thanks guys!
As I type, my new OS is creating an ext3 file system for the entire disk. :D
Matthew


All times are GMT -5. The time now is 01:28 PM.