செவ்வாய், 9 ஆகஸ்ட், 2016

How to Create Linux Live USB Disk

How to Create Linux Live USB Disk

Installing different Linux distros on your computer is not too much hard. You can install the Linux operating from a CD/DVD drive. Even you can install Ubuntu into Windows system. But if your computer does not have any CD or DVD drive, you’d opt for a Linux Live USB (Several companies launched the mini laptops called as Netbook without having any CD/DVD drive).
Here are different methods to create Linux Live USB disk to install from your USB drive. Even, you can run your favorite Linux Distro from the Live USB disk without installing it into your computer.

Prepare Linux Live USB with the Terminal

The easiest way to transform your USB stick to a Linux Live disk is using the Linux terminal. You just need the USB stick with enough space, the ISO file of your Linux distribution (e.g – Ubuntu, OpenSuse, Fedora, Debian, Linux Mint, CentOs etc.) and a computer which is pre-installed with any Linux distro.
To get started, start the Linux operating system at your computer and insert the USB stick into the proper place. Now open the terminal in your Linux and run the following command.
lsblk
list-of-mounted-disk-in-linux-trminal
Once you run the above command into the command line, all the hard disk and similar media will be listed there. Determine which one is your USB stick from the list. Generally, the USB disk appears as Sdb if you do not have more than one hard disk at your computer (look at the image above).
Now you need to format the USB stick. You can do it pretty easily from the command line in Linux. Run the following commands to format your USB drive.
$ sudo umount /dev/sdb
$ sudo mkfs.vfat -n 'Ubuntu' -I /dev/sdb
Once the format is complete you are ready to start preparing the live USB. Just run the following command:
$ sudo dd if=isofile.iso of=/dev/sdX bs=4M
Now you have to change ‘isofile.iso’ with the path and file name of your Linux distribution ISO file. Also replace ‘sdX’ with the proper one which reflects your USB drive. Therefore, after confirming the above things the syntax should look like this:
$ sudo dd if=/home/username/Desktop/ubuntu-10.10-i386.iso of=/dev/sdb bs=4M
create-linux-live-usb-disk-with-terminal
Once you execute the above command correctly, it will automatically start the process. Should you keep in mind that you should execute the above command as root user. So, after hitting the Enter key, you will be prompted to enter the root password. Do it and wait for a while. Once completed, it will display the details with exact details of copied data and the transfer rate of data which means the command has been run successfully.
Now restart your computer and boot from the USB stick. You should get the following screen.
run-linux-from-live-usb-stick

Preparing USB Stick with Linux Live USB Creator

Though the above method to make Linux Live USB from command line is pretty easy and less time consuming, it has some limitations as you need to have a Linux installed computer. But if you do not have such option available then this method can be lifesaver while the installation of the Ubuntu from USB stick is essential for you.
Unlike the above method you do not need to have any Linux to prepare your USB stick. You can do it from your Windows installed computer – be it windows XP or Windows 7.

How to Create Linux Live USB Drive in Windows 7

1. Format the USB disk with FAT 32 file system. Don’t try NTFS – it won’t work.
2. Download the latest zipped version of Syslinux.
3. Create a folder at your desktop or any where you wish and extract the downloaded zipped file with WinRar or 7-Zip.
4. Rename the folder as “syslinux”. Thus the folder “syslinux” contains all the extracted files from the zipped file syslinux- 1.7.0 (or whatever be the latest version).
5. Open the command prompt in your Windows. If you are in Windows 7 then run command prompt as administrator. Now, in the command prompt, run the following command:
cd <path to the folder syslinux>\win32
For instance,
cd C:\Documents and Settings\tanmay\Desktop\syslinux\win32
To install the syslinux on the USB stick run the following command:
syslinux -ma X:
Where, ‘X’ denotes the drive letter assigned for the USB stick in your computer.
6. Once you are done with above commands successfully, extract the whole ISO image file of Ubuntu at your USB stick. If you are using WinRar for that, right-click on the ISO image file then select Extract files, locate your USB disk and choose Extract.
7. A folder, “isolinux” should appear at the root location of the USB stick. Well, enter into that folder and select everything of that folder by pressing Ctrl + A, cut them (Ctrl + X) and paste (Ctrl+V) at the root location. Delete the folder “isolinux” and rename the file “isolinux.cgf” to “syslinux.cgf”. You are done!!
Booting from the USB stick will start the Linux distro, directly running from the USB stick. You should see the Linux desktop and the taskbar. Now, you can do everything from there. If you wish to install it in your computer hard disk, click on the Install icon residing at the desktop.
With the both methods above you’re actually creating both the Linux Live USB stick and the installer system at the same time. That means you can run your favorite Linux distro right from your USB stick with out installing that in your computer hard disk.
Though both of the above methods are well enough to install or run Linux from the USB stick but you can implement them for various purpose.
As for example, if you want to recover some data from a dead system, you can use Linux Live from the USB stick.
Again, if your Windows system is infected with malicious program files and you can’t remove them when the Windows is running, you can run the live stick to remove them manually, if you can recognize the file responsible for the infection.

How to Create Only the USB Installer For Linux

If you want to create only the USB installer for Linux instead of Linux Live USB, you can follow the following method.
Prerequisites:
  1. A Linux installed computer.
  2. A USB stick having enough space so that the installation image fits properly.
  3. The ISO image of Linux distro (Ubuntu for instance).
Starting the preparation
  1. Format the USB stick with FAT 32 file system. You can use a Windows installed computer though. Note: Do not format the USB stick with NTFS file system- it won’t work.
  2. Download installer kernel and initramdisk, suitable for your Ubuntu architecture that you are going to install. Say, if it is Ubuntu amd64 then download amd64 installer and i386 installer for the i386 ISO image of Ubuntu. In both of the cases, you need to download the files named as “vmlinux” and “initrd.gz”.
  3. Now, create a folder “install” at the root directory of your USB device and copy the downloaded files into that.
  4. Extract the Ubuntu ISO image at any location of your hard drive. You can use either WinRar or 7-zip as they are free. From the extracted files and folders, copy the folder called as “isolinux” to the root directory of the USB stick (at the same location where you’ve created the folder “install”), rename the folder “isolinux” to “syslinux” and go inside that folder. There, you can find another file “isolinux.cgf”. Rename the file to “syslinux.cgf”.
  5. Open the console at the Ubuntu installed computer. To make the USB stick bootable, use fdisk command to set the boot flag and apply the following steps.
    1. Install syslinux: To install syslinux, run this command at the console: sudo aptitude install syslinux
    2. Install boot sector on your removable device by running this command: sudo syslinux / dev/sdbX
  6. Where sdbX is the device name and number of your USB stick, which you can obtain by checking with the following command:
    sudo mount
    If everything happen correctly, a file called as “ldlinux.sys” will be created at the root directory of your USB device.
  7. Finally, copy the complete Ubuntu installation file (the ISO file without extracting) at the root directory of the USB drive. The files at your USB stick should look this:

You are done!! Now insert the stick and boot from it to install Ubuntu in any computer. You may require to change the boot preferences in your bios settings to start the booting from the USB drive.
Related Posts

கருத்துகள் இல்லை:

கருத்துரையிடுக