User Tools

Site Tools


linux:debian_on_usb

Debian On USB

In this tutorial I will try to tell how to install debian on a USB stick shortly. This section does not include copying live linux ISO's to USB but this section helps you. You can freely carry your usb stick with you and run it on any computer. BUT, after your installation do not expect a good performance from OS because even if you use a USB 3.0, limited simultaneous read/write performance prevents you from having a good performance.

Since this was my first installation on USB, I had some problems.

First problem was I selected LVM during partitioning. I do not know why but with LVM, USB does not boot. If anybody knows and share it with me I will be glad.

Second problem was I forgot to put a boot flag on the primary partition of the USB. You can do this with “gparted” installed any other linux.

You can use vmware player for all operations so you can deal with other things during installation.

Important pictures of the installation is below including gparted.


Do not choose LVM


Select your target usb for GRUB installation correctly. You will probably have more than one disk here, so do not damage your existing OS.


Now, lets open any linux OS and run gparted. If gparted is missing in your OS, just type “apt-get install gparted” if apt-get available in your linux.

Click on boot flag if missing.

Now it is ready to use. Just boot your pc with your new USB by changing settings from BIOS. Have fun.

Writing ISO Images to USB

When you download ISO images of Debian or any other Linux distribution you most probably write it to a USB to install it to another computer. Since USBs took the place of CD and DVDs, you need a tool to copy ISO image to USB. For Windows systems, there are many softwares out there but I like to use Rufus. It is small, open sourced, no installation required and very stable. I have not had any problems so far. I found a nice youtube video showing how to use Rufus;

For Linux users, you do not need to install any software you have it in your system that is dd After downloading iso and plugging your usb in, identify usb's device path then run dd then sync commands

dd if=<your_iso_file>.iso of=<device>
sync

If you cannot find the device path, you can use the following commands

df -h

df shows the information about file system -h switch just makes sizes human readable instead of bytes. OR

lsblk

OR

ls -l /dev/disk/by-id/

So, after successfully getting the device path (which is /dev/sdb in this case), final command should look like this;

umount /dev/sdb1
dd if=<your_iso_file>.iso of=/dev/sdb
sync

Make sure you unmount the usb before dd command, because if any activity occurs on usb while dd is running, your partition may be broken. dd command does not inform you about progress, sit and wait till it finishes. bs=4M argument can make the progress faster for dd. THE END

Discussion

Enter your comment. Wiki syntax is allowed:
 
linux/debian_on_usb.txt · Last modified: 2015/12/24 08:32 by ozan