LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   new hd mount point (https://www.linuxquestions.org/questions/linux-hardware-18/new-hd-mount-point-192684/)

rjcrews 06-12-2004 10:40 AM

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 :)

rjcrews 06-12-2004 01:03 PM

I moved the /var to its own partition and now it wont boot. that was obviously dumb. any ideas?

Tuttle 06-12-2004 01:14 PM

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)

rjcrews 06-12-2004 01:35 PM

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.

Tuttle 06-12-2004 01:47 PM

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]

rjcrews 06-12-2004 01:59 PM

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?

Tuttle 06-12-2004 02:08 PM

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.

rjcrews 06-12-2004 02:16 PM

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

Tuttle 06-12-2004 02:22 PM

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

Tuttle 06-12-2004 02:24 PM

read a bit of "man mount" too ;)

rjcrews 06-12-2004 02:33 PM

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

michaelk 06-12-2004 02:49 PM

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 []

rjcrews 06-12-2004 03:08 PM

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

Tuttle 06-12-2004 03:12 PM

aaaaaaaah could you post the contents of /etc/fstab plz.

ps, sorry about the [] brackets, if I use them it means "" !

Tuttle 06-12-2004 03:15 PM

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?


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