LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
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


Reply
  Search this Thread
Old 06-12-2004, 10:40 AM   #1
rjcrews
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 193

Rep: Reputation: 30
new hd mount point


Hi,

I got a new hd, and im using diskdrake to partition, and im somewhat new to linux. Where do i need to mount it (ie / or /usr or something) ? I dont quite understand how the file systems work in linux. Does the mount point effect how files are read and written to it?

Im also guessing it should be fat32. So my question is, how do i mount it so i can use it like i use the partition mounted at /home? it wont let me mount it /home bc the other hd is mounted there.

Any help is appreciated, and ty for patience on this forum
 
Old 06-12-2004, 01:03 PM   #2
rjcrews
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 193

Original Poster
Rep: Reputation: 30
I moved the /var to its own partition and now it wont boot. that was obviously dumb. any ideas?
 
Old 06-12-2004, 01:14 PM   #3
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,291

Rep: Reputation: 52
ok, all your partitions have a name: /dev/hda1, /dev/hda2, /dev/hda3, /dev/hdc1, /dev/hdc2 etc etc. Now look in /etc/fstab - this will show you where your partitions are mounted at bootup.
If you want to mount a new hd somewhere I would suggest putting it into /mnt/[new folder name] then adding this line to /etc/fstab:

/dev/hdc1 /mnt/[new folder name] auto noauto,user,rw 1 0

where /dev/hdc1 = first partition of the primary disk on the second ide cable
(see man fstab & man mount for other options)

Last edited by Tuttle; 06-12-2004 at 01:15 PM.
 
Old 06-12-2004, 01:35 PM   #4
rjcrews
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 193

Original Poster
Rep: Reputation: 30
ok that makes some sense i think, after looking at the fstab file. is there anyway to move the files i shouldnt have moved back to where they were? (moved the /var directory to its own partition)

It does boot to a command line.
 
Old 06-12-2004, 01:47 PM   #5
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,291

Rep: Reputation: 52
mkdir /mnt/var
mount /dev/[new var partition] /mnt/var
cp -R /mnt/var/ /var

Note: if you have copied the whole folder (directory and all) to the new partition then added:

/dev/[new var partition] /var etc.. etc...

to your fstab, then you will see that /var is now /var/var/[varfiles] instead of /var/[var files]
 
Old 06-12-2004, 01:59 PM   #6
rjcrews
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 193

Original Poster
Rep: Reputation: 30
thanks for the help btw. Does it matter where I am when i do that and do I need to be logged in as root?
 
Old 06-12-2004, 02:08 PM   #7
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,291

Rep: Reputation: 52
no and yes. If you issue a command giving the full pathname then it matters not where you are. If you issue a command like:

cp./[filename] ../../

then it does matter (that command just copied [filename] two directories up in the tree, starting from your current directory)

you will need to be root to change anything that isn't in your home folder or /tmp. try:

ls -al /etc

and various other folders to see the permissions of their contents.
 
Old 06-12-2004, 02:16 PM   #8
rjcrews
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 193

Original Poster
Rep: Reputation: 30
In the fstab, i dont have anything for hdb, just the 3 hda partitions (/, /home, and swap)and the cdrom, zip drive and the floppy. the place where i moved /var isnt in there.

did the mkdir.

mount /dev/hdb /mnt/var tells me i must specify the files system type. dont think hdb was correct. do i have to mount the other hd first or add it to the fstab file?

thanks again
 
Old 06-12-2004, 02:22 PM   #9
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,291

Rep: Reputation: 52
you dont HAVE to add it to your fstab to use "mount".

try this:

$su
[password]
mount -t [fstype (fat32=vfat, ntfs=ntfs)] /dev/hdb1 /mnt/var

(the 1 means the first partition on hdb!)

edit: you could try auto instead of the fstype

Last edited by Tuttle; 06-12-2004 at 02:31 PM.
 
Old 06-12-2004, 02:24 PM   #10
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,291

Rep: Reputation: 52
read a bit of "man mount" too
 
Old 06-12-2004, 02:33 PM   #11
rjcrews
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 193

Original Poster
Rep: Reputation: 30
hrm getting lost, appreciate you sticking with me.
did:

mount -t [vfat] /dev/hda1 /mnt/var and got
mount: fs type [vfat] not supported by kernel
 
Old 06-12-2004, 02:49 PM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 20,473

Rep: Reputation: 3571Reputation: 3571Reputation: 3571Reputation: 3571Reputation: 3571Reputation: 3571Reputation: 3571Reputation: 3571Reputation: 3571Reputation: 3571Reputation: 3571
What application did you use to move the /var partition? Do you know the partition ID of /var? How was the partition formatted?

To see all partitions on the drive

As root
fdisk -l

Add a line to the /etc/fstab for /var
/dev/<your var partition id> /var fstype defaults 1 2

BTW do not inculde the []
 
Old 06-12-2004, 03:08 PM   #13
rjcrews
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 193

Original Poster
Rep: Reputation: 30
used the harddrake in mandrake.
the fdisk gives for hdb:

/dev/hdb1 * start/end is 1 and 77 size=600mB id=82 linux swap
/dev/hdb2 77 and 4792 size=37gB id=5 extended
/dev/hdb5 77 and 968 size=7 gB id=83 linux
/dev/hdb6 969 and 4792 size= 30gB id=83 linux
 
Old 06-12-2004, 03:12 PM   #14
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,291

Rep: Reputation: 52
aaaaaaaah could you post the contents of /etc/fstab plz.

ps, sorry about the [] brackets, if I use them it means "" !
 
Old 06-12-2004, 03:15 PM   #15
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,291

Rep: Reputation: 52
Re: new hd mount point

Quote:
Originally posted by rjcrews
Hi,

I got a new hd
by this I thought you meant you have 2 hds' now, is this true? ie. hda & hdb?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to give not-root user ability to mount devices to any mount point??? jdupre Linux - General 8 02-04-2012 10:03 AM
Mount problem - device already mounted or mount point busy zahoo Linux - General 7 08-28-2009 05:02 PM
samba mount when not owner of mount point cotton213 Linux - General 1 08-04-2005 06:21 AM
can I mount two devices to the same mount point? gsgleason Linux - Hardware 7 03-04-2005 05:29 AM
Multiple mount --bind's to 1 mount point ? Etraman Slackware 6 12-23-2004 07:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration