LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Thunar, FluxBox & auto mount (https://www.linuxquestions.org/questions/linux-software-2/thunar-fluxbox-and-auto-mount-725920/)

CopyrightPhilly 05-14-2009 08:57 AM

Thunar, FluxBox & auto mount
 
hello,

I have my OS installed on a USB HDD, on this drive I have my OS partitions and two other EXT3 partitions which are used for storage.

what I am wanting to do is setup flux to mount these two storage partitions automatically when it starts.

I have tried adding thunar --daemon & to ~/fluxbox/startup but it dose not automatically mount these partitions. the only way I can mount them is by opening thunar and clicking the partition from side pane, this then mounts the partition. I can not use /etc/fstab to mount these as the device location always changes on boot for some reason (/dev/sda1 to /dev/sdc1 and so on)

so, can anyone help me out with setting these partitions to automatically mount when I login?

cheers,
Philly

oh and before anyone asks I do have thunar-volman installed.

Padawan.AVT 05-14-2009 02:06 PM

Well, you can make some tweaky script that will mount your drives and add it to rc to be executed at boot time

Something like



Code:

#!/bin/bash
# Copyleft by Padawan.AVT :)
#
# Let's supose you have a drive like that:
#
#  Device Boot      Start        End      Blocks  Id  System
#/dev/sdc1            1          60801  488384001  83  Linux
#/dev/sdc2            60901      3485143  3424242  83  Linux


DRIVE1=`fdisk -l | grep 488384001 | awk -F" " '{print $1}'`
DRIVE2=`fdisk -l | grep 3424242(or whatever you have in drive blocks) | awk -F" " '{print $1}'`

mount $DRIVE1 /mnt/sdc1
mount $DRIVE1 /mnt/sdc1



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