Find the answer to your Linux question:
Results 1 to 7 of 7
Hello! I have tried to google and read the manual but I can't seem to get this right. I know this is such a simple thing for many of you ...
  1. #1
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,229

    [SOLVED] Help Please for "mount"

    Hello!

    I have tried to google and read the manual but I can't seem to get this right. I know this is such a simple thing for many of you though.

    I use to do mounting by GUI since it is easier. Just click and password. I have come to the point of wanting to learn how to mount by CLI.

    So here's what i'm trying to do:
    Code:
    jun@jun-laptop ~ $ mount /dev/sda8 /dev/sda7
    mount: only root can do that
    
    jun@jun-laptop ~ $ sudo mount /dev/sda8 /dev/sda7
    mount: mount point /dev/sda7 is not a directory
    
    jun@jun-laptop ~ $ sudo mount -t /dev/sda8 /dev/sda7
    Usage: mount -V                 : print version
           mount -h                 : print this help
           mount                    : list mounted filesystems
           AND SO ON...
    jun@jun-laptop ~ $
    Anyway, I was trying to mount /dev/sda8 which is my Storage Bin (B) Ext3 to the system that I am currently using. /dev/sda7 "Mint".

    Thanks.
    nujinini
    Linux User #489667

  2. #2
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    you have to mount a device to a directory, not another device

    make a directory and then mount it mount /dev/sda8 <mount point>

  3. #3
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    You have to create mount_point (folder) for each partition.
    Let say, you want to mount /dev/sda8 partition having ext3 filesystem.
    Create mount_point (You don't have to create mount_point again for this partition.)
    Code:
    mkdir /media/sda8
    Mount partition
    Code:
    mount  /dev/sda8 /media/sda8
    You must have root privileges to mount partition.

    You can use options with mount command to control user access and other privileges.
    Let say, /dev/sda2, NTFS.
    Code:
    mkdir /media/sda2
    mount -t ntfs-3g  /dev/sda2  /media/sda2 -o defaults,umask=0
    defaults,umask=0 option enable read/write access on NTFS partition for all users.

    Replace ntfs-3g with vfat for FAT32 partition.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  4. #4
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,229
    Quote Originally Posted by coopstah13 View Post
    you have to mount a device to a directory, not another device

    make a directory and then mount it mount /dev/sda8 <mount point>
    Oooohhhhh....

    Now I see whats wrong.... Thanks
    nujinini
    Linux User #489667

  5. #5
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,229
    Quote Originally Posted by devils casper View Post
    You have to create mount_point (folder) for each partition.
    Let say, you want to mount /dev/sda8 partition having ext3 filesystem.
    Create mount_point (You don't have to create mount_point again for this partition.)
    Code:
    mkdir /media/sda8
    Mount partition
    Code:
    mount  /dev/sda8 /media/sda8
    You must have root privileges to mount partition.

    You can use options with mount command to control user access and other privileges.
    Let say, /dev/sda2, NTFS.
    Code:
    mkdir /media/sda2
    mount -t ntfs-3g  /dev/sda2  /media/sda2 -o defaults,umask=0
    defaults,umask=0 option enable read/write access on NTFS partition for all users.

    Replace ntfs-3g with vfat for FAT32 partition.
    This is rich. More than what I was asking for Thanks Casper!

    Anyway, if I may ask, how come when I use GUI to mount, it mounts even if I don't have to make a directory. What's happening at the back end. I mean, when I use CLI, I still have to make a directory and at GUI it mounts without a directory.
    nujinini
    Linux User #489667

  6. #6
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    GUI tool checks Label of partition and creates folder ( mount_point ) using Lable only. In case label is not defined, it assigns partition number to the mount_point.

    I have assigned Label Music for one of the NTFS partition in Windows XP. If I mount it in Linux through GUI tool, it creates Music folder. For partition which doesn't have any Label, it creates sda<partition_number> folder.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  7. #7
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,229
    Oh I see, thanks
    nujinini
    Linux User #489667

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...