Results 1 to 8 of 8

Thread: How to mount vfat partition automatically after boot?

  1. #1
    Join Date
    Oct 2009
    Location
    Dhaka,Bangladesh
    Posts
    251

    Default How to mount vfat partition automatically after boot?

    How to mount vfat partition automatically after boot?
    After login it it will mount all vfat partition and the icon of those parition will be at desktop.

    How can it be done.
    udisks is installed.
    If i click a vfat partition from pcmanfm it prompts for password to mount.
    I don't want to click.
    It will be automatically mounted and i will get the icon of that mounted vfat partition at desktop

  2. #2
    Join Date
    Jun 2008
    Location
    The English Lake District. UK - GMT/BST
    Posts
    36,734
    Blog Entries
    20

    Default Re: How to mount vfat partition automatically after boot?

    add it to fstab

    you might want to create a mount point for it first. If you don't konw how, tell me how you want it to appear Eg; STORE or MUSIC whatever
    and what is your login / uername
    Leap 15.1_KDE
    My Articles Was I any help? If yes: Click the star below

  3. #3
    Join Date
    Oct 2009
    Location
    Dhaka,Bangladesh
    Posts
    251

    Default Re: How to mount vfat partition automatically after boot?

    Quote Originally Posted by caf4926 View Post
    add it to fstab

    you might want to create a mount point for it first. If you don't konw how, tell me how you want it to appear Eg; STORE or MUSIC whatever
    and what is your login / uername
    Added in /etc/fstab:
    Code:
    /dev/sda1            /media/sda1          vfat       rw,exec,uid=1001,gid=100,umask=0002,auto 0 0
    /dev/sda2            /media/sda2          vfat       rw,exec,uid=1001,gid=100,umask=0002,auto 0 0
    /dev/sda12           /media/sda12        vfat       rw,exec,uid=1001,gid=100,umask=0002,auto 0 0
    But how can i get the partition/volume icon on desktop for these?

  4. #4
    Join Date
    Jun 2008
    Location
    The English Lake District. UK - GMT/BST
    Posts
    36,734
    Blog Entries
    20

    Default Re: How to mount vfat partition automatically after boot?

    Navigate to the folders in the file browser (Is this LXDE)?

    Can you drag sda1 to the desktop
    or can you right click sda1 and create a shortcut?

    I'm not sure, I don't use LXDE
    @oldcpu does though
    Leap 15.1_KDE
    My Articles Was I any help? If yes: Click the star below

  5. #5
    Join Date
    Oct 2009
    Location
    Dhaka,Bangladesh
    Posts
    251

    Default Re: How to mount vfat partition automatically after boot?

    If i drag it starts copying files to desktop.

  6. #6
    Join Date
    Jun 2008
    Location
    The English Lake District. UK - GMT/BST
    Posts
    36,734
    Blog Entries
    20

    Default Re: How to mount vfat partition automatically after boot?

    You better wait for someone that actually uses LXDE
    Leap 15.1_KDE
    My Articles Was I any help? If yes: Click the star below

  7. #7
    Join Date
    Oct 2009
    Location
    Dhaka,Bangladesh
    Posts
    251

    Default Re: How to mount vfat partition automatically after boot?

    Code:
    ln -s /media/sda1 ~/Desktop
    ln -s /media/sda2 ~/Desktop
    ln -s /media/sda12 ~/Desktop
    ln -s /media/sda13 ~/Desktop

  8. #8

    Default Re: How to mount vfat partition automatically after boot?

    #! /bin/bash
    Code:
    for dev in sda1 sda2 sda12 sda13 ; do
    cat > ~/Desktop/$dev.desktop << EOFDFILE
    [Desktop Entry]
    Type=Application
    Icon=system-file-manager
    Name=$dev
    Exec=pcmanfm /media/$dev
    StartupNotify=true
    Terminal=false
    MimeType=inode/directory;
    EOFDFILE
    chmod 744 ~/Desktop/$dev.desktop
    done
    Copy/paste the code above, save to a file an execute ... or for each partition, create a file in ~/Desktop which would look like that (example for sda1) :

    Code:
    [Desktop Entry]
    Type=Application
    Icon=system-file-manager
    Name=sda1
    Exec=pcmanfm /media/sda1
    StartupNotify=true
    Terminal=false
    MimeType=inode/directory;
    For each file you can choose the name and icon you like (i.e. you can change the text in red)

    This is different from what you did. You created symlinks. These are desktop files. You can change their attributs, name, icons, etc.

Posting Permissions

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