Solved

Add harddrive

Posted on 2003-11-05
10
1,185 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 1

Author Comment

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

The computer is an old iMac.
0
 
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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Internal CA server 6 134
NTPD Client Port Usage 12 94
How do I randomly delete K lines from a N line sized file using a Linux shell script 9 52
Bitcoin mining - Is it possible? 6 106
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…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

710 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