LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-07-2017, 12:09 PM   #1
Eliijah
LQ Newbie
 
Registered: Aug 2017
Posts: 29

Rep: Reputation: Disabled
How to run Debian from USB independently of the host operating system with out virtualbox


Run Debian from USB independently of the host operating system with out virtualbox



Hi, Im tying to install Debian on an USB. The idea is eventually to run debian->virtualbox->whonix. However I have run in to some problem already trying to make debian work on its own.

I have tried all sort software just trying to figure out whats going on: rufus, win32 diskimager, dotnetimager, UNibootin and linux live usb creator (and i used a iso image obviously).

But im not sure what im getting on my usb drive when running the programs (and haven't dared flowing trough) is it just files that can be installed on a computer much like using a cd rom? Resulting in the possibility to run Debian or windows on the computer with no involvement from the usb what so ever? Or will Debian replace the original operating system? Or are the programs/files supposed to enable Debian to run from the usb with no involvement from the original operating system? The later is what i what to achieve.

What I have succeeded doing so far is to run Debian on a vitual box using "linux live usb creator". However Im not sure this is the right way. And I did not expect this outcome when I used "linux live usb software" I believed that i would be possible simply to start Debian from the USB drive in windows with out a virtualbox or any other device. and that might have bin an insane assumption from an educated person perspective.

From what i read it seams to takes some kind of "booting" once Debin finally is install on the usb and that seems to imply choosing the operating system one wants when starting the computer: Ether windows that is situated on the host computer or Debian that is situated on the USB. Or perhaps thats wrong altogether...

So I guse my my question is what options there is give my objectives and how to get there. I whant Debian to run independently of the original operating system from the usb. Pleas keep in mind that I want debian->virtualbox->whonix eventually.

Thanks a lot. I have spent all day trying to figure this out.

Last edited by Eliijah; 08-07-2017 at 01:05 PM.
 
Old 08-07-2017, 12:21 PM   #2
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
You either boot to Debian [a GNU/Linux operating system] or boot to Windows.
You do not boot to one OS from another unless it is in a virtual machine.
That dealt with:
If you install a "Live" version of Linux onto a USB stick that allows you to choose it within BIOS or UEFI and load up that operating system. You then run it without the ability to save any changes to the operating system.
If you boot to a "Live" USB or an installation USB you can, then, plug in another USB drive and install Linux to that.

It may be worth doing a bit more research?
 
Old 08-07-2017, 12:31 PM   #3
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Do you have a CD or DVD writer and a suitable CDR or DVDR? If so, then you may find it much easier and less confusing to download and burn the Debian netinst iso to a CD and boot from that. This will avoid your confusion with rufus and such. Just burn the iso to disc and then boot up that disc.

After booting up the netinst installer, choose manual partitioning and create just one partition on your USB stick. Delete any existing partitions, and just create one. It doesn't need to take up the full size - 4GB in size will be enough if you choose the XFCE4 desktop environment software suite. Do not create a swap partition (this will make your life complicated for your later ideas of virtualbox etc).

The Debian partitioner will ask you if you really want to continue without creating a swap partition. You do indeed.

When it gets to the part about installing the GRUB bootloader, install onto the USB drive (probably /dev/sdb). Install to the drive itself, not the partition you just created (/dev/sdb, not /dev/sdb1).
 
Old 08-07-2017, 12:56 PM   #4
Eliijah
LQ Newbie
 
Registered: Aug 2017
Posts: 29

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by 273 View Post
You either boot to Debian [a GNU/Linux operating system] or boot to Windows.
You do not boot to one OS from another unless it is in a virtual machine.
That dealt with:
If you install a "Live" version of Linux onto a USB stick that allows you to choose it within BIOS or UEFI and load up that operating system. You then run it without the ability to save any changes to the operating system.
If you boot to a "Live" USB or an installation USB you can, then, plug in another USB drive and install Linux to that.

It may be worth doing a bit more research?



To be hones I just want it to work. With my prior knowledge cant understand it in depth any way.

I think the later is right. Not being able to make save changes means that its not possible to save stuff in the operating system I guess? With that option excluded I dont even have to know what BIOS or UEFI is (not right now any way).

Im not sure what boting means however a definition that is accurate in this context would be much appropriated. Is it just choosing operating system i various situations? Its used all the time i different context with no consistency to me.

What you mention as the last option brinks this to mind:
https://tails.boum.org/install/win/usb/index.en.html

So i guise that is exactly what I what to do with Debian! Im surprised i have came across this solution. But in detail how is it done?

And once its i place I will be abel "boot" to Debian that is on the usb drive when I start up the computer? And Debian will run independently of windows?

Last edited by Eliijah; 08-07-2017 at 01:10 PM.
 
Old 08-07-2017, 01:07 PM   #5
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
To put it very simply the BIOS or UEFI on a computer points to somethig which it is told to load into memory and start booting. I really suggest you just read about boot loaders and the like.
 
Old 08-07-2017, 01:32 PM   #6
Eliijah
LQ Newbie
 
Registered: Aug 2017
Posts: 29

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by IsaacKuo View Post
Do you have a CD or DVD writer and a suitable CDR or DVDR? If so, then you may find it much easier and less confusing to download and burn the Debian netinst iso to a CD and boot from that. This will avoid your confusion with rufus and such. Just burn the iso to disc and then boot up that disc.

After booting up the netinst installer, choose manual partitioning and create just one partition on your USB stick. Delete any existing partitions, and just create one. It doesn't need to take up the full size - 4GB in size will be enough if you choose the XFCE4 desktop environment software suite. Do not create a swap partition (this will make your life complicated for your later ideas of virtualbox etc).

The Debian partitioner will ask you if you really want to continue without creating a swap partition. You do indeed.

When it gets to the part about installing the GRUB bootloader, install onto the USB drive (probably /dev/sdb). Install to the drive itself, not the partition you just created (/dev/sdb, not /dev/sdb1).
Unfortunately i dont have a CD/DVD right now. actually I got all the files on the usb with ruffus and unetbootin with no problem. But once I started de installation file it say: permanent changes to the computer... I kind of bailed out because it seams to imply that the files are going on to my hard drive or something.

will it work to install Debian och the same usb as the installation files are on? whats going on withe procedure with two usb?

Last edited by Eliijah; 08-07-2017 at 01:34 PM.
 
Old 08-07-2017, 02:10 PM   #7
dejank
Member
 
Registered: May 2016
Location: Belgrade, Serbia
Distribution: Debian
Posts: 229

Rep: Reputation: Disabled
If you want live persistent usb with Debian, you should follow certain procedure. Here are some links that describe it:

https://debian-live.alioth.debian.or...al.en.html#556

https://www.linux.com/blog/creating-...ce-non-techies
 
Old 08-07-2017, 02:27 PM   #8
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Quote:
Originally Posted by Eliijah View Post
Unfortunately i dont have a CD/DVD right now. actually I got all the files on the usb with ruffus and unetbootin with no problem. But once I started de installation file it say: permanent changes to the computer... I kind of bailed out because it seams to imply that the files are going on to my hard drive or something.

will it work to install Debian och the same usb as the installation files are on? whats going on withe procedure with two usb?
You have gotten the installer on one USB drive. That is good. In that case, you do not need to worry about a bootable CD.

You still need a different drive to install Debian onto. If you're clever and you know what you're doing, you might be able to split things up on that one USB drive in order to install Debian into the free space. However, you are a novice at this so this is probably not worth the effort of even trying.

The simplest thing is to get a second USB drive to install Debian onto. You do not need to be scared about the permanent changes. You can avoid all changes to the internal hard drive in two possible ways:

1) If you know how to physically remove the hard drive, you can simply physically remove it before doing the install. That way, you will 100% know that nothing on the hard drive will be modified!

