Solved

Add harddrive

Posted on 2003-11-05
10
1,178 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
I used this drive with Mac OS 9.2

The computer is an old iMac.
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 12

Accepted Solution

by:
paullamhkg earned 125 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
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.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

762 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

9 Experts available now in Live!

Get 1:1 Help Now