#!/bin/bash
: <<nnnnnnn
‘
history:2013-01-05 11:17 FRI
Function:oracle VM VirtualBox in each partition that is in your Windows
Synopsis:mnt.v.windows.hardisk [C | D | E | ....]
The Windows partition for Optiplex380 is c,d,e.
/MNTVWH c MOUNTING C-drive
/MNTVWH D mounting D-plate
/MNTVWH e-Mount E-disk
-/MNTVWH H mounted removable hard disk
Find the specific location of the mobile hard disk
--Sudo fdisk-l
The folder that is configured in the VM is named: drive letter _ip Last
eg:e_138 [IP]
-
Description:on x86_64
-
-
Nsversion:v7.1.9.8.2013-mon-x86_64
BUGS:
When executing the script, if you report the following error: [/sbin/mount.vboxsf:mounting failed with the Error:no such device]
Here's how to fix it:
cd/media/vboxadditions_4.2.12_84980/
--sudo./vboxlinuxadditions.run
-
‘
nnnnnnn
mntdir=~/music/$1/
function Mntwindowsdisc () {
sudo mount-t vboxsf-o iocharset=utf8,uid=${user},gid=${user},umask=077 $1_138 ${mntdir}
}
#mount移动硬盘时需要先判断硬盘的位置
#需手动, automatically completed later
#/dev/sda2
#/dev/sdb1
#/dev/sdb2
#/dev/sdc1
function Mnthardisk () {
sudo mount-t ntfs/dev/sda2 ${mntdir}-o Uid=${user},gid=${user},umask=022,force
# sudo chown-r ${user}:${user} ${mntdir}
# sudo chmod-r 755 ${mntdir}
}
Case $ in
"C") Mntwindowsdisc C;;
"D") mntwindowsdisc D;;
"E") Mntwindowsdisc e;;
"H") mnthardisk H;;
*) echo "Not-support, you-Input is not Correct.";
Esac
#if [= = = "E"]; Then
# Mount_windows_folder E
#elif [= = "D"]; Then
# Mount_windows_folder D
#elif [= = = "C"]; Then
# # Mount_windows_folder C
#elif [= = = "H"]; Then
# Mount_hardisk
#else
# echo "Not-support, you-Input is not Correct ..."
#fi
This article is from the "Andyhdchoice" blog, make sure to keep this source http://andyhdchoice.blog.51cto.com/1521623/1548798
Small example: the various partitions in Windows that are mounted in Oracle VM VirtualBox