LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Running linux live from a usb drive (https://www.linuxquestions.org/questions/linux-general-1/running-linux-live-from-a-usb-drive-740645/)

chuffer 07-16-2009 07:15 PM

Running linux live from a usb drive
 
ive been looking around the net on tutorials on how to do this but everything ive been coming up with is how to boot linux from a thumbdrive.
what im hoping to do is run linux from the thumbdrive in a window inside whatever os im running.
so basically i am wondering if this is possible and what steps id have to take to achieve it

linus72 07-16-2009 07:22 PM

Welcome to LQ!

i think you mean run linux from usb in windows while running windows?
maybe no...

i think you mean run linux from usb in windows while running windows?
maybe YES!
via qemu

interested in virtual linux qemu
runs from usb/hd/cd
on windows and linux

can be read-only via iso or as REAL system via partitioned qemu-img

I'm the Maker, let me pat myself on the back...:)
Others have made them that run only on windows, but mine runs on both very fast and
got kvm for linux part too

that'll be $49.95 dude for that


LOL, just joking

I don't think you can run linux in windows without qemu or other virtual machine?

if interested in portable-qemu I 'll drop link and where to get portable-kqemu for Dindows too:)

chuffer 07-16-2009 07:43 PM

yeah, running linux while running windows, much like in vm is what i was hoping to acheive.

im definitely interested in portable-qemu for windows and linux so a link would be sweet.


i was thinking of using a portable version of vm but this thought just came to me today and had only started searching around after i put this post up.

linus72 07-16-2009 08:03 PM

OK...mmmm I'm real bad about writing good how-to's dude:)

it's a long story....

however, assuming you already know how to make multiple partitions and install linux
then we're good to go...

there are in all I think 6 scripts in portable-qemu
make_vhd.sh (to make a qemu-img, of whatever size, raw, unformatted or partitioned, a blank)

make_vhd.bat (for windows)

install.bat
install.sh ( for booting a distro off iso image to either install or run read-only)

run.sh
run.bat ( for running distro off installed qemu-img rw or read-only as a real distro runs)

imitates a real os exactly except it's virtual

i can even access my real cdrom/usb/hd thru portable-qemu
meaning it's a hacking tool, not for those of unethical intentions, dig?

this is THE portable VM dogpound

so, here is the scripts now, before you edit them
you must edit them 1st!

make_vhd.sh

Code:

#!/bin/sh
# $Id: Invoke Portable-Qemu to make a VHD.
# 05/13/09 Exp root $
# -------------------------------------------------------------------------
# Purpose:
#  To have the ability to install Slackware 12.2 DVD to a raw VHD and have
#  it run as an installed OS from USB or a folder on your Desktop in both
#  Linux and Windows!
# Needed:
#  Portable-Qemu, SlackDVD, and slk_run.sh/.bat
# Author:
#  Bryan Starr <thepenandpaper@gmail.com> 05/13/09
# -------------------------------------------------------------------------


./qemu-img create edit_name_and_size 0M

there you see edit name if name is "myvhd" and size is 200mb
it would be

Code:

./qemu-img create myvhd 200M
dig?

install.sh

Code:

#!/bin/sh
# $Id: invoke Portable-Qemu, boots multiple instances of Linux 
# playing on Qemu root Exp root $
# -------------------------------------------------------------------------
# Purpose:
#  To have the ability to play Linux(various) on Portable-Qemu
#  From USB, within another Virtual system, and/or out
#  of the folder on your Desktop!
# Author:
#  Bryan Starr <thepenandpaper@gmail.com> 06/29/09
# -------------------------------------------------------------------------


for num in 1; do
    qemu/qemu -L qemu/ qemu/kvm -no-kqemu -soundhw all -localtime -m 256 -boot d -cdrom name_of_isoimage.iso -hda qemu/name_of_image &
    sleep 1s
done

note again the edits

Code:

-m 256 -boot d -cdrom name_of_isoimage.iso -hda qemu/name_of_image
edit for memory and name of iso and hd name IN qemu folder

Code:

-m 256 -boot d -cdrom my.iso -hda qemu/myvhd
dig?

run.sh

Code:

#!/bin/sh
# $Id: invoke Portable-Qemu, boots multiple instances of Linux 
# playing on Qemu root Exp root $
# -------------------------------------------------------------------------
# Purpose:
#  To have the ability to play Linux(various) on Portable-Qemu
#  From USB, within another Virtual system, and/or out
#  of the folder on your Desktop!
# Author:
#  Bryan Starr <thepenandpaper@gmail.com> 06/29/09
# -------------------------------------------------------------------------


for num in 1; do
    qemu/qemu -L qemu/ qemu/kvm -no-kqemu -soundhw all -localtime -m 256 -hda qemu/name_of_image &
    sleep 1s
done

again, this time it's booting FROM the qemu-img as a hd

Code:

-m 256 -hda qemu/myvhd
qemu will only let you use 1/2 ypour real memory
so if you got 512mb ram
give qemu as mjuch as 250 maybe or it won't run

where it says
for num in 1; do

if you change that to
for num in 1 2 3; do

you'll get 3 qemu's pop up!

here's portable-qemu! 2mb
( http://multidistro.com/downloads/iso...le-Qemu.tar.gz )

some distro's don't work
like debian and ubuntu

you want to use light window managers
no gnome, no kde, sorry
itll run slow
holler if you need help:)

chuffer 07-16-2009 08:26 PM

thanks man, i should be able to get it working with what you gave me

its been a while since ive done anything in-depth with linux so this will be a nice refresher. ill let ya know how things turn out but it may be a few days before i get enough free time to work on it. much appreciated, and dont worry, im not one to hack for malicous reasons, actually going for the ethical hacker cert later this year :)

linus72 07-16-2009 08:37 PM

cool

dsl-4.4.10 full hd install(not MyDSL), using single user
using bootcode dma=on
boots fastest I have seen at 35sec to desktop
on 1.8 ghz 768mb ram amdXP 2200+ PC

2nd fastest may be browserpuppy49 frugal or tinycore-2.1+
with opera, flash10, etc lite apps (tcz's)

big ole slack with xfce4 is pretty slow...too bad:(

lumak 07-16-2009 09:08 PM

http://www.linux-live.org/... I haven't tried this yet but it looks like tutorials and information can all be found there. This will make a bootable linux flash drive or cd... your bios would have to support booting from usb.

QEMU has a stand alone version that works in both windows and linux supposedly.


All times are GMT -5. The time now is 10:56 AM.