Xfce Forum

Sub domains
 

You are not logged in.

#1 2014-06-08 03:04:35

Sideburns
Member
From: Trinidad, CO
Registered: 2011-03-30
Posts: 467
Website

Auto-mounting partitions

I'm working on setting up a specialized LiveUSB using Xfce on Fedora that includes ClamAV.  It's intended to be used by people with little if any Linux knowledge to scan Windows computers for malware that would otherwise hide itself from scanners.  One of the things I'd like it to do is auto-mount all Windows partitions so that there's one less step that they have to remember.  Is there a way to tell Xfce to do this?


Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.

Offline

#2 2014-06-09 06:42:39

PaperNick
Member
Registered: 2013-05-26
Posts: 106

Re: Auto-mounting partitions

What you're trying to do is basically a rescue disk. A rescue disk is a live linux distribution with pre-installed antivirus software. I've recently cleaned an infected PC with Kaspersky Rescue Disk 10. It is based on Kubuntu and after you launch it from the CD/USB, the first thing it does automatically is to mount all available partitions and start the antivirus software. You can even update the antivirus database if you're connected to the internet.

Offline

#3 2014-06-09 07:54:06

Sideburns
Member
From: Trinidad, CO
Registered: 2011-03-30
Posts: 467
Website

Re: Auto-mounting partitions

From what I can tell, the rescue "disk" can only be created under Windows, which I don't have, and the product doesn't appear to be free as in beer.  ClamAV, and the GUI front end are available from the Fedora repos at no charge.  One of the people I'm doing this for is a computer columnist (among other things) who is willing to do a write-up of whatever I come up with, and I'd much rather give FOSS some good publicity if I can.  Thanx for your suggestion, but at this point it doesn't look like it's what I need.  Of course, it may end up to be the best answer, but I'd like to do some more research before giving up on creating a completely FOSS solution.


Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.

Offline

#4 2014-06-09 08:49:22

PaperNick
Member
Registered: 2013-05-26
Posts: 106

Re: Auto-mounting partitions

You can create Kaspersky Rescue disk from Linux by simply downloading the iso file from the link above and then installing it on a CD or USB drive. You can burn it really easy on a CD, so I won't mention the instructions. To install it on a USB, download UNetbootin and choose Kaspersky Rescue Disk. While using the rescue disk, I was never asked to pay for anything or whatsoever. The rescue disk is even listed in their free tools.

The idea for creating a completely open source alternative is great. I wish you all the best, and don't forget to post the final product here when you are ready. I would definitely give it a try wink


Edit: I got a little idea about auto-mounting the Windows partitions.

You can list all partitions with:

blkid -o full

After that you mount the NTFS partitions only (assuming NTFS is used by Windows).

Last edited by PaperNick (2014-06-09 11:27:38)

Offline

#5 2014-06-09 20:39:36

Sideburns
Member
From: Trinidad, CO
Registered: 2011-03-30
Posts: 467
Website

Re: Auto-mounting partitions

As I wrote, this is "intended to be used by people with little if any Linux knowledge," so having them run something like that in a terminal is Right Out.  Now, if there's a way to turn that into a bash script and put it in /etc/rc.local, that would be Just What I need.  And, as it happens, somebody over at fedoraforum.org suggested a script to mount the appropriate partitions assuming that the USB drive would always be the same, which is only true if the computer has exactly one hard drive, we may be able to combine your idea with his.  Thanx!


Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.

Offline

#6 2014-06-10 06:57:39

PaperNick
Member
Registered: 2013-05-26
Posts: 106

Re: Auto-mounting partitions

I've searched for some auto-mount scripts and I found this guide. I hope that's what you're looking for.

Offline

#7 2014-06-10 07:23:26

Sideburns
Member
From: Trinidad, CO
Registered: 2011-03-30
Posts: 467
Website

Re: Auto-mounting partitions

Thank you; that might be what I need.  However, I might be able to limit it to NTFS partitions (I don't know what file system the various special partitions use.) by changing one line to this:


fdisk -l |  awk -F ' ' '{print $1}' | grep /dev/ | grep -i ntfs > /tmp/partitions

This way, only the partitions likely to need scanning get mounted.  (I used grep -i because I'm not sure if fdisk uses all caps, initial cap or all lower case for that, not having an appropriate partition to test it on.)  Putting that script in /etc/rc.local should get exactly the partitions we need mounted, and when Xfce starts, it will show them on the desktop.  Thanx!


Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.

Offline

Board footer

Powered by FluxBB