LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-08-2004, 09:53 PM   #1
PhilTR
Member
 
Registered: Jun 2004
Location: Birmingham, AL
Distribution: FC6, FC8, FC11
Posts: 102

Rep: Reputation: 16
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
 
Old 06-08-2004, 10:19 PM   #2
solnul
Member
 
Registered: Jan 2003
Distribution: Slackware
Posts: 82

Rep: Reputation: 15
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.
 
Old 06-08-2004, 10:47 PM   #3
PhilTR
Member
 
Registered: Jun 2004
Location: Birmingham, AL
Distribution: FC6, FC8, FC11
Posts: 102

Original Poster
Rep: Reputation: 16
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
 
Old 06-09-2004, 05:28 PM   #4
PhilTR
Member
 
Registered: Jun 2004
Location: Birmingham, AL
Distribution: FC6, FC8, FC11
Posts: 102

Original Poster
Rep: Reputation: 16
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
 
Old 06-09-2004, 05:36 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,262

Rep: Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624
/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/

Last edited by michaelk; 06-09-2004 at 05:40 PM.
 
Old 06-09-2004, 06:09 PM   #6
PhilTR
Member
 
Registered: Jun 2004
Location: Birmingham, AL
Distribution: FC6, FC8, FC11
Posts: 102

Original Poster
Rep: Reputation: 16
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
 
Old 06-09-2004, 06:38 PM   #7
PhilTR
Member
 
Registered: Jun 2004
Location: Birmingham, AL
Distribution: FC6, FC8, FC11
Posts: 102

Original Poster
Rep: Reputation: 16
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

Last edited by PhilTR; 06-09-2004 at 06:46 PM.
 
Old 06-09-2004, 07:02 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,262

Rep: Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624
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.
 
Old 06-09-2004, 07:11 PM   #9
PhilTR
Member
 
Registered: Jun 2004
Location: Birmingham, AL
Distribution: FC6, FC8, FC11
Posts: 102

Original Poster
Rep: Reputation: 16
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux root moved from hda2 to hda1 dangerousdave Linux - Software 3 11-02-2005 07:18 PM
hda2 went to hdb2 aral SUSE / openSUSE 21 08-13-2005 10:34 AM
reading from win partitions & console ash4stuff Linux - Software 2 04-04-2004 06:24 AM
Grub hdb2 xjphil Linux - Software 14 09-18-2003 03:05 PM
Reading/Writting to Win Xp Pro Shares Via Redhat 8.0 KePSuX Linux - Newbie 8 12-11-2002 01:32 PM


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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration