Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have created a partition on /dev/sdb

I want to be able to go to this drive when I type:

cd /name

What I did, which did not work.

  • mkdir name in /mnt
  • mounted the /dev/sdb on /mnt/name
  • updated the fstab: /dev/sdb /name ext3 defaults 0 1
  • mount -a (when i do this i get this message: 'the /name is not found')

What am I doing wrong here. Running latest Debian distro

share|improve this question
2  
If you have created a partition on sdb then is does not make any sense to try mounting sdb itself. Given your level of understanding: Why don't you use your distro's tools to do that? –  Hauke Laging Jun 4 '13 at 12:42

2 Answers 2

Let's take it from the beginning. First of all, you mount partitions, not disks. So, mount /dev/sdb won't work, mount /dev/sdb1 will (assuming you want to mount the 1st partition of sdb). To be able to access the drive with cd /name you need to either mount it at /name or make /name a symlink to /mnt/name. To actually mount it at /name do the following:

sudo mkdir /name
sudo chmod 755 /name

Add this line to /etc/fstab

/dev/sdb1 /name ext3 defaults 0 1

Then mount it: mount /name

To mount the partition in /mnt and link it to /name do

sudo mkdir /mnt/name
sudo chmod 755 /mnt/name
sudo ln -s /mnt/name /

Add this line to /etc/fstab

/dev/sdb1 /mnt/name ext3 defaults 0 1

Then mount it: mount /mnt/name

share|improve this answer
  • mkdir name in /mnt
  • mounted the /dev/sdb on /mnt/name

Those are what you did wrong. That will make it available at /mnt/name. Try using /name in both cases.

share|improve this answer
    
Well, if I create a '/name' in the root directory and try to mount '/dev/sdb' to '/home', I get a message saying that mount point '/name' does not exist –  Ahmad Jun 4 '13 at 11:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.