LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 08-15-2015, 11:18 AM   #1
redneck_wizard
LQ Newbie
 
Registered: Aug 2015
Posts: 9

Rep: Reputation: Disabled
Can I run persistent linux in a VM from a USB?


I have seen things stating that I can. Problem seems to be that I wouldn't be able to utilize more than 4GB of my 128GB USB 3.0.

The idea is to take linux with me everywhere and be able to run it on most computers without having to install programs or reboot into a live disk. I want to be able to always have files and information without having to always have my laptop.

I have been attempting to do this with Kali, but I am apparently not smart enough to even get LiLi to make a live usb... I can use whatever distro will work, although Kali or tails would be ideal.

Has anyone done something like this on a USB3? And please be gentle. I am not native to linux... But I aspire to be.
 
Old 08-15-2015, 12:28 PM   #2
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,500

Rep: Reputation: Disabled
Welcome aboard.

I think you may be confused. A VM runs under your O/S - a 'live' usb drive with persistence runs instead of your usual O/S.

(Kali is not a 'newbies' distro; you would likely be better served with a regular distro, like AntiX MX or Mint.)

Last edited by fatmac; 08-15-2015 at 12:29 PM.
 
Old 08-15-2015, 02:03 PM   #3
redneck_wizard
LQ Newbie
 
Registered: Aug 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by fatmac View Post
Welcome aboard.

I think you may be confused. A VM runs under your O/S - a 'live' usb drive with persistence runs instead of your usual O/S.

(Kali is not a 'newbies' distro; you would likely be better served with a regular distro, like AntiX MX or Mint.)
Oye mate, I appreciate your reply. I may have gotten my verbage backwards. So under a VM I would only be able to run linux in a live environment which means not saving or installing new applications.

So with that clarified, there is no way to make a 128GB USB3 a persistent volume that I can use in a VM within a Windows environment?

I know kali is not an ideal starting point, but my learning style is to dive in feet first and just figure it out. I appreciate your wisdom.
 
Old 08-15-2015, 02:47 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,730

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
Basically your option is going to be install software in most instances or reboot.

In a nutshell a virtual machine is a software implementation of the real hardware. This requires virtualization software running on the host platform like Virtualbox or Vmware.

A live version runs entirely from memory which may or may not have persistence. Some default live USB distributions use a FAT32 partition with the persistent storage being basically a file and therefore the reason for the 4GB limit. Most let you create an additional linux partition so you can increase the storage space. tails is designed as a live distribution that has the capability to have an encrypted persistent storage.

No reason why you can not install a regular distribution to the USB drive.

https://en.wikipedia.org/wiki/Compar...ation_software
 
Old 08-15-2015, 02:52 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,993

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
What I do and suggest that you do is to make a real install to this 128G drive just as if it were a normal hard drive. Then install any old VM you want and run any old distro as a client under it.

The problem with the live to usb plus persistence is the fact that you can't modify the kernel. It's locked in the squashfs image.
 
Old 08-15-2015, 03:46 PM   #6
redneck_wizard
LQ Newbie
 
Registered: Aug 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
So in theory I could install a distro to my USB just like I would on an HDD. You mention installing a VM. Does that mean on the host machine or can I install it on the USB with the linux distro? Further more, is there a format I can use that will allow linux to be able to use the full 128GB of the USB that will still be visible to Windows in order to run the VM?

I know this is kind of specific, specially for a newb. But I appreciate the insight.
 
Old 08-15-2015, 04:02 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,730

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
A regular distribution will use the entire flash drive space. I believe jefro was referring to installing a regular distribution then a vm on the flash drive. However, I do not know why you need a VM.
 
Old 08-15-2015, 04:06 PM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,533

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
The 4GB limit with persistence is just using FAT32 as a filesystem. If you use a Linux filesystem, you can set the size. As suggested above, if you have a 128GB drive, do a full install in the normal way to the USB. You might have problems if you install proprietary drivers but otherwise you should be able to boot on most computers.
 
Old 08-15-2015, 04:13 PM   #9
redneck_wizard
LQ Newbie
 
