LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-23-2004, 05:11 AM   #1
kjp_72
Member
 
Registered: Apr 2003
Posts: 43

Rep: Reputation: 15
How do I access 2nd NTFS HD?


I have SuSE 9.1 Pro Linux and I had 1 hard drive while installing. After install, I pluged my 2nd hard drive which is NTFS. There are stuffs from previous on it. When I booted into Linux it has found this hard drive. When I check IDE DMA setup in YaST I can see that 2 hard drives are there meaning my 2nd hard drive is reconized. My question is how can I access this hard drive?
Thanks.
 
Old 05-23-2004, 05:33 AM   #2
drowstar
Member
 
Registered: Apr 2004
Location: Germany
Distribution: Slackware, Gentoo, Fedora
Posts: 205

Rep: Reputation: 30
Hi kjp_72,
I am sure there is also an easy SUSE way of doing this, however the more general approach is this:
Type "devices:/" in the location bar of Konqueror (the file browser of KDE). It should be listed there.

Hope this helps,
- drowstar

In case you are interested (I prepared this to tell you how to do it, until I discovered the KDE way of doing it), there is a more sophisticated yet more interesting approach (it is save to ignore this):
Open a command line (hit [alt+f2] type konsole and hit [enter]).
Enter mount to see, what drives are in your system ("mounted"). The output should consist of several lines. They start with either none or /dev/hdxn. The bold part is important. If there is one such entry that contains a different letter x there than the other, then this is your second hard drive and it is mounted. Check what path is also listed in this line. This is where you can find the drive in your system.
 
Old 05-23-2004, 07:07 AM   #3
kjp_72
Member
 
Registered: Apr 2003
Posts: 43

Original Poster
Rep: Reputation: 15
thx again drowstar! your saviour !
 
Old 05-23-2004, 07:21 AM   #4
kjp_72
Member
 
Registered: Apr 2003
Posts: 43

Original Poster
Rep: Reputation: 15
When I type devices:/ in Konqueror I get 2 cd drive i have, floppy, hda1, hda2 but no hdb!!! i don't see my 2nd hard drive there! any idea how I can access it ?
 
Old 05-23-2004, 07:36 AM   #5
muxman
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 203

Rep: Reputation: 32
How about in the /dev directory? Is hdb in there? If so you can mount it to whatever dir you want and access it that way. It sounds as if the system is recognizing the drive but not mounting it. Look in your /etc/fstab file and see if it mounts the drive at bootup.
 
Old 05-23-2004, 07:50 AM   #6
kjp_72
Member
 
Registered: Apr 2003
Posts: 43

Original Poster
Rep: Reputation: 15
Oh /dev directory, there is rage of HDA to HDG or something.
On /etc/fstab there is no hdb
How can make it so it mount the drive at bootup ?
Thanks
 
Old 05-23-2004, 08:03 AM   #7
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
Simple and effective!

As root (to change to root type su (you will be prompted for a root password) in console) in console type:

fdisk -l

This will tell you what harddisks you have on your system. It should have a /dev/hda and some other. If there is no other, then you have some issues with your harddisk connection. Make it a slave.

If there are the two harddisks, then you are off to a good start. Check for the partition that says NTFS it should be like /dev/hdd1 or something...

Make a directory, where you are going to mount the harddisk.

mkdir /windows

then mount the filesystem:

mount -t ntfs /dev/hdxX /windows

(where x = letter of drive you got from fdisk -l and X = the number of the partition of that drive)

If mounting went without errors (read-only message is not an error), you should be able to access the windows disk under /windows directory.

If there were errors, check if you have support for NTFS.

Depending on the version of your kernel, you have or not have the support for NTFS filesystem. To see if you have the support for the ntfs filesystem in console type:

cat /proc/filesystems

There should be a line saying ntfs

One other thing for you to do is type:

dmesg | grep NTFS

This should tell you which driver for NTFS you have.

If all of these don't give you anything, check out

http://linux-ntfs.sourceforge.net/rpm/instructions.html

for instructions on how to obtain the driver and use it.

Hope you get it working. It looks complicated, but it's not really. If you have kernel 2.6.x then you should have no problems after the first few steps. However with 2.4.x you will need to visit the link I provided above.

Peace!
 
Old 05-23-2004, 08:05 AM   #8
muxman
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 203

Rep: Reputation: 32
This is assuming you have the drive setup, partitioned and formated correctly. Make a directory to mount the drive to. Then add a line like this to your /etc/fstab file. I say ike because your exact line will depend on your files system type.

The format is:
<file system> <mount point> <type> <options> <dump> <pass>

This may be a line that you add, or something like it:

/dev/hdb /mnt/drive2 ext3 auto 0 0



This line needs tweaking but is a basic line for the fstab file. I need a little more info to get it right but that is the basics.
 