or

2) Make sure to specify installation only to your second USB drive in the following steps:

2a) During partitioning - choose manual partitioning and create just one partition on the USB drive (probably either /dev/sdb1 or /dev/sdc1).

2b) During GRUB install - choose to install GRUB onto that USB drive (probably either /dev/sdb or /dev/sdc).

As long as you are extra careful during those two steps, you will make no modifications to your internal hard drive. It will do the install only onto the second USB drive.
 
Old 08-07-2017, 02:29 PM   #9
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Quote:
Originally Posted by dejank View Post
If you want live persistent usb with Debian, you should follow certain procedure. Here are some links that describe it:

https://debian-live.alioth.debian.or...al.en.html#556

https://www.linux.com/blog/creating-...ce-non-techies
A live persistent USB is NOT the desirable thing for this use case. The original poster wants to do a traditional install - a hard drive style install - onto a USB drive. This is for purposes of converting into a VM, so a simple traditional install is the best. No need to get into a liveCD style install.
 
Old 08-07-2017, 02:35 PM   #10
dejank
Member
 
Registered: May 2016
Location: Belgrade, Serbia
Distribution: Debian
Posts: 229

Rep: Reputation: Disabled
Quote:
Originally Posted by IsaacKuo View Post
A live persistent USB is NOT the desirable thing for this use case. The original poster wants to do a traditional install - a hard drive style install - onto a USB drive. This is for purposes of converting into a VM, so a simple traditional install is the best. No need to get into a liveCD style install.
Ahh, sorry, misunderstood him, thought that he wants USB live with persistence enabled.
 
