Solved

Add harddrive

Posted on 2003-11-05
10
1,180 Views
Last Modified: 2010-04-20
I have an external 20gb USB harddrive that I'd like to use with my Yellow Dog Linux.  The OS can see the drive, but I don't know how to access it.  Do I need to "mount" it?  (This is a term left over from a novice fling with Unix in college.)
0
Comment
Question by:fhieber
10 Comments
 
LVL 12

Expert Comment

by:paullamhkg
ID: 9692371
Yes you have to mount it, normally it act as a SCSI device, so 1st create the partition by using fdisk /dev/sda, you will get as below

Command (m for help): n                < key in n for create a new partition
it will ask you for which partition, which start form 1, afterward from which block to which block, if you wanted to use all the diskspace, just use the default.

afterward
Command (m for help): p               < key in p for display the partition info, and you will get something as below

   Device Boot    Start       End    Blocks   Id  System
/dev/sda1   *         1        33    265041   83  Linux                 < this mean the 1st partition of sda start from 1 to 33 and the type is linux ext2 file system.

if everything ok key in w to finalize the creattion. after created, you need to format your use harddisk, just use mke2fs /dev/sda1 this will format your harddisk to ext3 file system. afterward, create a mount point by mkdir /mnt/usb, now you can mount your usb harddisk by mount /dev/sda1 /mnt/usb, that all.
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 9692383
But if your usb harddisk is formatted by M$ windoz, ensure it's not NTFS, the method more easier.

1. format it as FAT32
2. mount the usb harddisk by mount -t vfat /dev/sda1 /mnt/usb

That all.

The above 2 method you need to login as root.


if you need to have the usb harddisk mount everytime you reboot/restart your linux, you need to add entry into the /etc/fstab as below.

For linux files system (ext3)
/dev/sda1                /mnt/usb                     ext3    noauto,defaults        1 2

For FAT32
/dev/sda1               /mnt/usb                      vfat     noauto,defaults        1 2

so every you reboot your /dev/sda1 will mount into /mnt/usb, but since usb harddisk is a removable device, I will recomment you to use the noauto, so that everytime when you plug-in you usb harddisk you need to mount it by hand, just mount /dev/sda1 /mnt/usb for linux file system, mount -t vfat /dev/sda1 /mnt/usb for FAT32 file system.

unless you plugin your usb harddisk and keep it without remove it, you can use auto, which will ask your linux distro to mount the device for you automatically so that you no need to mount it by hand.


0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 9692400
oh forgot to mention, ext3 file system is a linux file system, M$ windoz can't read it unless you install the Explore2fs have a check here http://uranus.it.swin.edu.au/~jn/linux/explore2fs.htm.

for NTFS, if you format it as NTFS, have a look here http://linux-ntfs.sourceforge.net/info/ntfs.html#4.9

remember all the above setting you need to login as root for making all the partition or mount point, ordinary user can mount the /mnt/usb after the root setting everything.

Hope this can help.
0
 
LVL 1

Author Comment

by:fhieber
ID: 9694610
I used this drive with Mac OS 9.2

The computer is an old iMac.
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 12

Accepted Solution

by:
paullamhkg earned 125 total points
ID: 9698377
As I remember you are using Yellow Dog linux, which I gave you some hints before, so try to get the macutils here http://www.usinglinux.org/archivers/macutils.html which can read lots of Mac format files from linux :) for mounting process is the same as I memtion before.
0
 
LVL 2

Expert Comment

by:sam_sunder
ID: 9762272
hello fiheber

Here are the quick steps to add an extra hard drive

1. Fdisk (format disk)  - fdisk \dev\<drive>
2. Make File System to use - mkfs -t ext3(which ever filesystem want) /dev/<drive>
     This bascially creates a file system.
3. The main thing you have to do is mount the drive.
     for example - mount -t ext3  /dev/<drive>   /<dir>
     You can also mount at boot time by making an entry in /etc/fstab.
Please check www.yolinux.com if you have more doubts.

regards

sam




0
 
LVL 1

Author Comment

by:fhieber
ID: 9764557
I didn't want to have to format the drive.  I was hoping that I could keep the files that are on it.  It does not look like that is going to work.  I tried to connect the drive to my OS X machine and it said that the disk did not contain a file system that the computer could recognize.
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 9768588
Do you mean your usb harddisk can't recognize by your OS X? have you try to do any thing on your usb Harddisk? is there any OS 9.2 around which you can read your usb harddisk to ensure the data still there, so that you can at lease make a backup.

OS X is unix like Operating System, so try to get the macutils I recomment before and install into your OS x and use this utility to read your usb harddisk, to see this working or not. still got any trouble post here.

BTW fdisk = fix disk :)
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 10301756
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Answered by paullamhkg
Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

khkremer
EE Cleanup Volunteer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now