LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 11-23-2013, 03:43 AM   #1
funkypunkypinkypow
LQ Newbie
 
Registered: Nov 2013
Posts: 17

Rep: Reputation: Disabled
Linux install on usb


Hello,
Please how do I install Linux on a usb? I don't want a live USB I know how to make a live USB with casper or persistence partiton I want to install a distro on my USB let's say I wanna install Kali on an 16 Gb flash USB, is it possible? and how? or install Luna on an 8Gb USB for my friend to use Linux and change his mind about linux and go from Windows to Linux
Thank you in advance
 
Old 11-23-2013, 04:10 AM   #2
cmj141
LQ Newbie
 
Registered: Oct 2013
Location: Scranton, PA. USA
Distribution: gentoo
Posts: 12

Rep: Reputation: 1
It's the same as you would install it on a hard drive. Partition it and install. I have my gentoo system on a 15gb. However depending on the usb stick you may need to add 'rootdelay=' and add a number like 7 to the kernel command line. Some usb sticks need the extra time to load else you'll get a kernel panic. Also you might want to use tmpfs to prevent less writing to the usb stick where possible. Usb sticks can die quick after so many writes. Don't be intimidated. It's easy.
 
1 members found this post helpful.
Old 11-23-2013, 04:40 AM   #3
bknapek
LQ Newbie
 
Registered: Dec 2009
Distribution: Slackware
Posts: 18

Rep: Reputation: 1
You may also need to setup initrd with modules needed to detect your USB storage.
 
Old 11-23-2013, 06:19 AM   #4
floppy_stuttgart
Senior Member
 
Registered: Nov 2010
Location: EU mainland
Distribution: Debian like
Posts: 1,153
Blog Entries: 5

Rep: Reputation: 107Reputation: 107
I have installed TinyCoreLinux on an usb, adapted for diverse pc:
- hp6910
- asus.. )each time a different grub line command in the grub menu).
I would recommend a distro which runs in RAM and dont write into the usb in order to avoir a wear.
A full distro running in RAM? I would suggest you start with knoppix.
Smaller (but a bit hard core=with more knowledge) ? install TinyCoreLinux
Others? perhaps. But dont know. Other users should suggest something here.
 
Old 11-23-2013, 04:28 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,985

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
There are many ways. This example assumes two things. Modern computer and modern linux. I'd think both of your choice may work but as noted above might be extra work.

I suggest this.

Power down computer and remove ac plug and then press power button a few times. Remove power to hard drives so you can't possibly make a mistake on this.

Put in USB drive and boot to bios. See if the usb shows up as a HARD DRIVE option. Usually this step isn't need.

Boot to cd/dvd and install your OS just as if it were a real hard drive install. The flash drive ought to be seen correctly by the installer. Note, use usb 2.0 and not 3.0 port.

Finish install and reverse computer to go back to normal.

Test boot using F key or boot options.
 
1 members found this post helpful.
Old 11-24-2013, 03:11 AM   #6
fenario
Member
 
Registered: Apr 2013
Posts: 46

Rep: Reputation: Disabled
yes as jefro says your install cd will be forced to see the USB flashdrive as the only option.
some distros will give you all optional drives and partitions from the start but some I tried did not. I've done jefro's way and it worked well adn it did a FULL install on the flashdrive.

or following floppy from Schtueggert you could try a puppy-linux distro:
http://www.puppylinux.com/download
and install with unetbootin which then will show you the option to run it in RAM
the whole system is only less than 200 GB big so 512 MB RAM will suffice
yet puppy is a very comprehensive system and lacks in nothing
 
Old 11-24-2013, 03:19 AM   #7
fenario
Member
 
Registered: Apr 2013
Posts: 46

Rep: Reputation: Disabled
appendix
puppy has it's own installation-application (on-external-flashdrive is one of the install options)
frugal is the RAM option mentioned by floppy_stuttgart
full is the option you are talking about funkypunkypinkypow
 
Old 11-25-2013, 03:25 PM   #8
bashscript
LQ Newbie
 
Registered: Nov 2013
Posts: 6

Rep: Reputation: Disabled
Substituting a USB as a hard drive to run linux is not a great idea and it will be very, very slow. I know because I've done that before. However, a 32GB SSD drive would be a better option and the reads and writes will be faster than a USB stick.

If you still want to use a USB stick as your hard drive, get a 3.0 USB stick if you have a USB 3.0 port or get a Class 10 SD card which is pretty fast.