Old 05-23-2004, 08:12 AM   #9
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
Like muxman said.

You will get all the details from fdisk -l command.

Then just replace /dev/hdb1 with yours
and /mnt/drive2 with the directory you created and want the drive to be mounted at
and ext3 with ntfs


I am not sure for auto (maybe you will have to use default)
And do make sure you have a mounting point directory created before mounting.

Last edited by marghorp; 05-23-2004 at 08:13 AM.
 
Old 05-23-2004, 10:06 AM   #10
kjp_72
Member
 
Registered: Apr 2003
Posts: 43

Original Poster
Rep: Reputation: 15
okay, I did what marghorp told me to do. I got up to the bit
mount -t ntfs /dev/hdxX /windows
and I don't think there were any error.
On fdisk -l
Device Boot Start End Blocks Id System
/dev/hdb1 2 10011 80405325 f W95 Ext'd (LBA)
/dev/hdb5 2 10011 80405293+ 7 HPFS/NTFS

I done
mkdir /windows2
mount -t ntfs /dev/hdb5 /windows2
and I don't think I got any error. I went devices:/ in Konqueror and i saw windows2 to be there.

Hard Disc
(hdb5)
[/windows2]

When I click on this i get
Could not enter folder /windows2

Any idea what I did wrong and how I can fix problem?
Thanks.
 
Old 05-23-2004, 10:19 AM   #11
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
The thing is you mounted it only for user root. Check the permissions of the folder /windows2 it's probably like dr-x------ root root. Please be here with me for a couple more steps. First open console and type in line by line:

su
<your root password here>

umount -a -t ntfs (this will unmount the ntfs harddrive)

mount /dev/hdb5 /windows2 -t ntfs -r -o umask=0222
(this command will mount the ntfs filesystem, so it can be read-only for all users)

You should be off here to see the files on that partition and read them.

Writing to a ntfs partition is however supported by kernel 2.6.x but it is still experimental, and thus not recomended, unless you don't have much value for the files you are going to write to that partition.

Please read the link I have provided in the above post. It will all get to you and you will understand the mounting of the ntfs partition. It will also explain how to automatically mount the partition at boot time.

Peace! Happy ntfs browsing!
 
Old 05-23-2004, 10:26 AM   #12
kjp_72
Member
 
Registered: Apr 2003
Posts: 43

Original Poster
Rep: Reputation: 15
Wooohooo!!! Thanks so much! I can access to my 2nd hard drive! again, Thank you so much
 
Old 05-23-2004, 10:30 AM   #13
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
You're welcome! Glad to see a person having a pleasant Linux experience.

Also edit your fstab file according to the instructions from the link I posted above. The link to instructions is at the bottom of the page. That way you will be able to have it auto mount at boot.

Last edited by marghorp; 05-23-2004 at 10:33 AM.
 
Old 05-23-2004, 10:59 AM   #14
kjp_72
Member
 
Registered: Apr 2003
Posts: 43

Original Poster
Rep: Reputation: 15
okay... I'm still having problem. I want to make it auto mount so I can access it without doing anything after reboot.
I added line to fstab
/dev/hdb5 /mnt/windows2 ntfs default 0 0
When I go to devices:/ and go to the

Hard Disc
(hdb5)
[/windows2]

I get error
Error - kio_devices_mounthelper
[mntent]: warning: no final newline at the end of /etc/fstab
mount: only root can mount /dev/hdb5 on /mnt/windows2
Please check that the disk is entered correctly.

What can I do so it mount at start automatically?
Thanks
 
Old 05-23-2004, 11:04 AM   #15
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
Quote:
Originally posted by kjp_72
[mntent]: warning: no final newline at the end of /etc/fstab
mount: only root can mount /dev/hdb5 on /mnt/windows2
See the line saying no final newline at the end of /etc/fstab?

Edit the fstab file. And this time, position yourself at the end of the final line (the one you added for your automounting) and press ENTER.

This will add the newline at the end of fstab file. The parsing program parses the fstab file line by line and in your case, because you didn't make a new line after the one you added, it can't parse it correctly and execute the line.

Still... Read the link I posted above, for it will provide you with info on automounting the ntfs partition and making it's permissions suite your needs.

Good luck!

Peace!
 
  


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
cannot access 2nd hard drive swatward Linux - Hardware 1 08-18-2005 05:30 AM
Mandrake won't let me access 2nd HDD illiniguy3043 Linux - Hardware 8 06-26-2004 10:04 PM
Captive NTFS -- full r/w ntfs access for Linux spurious Linux - Software 6 01-09-2004 01:29 AM
Write access to a 2nd HD (different scenario) griphiam Linux - Hardware 1 10-22-2003 10:44 PM
Reading NTFS 2nd Hard Drive shwabob Linux - Hardware 1 06-09-2003 06:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:19 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