LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-02-2011, 07:49 PM   #1
flipjarg
Member
 
Registered: May 2010
Distribution: Debian & Backtrack
Posts: 58

Rep: Reputation: 2
Question Possible to have a Persistent USB Distro run using Qemu?


Hello! today I setup a USB drive to use Qemu to boot Backtrack. It was so easy my grandma could do this! My thanks goes out to anyone who worked on the Qemu project!

Now, I am wondering, how hard it is to get a distro to run persistently, using Qemu. I would like to have my .bashrc, apps I install, small scripts I write, etc. saved instead of the default bootup each time.

It doesn't matter which distro it is as long as it is Debian based. I did find this thread which I will try later but it sounds almost like I need to boot from USB first... not quite sure. I was hoping I could get further insight from someone before I waist too much time working toward something that will not happen.

Thank you for any input!

Last edited by flipjarg; 02-04-2011 at 09:34 PM.
 
Old 02-02-2011, 11:12 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
QEMU is just an emulator, you can run whatever software you want in it. If it is a distribution that saves changes to the drive, than that would be reflected in the image (or actual USB device, if you are doing it that way). It is just a matter of finding a live distribution that offers persistent settings on USB.
 
Old 02-03-2011, 08:00 AM   #3
flipjarg
Member
 
Registered: May 2010
Distribution: Debian & Backtrack
Posts: 58

Original Poster
Rep: Reputation: 2
I thought that should be the case. Yesterday I noticed that Backtrack has the option to boot a persitent CD. However, it doesn't work. I just dropped the ISO into the folder with Qemu on my USB. All of the settings are default. I would guess I need to make a partition to hold the changes. From what I have read a casper-rw partion. Correct?

Everything I find about running a persistent on a USB refers to booting from the BIOS. So it really doesn't matter if I boot from the bios or not, does it? As long as I have that -rw partition.

The only problem is that I need Windows to recognize the file system on the USB. FAT/FAT32 is what I will try first.

Last edited by flipjarg; 02-03-2011 at 08:12 AM.
 
Old 02-03-2011, 04:56 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,374

Rep: Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198
It is easy to either create a persistent feature with most disto's or simply install the distro to a virtual hard drive. The same way one runs an iso in qemu would be the way one runs a virtual hard drive.

If you don't want to use normal text file to create a qemu batch then one could easily use qemumanager for windows. It would not need installing either. It is a gui for making batch files and they made it easy to create and use almost every aspect of qemu on windows. It is about as easy as it gets.

If you want to create a persistence then two ways would be used. One is that the disto has a live feature and it has a way to save data to a floppy. Second is that one uses the same persistent file that a live usb would use but corrects for the path in qemu.

Persistence in usb is normally how one merges a casper file with the fused file. It has nothing to do with bios.

One can usually boot to a real drive in qemu. Something like -hda \\.\\e: or similar is used. May be be different but check on that.
 
Old 02-03-2011, 05:47 PM   #5
flipjarg
Member
 
Registered: May 2010
Distribution: Debian & Backtrack
Posts: 58

Original Poster
Rep: Reputation: 2
So, since the ISO has an option in the boot menu to run as a "persistent cd" I pretty much just need to make sure the batch file is starting/running Qemu in a way that will allow the distro to run as persistent?
 
Old 02-03-2011, 10:16 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,374

Rep: Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198
Sure but it would be better to either get a distro on a pre-made VM or other image or simply install from the ISO to a cqow2 formatted virtual filesystem. It would be like installing any normal os.

On qemu you would have to re-edit the batch file after your first install as you would have had the -boot d option. Then remove it and if you want remove the ISO.

There is no need to fool with a persistence when you can make a real install to a virtual machine.

Once you try it you will see what I mean. Just look at the batch file that you have for the deal you booted to. It is a simple text file that tells qemu how to boot.

But qemu manager makes it even easier.

Last edited by jefro; 02-04-2011 at 11:00 PM.
 
Old 02-04-2011, 09:33 PM   #7
flipjarg
Member
 
Registered: May 2010
Distribution: Debian & Backtrack
Posts: 58

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by jefro View Post
Sure but it would be better to either get a distro on a pre-made VM or other image or simply install from the ISO to a qemu2 formatted virtual filesystem. It would be like installing any normal os.

On qemu you would have to re-edit the batch file after your first install as you would have had the -boot d option. Then remove it and if you want remove the ISO.

There is no need to fool with a persistence when you can make a real install to a virtual machine.

Once you try it you will see what I mean. Just look at the batch file that you have for the deal you booted to. It is a simple text file that tells qemu how to boot.

But qemu manager make it even easier.
The egg just cracked! I get it! Not sure why it didn't strike me to just install the distro on a virtual machine! I am new to the virtual machine and USB linux world. Thanks for the help!
 
Old 03-18-2011, 02:55 PM   #8
Maverick918
LQ Newbie
 
Registered: Mar 2011
Posts: 3

Rep: Reputation: 0
Hey Flipjarg,

Can you write out a little tutorial on using QEMU to boot backtrack 4 off of USB with persistence? Ive searched all day for a working tutorial. I would really appreciate it.
 
Old 03-23-2011, 08:45 PM   #9
flipjarg
Member
 
Registered: May 2010
Distribution: Debian & Backtrack
Posts: 58

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by Maverick918 View Post
Hey Flipjarg,

Can you write out a little tutorial on using QEMU to boot backtrack 4 off of USB with persistence? Ive searched all day for a working tutorial. I would really appreciate it.
Here is what I did... since i couldn't get the backtrack ISO to work persistently:

1 - Download Qemu Manager (which can be installed on your USB)
2 - Create a Virtual Machine which will boot from the ISO and make sure the virtual drive has at least 4GB or 5GB of free space.
3 - Boot up the Virtual Machine
4 - Install backtrack
YOu can really do this with any distro you want. Hope this helps.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Can Mandriva 2009 boot from USB and run persistent? linus72 Mandriva 2 11-07-2009 10:55 PM
Special Edition DSL-SE-Embedded-4.4.10 USB with Persistent Qemu for Linux/Windows linus72 DamnSmallLinux 3 04-21-2009 05:56 AM
Distro to run from usb yuchankit Linux - Distributions 13 02-22-2009 03:45 AM
Needed - Distro that supports wireless internet, ability to run from 8 GB USB drive PenguinnPower Linux - Distributions 10 12-27-2008 09:34 AM
persistent fs mounts between linux usb-boot and qemu guest on windows? stairwayoflight Linux - Software 0 01-11-2007 04:14 AM


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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration