LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 03:12 PM   #16
dejank
Member
 
Registered: May 2016
Location: Belgrade, Serbia
Distribution: Debian
Posts: 229

Rep: Reputation: Disabled

What do you want, USB stick, or USB hard drive? If former, it will not save anything without persistence enabled, if you create live image on it. If later, you can install debian on it and choose during boot process to boot into it. Also, for installing debian 9, do not use live images, those are flaky in this version. Use regular installer.
 
Old 08-07-2017, 03:52 PM   #17
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
I think I've figured out what the goal is. The goal is to run Whonix, which is a privacy oriented distribution similar in spirit to Tails - but using a couple VMs instead of a LiveCD/LiveUSB.

But in order to run those VMs, there must be a host OS running VirtualBox (or one of the other supported VM hosts). The original poster wants to run VirtualBox on Debian.

Now that I understand the goals, I can explain the steps required:

1) Get a second USB drive. It's good that you have the Debian installer working on a USB drive. You need a second one to install Debian onto. Bear in mind that performance will be sluggish, so keep your expectations realistic. (Performance can be better if it's a fast USB drive using USB 3.0 and plugged into a USB 3.0 port.)

2) Boot up with the Debian installer, and do the Debian install onto the second USB drive. As I previously noted, take care during the partitioning and GRUB install steps to do this onto the second USB drive (and not the internal hard drive). I recommend making a single large ext4 partition for the OS - as big as will fit on the USB drive.

Previously, I recommended a size of only 4GB would be enough. However, your intent is to eventually run VirtualBox and host a couple VMs on it. This will take up a good deal of space. The system requirements say 10GB of free space is needed for Whonix. Debian and VirtualBox itself will take up perhaps 5GB. So, I'd go with at least 15GB and preferably more than 20GB USB drive.

When you do this install, I recommend selecting the XFCE4 Desktop Environment. This is a lot less taxing on resources than GNOME3, which is important since you'll be splitting up resources three ways (for the host OS as well as two VMs).

3) Use apt-get to install VirtualBox. You'll have to add a third party software repository for this, as detailed here:

https://wiki.debian.org/VirtualBox

Quote:
To install VirtualBox you must use the upstream third-party repository.

Add virtualbox.list to /etc/apt/sources.list.d
Code:
deb http://download.virtualbox.org/virtualbox/debian stretch contrib
Add Oracle VirtualBox public key:
Code:
curl -O https://www.virtualbox.org/download/oracle_vbox_2016.asc
apt-key add oracle_vbox_2016.asc
Install virtualbox-5.1
Code:
apt-get update
apt-get install virtualbox-5.1
4) Install Whonix ... left as exercise for the reader ...
 
1 members found this post helpful.
Old 08-07-2017, 04:14 PM   #18
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 616

Rep: Reputation: 142Reputation: 142
1. Install system to USB (stick or drive, both are suitable) as regular installation
2. Install bootloader, (GRUB).
3. Make sure your system uses initrd, it's important.
4. You system will not boot due to missed usb drivers, so, you have to boot into any other linux system, mount your USB stick and chroot into the system that installed to USB.
5. Decompress initrd, add required USB drivers to initrd and compress it again. You need two or three drivers: usb_xhci usb_ehci usb_storage or something similar, do not remember for sure. Kernel uses this drivers for mounting root partition.
6. Bootloader should point to the root partition by UUID or by Label, not as /dev/sda or /dev/sdb.
7. If you have enough RAM, pack /usr /home /lib into squashfs images, your system will boot faster and apps will start faster as well.
8. If you want to save changes you can rebuild squashfs "on-the-fly" so your changes would be reflected on next boot.

Did it few times with Slackware and with Gentoo. One of the USB Gentoo installations I using every day as a rescue system.
Unfortunately there is no ready to use "step-by-step" instruction how to install system to USB. At least I didn't find such an instruction.
But all the thing can be found on web, including this forum.

Last edited by Teufel; 08-07-2017 at 04:16 PM.
 
Old 08-07-2017, 04:24 PM   #19
Eliijah
LQ Newbie
 
Registered: Aug 2017
Posts: 29

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by IsaacKuo View Post
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).


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.

What I whant is a safe internet connection avoiding VPN providers and the risk of being the end nod in tor network (I dont want Tor if not necessary any way).

