LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-07-2009, 09:20 AM   #1
drmjh
Member
 
Registered: Mar 2005
Location: North Carolina, USA
Distribution: Ubuntu
Posts: 308

Rep: Reputation: 31
Question 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
 
Old 07-07-2009, 09:34 AM   #2
shane25119
Member
 
Registered: Aug 2003
Location: Illinois
Distribution: Linux Mint XFCE
Posts: 654

Rep: Reputation: 53
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.
 
Old 07-07-2009, 09:34 AM   #3
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
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
 
Old 07-07-2009, 10:10 AM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Try cfdisk, it's probably included, I think it's much more intuitive to use, it has curses-like interface.
 
Old 07-07-2009, 10:51 AM   #5
nowonmai
Member
 
Registered: Jun 2003
Posts: 481

Rep: Reputation: 48
Quote:
Originally Posted by drmjh View Post
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...
 
Old 07-07-2009, 10:57 AM   #6
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
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.
 
Old 07-07-2009, 11:22 AM   #7
drmjh
Member
 
Registered: Mar 2005
Location: North Carolina, USA
Distribution: Ubuntu
Posts: 308

Original Poster
Rep: Reputation: 31
Thanks guys!
As I type, my new OS is creating an ext3 file system for the entire disk.
Matthew
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I switch from Gnome to KDE painlessly? drew boardman Linux - Software 2 08-13-2008 11:04 AM
Trying to integrate Vuze, FretsOnFire, and other similar apps to menu painlessly mongoosecage Slackware 5 07-14-2008 12:15 PM
weird fdisk problem (Fdisk unable to see winxp partitions) khidot Slackware - Installation 5 04-07-2007 09:26 PM
No fdisk with XP chichibabin Linux - General 5 11-07-2003 10:34 AM
Fdisk Help! SnowSurfAir Linux - Software 21 07-21-2003 01:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration