LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   reading hda2 (win) from hdb2 (linux) (https://www.linuxquestions.org/questions/linux-newbie-8/reading-hda2-win-from-hdb2-linux-191304/)

PhilTR 06-08-2004 08:53 PM

reading hda2 (win) from hdb2 (linux)
 
I'm running WinXP (hda) and RH Linux 9.0 (hdb) as a dual boot system. I've heard that its possible to read a dedicated windows hd from a linux hd (on the same computer.) When I do fdisk ( as root) it sees hda, so I think I'm half way there. If it's possible, how (what command) would I use to mount hda? Thanks for your help. philtr

solnul 06-08-2004 09:19 PM

First, you need to find out if your Windows partition is formatted as FAT32 or NTFS. If it's NTFS, there's an experimental read-only driver you can get (there's also a way to wrap the DLL in Linux, but that's a little more complex).

If it's FAT32, you can do full read/write. Try "mount -t vfat /dev/hda2 /mnt/winxp" (assuming /mnt/winxp is the directory where you want it mounted).

Once you've got things working, you should add a line to your /etc/fstab file (just create a new line with your favorite editor):

[CODE}
/dev/hda2 /mnt/winxp [vfat|ntfs] quiet 0 0
[/CODE]

Where [vfat|ntfs} means whichever FS the drive is.

If you want the partition to be mountable by normal users and read-writable by everybody, change "quiet" to "quiet,users,umask=000". I'd suggesting reading up on mount and umask; their manpages are a good place to start.

PhilTR 06-08-2004 09:47 PM

solnul, thanks for the info. I'm going to work on it tomorrow as it a bit past my witching hour. Damn State expects me to show up on time for work mornings. Imagine that! I'll post to let you know how things work out. philtr

PhilTR 06-09-2004 04:28 PM

OK, I logged in as root and did an fdisk getting the blow info.

bash-2.05b# fdisk -l

Disk /dev/hda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 6374 51199123+ 7 HPFS/NTFS
/dev/hda2 6375 12160 46476045 f Win95 Ext'd (LBA)
/dev/hda5 6375 12160 46476013+ 7 HPFS/NTFS

Disk /dev/hdb: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux
/dev/hdb2 14 12031 96534585 83 Linux
/dev/hdb3 12032 12161 1044225 82 Linux swap

--------------------o--------------------

I then tried two commands as you see below trying both 'types' just to be daring.


bash-2.05b# mount -t vfat /dev/hda2 /mnt/winxp
mount: wrong fs type, bad option, bad superblock on /dev/hda2,
or too many mounted file systems
(aren't you trying to mount an extended partition,
instead of some logical partition inside?)

bash-2.05b# mount -t ntfs /dev/hda2 /mnt/winxp
mount: fs type ntfs not supported by kernel

--------------------o----------------------

At this point I figgured I'd better back up n punt. I am using linux kernal version 2.4.20-31.9. I'm wondering if a previous version might support ntfs? Suggestions appreciated. Sorry for the crappy formatting. philtr

michaelk 06-09-2004 04:36 PM

/dev/hda2 is an extended partition and you can not mount an extended partition. Your windows partitions are /dev/hda1 (c: drive) and /dev/hda5 (d: drive)

RH does not include NTFS support out of the box. I believe this is still read only.
http://linux-ntfs.sourceforge.net/rpm/

or here:
http://www.jankratochvil.net/project/captive/

PhilTR 06-09-2004 05:09 PM

hmmmmm.....michaelk, I didn't know what to make of hda1. The asterisk under the word Boot throw'd me off. Now that I look at it a little bit funnier, I guess it means that the boot sector is "contained in" hda1!?!? In any event it looks like my XP hd is in NTFS format and not VFAT. Thanks for the links. I'll do some shopping at my favorite SourceForge. Solnul thought it was "read only" too but, that someting or another DLL could be wrapped in linux. Not sure what he means tho. To be sure, I'm encouraged. philtr

PhilTR 06-09-2004 05:38 PM

Damn! That was easy even!!! Even tho my butt put teeth marks in my chair! Thanks. Should I put D: drive in a separate folder? It seem logical that I should. philtr

michaelk 06-09-2004 06:02 PM

Yes, you need to use a different mount point for each partition. The * means the boot flag means set active for that partition. The windows / DOS boot loader looks for this flag to know which primary partition contains the OS. At least for windows up to XP,W2k I believe.

PhilTR 06-09-2004 06:11 PM

I went ahead and created a "winxp_d" folder and mounted D: drive. Thanks for your help. The instructions page made installatin real easy. It even gave me the commands to run to test the installation. Now I can go back to iptables, squid and bind. Heheh. philtr


All times are GMT -5. The time now is 09:30 AM.