Good Luck and welcome to LQ!

Last edited by bashscript; 11-25-2013 at 03:26 PM.
 
1 members found this post helpful.
Old 11-25-2013, 08:55 PM   #9
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,985

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
You'd only notice slow performance on a very very poor usb flash or some instance where it failed to go to usb 2.

Still some issues with usb 3.0.

In all cases, the usb flash that you have may also have some unique issues. Big name brands tend to be fully working. Grey market and off brands may be trouble.


I almost always use full normal installs to a usb now. I do use a virtual machine however to prevent any accidents on main system.

Last edited by jefro; 11-25-2013 at 08:57 PM.
 
Old 11-26-2013, 09:50 PM   #10
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 814

Rep: Reputation: 265Reputation: 265Reputation: 265
I agree with jefro, turn off everything and UNPLUG YOUR HARD DRIVES. I know from experience that at least some distros automatically select a hdd over a usb, regardless if there is already another OS installed. Then, you might have to temporarily tweak your BIOS so that it doesn't look for a hdd where it used to find one. Then boot from liveCD/whatever you use to install, and install away!
 
Old 11-26-2013, 11:32 PM   #11
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
Originally Posted by maples View Post
I know from experience that at least some distros automatically select a hdd over a usb, regardless if there is already another OS installed.
I overcame that problem by using update-grub or grub-install & fixmbr.
 
Old 11-27-2013, 11:47 AM   #12
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
i installed fedora on my 32 gb usb flash drive because my acer revo has all 4 partitions dedicated to windows for some reason (and i didnt want to delete the wrong one).

it was the same exact procedure to install to the internal hard drive except i needed 2 usb flash drives. i had a 2 gb one laying around so i created a live-usb with it and booted up. i clicked on install-to-harddrive icon to start the install and when it got to the partitioning step i selected the other usb drive from the dropdown menu (i think it was listed as sdc).

logically speaking it wouldnt matter if the hard drive is internal/external, a camera, mp3 player, dvr, fone, ... as long as it has formatted space that the pc can read from and write to the install method should be the same.
 
Old 11-27-2013, 01:18 PM   #13
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 814

Rep: Reputation: 265Reputation: 265Reputation: 265
That would be interesting...booting Linux from your phone...has anyone ever done that before? Would it work?

That said, my parent's contract is up for renewal in a few months...our current phones will probably be replaced... . . . . . .

Now I won't be able to live with myself if I don't do it.

But by that time, this thread will be closed!

I'm sure I'll find somewhere on this site where it would be relevant.

Sorry for digressing.
 
Old 11-27-2013, 01:31 PM   #14
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
for Kali 1.0.5 i take it you have read the install to hard drive instructions
and it looks like you did not understand them

install to a usb the SAME as to a harddrive

just READ YES READ !!!!!!! the on screen text and do a normal everyday custom install
and install grub to the USB !!! and not the mbr of the FIRST drive

-- so you have to READ what is on the screen

it is VERY easy to do a usb2 install

Quote:
That would be interesting...booting Linux from your phone.
the security professionals over at "offensive security" have a ARM and "galaxy" build
Kali Linux for Samsung Chromebook ARM
Kali Linux for Odroid U2 Image
Kali Linux for Raspberry Pi Image
Kali Linux for RK3306 / SS808 Image
Kali Linux for Galaxy Note 10.1 Image
Kali Linux for CuBox Image
Kali Linux for Efika MX Image
Kali Linux for BeagleBone Black Image

mind you kali is FOR security and Network Professionals
( or those with really a lot of experience and can code in there sleep )

Last edited by John VV; 11-27-2013 at 01:39 PM.
 
Old 12-01-2013, 06:16 PM   #15
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
Quote:
Originally Posted by maples View Post
That would be interesting...booting Linux from your phone...has anyone ever done that before? Would it work?
http://www.ubuntu.com/phone/ubuntu-for-android
sadly most newer android fones (ics and newer) no longer mount as regular usb flash drives -- they only show up to the computer as mtp devices. my galaxy s-2 is capable of doing this.

Last edited by schneidz; 12-01-2013 at 06:18 PM.
 
  


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
Usual Linux install into usb (no live usb). neoskylla Linux - Software 8 09-11-2007 09:20 PM
How to install the rest of the Linux packages from USB drive after install? ArchW Linux - General 2 03-08-2006 07:50 AM
How to install teh rest of the Linux packages from USB drive after install? ArchW Linux - Newbie 4 03-07-2006 08:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:23 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