Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 19
I'm trying to delete a partition, and maybe I just don't know what I'm doing (which I don't), but I can't get fdisk to work. I type this in: [root@localhost ...
  1. #1
    Just Joined!
    Join Date
    Feb 2009
    Posts
    7

    [SOLVED] Trouble with fdisk - Trying to delete partition

    I'm trying to delete a partition, and maybe I just don't know what I'm doing (which I don't), but I can't get fdisk to work. I type this in:

    [root@localhost ****]# df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/mapper/VolGroup00-LogVol00
    146G 4.2G 135G 3% /
    /dev/sda1 190M 25M 156M 14% /boot
    tmpfs 505M 48K 505M 1% /dev/shm

    And then this:

    [root@localhost ****]# fdisk -l
    bash: fdisk: command not found
    [root@localhost ****]# fdisk /dev/sda1
    bash: fdisk: command not found

    It appears as though my fdisk isn't working for some reason. Anyone know why? Or what I should do? If anyone would like to give me step by step instructions on how to delete a partition that would be greatly appreciated.

  2. #2
    Just Joined!
    Join Date
    Feb 2009
    Location
    USA
    Posts
    21
    Seems like you don't have /sbin in you PATH, try invoking the command with absolute path...

    Code:
    /sbin/fdisk -l

  3. #3
    Just Joined!
    Join Date
    Feb 2009
    Posts
    7

    Correction...

    I realize that I have to install fdisk. So I tried to and it had an error and told me to install Parted. So I tried doing that but it won't work. I do the ./configure, and when i do make it says this:

    Making all in libparted
    make[1]: Entering directory `/home/****/Desktop/parted-1.8.7/libparted'
    Makefile:564: warning: overriding commands for target `linux.lo'
    Makefile:557: warning: ignoring old commands for target `linux.lo'
    Making all in labels
    make[2]: Entering directory `/home/****/Desktop/parted-1.8.7/libparted/labels'
    /bin/sh ../../libtool --tag=CC --mode=compile gcc -std=gnu99 -I. -I../../lib -I../../include -g -O2 -Werror -MT rdb.lo -MD -MP -MF .deps/rdb.Tpo -c -o rdb.lo rdb.c
    mkdir .libs
    gcc -std=gnu99 -I. -I../../lib -I../../include -g -O2 -Werror -MT rdb.lo -MD -MP -MF .deps/rdb.Tpo -c rdb.c -fPIC -DPIC -o .libs/rdb.o
    cc1: warnings being treated as errors
    ../../include/parted/natmath.h:94: error: inline function 'ped_div_round_to_nearest' declared but never defined
    ../../include/parted/natmath.h:91: error: inline function 'ped_div_round_up' declared but never defined
    make[2]: *** [rdb.lo] Error 1
    make[2]: Leaving directory `/home/****/Desktop/parted-1.8.7/libparted/labels'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/****/Desktop/parted-1.8.7/libparted'
    make: *** [all-recursive] Error 1


    Now what am I supposed to do?

  4. #4
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    2,941
    are you sure fdisk is not already located at /sbin/fdisk ?

  5. #5
    Just Joined!
    Join Date
    Feb 2009
    Posts
    7
    I see it there but nothing happens when i type in:

    /sbin/fdisk -l

  6. #6
    Just Joined!
    Join Date
    Feb 2009
    Posts
    7
    I navigate to the folder and when I type in anything with fdisk it says bash: fdisk: command not found

  7. #7
    Linux Guru rokytnji's Avatar
    Join Date
    Jul 2008
    Location
    Pecos, Texas
    Posts
    2,943
    Try typing in cfdisk as root user and see what comes up maybe.
    Linux Registered User # 475019
    Lead,Follow, or get the heck out of the way
    AntiX,Puppy,Ubuntu,Windows 7=(cuz of scooters)
    Open CourseWare for Linux Geeks

  8. #8
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    2,941
    what does ls /sbin/f* return ... usually current directory is not in root user path for security reasons.

  9. #9
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Which version of RedHat are you using? Execute this
    Code:
    cat /etc/redhat-release
    cat /etc/*version*
    Post output here.


    Use - (hyphen) with su command.
    Execute this
    Code:
    su -
    fdisk -l
    Post output here.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  10. #10
    Just Joined!
    Join Date
    Feb 2009
    Location
    USA
    Posts
    21
    Quote Originally Posted by mrmojomike View Post
    I see it there but nothing happens when i type in:

    /sbin/fdisk -l
    are you trying to find a disk with GUID Partition table... if so you cannot find the disk with fdisk. In such a case you have to go with more advanced tools like parted

    invoke parted and use print command to see you can see the disks.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...