Can I Boot my Physical Kali Live USB Drive Inside VirtualBox?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can I Boot my Physical Kali Live USB Drive Inside VirtualBox?
I have a working Kali Linux Live USB drive, with persistance & encryption. I want to install Android Debug Bridge (aka "Android Bridge Tools") on this USB drive so that I can connect to the internet via my Android phone.
I've recently learned that i386 Architecture, and two other library files were left off of the Kali Distro, and they need to be installed in order for Android Tools to work. The problem is the android is my only source of internet atm, and I can't access the internet from Kali Live.
So I've installed VirtualBox, and have a Kali Live image loaded and working, and I've managed to successfully install the i386 architecture on the virtual Kali Live O/S, so in terms of "proof of concept" it works just fine. The problem is how do I "boot" my actual, physical USB drive in VirtualBox so that I can use "apt get" to download and install the necessary package and files to get the i386 architecture and two other library files.
I tried to navigate to the USB drive from within VirtualBox, and I got a Windows message saying that the USB needed to be formatted and do I want to format it now. The only thing I can think of is to:
1) Image the USB drive.
2) Mount the image in VirtualBox
3) Add the i386 architecture to the image.
4) Write the image to the USB drive.
Which sounds pretty "long-way-round" to me, if it's even possible.
you can read the documentation of virtualbox about: how can you use a real usb port iside a vm.
And again, using kali will make only troubles for you, using a more user friendly distro will give you much easier way... But you know...
you can read the documentation of virtualbox about: how can you use a real usb port iside a vm.
And again, using kali will make only troubles for you, using a more user friendly distro will give you much easier way... But you know...
Still hoping for a real answer instead of an endless stream of this drivel.
My actual experience using Kali is very limited. Here is a little less drivel.
As far as I know you can not directly boot a USB drive via VirtualBox. The USB drive needs to be converted to a VMDK image file first. While the actual documentation does not provide detail steps there are many threads that post the exact commands.
There are tools to convert a VMDK image back to an ISO image but I have not tried using them.
To access a USB drive from within a VirtualBox guest you need to install the extension pack and then connect the drive. Once the drive is connected to the guest you can then mount its filesystems but I am not sure of the exact steps since the persistence partition is encrypted and you might need to setup luks. I do not know if it is possible and I don't know how the partition is configured so I have no idea how to copy the files from the virtual machine to the USB drive and have it work once you reboot from the USB again.
I used to use LVM2 for VirtualBox kvm/qemu xen
instead of creating Virtual disks I would create LV and add block device directly when configuring the VM
Obviously you need rw to those block devices ( hence disk group or udev rules )
the VM just sees the block device as a raw disk
VirtualBox "extra" usb passthrough ( as far as I remember ) doesn't require special drivers on the guest OS , the VM would treat a USB mass storage as USB mass storage.
I never tried usb passthrough with kvm or xen but I guess it is possible.
however, I'm confused with the end goal
which appears to be to install adb to enable network tethering.
I would just tether the android to the PC and configure the VM to use NAT
or setup some network bridge
I don't recall exactly what is involved with the tethering with respect to created net. devices
That was a real answer.
Yes.
Read the documentation.
Ignored.
Please don't talk to me or my wife's son ever again.
Quote:
This option is well-hidden.
But you should do it anyways.
Quote:
Originally Posted by pan64
Do you really think I [anyone] can explain it better than the official how-to? Did you try that already? Where did you stuck?
I "stuck" when I had to read yet another iteration of how incredibly and horrifically complex and unknowable Kali is, and how impossible it is for anyone but the most extremely qualified experts should ever attempt this terrifyingly challenging feat of human accomplishment. And also, how NO ONE, EVER will want to read about how to install Android Bridge Tools on Kali Linux EVER, and how pointless it is for me to try this, and for anyone to help me accomplish it, because no one, ever, in the entire history of Linux has ever wanted to boot a laptop with Kali Live and anonymously connect to the internet with state-of-the-art penetration testing tools using a pay-as-you-go burner phone. NO ONE. EVER. Has wanted to do this.
VirtualBox can boot virtual machines from USB flash drives, allowing you to boot a live Linux system or install an operating system from a bootable USB device. This option is well-hidden.
I appreciate the time and effort of this. This is what a good response on a healthy forum looks like, for those that either forgot, or never knew. > tfw "RTFM" = "Google it"
Quote:
Originally Posted by michaelk
My actual experience using Kali is very limited. Here is a little less drivel.
As far as I know you can not directly boot a USB drive via VirtualBox. The USB drive needs to be converted to a VMDK image file first. While the actual documentation does not provide detail steps there are many threads that post the exact commands.
There are tools to convert a VMDK image back to an ISO image but I have not tried using them.
To access a USB drive from within a VirtualBox guest you need to install the extension pack and then connect the drive. Once the drive is connected to the guest you can then mount its filesystems but I am not sure of the exact steps since the persistence partition is encrypted and you might need to setup luks. I do not know if it is possible and I don't know how the partition is configured so I have no idea how to copy the files from the virtual machine to the USB drive and have it work once you reboot from the USB again.
I also appreciate the time and effort for this. Good role modeling. I see it, even if some of these so-called "gurus" and "senior members" are oblivious to anything except a baseball bat to the cranium.
Quote:
Originally Posted by Firerat
I used to use LVM2 for VirtualBox kvm/qemu xen
instead of creating Virtual disks I would create LV and add block device directly when configuring the VM
Obviously you need rw to those block devices ( hence disk group or udev rules )
the VM just sees the block device as a raw disk
VirtualBox "extra" usb passthrough ( as far as I remember ) doesn't require special drivers on the guest OS , the VM would treat a USB mass storage as USB mass storage.
I never tried usb passthrough with kvm or xen but I guess it is possible.
however, I'm confused with the end goal
which appears to be to install adb to enable network tethering.
I would just tether the android to the PC and configure the VM to use NAT
or setup some network bridge
I don't recall exactly what is involved with the tethering with respect to created net. devices
Quote:
Originally Posted by Firerat
ok, was thinking
download the required packages
boot kali
mount filesystem where the required packages were downloaded to
install
tether
Thanks for all that time an effort. It's much appreciated. You're a good egg; I can tell. I don't understand part of this (bold). The "Big Picture" for me is that this whole thing has taken hold of me like dabbling in Ubuntu and Linux Mint never did. I tried both, got both bored and frustrated, and quit. This project is a challenge, and I'm determined. I'm on like week two of a daily and consistent effort to get ADB installed on Kali Live. I've learned a whole ton of stuff and have a bunch more questions. I'm INVOLVED in this now, vs. half-heartedly copying and pasting meaningless terminal commands. What's an "architecture"? How likely is it that the CIA is trying to suppress the ability to connect Kali to the internet via burner phones? Why do seemingly normal Linux people suddenly lose their minds and start barking and howling at the moon, and urinating on the shoes of perfect strangers the moment they read the word "Kali" in a post? I find it amazing that in the middle of a community of people who are all dissident enough to break free of Windows, there's this stoic cadre of "Old Guard" curmudgeons that regard Kali as some kind of resurrected demon from the 72nd level of hell. They don't USE Kali. They don't know anything about Kali. But they read the sticky and by God that's BLACK LETTER LAW and they are all here, collectively, to ENFORCE that law. Asking a question is PROOF; PROOF, Ladies and Gentleman that the accused that stands before you now knows NOTHING about Linux, and he must be HAMMERED back to Ubuntu where it's safe. God himself demands this be done, and so mote it be.
Ridiculous. Some of you people are ridiculous, and if you had a lick of common sense and self-awareness, you'd be embarrassed and ashamed. Here's what you people need to know about me. You see my name anywhere on the internet, and you think "That's the guy that is going to LEARN KALI. The ONLY ONE, TOO. Somewhere, there are two rats copulating in an alley under a dirty mattress, and that guy doesn't give TWO FORNICATING RATS about whether or not we approve."
Last edited by Johnny Faster; 10-21-2019 at 09:09 PM.
yeah, my mistake I switched to some short hand based on kali reference
if all you want is to get access to some files with kali usb I offered a perfectly practical solution with mounting the filesystem with pre-downloaded files.
admittedly I did leave out detail, but the concept was there.
If you had asked me to elaborate I may have become more verbose.
However, your response is pitiful and I do not suffer fools gladly.
yeah, my mistake I switched to some short hand based on kali reference
if all you want is to get access to some files with kali usb I offered a perfectly practical solution with mounting the filesystem with pre-downloaded files.
admittedly I did leave out detail, but the concept was there.
If you had asked me to elaborate I may have become more verbose.
However, your response is pitiful and I do not suffer fools gladly.
I wish you luck.
I said I appreciated your post. I called you a "good egg". I said I didn't understand part of it. The criticism was leveled at others.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.