Old 08-07-2017, 02:53 PM   #11
Eliijah
LQ Newbie
 
Registered: Aug 2017
Posts: 29

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dejank View Post
If you want live persistent usb with Debian, you should follow certain procedure. Here are some links that describe it:

https://debian-live.alioth.debian.or...al.en.html#556

https://www.linux.com/blog/creating-...ce-non-techies
Thansk alot but I stoped right here:

In order to follow this tutorial you need:
-A machine with linux installed.

What is 273 talking about below (goes with out saying obviously that you are free to answer your self if youre around). any guide or instructions for this?

Quote:
Originally Posted by 273 View Post
You either boot to Debian [a GNU/Linux operating system] or boot to Windows.
You do not boot to one OS from another unless it is in a virtual machine.
That dealt with:
If you install a "Live" version of Linux onto a USB stick that allows you to choose it within BIOS or UEFI and load up that operating system. You then run it without the ability to save any changes to the operating system.
If you boot to a "Live" USB or an installation USB you can, then, plug in another USB drive and install Linux to that.

It may be worth doing a bit more research?
I know Tails is design to run on usb but there seams to be a very straight forward way to get it on a usb. Involving two usb and a windows computer. as solution 273 mention in tis case as well.

Is it realy that mutch more complicated with Debian witch is the operating system I whant than it is with tails?

How would virtualbox->debian->virtualbox->whonix work by the way? Would it be slow?

Last edited by Eliijah; 08-07-2017 at 03:01 PM.
 
Old 08-07-2017, 02:59 PM   #12
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
Tails runs on a live USB stick, you put the image on that and it runs from that stick. Yes, the Debian Live installer does that too.
Again, please read a little more about operating systems.
 
Old 08-07-2017, 03:02 PM   #13
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Quote:
Originally Posted by Eliijah View Post
I know Tails is design to run on usb but there seams to be a straight forward way to get ir on a usb. is it realy that mutch more complicated with Debian witch is the operating system I whant.
Tails is very different from a normal linux distribution. It is designed specifically to be a LiveCD distribution. It is purposefully designed in a way to NOT install anything or even leave any data on the computer.

But looking up Whonix, I think I misunderstand what, precisely, you want to do. What is your goal?

I thought you were intending to convert the Debian install into a VM, but after looking up Whonix I'm guessing that you actually want to run Virtualbox within the Debian install.

Okay, but first a word of warning - the performance of this will be BAD unless you're doing this with a very fast USB 3.0 drive (on a USB 3.0 port).
Quote:
how would virtualbox->debian->virtualbox->whonix work by the way? would it be slow?
It is very much not obvious what these arrows are supposed to mean. Please word what exactly you mean. I had assumed the arrows meant some sort of conversion, but now I am guessing that it actually means something about running some software on something else.
 
Old 08-07-2017, 03:06 PM   #14
Eliijah
LQ Newbie
 
Registered: Aug 2017
Posts: 29

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by 273 View Post
Tails runs on a live USB stick, you put the image on that and it runs from that stick. Yes, the Debian Live installer does that too.
Again, please read a little more about operating systems.
sure, but im sure there is a step by step guide ut there. im confident that I could work this out:
https://tails.boum.org/install/win/usb/index.en.html

I dont whant Tails by the way.
 
Old 08-07-2017, 03:12 PM   #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
Quote:
Originally Posted by Eliijah View Post
sure, but im sure there is a step by step guide ut there. im confident that I could work this out:
https://tails.boum.org/install/win/usb/index.en.html

I dont whant Tails by the way.
That's just some instructions on how to install from a USB installer to another USB drive but it's been dressed up as something special. Take some time to read about what Live USBs do, what installers do and how OSs boot and you'll find how to interpret that to install what you want how you want.
 
  


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
[SOLVED] What would be a Linux operating system that would host a BBS well? windows50plinux50p Linux - General 8 10-10-2014 09:09 AM
virtualbox won't run prog on ubutu guest mac host gav251 General 2 11-14-2013 07:16 AM
[SOLVED] Debian v6.0 - squeeze host with VirtualBox - run Windows XP as guest? larrym82 Linux - Virtualization and Cloud 6 12-26-2011 11:52 AM
[SOLVED] run linux from usb in windows without modifying host system colorpurple21859 Linux - Virtualization and Cloud 6 09-22-2011 03:05 PM
error why selecting the host operating system in the boot menu arougen02 Linux From Scratch 5 05-20-2008 10:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:31 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
Open Source Consulting | Domain Registration