LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What am I doing wrong? (https://www.linuxquestions.org/questions/linux-newbie-8/what-am-i-doing-wrong-75964/)

funkenbooty 07-25-2003 06:37 PM

What am I doing wrong?
 
[Paul@localhost Paul]$ su
Password:
[root@localhost Paul]# fdisk -l
bash: fdisk: command not found
[root@localhost Paul]#


I am on a quest to access my FAT32 partition.
Wanted to look at how everything is partitioned.
Got stuck at fdisk!
Am I supposed to be in a different directory?
You do have to be root to do this?

lfur 07-25-2003 06:47 PM

Instead of:
su

try:
su -

and then:
fdisk -l

Looking_Lost 07-25-2003 06:47 PM

/sbin/fdisk

or use su -

Proud 07-25-2003 06:47 PM

Which distro are you using? You may need to install fdisk.

funkenbooty 07-25-2003 07:01 PM

I am using RH8
I did man fdisk and the manual shows up.
Does that mean that fdisk is there?

funkenbooty 07-25-2003 07:14 PM

[Paul@localhost Paul]$ su-
bash: su-: command not found
[Paul@localhost Paul]$ su -
Password:
[root@localhost root]# fdisk -l

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

Device Boot Start End Blocks Id System
/dev/hda1 * 1 128 1028128+ 7 HPFS/NTFS
/dev/hda2 129 4982 38989755 f Win95 Ext'd (LBA)
/dev/hda5 129 893 6144831 7 HPFS/NTFS
/dev/hda6 1914 4982 24651711 b Win95 FAT32
/dev/hda7 894 906 104391 83 Linux
/dev/hda8 907 1848 7566583+ 83 Linux
/dev/hda9 1849 1913 522081 82 Linux swap

Partition table entries are not in disk order
[root@localhost root]#


Thanks that worked!

Some of this does not look familiar.
Linux does not show the names that I gave to the Windows partitions?

The partition that I want to use between XP and RH8 is :
/dev/hda6 1914 4982 24651711 b Win95 FAT32

I'm fairly sure. I know it was over 20GB

Can you tell me how to R/W to it?

fancypiper 07-25-2003 07:20 PM

# How much free drive space
df -h

How you named them will be shown in the file /etc/fstab. Mine for an example:
Code:

# Duron 950 uilleann box /etc/fstab file
/dev/hda6        /              reiserfs        defaults        1 1
dev/hda2        /boot          ext3                defaults        1 2
none            /dev/pts        devpts                gid=5,mode=620  0 0
/dev/hda8        /home          reiserfs        defaults        1 2
#/dev/hda3        /mnt/gentoo    reiserfs        defaults        1 2
#/dev/hda7        /mnt/mandrake  ext3                defaults        1 2
/dev/hda1        /mnt/winc        vfat                defaults        0 0
none            /proc          proc                defaults        0 0
none            /dev/shm        tmpfs                defaults        0 0
/dev/hdc1        /pub            ext3                defaults        1 2
/dev/hda9        /snd            reiserfs        defaults        1 2
/dev/hda5        swap            swap                defaults        0 0
/dev/fd0        /mnt/floppy    auto                noauto,owner    0 0
/dev/cdrom        /mnt/cdrom        iso9660                noauto,owner,ro 0 0

# Managing drives
LNAG - Accessing my drives
Rute - Device Mounting

# Redhat links
RedHat Linux Manuals
Get your mp3 support here
Maximum RPM
rpmfind
Easier software management: apt4rpm - Red Carpet
RedHat 8.0 Tips & Tricks

# Redhat 7.3 down configuration commands
setup leads to several configuration tools

# Redhat 7.3 up configuration commands
Configure soundcard:
redhat-config-soundcard
Configure X server:
redhat-config-xfree86
Configure network:
redhat-config-network
Manage software:
redhat-config-packages

# Handling NTFS
New Technology FileSystem (NTFS) HOWTOs
Linux NTFS project

Skyline 07-25-2003 07:22 PM

Hi Funkenbooty

If your mount point in Red Hat is /mnt/xpdata then:

mount -t vfat -o rw /dev/hda6 /mnt/xpdata

once youve tested it then do in /etc/fstab

/dev/hda6 /mnt/xpdata vfat rw


funkenbooty 07-25-2003 07:42 PM

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

Device Boot Start End Blocks Id System
/dev/hda1 * 1 128 1028128+ 7 HPFS/NTFS
/dev/hda2 129 4982 38989755 f Win95 Ext'd (LBA)
/dev/hda5 129 893 6144831 7 HPFS/NTFS
/dev/hda6 1914 4982 24651711 b Win95 FAT32
/dev/hda7 894 906 104391 83 Linux
/dev/hda8 907 1848 7566583+ 83 Linux
/dev/hda9 1849 1913 522081 82 Linux swap

Partition table entries are not in disk order
[root@localhost root]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda8 7.1G 1.4G 5.3G 21% /
/dev/hda7 99M 9.1M 84M 10% /boot
none 125M 0 124M 0% /dev/shm
/dev/cdrom 528M 528M 0 100% /mnt/cdrom
/dev/fd0 1.4M 0 1.3M 0% /mnt/floppy
/dev/hda6 23G 768K 23G 1% /mnt/fat32
[root@localhost root]#


There it is, should have thought of a better name than fat32!

Now I have to make it accessible to all users.

Thanks to all for your help:D

funkenbooty 07-25-2003 08:15 PM

Will I have to do this every time I reboot?

mount -t vfat -o rw /dev/hda6 /mnt/fat32

fancypiper 07-25-2003 09:21 PM

No, not if you put it in your /etc/fstab file.
# Managing drive devices
Rute guide - Device Mounting
LNAG - Accessing my drives

Skyline 07-25-2003 09:58 PM

Hi funkenbooty

Just put this in on a new line at the bototm of your /etc/fstab


/dev/hda6 /mnt/xpdata vfat rw


Just substitute in your mount point instead of /mnt/xpdata

Remember to press enter to create a new line after youve put this line in at the bottom

funkenbooty 07-25-2003 10:37 PM

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda9 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/hda6 /mnt/fat32 vfat rw


The bottom line is what I am trying to add, but when I try to save it won't let me: Unable to make backup of original file
Unable to write to file
I am using Kedit.

Skyline 07-25-2003 11:07 PM

Hi Funkenbooty

First - did it mount corectly when you created a temporary mount with?

mount -t vfat -o rw /dev/hda6 /mnt/fat32

Next - Did you definately press enter after youve typed the line in at the bottom of /etc/fstab - it needs a carriage return.

To get KEDIT I just do:

su
root password

KEDIT /etc/fstab

A KEDIT window opens up - type in your line at the botom and make suyre you definately press enter so the cursor is left on the next blank line

Then just click the little Save icon on the toolbar above - this should just save this version over the previous one in /etc

funkenbooty 07-26-2003 02:16 AM

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda9 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/hda6 /mnt/fat32 vfat rw


I pretty sure that I've got it mounted.
The partition is letting me write to it.

The reason it wasn't working before was because (I guess) that I was opening it from inside Konqueror and was not root.

I think I will change the file back to the way it was though so I get more practice typing these commands.

I appreciate your help! Thanks.


All times are GMT -5. The time now is 03:43 AM.