All in one forum  - Applications | Games | E-Books | Music, Movies & Videos | Mobile Stuff | Live Discussions | Webmaster Stuff | Many More | Community to Hang Out & Stick to One low monthly fee you get access to files using 4 premium accounts

Unlimited Storage and Bandwidth for $4.95/mo Your Link here @20$ Member of the Month - Free Rapidshare Account Join NFO Competition
Go Back   Home > Tutorial Section > Operating System > Windows XP
Forgot Password? Join Us!

Windows XP post your windows xp related tips and tricks here

Notices

Your Ad Here


Post New Thread Reply
 
LinkBack Thread Tools Display Modes
Old 05-04-2008, 06:10 PM   #1 (permalink)
 
PaNkAJ's Avatar

 
User Info
Join Date: Jul 2007
Location: In Your Heart
Send a message via Yahoo to PaNkAJ
Achievements Posts: 10,334
Casino Cash: $738880

Total Points: 14,306,759.99
Donate

Reputation: 146132
PaNkAJ has a reputation beyond reputePaNkAJ has a reputation beyond reputePaNkAJ has a reputation beyond reputePaNkAJ has a reputation beyond reputePaNkAJ has a reputation beyond reputePaNkAJ has a reputation beyond reputePaNkAJ has a reputation beyond reputePaNkAJ has a reputation beyond reputePaNkAJ has a reputation beyond reputePaNkAJ has a reputation beyond reputePaNkAJ has a reputation beyond repute


Awards Showcase
Administrator Of the Month Of Jan 
Total Awards: 1
Cool Access Windows and mac OS files from linux

There is a neat utility out there, which is capable of searching for available HFS+, NTFS and FAT32 partitions. It creates mount points for them and adds them to /etc/fstab, so they will be mounted everytime you boot.

Instructions for use:
- Download and save this file on your local hard drive as winmac_fstab
- Open a terminal and type "sudo bash winmac_fstab"
- If sudo asks for a password, use your own password
- Your windows and mac partitions will now be mounted everytime
you boot. You can delete this script now if you like (with "rm winmac_fstab")

There also exists a similar script for Samba network shares (the ones Windows uses).


Script:-

#!/bin/bash
####################
# This utility searches for available HFS+, NTFS and FAT32 partitions, creates
# mount points for them and adds them to /etc/fstab
# ©2005 Dennis Kaarsemaker <dennis@ubuntu-nl.org>
# Thanks to Nalioth for suggesting, assisting with and testing the HFS+ bits
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# Instructions for use:
# - Save this file on your local hard drive
# - Open a terminal and type sudo bash winmac_fstab
# - If sudo asks for a password, use your own password
# - Your windows and mac partitions will now be mounted everytime
# you boot. You can delete this script now
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
###################

# Root check
if [[ $UID != 0 ]]; then
echo 'You should run this program as root or using sudo'
exit 1
fi

# Get label for disk, consisting of size and name (fs labels proves too hard)
getlabel() {
MAJ=`file /dev/$drive | sed -e 's/.*(\(.\).*/\1/'`
MIN=`file /dev/$drive | sed -e 's/.*(..\(.\).*/\1/'`
UDI="/org/freedesktop/Hal/devices/block_${MAJ}_${MIN}"
SIZE=`hal-get-property --udi $UDI --key volume.size`
GB=`python -c "print int(round($SIZE.0 / (1024**3)))"`
label="$GB\\040GB\\040Disk\\040($drive)"
label2="$GB GB Disk ($drive)"
}

# Simple command line argument for installers
# -w: mount them with user,umask=0111
# -r: mount them with user,umask=0133,uid=1000,gid=1000
RWALL=-1;
if [[ $1 == '-w' ]]; then RWALL=1; fi
if [[ $1 == '-r' ]]; then RWALL=0; fi

if [[ $RWALL == -1 ]]; then
echo 'By default the disks will be writable only by root and'
cat /etc/passwd | awk -F ':|,' '/:1000:/ {print $5 " (" $1 ")"}'
echo 'Do you want to make the disk writable by all users instead? (y/n)'
read RESP
if [[ $RESP == 'y' || $RESP == 'Y' ]]; then
RWALL=1
else
RWALL=0
fi
fi

