LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   fdisk not a command? (https://www.linuxquestions.org/questions/linux-newbie-8/fdisk-not-a-command-55902/)

toob 04-20-2003 12:05 AM

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!!!

2damncommon 04-20-2003 03:41 AM

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)

lokee 04-20-2003 10:21 AM

Try this:
/etc/fdisk -l /dev/hdb

trickykid 04-20-2003 12:03 PM

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.

toob 04-20-2003 09:53 PM

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?

toob 04-20-2003 10:10 PM

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?)

2damncommon 04-20-2003 11:36 PM

Quote:

mount/dev/hdb4
mount (space) /dev/hdb4
Or is that a typo?

lokee 04-21-2003 11:23 AM

Ooops,
I meant /sbin/fdisk
Sorry...

toob 04-26-2003 08:03 PM

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

Aussie 04-26-2003 09:30 PM

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".

toob 04-26-2003 10:47 PM

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!!!!!!!!

Aussie 04-26-2003 10:56 PM

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.


All times are GMT -5. The time now is 12:10 AM.