[Ubuntu-PH] Mounting harddrives
Arlan Tiu
arlantiu at gmail.com
Tue Aug 23 23:53:32 UTC 2005
Whoa, thanks for the script.
I'm still getting use to linux commands, I can't still understand the
script that you gave but I'm studying it. :D
Thanks for the help.
Another question, will UBUNTU Intel x86 edition will run on Intel
Celeron 633 processor?
On 8/23/05, Arman Awatin <arman at weblogic-ht.net> wrote:
> Hi arlan,
>
> I have a script which you can use to solve your problem, so you won't get
> confused configuring your fstab etc.. make sure your HDDs are properly
> installed.
> Also, you need to study the links they gave to you. Coz it's much better to
> solve and face the problem by your own. :)
>
> Save this script to anyfile.sh
> Then run the script at the shell by typing ./anfile.sh
>
> ### Begin ###
>
> #!/bin/bash
>
> if [[ $UID != 0 ]]; then
> echo 'you should run this program as r00t or by using sudo'
> exit 1
> fi
>
> 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 r00t 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='umask=0000'
> else
> OPTIONS='umask=0022,uid=1000,gid=1000'
> fi
>
> drivesntfs=`fdisk -l | grep -i 'ntfs' | awk -F '/| ' '{print $3}'`
> drivesfat=`fdisk -l | grep -i 'fat32' | awk -F '/| ' '{print $3}'`
>
> for drive in $drivesntfs
> do
> if [[ ! `grep $drive /etc/fstab` ]]
> then
> mkdir "/mnt/$drive"
> echo "#added by windows_fstab" >> /etc/fstab
> echo "/dev/$drive /mnt/$drive ntfs ro,$OPTIONS 0 0" >> /etc/fstab
> fi
> done
> for drive in $drivesfat
> do
> if [[ ! `grep $drive /etc/fstab` ]]
> then
> mkdir "/mnt/$drive"
> echo "#added by windows_fstab" >> /etc/fstab
> echo "/dev/$drive /mnt/$drive vfat rw,$OPTIONS 0 0" >> /etc/fstab
> fi
> do "sudo mount -a"
> done
>
> ### End ###
>
> got a problem? just explain it... :)
> But Im sure 100%, it should work...
>
> Cheers,
>
>
>
> > Just new in using ubuntu, my problem is I don't know how to mount a
> > windows harddisk since I need to copy some files in it.
> >
> > The system recognize that there are 2 hard drives but ubuntu can't see
> > it. Hope you can help me. If ever please give the step by step
> > process.
> >
> > Thanks in advance and more power!
> > --
> > Arlan R. Tiu
> > Computer Teacher / I.T. Head
> > St. Peter the Apostle School
> > 1260 Pres. Quirino Ave. Ext., Paco, Manila, Philippines
> > 0921-3098333
> >
> > --
> > ubuntu-ph mailing list
> > ubuntu-ph at lists.ubuntu.com
> > http://lists.ubuntu.com/mailman/listinfo/ubuntu-ph
> >
>
>
--
Arlan R. Tiu
Computer Teacher / I.T. Head
St. Peter the Apostle School
1260 Pres. Quirino Ave. Ext., Paco, Manila, Philippines
0921-3098333
More information about the ubuntu-ph
mailing list