Announcement

Collapse
No announcement yet.

How do I do this: Need read/write-access to /dev/sda1

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How do I do this: Need read/write-access to /dev/sda1

    Hello!

    I want to run MS Windows 7 through VirtualBox with Kubuntu 11.10 as host. I also want to use two of my existing ntfs hard disk partitions with it, and no virtual drive. I don't care about all warnings telling me that I should not use raw hard drive partitions with VirtualBox, because I don't save important information on these partitions anyway. But I do save important information on other partitions on the same physical hard disk.

    I found this user manual here:

    https://www.virtualbox.org/manual/ch09.html#idp13659008
    From the user manual, i quote:

    "Creating the image requires read/write access for the given device. Read/write access is also later needed when using the image from a virtual machine."
    The way I understand it, I need both read and write-access to these particular partitions. But I don't know if that should be specified in /etc/fstab or as an ownership of the device-files, such as /dev/sda1 and /dev/sda8.

    I got some information here: http://ubuntuforums.org/archive/index.php/t-664692.html

    how about
    sudo chown joshua:disk /dev/sda*
    VBoxManage internalcommands createrawvmdk -filename /mnt/external/vmware/xp_real/xp.vdmk -rawdisk /dev/sda -partitions 4 -relative
    install-mbr -f -p 4 /mnt/external/vmware/xp_real/xp-pt.vdmk
    If I use: sudo chown me:disk /dev/sda1 , wouldn't that screw up my whole system? Doesn't "root" have to be the owner of these files, for linux to work properly?

    I would really appreciate some help here, because I don't want to go any further with this, until I am absolutely sure what I am doing.





    For the moment, this is what I get when trying to make a VMDK-image:

    me@me:~$ VBoxManage internalcommands createrawvmdk -filename /home/me/VirtualBox\ VMs/Microsoft\ Windows\ 7/windisk.vmdk -rawdisk /dev/sda -partitions 1,8 -relative
    VBoxManage: error: Cannot open the raw disk '/dev/sda': VERR_ACCESS_DENIED
    VBoxManage: error: The raw disk vmdk file was not created
    But with sudo, I get this instead:

    me@me:~$ sudo VBoxManage internalcommands createrawvmdk -filename /home/me/VirtualBox\ VMs/Microsoft\ Windows\ 7/windisk.vmdk -rawdisk /dev/sda -partitions 1,8 -relative
    [sudo] password for me:
    RAW host disk access VMDK file /home/me/VirtualBox VMs/Microsoft Windows 7/windisk.vmdk created successfully.
    From this I understand that there are no issues with the software, but rather access problems in linux.

    And just to let everybody know that I have tried:
    VirtualBox will not accept the VMDK-image afterwords anyway, because of the same access-problems. And I can't run VirtualBox through sudo or kdesudo because of security-issues.



    #2
    Re: How do I do this: Need read/write-access to /dev/sda1

    Just a thought, but have you added your user account to the vboxusers group in /etc/group?

    If you do that, then you will be allowed access to the VB libs that control the devices.

    Just a thought... I don't use VBox anymore but rather use KVM where I use raw partitions on other drives all the time as a normal user.

    Take a look at KVM to see if it might fit your needs better. I find the performance of windows operating systems to be pretty close to native, but I only use server and not client operating systems.

    Hope this helps!
    Joe

    Comment


      #3
      Re: How do I do this: Need read/write-access to /dev/sda1

      Joe:

      I have added my user account to the vboxusers group, and rebooted. Still access denied. How do I access VB libs?
      I will take a look at KVM as well, when I find time to. Thank you for your answer!

      Comment

      Working...
      X