LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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


Closed Thread
  Search this Thread
Old 11-23-2003, 08:23 PM   #1
endezeichen
Member
 
Registered: Nov 2003
Posts: 48

Rep: Reputation: 15
fdisk question


I made a vfat partition with Partition magic so i can swap files between Linux and Windows. Ive been told to use the fdisk -l command to check my partition table. When I type it in the command line it says command does not exist, and when i type /sbin/fdisk -l it says cannot open dev/hda. Is it meant to be typed in Windows?
Also, I have to use the mount -t vfat /dev/hdaX /mnt/shared command. Will someone plz explain to me what "dev" is? Im pretty sure its device, but what does that mean?
 
Old 11-23-2003, 08:33 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Nope, in a linux terminal, however you
should be root to run it, normal users don't
have access rights for raw devices usually.

Try a
su -c "fdisk -l /dev/hda"
it will prompt you for root's password.

Basically in Unix (and thus in linux)
everything is a "file" (or a stream).
All "devices" live in /dev ...


Cheers,
Tink
 
Old 11-23-2003, 08:34 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
You need to be logged in as root to use the fdisk utility.

/dev is the directory name where the device files are located. Open up Konqueror or some file broswer and go to the top of the directory tree i.e. /. One of the directories will be /dev.
 
Old 11-23-2003, 08:34 PM   #4
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
That command is meant to be run in Linux. Open an x terminal, become root and give the command:
Code:
Sun Nov 23 06:23pm fancy@tinwhistle ~$ su -                                     
Password: 
Sun Nov 23 09:31pm root@tinwhistle ~ # fdisk -l

Disk /dev/hda: 255 heads, 63 sectors, 4865 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1      1217   9772056    c  Win95 FAT32 (LBA)
/dev/hda2   *      1217      1229     99855   83  Linux
/dev/hda3          1230      1656   3429877+  83  Linux
/dev/hda4          1657      4865  25776292+   5  Extended
/dev/hda5          1657      1719    506016   82  Linux swap
/dev/hda6          1720      2146   3429846   83  Linux
/dev/hda7          2147      2573   3429846   83  Linux
/dev/hda8          2574      3719   9205213+  83  Linux
/dev/hda9          3720      4865   9205213+  83  Linux

Disk /dev/hdb: 255 heads, 63 sectors, 9729 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdb1   *         1       973   7815591   83  Linux
/dev/hdb2           974      1946   7815622+  83  Linux
/dev/hdb3          1947      2919   7815622+  83  Linux
/dev/hdb4          2920      9729  54701325   83  Linux

device, ide drive connected to ide1 master, partition number X
# Managing drives
LNAG - Accessing my drives
Rute - Device Mounting
 
Old 11-23-2003, 08:38 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Here's a link to a quite concise introduction :)

http://tille.soti.org/training/tldp/


Cheers,
Tink
 
Old 11-23-2003, 08:39 PM   #6
endezeichen
Member
 
Registered: Nov 2003
Posts: 48

Original Poster
Rep: Reputation: 15
ok heres my problem--
When i log in as root and type fdisk -l It says command fdisk not found. And i am using (L) and logged in as root
 
Old 11-23-2003, 08:42 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally posted by endezeichen
ok heres my problem--
When i log in as root and type fdisk -l It says command fdisk not found. And i am using (L) and logged in as root
That's weird ... it should be in root's path.
Which distro/version are you using?
Did you login as root, or su?
And what happens when you prefix it
with /sbin as root?

Cheers,
Tink
 
Old 11-23-2003, 08:53 PM   #8
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Is it installed?

whereis fdisk
Code:
Sun Nov 23 09:31pm root@tinwhistle ~ # whereis fdisk
fdisk: /sbin/fdisk /usr/share/man/man8/fdisk.8.gz
 
Old 11-23-2003, 09:04 PM   #9
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php

The other thread can be found here where you asked the same question yesterday and you replied after I gave you a concise answer: http://www.linuxquestions.org/questi...hreadid=119002
 
  


Closed Thread



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
Fdisk question OhSnapWhat Slackware 5 09-04-2005 10:13 AM
FDISK Question lennysokol Linux - Software 2 04-03-2005 02:22 PM
fdisk question digsby0007 Linux - Software 1 05-02-2004 02:09 PM
fdisk duru question trade14u Linux - General 2 03-25-2004 11:29 AM
fdisk question yee007 Linux - General 0 04-09-2001 12:13 PM

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

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