I have bin reading a bit and concluded that first installing Debian then running virtualbox in debian and running whonix in the virtualbox (whonix always runs in a VB by the way)is a god solution. Or at least its seams that way to me for various reasons. I know Tails is so posed to protect the content on the computer or some thing I presume this goes for the content on a usb drive as well. but I dont relay need to worry about that. and Im not sure I know that means ether. after all there are all sorts of ways to encrypt hard drives and so on so I dont see the advantage.

As to The problem at hand:

Im some what familiar with partition magic because I watched a fiend use it on my computer once. however I just fetched a DVD at from my kind neighbor and Im going to use that unless I rely need a usb for the iso file in order to make this work. so I start up de DVD and hoping to be able to select where I want to install the iso file. but all it say is: "begin install on this computer". Why is that? What dose it take to make the usb the destination?

Now im starting to wounder if there is some kind of iso for portable drives or some thing?

Last edited by Eliijah; 08-07-2017 at 04:28 PM.
 
Old 08-07-2017, 04:28 PM   #20
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 Teufel View Post
1. Install system to USB (stick or drive, both are suitable) as regular installation
2. Install bootloader, (GRUB).
3. Make sure your system uses initrd, it's important.
4. You system will not boot due to missed usb drivers, so, you have to boot into any other linux system, mount your USB stick and chroot into the system that installed to USB.
5. Decompress initrd, add required USB drivers to initrd and compress it again. You need two or three drivers: usb_xhci usb_ehci usb_storage or something similar, do not remember for sure. Kernel uses this drivers for mounting root partition.
6. Bootloader should point to the root partition by UUID or by Label, not as /dev/sda or /dev/sdb.
7. If you have enough RAM, pack /usr /home /lib into squashfs images, your system will boot faster and apps will start faster as well.
8. If you want to save changes you can rebuild squashfs "on-the-fly" so your changes would be reflected on next boot.

Did it few times with Slackware and with Gentoo. One of the USB Gentoo installations I using every day as a rescue system.
Unfortunately there is no ready to use "step-by-step" instruction how to install system to USB. At least I didn't find such an instruction.
But all the thing can be found on web, including this forum.
I have installed Debian onto USB many times, and never had this problem. The default Debian initrd must be sufficiently loaded with usb storage drivers that no such customization is required. I just install Debian onto a USB drive just as I would any hard drive, and it works exactly the same.

Still, the tip about using squashfs sounds like it can be useful for someone who knows what they're doing (like myself). For a novice, though, it may be more trouble than it's worth. The original poster is trying something pretty complex involving virtualbox and VMs already, so...probably not worth the trouble.
 
Old 08-07-2017, 04:50 PM   #21
Eliijah
LQ Newbie
 
Registered: Aug 2017
Posts: 29

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by IsaacKuo View Post
I think I've figured out what the goal is. The goal is to run Whonix, which is a privacy oriented distribution similar in spirit to Tails - but using a couple VMs instead of a LiveCD/LiveUSB.

But in order to run those VMs, there must be a host OS running VirtualBox (or one of the other supported VM hosts). The original poster wants to run VirtualBox on Debian.

Now that I understand the goals, I can explain the steps required:

1) Get a second USB drive. It's good that you have the Debian installer working on a USB drive. You need a second one to install Debian onto. Bear in mind that performance will be sluggish, so keep your expectations realistic. (Performance can be better if it's a fast USB drive using USB 3.0 and plugged into a USB 3.0 port.)

2) Boot up with the Debian installer, and do the Debian install onto the second USB drive. As I previously noted, take care during the partitioning and GRUB install steps to do this onto the second USB drive (and not the internal hard drive). I recommend making a single large ext4 partition for the OS - as big as will fit on the USB drive.

Previously, I recommended a size of only 4GB would be enough. However, your intent is to eventually run VirtualBox and host a couple VMs on it. This will take up a good deal of space. The system requirements say 10GB of free space is needed for Whonix. Debian and VirtualBox itself will take up perhaps 5GB. So, I'd go with at least 15GB and preferably more than 20GB USB drive.

When you do this install, I recommend selecting the XFCE4 Desktop Environment. This is a lot less taxing on resources than GNOME3, which is important since you'll be splitting up resources three ways (for the host OS as well as two VMs).

