LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can I Boot my Physical Kali Live USB Drive Inside VirtualBox? (https://www.linuxquestions.org/questions/linux-newbie-8/can-i-boot-my-physical-kali-live-usb-drive-inside-virtualbox-4175662923/)

Johnny Faster 10-21-2019 01:31 PM

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.

Help?

pan64 10-21-2019 01:56 PM

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...

Johnny Faster 10-21-2019 03:03 PM

Quote:

Originally Posted by pan64 (Post 6049302)
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.

scasey 10-21-2019 03:05 PM

Quote:

Originally Posted by Johnny Faster (Post 6049329)
Still hoping for a real answer instead of an endless stream of this drivel.

That was a real answer.
Yes.
Read the documentation.

Ignored.

pan64 10-21-2019 03:17 PM

Quote:

Originally Posted by Johnny Faster (Post 6049329)
Still hoping for a real answer instead of an endless stream of this drivel.

Do you really think I [anyone] can explain it better than the official how-to? Did you try that already? Where did you stuck?

colorpurple21859 10-21-2019 05:14 PM

https://www.howtogeek.com/187721/how...in-virtualbox/

Firerat 10-21-2019 05:28 PM

you could do a silly thing like adding yourself to disk group
and add that as a disk in VirtualBox

a safer method would be to create/modify udev rules to change the group of that one device to your own group

but setting up VirtualBox with USB passthrough is the correct solution

michaelk 10-21-2019 05:50 PM

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.

Firerat 10-21-2019 06:10 PM

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

Firerat 10-21-2019 06:23 PM

ok, was thinking

download the required packages
boot kali
mount filesystem where the required packages were downloaded to
install
tether

Johnny Faster 10-21-2019 09:06 PM

Quote:

Originally Posted by scasey (Post 6049333)
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 (Post 6049337)
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.

HINT: "Kali" is a top-secret code word for DEBIAN.

Here's the Winner:

Quote:

Originally Posted by colorpurple21859 (Post 6049367)

Quote:

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 (Post 6049379)
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 (Post 6049382)
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 (Post 6049386)
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."

Firerat 10-21-2019 09:26 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.

I wish you luck.

Johnny Faster 10-21-2019 09:58 PM

Quote:

Originally Posted by Firerat (Post 6049427)
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.

Firerat 10-21-2019 10:20 PM

Quote:

Originally Posted by Johnny Faster (Post 6049431)
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.

being "nice" to me does not excuse the disrespect to others.

rtmistler 10-21-2019 11:01 PM

@Johnny Faster,

You've been a member of LQ long enough to know to be respectful and also to know that there are no guarantees that people can solve every problem.

Please avoid the posts attacking your fellow LQ members.

At the very least, people have been respectful enough to try.


All times are GMT -5. The time now is 11:18 AM.