LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-20-2003, 12:05 AM   #1
toob
LQ Newbie
 
Registered: Jun 2002
Distribution: Red Hat 8
Posts: 25

Rep: Reputation: 15
Question fdisk not a command?


Greetings all,

I'm trying to list my partitions and for some reason the command line 'fdisk' doesn't work. I am getting an error stating it is invalid when I try to use:

fdisk -l /dev/hdb

I can view the list under Block Devices but the only things that show up there are the things Linux already sees -- and I do not see my 4 GB FAT32 partition there, either. I guess I'm just trying to figure out how to find my FAT32 partition, and it doesn't like fdisk. . . (Note: I'm trying to do what I did last June, as referenced in the following thread: http://www.linuxquestions.org/questi...threadid=23202 in case anyone wants background. . . only I'm running RH 8 now).

Can anyone help? I'm not very technical and I thank you in advance for your help!!!
 
Old 04-20-2003, 03:41 AM   #2
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
Quote:
for some reason the command line 'fdisk' doesn't work
Are you logged in as root?
su
root password
fdisk

Is fdisk installed?
which fdisk (also as root)
 
Old 04-20-2003, 10:21 AM   #3
lokee
Member
 
Registered: Feb 2003
Distribution: Gentoo
Posts: 381

Rep: Reputation: 30
Try this:
/etc/fdisk -l /dev/hdb
 
Old 04-20-2003, 12:03 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
lokee,

Most likely there are no commands that are run from the /etc directory. That is a directory where configuration files are stored.

The default location of fdisk is in /sbin where most likely you have to be root to run.
 
Old 04-20-2003, 09:53 PM   #5
toob
LQ Newbie
 
Registered: Jun 2002
Distribution: Red Hat 8
Posts: 25

Original Poster
Rep: Reputation: 15
I forgot to mention another related problem I am having -- I am using x window (KDE) -- and when I go to "Run Command" and type in my command, the command window disappears and I cannot see what results occurred after running the command -- is there a 'cure' for this behavior?
 
Old 04-20-2003, 10:10 PM   #6
toob
LQ Newbie
 
Registered: Jun 2002
Distribution: Red Hat 8
Posts: 25

Original Poster
Rep: Reputation: 15
I managed to open terminal and ran /sbin/fdisk -l /dev/hdb (thanks both lokee & trickykid!) - and located my FAT32 drive as follows:

Device Boot Start End Blocks Id System
/dev/hdb5 1473 2014 4097488+ b Win95 FAT32

When I attempted to mount it using this command: mount/dev/hdb4 -t vfat32 /mnt/hdb4 I receive the following error: bash: mount/dev/hdb5: No such file or directory

Okay, if I *know* it is there, and it's recognized as a FAT32 partition. . . why doesn't it want to mount it?

Gosh my sincerest apologies if I sound like an idiot by asking such a question, knowing me I've got something totally screwed up!

Thanks again for all who can help. . . ! (Can anyone recommend a good 'learning Linux' type book?)
 
Old 04-20-2003, 11:36 PM   #7
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
Quote:
mount/dev/hdb4
mount (space) /dev/hdb4
Or is that a typo?
 
Old 04-21-2003, 11:23 AM   #8
lokee
Member
 
Registered: Feb 2003
Distribution: Gentoo
Posts: 381

Rep: Reputation: 30
Ooops,
I meant /sbin/fdisk
Sorry...
 
Old 04-26-2003, 08:03 PM   #9
toob
LQ Newbie
 
Registered: Jun 2002
Distribution: Red Hat 8
Posts: 25

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by 2damncommon
mount (space) /dev/hdb4
Or is that a typo?
It was a typo. . . however, now it's telling me hdb5 is not a mount point. Do I have to create a mount point? (We all know the next question) -- if so, how?

Thanks again for everyone for being so understanding and for your help!

--Melissa
 
Old 04-26-2003, 09:30 PM   #10
Aussie
Senior Member
 
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590

Rep: Reputation: 58
You may need to load the vfat kernel module before you can mount a fat32 partition. Do "lsmod" and if you can't see the vfat module in the output load it with the modprobe command - "modprobe vfat".
 
Old 04-26-2003, 10:47 PM   #11
toob
LQ Newbie
 
Registered: Jun 2002
Distribution: Red Hat 8
Posts: 25

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Aussie
You may need to load the vfat kernel module before you can mount a fat32 partition. Do "lsmod" and if you can't see the vfat module in the output load it with the modprobe command - "modprobe vfat".
Hi Bern,

"lsmod" doesn't seem to work -- I'm getting the following error: bash: lsmod: command not found error

Hopefully I'll become less stupid with Linux in the near future, as I ordered two books today. . . . but I thank you for your help now!!!!!!!!
 
Old 04-26-2003, 10:56 PM   #12
Aussie
Senior Member
 
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590

Rep: Reputation: 58
You need to be root Melissa, the su command is helpful here,
Code:
bern@grendel bern$ su -c 'lsmod'
Password:
Module                  Size  Used by    Tainted: P
nvidia               1539776  10  (autoclean)
adv717x                 2840   0  (autoclean) (unused)
agpgart                13872   3  (autoclean)
ide-scsi                8784   0
8139too                16264   1
mii                     2432   0  [8139too]
sidewinder             10008   0  (unused)
emu10k1-gp              1480   0  (unused)
gameport                1484   0  [sidewinder emu10k1-gp]
joydev                  5856   0  (unused)
input                   3232   0  [sidewinder joydev]
emu10k1                66856   3
ac97_codec             10376   0  [emu10k1]
soundcore               3652   4  [emu10k1]
via686a                 8064   0
eeprom                  3636   0
lm80                    5692   0
adm1021                 5944   0
i2c-proc                6928   0  [via686a eeprom lm80 adm1021]
i2c-isa                 1160   0  (unused)
i2c-viapro              3984   0  (unused)
i2c-core               13928   0  [adv717x via686a eeprom lm80 adm1021 i2c-proc i2c-isa i2c-viapro]
apm                    10024   2
It allows you to run a root command while logged in as a user, do 'man su' for all the options.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem using command fdisk -l ? AkshatBhandari Linux - Newbie 2 03-17-2005 12:36 PM
fdisk command - can't get it to work!! sknarf Linux - Software 4 06-23-2004 01:59 AM
fdisk command not found ryancherry Fedora 2 06-12-2004 06:56 PM
fdisk command not found? tiang_ono Linux - Newbie 7 05-17-2004 10:48 PM
fdisk command thefetus Linux - Newbie 5 11-19-2003 02:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:20 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