3) Use apt-get to install VirtualBox. You'll have to add a third party software repository for this, as detailed here:

https://wiki.debian.org/VirtualBox



4) Install Whonix ... left as exercise for the reader ...




The first problem seams to be to even get the installer to install on the usb. it say: "begin install on this computer" Im using a DVD now not a second USB. However im willing to get partition magi right now and divide the USB if i have to if necessary. I Have a 32 gigabyte USB by the way.

I did not realized that the virtual box would be difficult to install. Seams to be an other challenge thanks for sharing.

Last edited by Eliijah; 08-07-2017 at 05:02 PM.
 
Old 08-07-2017, 07:32 PM   #22
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,974

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
I used to make usb installs from virtualbox. Just don't add in a virtual hard drive and use usb drive attached.

A safe way to make a real install to a usb could be this way.

Use a windows live to usb installer program. (pendrivelinux.com)
Power down system and remove either power or data from internal hard drive.
Boot to the usb you created.
Install a new usb 16G or so. Best if it is fast usb 3.
Install your OS to this last usb drive following the installer.
 
Old 08-08-2017, 12:52 AM   #23
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
The first problem seams to be to even get the installer to install on the usb. it say: "begin install on this computer" ...
The USB stick is in "...this computer" so that's the option you want. The USB stick is just another hard drive in that computer as far as operating systems are concerned.
Now I understand what you are trying to achieve a 32GB USB stick may be a little small (you should probably use it as just one partition and be careful not to install too much). A USB stick also sounds far too slow for what you want to do -- I know when I used a USB3 stick it was a little slow and I didn't run a virtual machine from that.
 
Old 08-08-2017, 04:08 AM   #24
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
The first problem seams to be to even get the installer to install on the usb. it say: "begin install on this computer" Im using a DVD now not a second USB. However im willing to get partition magi right now and divide the USB if i have to if necessary. I Have a 32 gigabyte USB by the way.

I did not realized that the virtual box would be difficult to install. Seams to be an other challenge thanks for sharing.
When you say you have a DVD, what do you mean? Do you mean a DVD disc of the Debian installer? Or something else?

If you have a DVD disc of the Debian installer, then just use that. You will wipe out everything that is currently on the 32GB USB drive (which should easily be big enough for your application).

Choose manual partitioning and create just one ext4 primary partition on the USB drive. I would recommend against creating a swap partition; note that the installer will ask to confirm that you really want this. Later on, you can create a swap file if you really want it.

The install of virtual box is not difficult, it just involves some more steps. However, looking at the Whonix web site, I think maybe their KVM option might be an easier option for you:

https://www.whonix.org/wiki/KVM
https://www.whonix.org/wiki/KVM/Inst...on_Screenshots

In either case, the steps for installing whonix will likely be the most complex part.

The current version of Debian is Debian Stretch (Debian 9), so the instructions say to install kvm with:

Code:
apt-get install qemu-kvm libvirt-daemon-system libvirt-clients virt-manager
One annoying thing - the whonix instructions assume an Ubuntu style set up of "sudo", whereas Debian does not install sudo by default. In order to deal with this, simply use "su" to log in as root within a terminal console, and everywhere you see instructions with "sudo" ignore the "sudo".

For example, if you see:

Code:
sudo apt-get install foobar
simply do this instead:

Code:
apt-get install foobar
Optionally, you could instead set up sudo in an Ubuntu-like way. With the current Debian installer, one way to do this is to NOT provide a root password during the installation steps requesting this. This will set things up in an Ubuntu-like way. Or you can do a traditional Debian install and ignore "sudo". Either way, it's just one more annoying thing you'll have to keep in mind due to the way the whonix documentation is done.
 
Old 08-08-2017, 04:39 PM   #25
Eliijah
LQ Newbie
 
Registered: Aug 2017
Posts: 29

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by IsaacKuo View Post
When you say you have a DVD, what do you mean? Do you mean a DVD disc of the Debian installer? Or something else?

If you have a DVD disc of the Debian installer, then just use that. You will wipe out everything that is currently on the 32GB USB drive (which should easily be big enough for your application).

Choose manual partitioning and create just one ext4 primary partition on the USB drive. I would recommend against creating a swap partition; note that the installer will ask to confirm that you really want this. Later on, you can create a swap file if you really want it.


