Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
09-22-2003, 01:54 AM
|
#1
|
LQ Newbie
Registered: Aug 2003
Distribution: Slack
Posts: 15
Rep:
|
2nd hard drive
here's a dumb one...
How do i access, write to and switch over to the 2nd physical disk in my linux RH 7.1 box!!!!???? thanks to the book I am reading, beginners guide to admin linux, it has taken me through fdisk, mke2fs, and types of partitions but it forgot to explian one major thing.... how do i access it?!! i am logged in as root on the root partition / but what if i want to create a directory on the 2nd disk, and how do i name it? it is only known as, at this point to be /dev/hdb1 or 2 etc...
ie: Say i wanted to create a partition or directory called /test1 on this disk? all the space has been allocated to it but it still after running mke2fs it is still sitting there as /dev/hdb1? Have i missed something?
although i have to admit, this is more fun than everything going smoothly.
|
|
|
09-22-2003, 02:14 AM
|
#2
|
Member
Registered: Aug 2003
Location: Seattle, Wa
Distribution: Fedora,Trustix,Debian
Posts: 290
Rep:
|
To create directories on the drive you first have to make a partition.
To create a partition use fdisk /dev/hdb
If you have /dev/hdb1 then it seems like you have already created at least one partition on there.
If the parition that you created is of type ext2 most likely on redhat 7.1, should have been done while creating the partition then
All is good. All you have to do is mount the partition.
create a mount point
mkdir /mnt/drive2
/mnt contains all the mount points.
syntax : mount -t device type /device /mountpoint
ext2 > ext2, fat32 > vfat
ie if /dev/hdb1 is ext2
mount -t ext2 /dev/hdb1 /dev/drive2
then to create directorys simply cd to /mnt/drive2 and mkdir to create directorys or touch something to create a file etc.
Good Luck
|
|
|
09-22-2003, 05:17 PM
|
#3
|
LQ Newbie
Registered: Aug 2003
Distribution: Slack
Posts: 15
Original Poster
Rep:
|
thank you for a quick response zatriz, i have just tried this proceedure to mount the 2nd HD. I first created the mount point by entering mkdir /drive2 from within the /mnt directory. = success.
Then when i enter the cmd:
mount -t ext2 /dev/hdb1 /dev/drive2 it gives me the responce: drive2 does not exist. however when i enter:
mount -t ext2 /dev/hdb1 /mnt/drive2, it goes right ahead and does it. This is because there was no drive2 in /dev. Have i done something wrong? this seems to be working, i can now go ahead and create dir's off of the drive2.
I of course will have to do this for all partitions i had created in fdisk: i had created 2 primary and an extended containing 3 others.
Thank you for your help!
|
|
|
09-22-2003, 11:00 PM
|
#4
|
Member
Registered: Aug 2003
Location: Seattle, Wa
Distribution: Fedora,Trustix,Debian
Posts: 290
Rep:
|
neo.sarcastic,
Sorry that was an error on my part. idiot me i didn't realize what i had typed. what you did is right. The mounted partition should be in the mnt folder /mnt/drive2. NOT /dev/drive2.
Remember that instead of calling it drive2 you can call it anything you want.
But yeah thats it and no there is nothing wrong.
|
|
|
09-23-2003, 12:22 AM
|
#5
|
LQ Newbie
Registered: Aug 2003
Distribution: Slack
Posts: 15
Original Poster
Rep:
|
it's all good
Thanks for your help.
i decided to stick to drive# naming because it makes sense.
cheers!
|
|
|
All times are GMT -5. The time now is 01:50 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|