Date: Sat, 2 Oct 2010 16:04:09 +0200 (CEST) From: Juergen Lock <nox@jelal.kn-bremen.de> To: ttsiodras@gmail.com Cc: freebsd-emulation@FreeBSD.org Subject: Re: VirtualBox can't boot a Linux residing in the same hard disk - operation not permitted Message-ID: <201010021404.o92E49cn063220@triton8.kn-bremen.de> In-Reply-To: <AANLkTikFn3dbkWXPFj0-zGQzhJD=W7sUFTUj1Mu8P_WK@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <AANLkTikFn3dbkWXPFj0-zGQzhJD=W7sUFTUj1Mu8P_WK@mail.gmail.com> you write: >Hi, everyone. > >I have a disk where I have installed both Linux and FreeBSD, under >different partitions. From FreeBSD, I wanted to use VirtualBox to boot >my Linux, which resides in a different partition of the same disk. I >installed the latest Virtualbox from ports (3.2.8, r64453), and I >tried to create a raw-access device: > > bash$ sudo VBoxManage internalcommands createrawvmdk -filename >~/.VirtualBox/WholeDisk.vmdk -rawdisk /dev/ad11 > >but unfortunately, I got... > > ERROR: VMDK: could not open raw disk file '/dev/ad11' > >and truss revealed that: > > bash$ sudo truss VBoxManage internalcommands createrawvmdk -filename >~/.VirtualBox/WholeDisk.vmdk -rawdisk /dev/ad11 2>&1 | grep ad11 > open("/dev/ad11",O_RDONLY,0600) = 8 (0x8) > open("/dev/ad11",O_RDWR,0600) ERR#1 'Operation >not permitted' > >So it seems that VBoxManage attempted to get read-only access to the >device, succeeded, then attempted to get RW access, and failed. > >I tried this under a root login too (i.e. not via sudo), just in case. No go. > >Security wise, I am at: > >bash$ sysctl kern.securelevel >kern.securelevel: -1 > >Any ideas on what to try? You need to disable the geom(4) anti-foot-shooting flag: sysctl kern.geom.debugflags=16 (this is meant to protect from writing to underlying devices of mounted filesystems because that usually causes corruption.) So be careful not to mount/boot the FreeBSD slice from within the guest... :) HTH, Juergen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010021404.o92E49cn063220>