LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Is it possible to create a liveUSB of a VM Image? (https://www.linuxquestions.org/questions/linux-newbie-8/is-it-possible-to-create-a-liveusb-of-a-vm-image-4175514996/)

initramfs 08-15-2014 04:03 PM

Is it possible to create a liveUSB of a VM Image?
 
Hello

Fedora 20 is my main host OS and I have a couple of distros in virtualbox and I want to know if it is possible to create a bootable LiveUSB on any of the distros.

Thanks

jefro 08-15-2014 07:48 PM

Yes, for the most part a vm is a real computer. Linux doesn't care as much as it once did on hardware but in a strange twist is going back to hardware specific installs. (that's a different story)

So back to your issue. A usb to most common modern linux is just a scsi drive. Linux doesn't use the old hda1 naming and way to access. You normally see sda1 or such. Your virtual hard drive will be a scsi if you built it but internally it should show up as sda1.

Since a usb and vm hard drive are similar then it is usually only a matter of choosing your way to clone the two. You can clone directly or indirectly.

Now, the hard part. Some distro's might boot by uuid or other naming issue and may even mount by naming. You can either fix that to generic before or fix to exact after clone.

How would you clone a real system?

initramfs 08-15-2014 11:40 PM

There are sites that show how to clone a disk with virtualbox. But I couldn't find anything on how to take the vdi image file and make a bootable usb out of it.

So, I decided to install a linux system the standard way. Boot to a liveCD, insert the usb stick and mount it, partition it, install the linux OS and bootloader on it.

The only drawback is -- it will be quite slow. I'll probably get a USB 3.0 stick down the road since my system has two 3.0 usb ports.

I still appreciate the reply though, jefro. Thanks

jefro 08-16-2014 03:09 PM

Where did you get that it will be slow? It will only be slow if your flash drive has slow access (or bad controller) A fast access 2.0 will be better than a 3.0 flash drive with slow access speeds. Get a fast access one.

I use usb flash installs all the time. I purchase fast drives. Not too long ago the usb 3 drives wouldn't work. My installs work great.

It makes no difference if you clone a vm to a flash or install to a flash. It is the same.

Yes, there are hundreds of ways to clone a system. In the most basic sense it boils down to two ways. One is bit by bit and the other is file by file.

I almost always use a VM to create a live usb install too.

initramfs 08-17-2014 02:16 PM

Quote:

Originally Posted by jefro (Post 5222158)
Where did you get that it will be slow? It will only be slow if your flash drive has slow access (or bad controller) A fast access 2.0 will be better than a 3.0 flash drive with slow access speeds. Get a fast access one.

Maybe the usb stick I have is slow. I purchased it like three or four years ago and it is 2.0 type, but I'm not sure of the speed in terms of read/write specs. Perhaps this is the culprit as to why some people say running a linux OS on a usb stick is slow.


I rarely run linux from USBs as you would with a hard drive, I use unetbootin to create a bootable liveUSB to try out the distro and/or to install onto a hard drive.

jefro 08-17-2014 08:40 PM

I did buy one that worked great in windows but wouldn't run in linux on an ext4 filesystem. Tried an ext2 and did a bit better but returned it. Tend to use patriot brand. I'm sure others are good.

Usb install apps usually do two things. One is they tend to run a compressed filesystem and two they use a Windows format.

I don't seem to have their issues. Most of the computers I use are 2.x usb. All native installs.

I have been playing with btrfs for a year or so. Not really the best choice for a usb flash drive.


All times are GMT -5. The time now is 07:16 AM.