PDA

View Full Version : [ubuntu] on a usb stick



Vegan
November 5th, 2012, 02:03 AM
ok we all know about live cd, so why not install it to a usb stick and take linux to go

I have lots of 8 GB sticks and can get bigger ones easy enough

oldfred
November 5th, 2012, 06:07 AM
LIveCD or full install. I have both on flash drives.

Pros & cons of persistent install over direct install to flashdrives - C.S.Cameron
http://ubuntuforums.org/showthread.php?t=1655412

https://help.ubuntu.com/community/LiveCD/Persistence
https://wiki.ubuntu.com/LiveUsbPendrivePersistent

But I converted to using grub2's loop mount to load multiple ISO from one flash drive. I then have several Ubuntus, gparted and other repair ISO all on one flash drive.

These are scripts to install many ISOs. Some that will not loopmount by installing a kernel and boot image.
MultiBootUSB - Install and boot multiple Linux from Pendrive / Flash drive / USB disk w/grub2
https://help.ubuntu.com/community/InstallAndBootMultipleLinuxFromPendriveFlashDriveU SBDisk
http://ubuntuforums.org/showthread.php?t=1518273
http://sourceforge.net/projects/multibootusb/files/
MultiSystem Another LiveUSB Multiboot French(translate) w/grub2
http://liveusb.info/dotclear/
Another: multiboot055.sh
http://blog.p-mt.net/blog/2009/12/27/multiboot-usb-stick/


Full install is just like any install to a second drive with some settings to reduce writes like you do for a SSD.
Full install of 12.04 to USB device C.S.Cameron post #5
http://ubuntuforums.org/showthread.php?t=2060493
HOW TO Install Lubuntu on USB Drive - amjjawad
http://ubuntuforums.org/showthread.php?t=1872303
https://help.ubuntu.com/community/LubuntuLinks

Ubuntu Encrypted Flash Memory Installation using alternative text based installer, if you do not want encryption you just use standard Desktop installer. Process is similar but without LVM, screens will look a bit different.:
Standard full install with screenshots to flash or SSD:
Ubuntu Encrypted Flash Memory Installation using alternative text based installer
http://members.iinet.net/~herman546/p19.html
More discussion Dec 2010, more SSD info
http://ubuntuforums.org/showthread.php?t=1643591
http://ubuntuforums.org/showthread.php?t=1404664

Vegan
January 7th, 2013, 09:14 PM
The thinking I have is to simply use the USB stick as the sole storage for the install and not use the hard disk at all.

I wanted to use the stick for malware recovery purposes and Linux is less likely to be contaminated by Windows malware.

If loaded a Ubuntu disk can it install to USB sticks as the target fine?

C.S.Cameron
January 8th, 2013, 06:30 AM
Following is step by step how to install 12.04 on a 8GB flash drive:

Turn off and unplug the computer. (See note at bottom)
Remove the side from the case.
Unplug the power cable from the hard drive.
Plug the computer back in.
Insert the flash drive.
Insert the Live CD.
Start the computer, the CD should boot.
Select language
Select install Ubuntu.
Select Download updates while installing and Select Install this third-party software.
Continue
At "Installation type" select "Something else".
Continue
Confirm Device is correct.
Select "New Partition Table"
Click Continue on the drop down.
(Optional partition for use on Windows machine)
Click "Free space" and "Add".
Select "Primary".
Make "New partition size..." about 1000 bytes.
Location = Beginning.
"Use as:" = "FAT32 file system", (
And "Mount point" = /windows.
Select "OK"
Click "free space" and then "Add".
Select "Primary", "New partition size ..." = 4000 to 6000 bytes, Beginning, Ext4, and Mount point = "/" then OK.
(Optional home partition)
Click "free space" and then "Add".
Select "Primary", "New partition size ..." = 1000 to 4000 bytes, Beginning, Ext2, and Mount point = "/home" then OK.
(Optional swap space, allows hibernation)
Click "free space" and then "Add".
Select "Primary", "New partition size ..." = remaining space, (1000 to 2000 bytes, or same size as RAM), Beginning and "Use as" = "swap area" then OK.
(Important)
Confirm "Device for boot loader installation" points to the USB drive. Default should be ok if HDD was unplugged.
Click "Install Now".
Select your location.
Continue.
Select Keyboard layout.
Continue.
Insert your name, username, password, computer name and select if you want to log in automatically or require a password.
Selecting "Encrypt my home folder" is a good option if you are worried about loosing your USB drive.
Select Continue.
Wait until install is complete.
Turn off computer and plug in the HDD.
Stick the side panel back on.

Note:
You may omit disabling the hard drive if after partitioning you choose to install grub to the root of the usb drive you are installing Ubuntu to, (ie sdb not sdb1). Be cautious, many people have overwritten the HDD MBR.
At boot you will then be given the option to boot your computer's hard drive, even when booting another computer.