LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to run Debian from USB independently of the host operating system with out virtualbox (https://www.linuxquestions.org/questions/linux-software-2/how-to-run-debian-from-usb-independently-of-the-host-operating-system-with-out-virtualbox-4175611492/)

Eliijah 08-07-2017 12:09 PM

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.

273 08-07-2017 12:21 PM

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?

IsaacKuo 08-07-2017 12:31 PM

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).

Eliijah 08-07-2017 12:56 PM

Quote:

Originally Posted by 273 (Post 5745537)
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?

273 08-07-2017 01:07 PM

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.

Eliijah 08-07-2017 01:32 PM

Quote:

Originally Posted by IsaacKuo (Post 5745545)
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?

dejank 08-07-2017 02:10 PM

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

IsaacKuo 08-07-2017 02:27 PM

Quote:

Originally Posted by Eliijah (Post 5745589)
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.

IsaacKuo 08-07-2017 02:29 PM

Quote:

Originally Posted by dejank (Post 5745613)
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.

dejank 08-07-2017 02:35 PM

Quote:

Originally Posted by IsaacKuo (Post 5745622)
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.

Eliijah 08-07-2017 02:53 PM

Quote:

Originally Posted by dejank (Post 5745613)
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 (Post 5745537)
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?

273 08-07-2017 02:59 PM

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.

IsaacKuo 08-07-2017 03:02 PM

Quote:

Originally Posted by Eliijah (Post 5745632)
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.

Eliijah 08-07-2017 03:06 PM

Quote:

Originally Posted by 273 (Post 5745636)
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.

273 08-07-2017 03:12 PM

Quote:

Originally Posted by Eliijah (Post 5745643)
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.


All times are GMT -5. The time now is 06:40 AM.