I have a DVD with the iso image. however when start up the cd rom intending to install on the F drive where my usb is that is not an option. It only say "being install on this computer". Its not possible to select where to install files.

How ever Im starting to wounder if its realy the iso file that sould be on the dvd (when flowing the procedure you suggested).

I actually stated out using the disk image programs (the I did not realize the need for two "hard drives" when starating up the installation files at that point) what I got om the usb when I used it was not the iso file but a lot of different files. I guess this is the installation files.

So right now I think what I should do is to run the iso fil in the disk imager have usb as my destination folder. Then simply copy paste it to my regular hard drive. And then make a dvd with the installation files not the iso file. And finally start up the installation from the dvd and select the usb drive as the destination folder.

Edit: Just did it and its exactly the same as when using the iso file. Every thing seems to work installation is starting up but I cant select what drive to install to. Is that an option that comes later in the installation process? "being install on this computer" sound kind of finale.

Last edited by Eliijah; 08-08-2017 at 06:05 PM.
 
Old 08-08-2017, 06:01 PM   #26
Eliijah
LQ Newbie
 
Registered: Aug 2017
Posts: 29

Original Poster
Rep: Reputation: Disabled
I looked in to this guide:

https://www.pendrivelinux.com/debian...-from-windows/

They dont mention any thing about installation just get the iso fil on the usb with Win32 DiskImager (i use ruffus by the way)

Then as step 6:

6. A progress bar will indicate the progress of the write. Once it has finished, simply reboot your PC and set your BIOS or Boot Menu to boot from the USB Device

I have absolutely no idea what means am I missing something fundamental in the installation process that is implicit?

Last edited by Eliijah; 08-08-2017 at 06:22 PM.
 
Old 08-08-2017, 06:44 PM   #27
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
You can rsync an HDD install to the stick and install grub on the stick. Just change the /etc/fstab and the bootloader to know it's new location.

Otherwise I tend to do a debootstrap install method. Be sure to install a bootable kernel in the chroot and set a root password or it's pretty useless even if you could boot it. The advantage of the debootstrap route is that you can install network drivers and firmware from a running distro before you ever boot it up. Since you can spam a key and boot from another device (usb) I almost never boot the storage device that comes with the systems I buy. Or need to do anything with that space until I've made a good backup, if ever. With usb 3 and a decent speed usb storage device, it's pretty functional. As long as you cycle through new media enough to cover paranoid trust like issues. A new stick once every 3 to 6 months keeps me calm.
 
Old 08-08-2017, 07:03 PM   #28
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 looked in to this guide:

https://www.pendrivelinux.com/debian...-from-windows/

They dont mention any thing about installation just get the iso fil on the usb with Win32 DiskImager (i use ruffus by the way)

Then as step 6:

6. A progress bar will indicate the progress of the write. Once it has finished, simply reboot your PC and set your BIOS or Boot Menu to boot from the USB Device

I have absolutely no idea what means am I missing something fundamental in the installation process that is implicit?
Ignore that how-to. It is about "Debian Live", not the Debian installer. The netinst Debian installer is here:

https://www.debian.org/CD/netinst/

If you're not sure which architecture to get, use amd64. (If you have a 32 bit CPU, then you'd need to use i386 instead of amd64 - but this is a waste of time because you won't be able to get VMs working on a 32 bit CPU.)

"Debian Live" are Debian LiveCDs, which are different from the official Debian installer. You won't be able to set up a decent VM host with a LiveCD style install.

Last edited by IsaacKuo; 08-08-2017 at 07:08 PM.
 
Old 08-08-2017, 07:04 PM   #29
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 have a DVD with the iso image.
Which iso image? It does not sound like you have gotten the Debian installer.
 
Old 08-08-2017, 07:06 PM   #30
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 Shadow_7 View Post
You can rsync an HDD install to the stick and install grub on the stick. Just change the /etc/fstab and the bootloader to know it's new location.

Otherwise I tend to do a debootstrap install method.
This won't work for the original poster because he has no working linux install whatsoever. He only has Windows on the hard drive, and is unfamiliar with how to install linux or even where to get an iso for an actual linux installer. There is no HDD install to rsync from, nor is there any working linux install to run debootstrap from.
 
  


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 06:40 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