if [[ $RWALL == 1 ]]; then
OPTIONS='user,fmask=0111,dmask=0000'
MACOPTIONS='user,file_umask=0111,dir_umask=0000'
else
OPTIONS='user,fmask=0133,dmask=0022,uid=1000,gid=1 000'
MACOPTIONS='user,file_umask=0133,dir_umask=0022,ui d=1000,gid=1000'
fi

# Now for the real work
drivesntfs=`fdisk -l | grep -i 'ntfs' | awk -F '/| ' '{print $3}'`
drivesfat=`fdisk -l | grep -i 'fat32' | awk -F '/| ' '{print $3}'`
driveshfs=`fdisk -l | grep -i 'Apple_HFS' | awk -F '/| ' '{print $3}'`

donesomething='n'
for drive in $drivesntfs
do
getlabel $drive
if [[ ! `grep $drive /etc/fstab` ]]
then
mkdir "/media/$label2"
echo "#Added by winmac_fstab utility" >> /etc/fstab
echo "/dev/$drive /media/$label ntfs ro,$OPTIONS 0 0" >> /etc/fstab
echo "Added /dev/$drive as '/media/$label2'"
donesomething='y'
else
echo "Ignoring /dev/$drive - already in /etc/fstab"
fi
done
if [[ $donesomething == 'y' ]]
then
echo "NTFS drives will be mounted read-only!"
fi
for drive in $drivesfat
do
getlabel $drive
if [[ ! `grep $drive /etc/fstab` ]]
then
mkdir "/media/$label2"
ln -s "/media/$label2" /media/$drive # yay, spaceless link for b0rken programs
echo "#Added by winmac_fstab utility" >> /etc/fstab
echo "/dev/$drive /media/$label vfat rw,$OPTIONS 0 0" >> /etc/fstab
echo "Added /dev/$drive as '/media/$label2'"
donesomething='y'
else
echo "Ignoring /dev/$drive - already in /etc/fstab"
fi
done
for drive in $driveshfs
do
getlabel $drive
if [[ ! `grep $drive /etc/fstab` ]]
then
mkdir "/media/$label2"
echo "#Added by winmac_fstab utility" >> /etc/fstab
echo "/dev/$drive /media/$label hfsplus rw,$MACOPTIONS 0 0" >> /etc/fstab
echo "Added /dev/$drive as '/media/$label2'"
donesomething='y'
else
echo "Ignoring /dev/$drive - already in /etc/fstab"
fi
done

if [[ $donesomething == 'y' ]]
then
# And mount them
mount -a
echo "All windows and mac partitions will now be mounted every time you boot"
echo "You do not need to reboot, the partitions are mounted now too"
else
echo "No usable windows/mac partitions found"
fi

Guests Register to see the forum...
Click on thanks & take the Link with you....No Spamming with reply
PaNkAJ is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply
Click here to Donate to remove the Adverts.
Post New Thread Reply

Bookmarks



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to access files over the internet to a... TheMorbidMe Windows 0 09-05-2007 10:06 AM
How to execute .exe files on linux? andrius n Linux and UNIX 0 09-03-2007 11:09 PM
How can I access Windows Help Files in timmyjohnboy1234 Windows 0 08-31-2007 10:56 PM
C$ can't access. Both OS are windows XP. I think... salmanhbl Applications and Security 0 08-11-2007 08:28 PM
how can i use windows files on linux o/s.? durbal s Linux and UNIX 0 07-26-2007 07:13 PM


These are the 125 most used thread tags
Tag Cloud
(2008) 1080i 2007 2008 2009 action adobe advanced adventure aio all in one antivirus appz audio avalon avira beta black build burning collection comedy converter copy crack database deluxe desktop development digital tutors direct download disciple download download manager drama driver dvd dvdrip easy edition files final finance flash fonts free full game games getdata graphics guide hacking halloween hdtv hidden hq increditools internet introducing myself keygen link linkin park love magic manager matlab maya media megaupload microsoft mobile movie multimedia music n95 nero network office pack patch photoshop pics pictures pillar platinum plumb pocket portable premium professional rapidshare recover retail ringtones rock rs.com security serial server sexy software steppenwolf studio suite symbian telugu movie template thriller tools tutorial ultimate utilities video videos virus vista wallpaper wallpapers web development windows wwe xp xvid [rs.com]

New To AiO Forum? Need Help?

Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

Site Best Viewed with Firefox 3.0 & IE v7.0
RapidShare Links PhazeDDL Warez
PhazeDDL Warez