LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how do u use second hard drive? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-u-use-second-hard-drive-147735/)

dauphinfay 02-18-2004 04:47 PM

how do u use second hard drive?
 
hi folks. im sorry that i have to ask this totally awful question but...

i have a second hd installed and i cant cd into it so im not sure how i can store data to it. i have cfdisk'd it so i know its listed as hdb1 but im unsure as to how to access it and use it. this is sort of related to another post of mine concerning dual cdroms:

http://linuxquestions.org/questions/showthread.php?s=&threadid=146584

i suppose an answer to one might help me figure out the other.

thanks in advance. :)

THX75 02-18-2004 04:56 PM

I just installed a new hard drive and couldn't get Linux to recognize it either. Both HDs showed up in the Bios setup. I fixed it by setting the hard drive jumpers from Cable Select to a Master and Slave setup. I read somewhere where Linux doesn't like Cable Select when both HDs use the same cable/channel.

Don't know if this is your problem either.

Good luck!

Genesee 02-18-2004 05:03 PM

is the second drive mounted?

make a dir, /mnt/hdb or /mnt/harddrive2 or whatever you like

then to mount manually, something like

mount /dev/hdb1 /mnt/hdb

or you can add lines to your fstab as in your other post.

check the man page for mount ("man mount") for options and syntax on mounting.

once it's mounted, you can access it via the mountpoint(s) just like you would any other directory.

here's a simple howto:

http://www.linuxplanet.com/linuxplan...orials/4232/1/

Skyline 02-18-2004 05:09 PM

Quote:

i have a second hd installed and i cant cd into it so im not sure how i can store data to it.
Have you formatted a filesystem on it? - for example

mke2fs -j /dev/hdXY

you'll need a filesystem on it and then mount it first before you can store data to it

globeTrotter 02-18-2004 05:18 PM

hi

what you need to do is 'mount' the hd. as root, type in
# mkdir /mnt/nameforhardrive
this creates a directory in the /mnt directory. name it as you wish. then type as 'user'
$ mount -t ext3 umask=0000 /dev/hdb1 /mnt/nameforhardrive
this should load all the files and directories on the hard drive into the /mnt/nameforhardrive folder. when finished
$ umount /mnt/nameforhardrive

a point of note, the ext3 is the filesystem type of a modern linux system. as you havent specified the file type on the hard drive i can only guess. if the hardrive is formated with a fat16 or fat32 windows system, replace the ext3 with vfat.

if you'd rather use the desktop than the command line, read on. Now that you have created the /mnt/nameforhardrive folder we can place this in the fstab file for automounting. become root and
# cd /mnt
#ls
this will give you a list of files, one should be called fstab. so make a copy of this file, jus incase you mess it up, you can always copy the original back.
# cp fstab fstab.Copy
#ls
you should see the fstab & fstab.Copy files, now
# vi fstab
this opens the fstab file for editing, i assume you are aware of vi!!!! enter the following on the last line.
/dev/hdb1 /mnt/nameforhardrive ext3 noauto,user 0 0
save and exit. as an after thought you could do all this from KDE or GNOME if your not comfortable with vi & the command line. navigate with the explorer to the /etc folder and edit fstab with a gui text editor. i like Kate (the editor !!!!)

once the line has been placed in fstab. ( i have to say i only use KDE so wouldn't know if you do the same in GNOME ) right click on the desktop. press Create New, press Hard Disk..., click the device tab, click the device drop down window box to see a list of options, click /dev/hdb1 (/mnt/nameofhardrive) option. click the general tab and click on the icon to pick a diffrent one. this will be the icon while the hard drive is mounted.. when finished click ok. you should now have an icon on the desktop. you should be able to mount the hardrive just by double clicking on the icon. oyu should get a browser open with all your files on. from here on in you can drag and drop as you need to. when finished right click on the icon on the desktop and click unmount. the browser should disappear. sorry for taking so long, but it's all worth it once set up. just remember to stipulate what type of file format you have, ext2, ext3 or vfat are the most common. if you don't know try each one to see which works.
best of luck
GT

globeTrotter 02-18-2004 05:25 PM

oooooooppppppppps sorry, my mistake

if you'd rather use the desktop than the command line, read on. Now that you have created the /mnt/nameforhardrive folder we can place this in the fstab file for automounting. become root and
# cd /mnt

dont #cd /mnt, wrong place. use
#cd /etc

sorry again fstab resides in the /etc folder
regards
GT

dauphinfay 02-19-2004 06:52 AM

thanx for all of the replies everyone. i was able to do it and now i understand much better. when i reboot, i am able to have the second hd (ide) mount automatically. thanx again.

:D


All times are GMT -5. The time now is 02:59 AM.