Registered: Aug 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
A regular distribution will use the entire flash drive space. I believe jefro was referring to installing a regular distribution then a vm on the flash drive. However, I do not know why you need a VM.
It is my intent to run linux from within a windows machine without having to boot into linux. I'd like to just be able to plug the usb into any windows based PC that supports visualization and be able to have my linux run in a VM. Not sure if it is possible, but it would be the ultimate go anywhere OS that I can keep all of my files setting and security features with me.
 
Old 08-15-2015, 04:17 PM   #10
redneck_wizard
LQ Newbie
 
Registered: Aug 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
The 4GB limit with persistence is just using FAT32 as a filesystem. If you use a Linux filesystem, you can set the size. As suggested above, if you have a 128GB drive, do a full install in the normal way to the USB. You might have problems if you install proprietary drivers but otherwise you should be able to boot on most computers.
I get fat32 is what is limiting the size of files. But the format linux uses is EXT4, which windows does not recognize natively. That makes it so the USB will not be recognized in a Win environment correct?
 
Old 08-15-2015, 09:53 PM   #11
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,533

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
I don't see how it would be much more advantageous to use virtual software to run Linux than to do an actual install to a flash drive. You would still boot within the virtual software.

No windows doesn't recognize Linux filesystems but that isn't really relevant if you are using VirtualBox or other virtual software to run Linux with a windows host.

Last edited by yancek; 08-15-2015 at 09:57 PM.
 
Old 08-15-2015, 10:06 PM   #12
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,993

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
"in theory I could install a distro to my USB just like I would on an HDD."

Almost all modern distro's treat a USB just as if it were an internal hard drive. Your installer can't even tell the difference. You can bork your computer if you don't remove data or power to internal drives. I go so far as to use a VM to create USB flash drives cause I'm just that lazy.

It will consume as little room on the drive as you set or as much as you set to use. I just use the entire drive in almost all usb flash cases. The reason is you are going to use it for VM's. A VM puts it's virtual hard drive on the linux drive (generally in your home sometimes hidden slightly).
 
Old 08-15-2015, 11:06 PM   #13
redneck_wizard
LQ Newbie
 
Registered: Aug 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
Ok so we've gotten that I can install linux on a usb. Would I need to make a separate NTFS partition to install virtual box or VMware so I can start the visualization in a Win environment? Remember the point is to be able to run the OS from any Windows machine that can support visualization without having to install VM software onto that host machine.
 
Old 08-16-2015, 07:37 AM   #14
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,533

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
Quote:
Would I need to make a separate NTFS partition to install virtual box or VMware so I can start the visualization in a Win environment?
If you are going to be using a windows system as the host for the virtual software, it will already be on an ntfs partition and VirtualBox or VMWare will need to be installed within windows.

Quote:
Remember the point is to be able to run the OS from any Windows machine that can support visualization without having to install VM software onto that host machine.
I'm not sure how you expect to run Linux or any OS in virtual software without installing the virtual software. If you put the system on a flash drive correctly, you should be able to boot and run it from most any computer. I'm not sure why you want virtual software.
 
Old 08-16-2015, 08:35 AM   #15
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
I just googled this kind of thing (taking a Linux VM with you to run under Windows) as it sounds interesting and I found a few results like this:
http://www.howtogeek.com/188142/use-...Speed=noscript
So, I haven't tried it but it looks like what I think is being asked for here.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Best Linux Distro to Run from RAM, persistent, and with easy copy-paste FM? NetLinux Linux - Newbie 21 01-02-2012 12:22 PM
[SOLVED] Possible to have a Persistent USB Distro run using Qemu? flipjarg Linux - Newbie 8 03-23-2011 07:45 PM
Hello :) I'm new to Linux and I'm trying out a Persistent Bootable Ubuntu USB Drive! nate_rio LinuxQuestions.org Member Intro 0 04-30-2010 04:23 PM
Can Mandriva 2009 boot from USB and run persistent? linus72 Mandriva 2 11-07-2009 09:55 PM
Can I install 3,4 persistent linux in usb memory? miros84 Linux - Software 2 08-22-2009 04:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration