Small example: the various partitions in Windows that are mounted in Oracle VM VirtualBox

Source: Internet
Author: User
Tags oracle vm virtualbox vm virtualbox

#!/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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.