LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   partition not showing in fstab or mtab (https://www.linuxquestions.org/questions/linux-newbie-8/partition-not-showing-in-fstab-or-mtab-106597/)

tyccea 10-21-2003 01:46 AM

partition not showing in fstab or mtab
 
I was dual-booting between RH9 & Peanut Linux, switched to dual-booting between RH9 & win2k. I can't mount my win partition because RH9 says it's not in fstab or mtab.
Here's the output:

[MOG811@kinjiru tyccea]# cat /etc/fstab
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/hda5 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/cdrom1 /mnt/cdrom1 udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0

[MOG811@kinjiru tyccea]# cat /etc/mtab
/dev/hda3 / ext3 rw 0 0
none /proc proc rw 0 0
usbdevfs /proc/bus/usb usbdevfs rw 0 0
/dev/hda2 /boot ext3 rw 0 0
none /dev/pts devpts rw,gid=5,mode=620 0 0
none /dev/shm tmpfs rw 0 0

What do I need to do so I can mount the win partition? It's in the grub boot menu as DOS.
Here's the output from /etc/grub.conf

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,1)
# kernel /vmlinuz-version ro root=/dev/hda3
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,1)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
root (hd0,1)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.20-8.img
title DOS
rootnoverify (hd0,0)
chainloader +1

TIA for the suggestions on what to read / do. :D

MasterC 10-21-2003 02:19 AM

Well, if you are just trying to mount something, you'll have to specify the device (/dev/hdx) the filesystem (ntfs/vfat) and the location to mount it to (/mnt/windoze):
mount -t ntfs /dev/hdx /mnt/windoze

However... If it is indeed NTFS, check around the board, you'll need to patch your distro to support NTFS or rebuild your kernel ( a patch is much easier :D ).

Right now it's likely you are missing 1 of those components, filesystem, device and mount point if the entry is NOT in /etc/fstab for the device or is in there incorrectly (filesystem or device).

HTH

Cool

tyccea 10-21-2003 04:44 PM

Thanks for the swift response, MasterC. The partition was formatted as FAT - took up the entire drive. Then Peanut's parted program resized it, making room for Peanut. About a week later I replaced Peanut with RH9. I'm about to google-around :study: and see what I come up with. The only other command I learned for showing partitions was the following...but I'm still stuck so far. :p

[MOG811@kinjiru tyccea]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 4.6G 1.9G 2.5G 44% /
/dev/hda2 99M 9.1M 85M 10% /boot
none 94M 0 94M 0% /dev/shm

You wrote: " Right now it's likely you are missing 1 of those components, filesystem, device and mount point if the entry is NOT in /etc/fstab for the device or is in there incorrectly (filesystem or device)."
Hmm...is there a way to figure out what device (/dev/hda?) RH allocates to the grub.conf DOS entry?

Thanks again.

MasterC 10-21-2003 04:49 PM

Grub.conf has nothing to do with what partition you mount. You can use the command:
/sbin/fdisk -l (FDISK -L lowercase)
To display your partitions. Then you can usually deduce the necessary partition to mount from there ;)

Cool

tyccea 10-21-2003 05:24 PM

AHA!! :D :D :D Talk about a happy camper!

[MOG811@kinjiru tyccea]# /sbin/fdisk -l

Disk /dev/hda: 10.2 GB, 10262568960 bytes
255 heads, 63 sectors/track, 1247 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 581 4666851 c Win95 FAT32 (LBA)
/dev/hda2 * 582 594 104422+ 83 Linux
/dev/hda3 595 1199 4859662+ 83 Linux
/dev/hda4 1200 1247 385560 f Win95 Ext'd (LBA)
/dev/hda5 1200 1247 385528+ 82 Linux swap
[MOG811@kinjiru tyccea]# mount /dev/hda1
mount: can't find /dev/hda1 in /etc/fstab or /etc/mtab

Now all I have to do is add this entry to fstab as...
/dev/hda1 /windows/C vfat rw,noauto,user 0 0
Is this all I have to do? I found an article on this at:
http://www.fisherfamily.orcon.net.nz...ows_Partitions

Thanks again - you led me to some good articles.

dalek 10-21-2003 05:52 PM

Try this.

Code:

mkdir /mnt/windows    <enter>
mount /dev/hda1 /mnt/windows    <enter>

If that works add this to your fstab file AS root.

Code:

/dev/hda1 /mnt/windows vfat iocharset=iso8859-1,codepage=850,umask=0 0 0
That needs to be close to the bottom of the file. DO NOT put close to the top. It needs to mount the others first so it can boot.

Oh, the first command makes a directory for the partition to mount too, display the files. The second command tell it to mount the partition /dev/hda1 and display the partition in /mnt/windows directory. The rest is the file system info and such.

Note, you will have read/write access to the drive and ALL users can access and change the contents.

Oh yeah, to get to it in command line type in

Code:

cd /mnt/windows  <enter>
In a file manager type in

Code:

file:/mnt/windows
Hope that helps. Keep reading though.

:D :D :D :D

edit: still can't spell spit, can't read either.

dalek 10-21-2003 06:18 PM

One more tidbit of info. If something mounts when you boot automatically, it is in fstab. If you mount something manually using the mount command, that goes in mtab. NEVER NEVER mess with mtab. Look all you want but don't change anything. You can mess with fstab IF you know what to add or delete.

I sometimes cheat and mount something manually and look at mtab to see what needs to go into fstab. They are usually pretty close.

Clear as mud yet??

:D :D :D :D

tyccea 10-21-2003 08:05 PM

You wrote: "Clear as mud yet??"
Crystal. I really appreciate it.

Everything mounts fine now; I get an error when I type mount /dev/hda1, saying
[mntent]: warning: no final newline at the end of /etc/fstab .........

And found the answer here:
http://www.linuxquestions.org/questi...?threadid=8093


All times are GMT -5. The time now is 02:50 PM.