Secondary Harddrive -- mount ??

Secondary Harddrive -- mount ??

Post by Matthew Metnetsk » Sun, 24 Nov 2002 14:15:46



I have a secondary drive (it was D on Windows but that doesn't matter now)
and I'm wondering how to get access to it.  When I do 'df -h' it only lists
my primary drive, boot, and swap.  How might I find which /dev/* it is?  
And how would I make it auto mount on startup?  And finally, if it needs
formatting, as I imagine it should, how would I go about that too?

Thanks A LOT in advance,

~ Matthew

 
 
 

Secondary Harddrive -- mount ??

Post by Richard Pit » Sun, 24 Nov 2002 16:32:50



> I have a secondary drive (it was D on Windows but that doesn't matter
> now) and I'm wondering how to get access to it.  When I do 'df -h' it
> only lists my primary drive, boot, and swap.  How might I find which
> /dev/* it is? And how would I make it auto mount on startup?  And
> finally, if it needs formatting, as I imagine it should, how would I go
> about that too?

> Thanks A LOT in advance,

> ~ Matthew

I'm assuming you are now booted and running Linux of some flavor.

Linux does not, by default show the normal user all contents of all
partitions of all hard disks. It only shows the partitions "mounted".

/etc/fstab is the parameter file that governs mounts at or near boot
time.

Otherwise, you can 'mount' the relevant partitions using the mount
command such as:

mount /dev/hda2 -t vfat /mnt/hda2

provided that the directory /mnt/hda2 exists and the second partition on the
primary hard drive exists and is some kind of FAT file system.

see:

man mount
man fdisk

richard

--
Richard C. Pitt                 C.E.O. Belcarra Technologies

Software Systems - design and implementation: Internet, Linux, Communications
USB, RNDIS, ATM, E-mail, SQL, Encryption, Security, Web, Embedded Systems

 
 
 

Secondary Harddrive -- mount ??

Post by Martin Blum » Sun, 24 Nov 2002 18:39:01




Quote:> I have a secondary drive (it was D on Windows but that doesn't matter now)
> and I'm wondering how to get access to it.  When I do 'df -h' it only
lists
> my primary drive, boot, and swap.  How might I find which /dev/* it is?
> And how would I make it auto mount on startup?  And finally, if it needs
> formatting, as I imagine it should, how would I go about that too?

> Thanks A LOT in advance,

> ~ Matthew

First you have to find out where it is installed and how it is partitioned.
(all the following commands should be executed by "root").

# fdisk -l /dev/hdb
(that's -l = ell for listing)

gives you the partition table of the 2nd disk on the first ide channel. If
you don't see any output, then there is no disk on this channel. Try then
with /dev/hdc or /dev/hdd.

You will then see entries like
/dev/hdb1 1  3 1008 83 Linux

The first entry is the name of the partition, the last the format of the
partition.
You can then mount it with

# mount -t linux /dev/hdb1 /mnt

If you want to mount it every time the machine starts up, you'll have to
edit your /etc/fstab file.

Read the following man pages:
man fdisk
man mount
man fstab

Regards
Martin

 
 
 

Secondary Harddrive -- mount ??

Post by Silva » Mon, 25 Nov 2002 07:15:38



> and I'm wondering how to get access to it.  When I do 'df -h' it only
> lists my primary drive, boot, and swap.  How might I find which /dev/* it

df only lists mounted partitions that you have access to.

As suggested, you want fdisk -l.  I'll add that your drive is _probably_
either hdb or hdf

The methods suggested will work, but you can also look at what your kernel
says.

If you have a boot.log (/var/log/boot.log) it's probably in there.  If not,
shortly after booting run dmesg and look at what it says about your hard
drives.  On my box, for example:

hda: CREATIVE CD-RW RW8439E, ATAPI CD/DVD-ROM drive
hdb: CD-950E/TKU, ATAPI CD/DVD-ROM drive
hdf: MAXTOR 6L040J2, ATA DISK drive
hdf: 78177792 sectors (40027 MB) w/1819KiB Cache, CHS=77557/16/63, UDMA(100)
hdb: ATAPI 52X CD-ROM drive, 128kB Cache, DMA

I have a CD-RW on hda, a CD-ROM on hdb, and a hard drive on hdf.

(I have no hde, and no "master" hard drive.  It died, and the system still
worked after I pulled it out, so I just left things as they are...  :)

Anyway, once you see the results of that, it should be immediately obvious
to you which one is your "missing" hard drive.

Quote:> And how would I make it auto mount on startup?  And finally, if it needs
> formatting, as I imagine it should, how would I go about that too?

As mentioned by others, that's a function of /etc/fstab

Before answering the question about formatting, we really need to know
what's already there, and what you want to keep, if anything.  If you want
to wipe everything out and start fresh, then what do you intend to do with
the drive?  How big is it?  How many partitions do you want there?

You need to give some thought to how you want it partitioned, then you can
partition it, format the partition(s) and mount it/them wherever you want
by adding new entries to /etc/fstab.

--
Michael McIntyre         USDA zone 6b in SW VA, USA

---------[ registered Linux user #243621 ]---------
http://www.geocities.com/Paris/Rue/5407/index.html

 
 
 

1. mount a harddrive onto a diffrent harddrive

What I want to do is have /dev/ad4s1e mount to /ftp/mine and where
harddrive /dev/ad7s1e mounted to /ftp

is this possible ??

I have them set so when I do a df I can see both /ftp/mine and /ftp
but if I go to /ftp and do a ls I dont see the folder /ftp/mine.

I know I can symlink it but that doesnt work that well with proftpd
when I set the root to /ftp that is why I want harddrive /dev/ad4s1e
to be mounted to /ftp/mine if it popssible.

Thanks Peter

2. Exabyte 8200 Tape Drive

3. Secondary Gateway for Secondary Network Card using Secondary IP's

4. Q: AIX 4.1.4 vs. 4.2

5. Remote-print

6. Mounting secondary partions?

7. Unix security additions

8. Mounting Secondary Partition

9. How do I mount IDE cd-rom on secondary controller

10. Suspension from Post Secondary School over NFS mounting

11. mounting secondary drive (fat32)?

12. Mount point for second harddrive?