'Seeing' my windows partition
Hi guys, I've been trawling thru the archives looking for the answer to my question, but still can't quite get it to work so thought I'd ask for some personal help.
I have a duel boot system running Windows and Red Hat. I'd like to be able to see the files from the windows partition while I'm using Red Hat. I've tried following the steps people have suggested for mounting the partition, but I'm not sure whether I'm typing the right thing (well I'm obviously not as it's not working!). This is what I get from typing fdisk -l Disk /dev/hde: 203.9 GB, 203928109056 bytes 255 heads, 63 sectors/track, 24792 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hde1 * 1 12748 102398278+ 7 HPFS/NTFS /dev/hde2 12749 12992 1959930 6 FAT16 /dev/hde3 12993 13005 104422+ 83 Linux /dev/hde4 13006 24792 94679077+ f Win95 Ext'd (LBA) /dev/hde5 13006 13770 6144831 83 Linux /dev/hde6 13771 13901 1052226 82 Linux swap /dev/hde7 13902 24792 87481926 83 Linux Slightly confused that it's all come up as hde rather than hda ... is that a problem? Anyhow, have tried a few different lines in my /etc/fstab file, but just doesn't seem to do anything ... Help! Thank you |
After you edited fstab, did you run "mount -a"? What do the lines you've added to fstab look like? It's not a problem that your hard drive is hde rather than hda, presumably you have other IDE devices in that machine?
|
AT the moment my /etc/fstab file looks like this (I added the last line)
LABEL=/ / ext3 defaults 1 1 LAB EL=/boot /boot ext3 defaults 1 2 none /dev/pts devpts gid=5,mode=620 0 0 LABEL=/home /home ext3 defaults 1 2 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0 /dev/hde6 swap swap defaults 0 0 /dev/sda1 /mnt/flash auto noauto,owner,kudzu 0 0 /dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0 /dev/hde2 /home/rachel/H vfat user,rw,exec,umask=000 0 0 I've just tried to run mount -a in the /home/rachel/H directory (would only let me do it as root) and got the following error mount: wrong fs type, bad option, bad superblock on /dev/hde2, or too many mounted file systems I've also tried it with hde4 instead of hde2 and msdos instead of vfat (can you tell I really don't know what I'm doing!?!), none of which seem to work. Cheers for your help! |
How about just mounting the partition without having it in your fstab first? Try commenting out that last line (i.e. put a # at the beginning) and then run (as root) "mount -t vfat /dev/hde2 /home/rachel/H". Does that work at all?
|
hmmmm Can't even get onto linux at the moment to try it. I rebooted with that line still in my fstab and it complained heavily when booting up :s Said something about taking me down to shell level and I had the option of hitting cntrl D, which just rebooted or entering root password, which then gave the line
(repair filesystem) 1 # Absolutely no idea what to type after that .... |
Okey dokey - Here's the details of my new problem ... how do I get out of this one? The following is transcribed from where it all started to go wrong during the boot!
Checking filesystems WARNING: bad format on line 2 of /etc/fstab fsck ext3: EL = /boot: The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternative superblock: e2fsck -b8193 <device> /home: clean, 269068/10944512 files, 4027182/21870481 blocks No such file or directory while trying to open EL = /boot [FAILED] *** An error occured during the file system check *** Dropping you to a shell; the system will reboot *** when you leave they shell Give root password for maintenance (or type Control-D to continue) |
Right ... sorted out the boot problem, back to the original one ...
Tried mounting the partition manually as suggested but got the same error [root@zia root]# mount -t vfat /dev/hde2 /home/rachel/H mount: wrong fs type, bad option, bad superblock on /dev/hde2, or too many mounted file systems Any more suggestions? Much appriciated :) |
Does /home/rachel/H exist in your home directory? It won't create it for you. It should work.
|
No, if it was a mount point problem, mount would tell you that. Ah, vfat may indeed be the wrong filesystem type. Try running "modprobe fat" and then running mount again, but using "fat" as the type, rather than "vfat".
|
I'm slightly confused now but I think you have a dual boot with win and red hat.Win still boots right?
(I have no idea why so many linux partitions if you just have 1 linux.and your swap partition is huge.you got 5 GB of ram?) If so(win still boot) does GRUB do the multi boot thing for you or lilo? If grub is there I think you can run a grub shell and have grub set itself up again in the boot file in the root partition which should clear up the wrong fs thing and fix the fstab of your linux. I'm not familiar with the red hat flavor but your install disk #1 should have a rescue feature.if so re-install bootlaoder.If grub asks anything during re-install about windows or "another partition with another fs type"answer yes and it should correctly add the win partition to your linux fstab. Hope this helps. |
This is what my /etc/fstab entry for a windows ntfs partition looks like:
/dev/hda1 /windows/C ntfs ro,users,gid=users,umask=0002,nls=utf8 0 0 Doing it manually would be like this: sudo mount -t ntfs /dev/hda1 /windows/C ro,users,gid=users,umask=0002,nls=utf8 If you still get the same message as you posted before, try removing one option at a time. A bad option could give you the same message. You may have your windows partitions mounted somewhere else. That is fine. If you can boot up both systems, don't bother trying to change grub. Get the windows partition mounted manually, they way you want it. If it works, then you can use an entry in /etc/fstab based on the same options. Be sure to read the "man mount" manpages. |
Again, I think the filesystem type specified is wrong. I found another thread saying to use "fat" for FAT16, rather than "vfat".
|
Sometimes you can get lucky and using type "auto" will figure it out for you. I don't know which types that works with however.
If it helps, here are the vfat mount options from the vfat.txt file in the kernel source: Code:
USING VFAT The name turned out to be misleading, as I found out later. I also modprobed the fat file system. I don't know whether it already was present. Yes I forgot to check first. modprobe fat I created a fat filesystem on this file with "mkfs.msdos fat16.img". Next I created a directory to mount it on, and mounted the file using a loop back device. mkdir test mount -t auto fat16.img test/ -o loop,rw,uid=jschiwal,gid=users,fmask=0111,dmask=0000 Then I used the "mount" command to see how it was mounted. /home/jschiwal/podcasts/fat16.img on /home/jschiwal/podcasts/test type vfat (rw,loop=/dev/loop1,uid=1000,gid=100,fmask=0111,dmask=0000) Using "fdisk -l /dev/loop1" didn't provide much useful information. So I tried "file fat16.img": fat16.img: x86 boot sector, mkdosfs boot message display, code offset 0x3c, OEM-ID " mkdosfs", sectors/cluster 4, root entries 512, sectors 2000 (volumes <=32 MB) , Media descriptor 0xf8, sectors/FAT 2, heads 64, serial number 0x44a61f31, label: " ", FAT (12 bit) Next I created a larger file and used mkfs.msdos on it to create a filesytem. hpamd64:/home/jschiwal/podcasts # ls -lh fat.img -rw-r--r-- 1 root root 74M 2006-07-01 02:21 fat.img hpamd64:/home/jschiwal/podcasts # file fat.img fat.img: x86 boot sector, mkdosfs boot message display, code offset 0x3c, OEM-ID " mkdosfs", sectors/cluster 4, root entries 512, Media descriptor 0xf8, sectors/FAT 147, heads 64, sectors 150000 (volumes > 32 MB) , serial number 0x44a62296, label: " ", FAT (16 bit) hpamd64:/home/jschiwal/podcasts # mount -t auto fat.img test/ -o fmask=0111,dmask=0000,uid=jschiwal,gid=users,loop Let's see how it was mounted: /home/jschiwal/podcasts/fat.img on /home/jschiwal/podcasts/test type vfat (rw,loop=/dev/loop1,fmask=0111,dmask=0000,uid=1000,gid=100) For completeness: file /dev/loop1 Disk /dev/loop1: 76 MB, 76800000 bytes 255 heads, 63 sectors/track, 9 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes This time the fat16 filesystem was used, because it is over 32MB in size. I used auto, which selected "vfat" again. It looks like vfat should be the option to use. |
Hi again,
Thanks for all the replys! I'm afraid I don't really understand everything as I'm trying to learn it as I go along. Linux was installed on my computer by my system manager at work, so I don't have any disks or anything. It is GRUB that does the multi boot thing, but I've no idea how to run a GRUB shell. I've tried using fat and msdos instead of vfat, neither of which work [root@zia root]# mount -t msdos /dev/hde2 /home/rachel/H mount: wrong fs type, bad option, bad superblock on /dev/hde2, or too many mounted file systems [root@zia root]# mount -t fat /dev/hde2 /home/rachel/H mount: fs type fat not supported by kernel What's modprobe fat meant to do and where do I run it from? Tried just typing it in a terminal window (as root) but it didn't do anything at all. Cheers |
Running "modprobe fat" is supposed to load the kernel module fat. If it just returned you to a prompt, then that means it loaded OK.
|
All times are GMT -5. The time now is 12:55 PM. |