Home

Linux for beginners

Jump to running Linux from USB disk

 

Why do I need Linux when I am quite fine with Windows?

 

Are you paying for Windows? If not, then probably you don't need Linux.

Do you work with any application that is not available in Linux? If yes, you then have to keep Windows anyway.

Do you use computer for mostly Internet, email, document and spreadsheets? Do you buy Windows and Office software for that? If yes, then you probably look into Linux.

 

The best thing about Linux is that it is free! (some specific application will cost you but we can say that 99% of Linux is still free).

 

Even if you can't find out a good reason why you need Linux, think about this dreaded situation. You Windows system has become corrupt and your computer refuses to boot up. You need to take out your important documents out of hard disk (assuming hard disk is fine). So, what to do?

 

Easy with Linux. Most Linux versions can be booted from CD drive. Once you boot your computer with Linux CD, you can access (read) your Windows hard disk partitions. You can then plug an USB device into your computer and can copy the files from hard disk.

 

So, even if you don't use Linux, it is a wise idea to keep one boot able Linux CD at your disposal.

 

If you use copied versions of Microsoft products (Windows, Office etc.) you can probably get away without facing any problem at all. However, if you run any business, you must buy commercial license for all your software. If you don't and ever get caught – you need to pay a hefty financial penalty. With Linux, since nearly everything is free, you are never going to face such trouble.

 

In fact, corporate business users can save very large amount of money by shifting to Linux from Windows.

 

What are the difference between Linux and Windows?

 

In one way, they are quite similar (like look and feel, you will get Windows like feeling and applications like desktop, file browser, word processor, spreadsheet etc.).

 

However, there are some differences worth discussing.

 

All Windows operating systems are solely developed and sold by Microsoft. Different versions of Windows – like Windows 98, Windows 2000, Windows XP though differ slightly, most of Windows applications run in all Windows versions.

 

However, the case is different in case of Linux. Several vendors develop and market Linux operating system. The most common versions are – RedHat (now Fedora), SuSE, Mandrake (now Mandriva), Knoppix, Fedora and Ubuntu.

 

Out of these, Knoppix and Ubuntu are completely free Linux. As a result, they don't come with any commercial support. However, the Linux user community do provide excellent support.

 

For other Linux, you need to pay a small fee to vendors (to cover packaging, manual, support etc.). They also offer bit of commercial support for its users.

 

In Windows, an executable (EXE file) usually runs in all versions of the Windows (barring very few exceptions).

 

In Linux, an application for one version (say Ubuntu) won't run in another version (say RedHat). So, you always need to get the application specific to your Linux flavour.

 

At first, it may seem a big disadvantage. Well, it has some good points also. I am sure that you agree that viruses are the worst by product of Windows. Now, since an application will run in all Windows versions, viruses can spread rapidly and can cause havoc damage. But, in Linux, because of its inherent version difference among vendors, the viruses will have little chance to propagate and cause damage. Also, Linux was developed from ground up for multi-user and security in mind. In Linux, the user has to provide several permissions to an application to work. So it makes malicious program work much harder.

 

Now if you ask me, which applications are better – Microsoft products or comparable Linux free products?

 

Honestly speaking, still Microsoft products theoretically offer more features. Before you jump out, let me tell you something more. Research shows that 80% or users only use 20% of features of a typical program. So, why do you pay such huge sum for software to get features which you will never use? You will be amazed to discover that how sophisticated programs you can get in Linux for free!

 

In this document, I shall only discuss Ubuntu Linux as it is completely free.

 

Why choose Ubuntu over other Linux flavors?

 

Although choosing a Linux flavour is often a matter or personal preference, Ubuntu does have some advantage over other Linux flavours!

 

·       It will always remain free.

·       Its installation is simpler than other Linux flavours.

·       Often it is a trouble to find proper applications in Linux as one Linux executable won't work in other Linux flavours. Ubuntu has a large number of readily available applications.

·       Ubuntu has an excellent on-line community for support.

·       Simplicity is Ubuntu's virtue. It does not come with several redundant applications. By default, it offers one application per task.

·       Ubuntu easily recognizes most hardware in the market (not as good as Windows like recognition but better than some other Linux flavours).

 

 

How to get Linux?

 

Ubuntu Linux can be ordered free (without any shipping charge) from Canonical Limited.

https://shipit.ubuntu.com/

It usually takes 4 weeks to get the CDs delivered to you.

You will get 2 CDs in a pack. One is for normal install in your hard disk. Another one is Live CD – that is boot able Linux CD which you can use to test Linux without installing anything in your hard disk.

 

Ubuntu community forum is at

www.ubuntuforums.org

 

Other useful links

http://help.ubuntu.com/starterguide/C/faqguide-all.html

 

How to use Live CD?

 

Make sure your computer is configured to boot from CD.

To check it, enter in your computer's BIOS and see booting sequence.

 

Start the computer with Ubuntu Live CD in your CD drive.

The computer will boot with Linux. It will ask you some simple questions and then will configure the system by itself.

 

Within 5-10 minutes, you should be presented with Ubuntu Linux desktop (quite similar to Windows desktop).

 

You can run some utility applications, games and Open Office applications from the live CD. As live CD does not write anything on your hard disk (it simulates a virtual hard disk in RAM), none of your settings will be saved when you shut down Ubuntu. However, you can save your files in external USB disk or in floppy or FAT hard disk (but not in NTFS hard disk).

 

For real work with Linux, install it into hard disk.

 

How to access Windows files from Linux?

 

Before explaining it further, we need to understand what a file system is.

The type of file system determines how files are physically stored in the hard disk.

 

There are several file systems used.

 

Windows use either FAT or NTFS (NT/2000/XP and upward)

Floppy disks and USB drives usually use FAT (in both Windows and Linux)

Linux use either ext2 (common) or ext3.

 

The caveats are:

 

Windows cannot access Linux's ext file system.

Linux can read (but not write) NTFS file system.

Linux can read and write on FAT file system.

 

Unlike in Windows, when you start Ubuntu Linux, you won't see all your hard disks by default!

 

You need to “mount” them yourself.

 

In the Linux's Terminal window (similar to DOS command prompt in Windows), type

 

sudo mkdir /media/windows_system

sudo mount /dev/hda1 /media/windows_system -t ntfs -o umask=0222

 

Now you should be able to see your Windows primary partition.

 

To see Windows secondary partition, use this command

 

sudo mkdir /media/windows_data

sudo mount /dev/hda1 /media/windows_data -t ntfs -o umask=0222

 

To see floppy drive, first put a floppy on the drive, and then issue this command

 

sudo mkdir /media/floppy

sudo mount /dev/hda1 /media/floppy -t vfat -o umask=000

 

To “unmount” any drive, use this command

 

sudo umount /media/floppy

 

If you have multiple floppies to use in single session, after each floppy insert, you need to unmount previous floppy and re-mount the new one. Irritating? Yes!

 

To access files in USB drive, just plug the USB drive in USB port when Ubuntu is running ( not during boot up time) The USB disk will be shown under /media/usbdisk directory.

 

How will Linux recognize my devices?

 

Usually your display, sound card etc. are automatically recognized by Linux

External modems are also detected.

 

However, the biggest pain is if you have internal modem (also known as WinModem). These are not just hardware but they have a built in software instructions which works only with Windows. The installation of WinModem under Ubuntu is very complicated.

 

To make your software modem work in Linux, first check what type of modem you have.

 

You can download WinModem driver for Linux from this site.

http://www.linuxant.com/drivers/

 

Then install the driver as per instructions.

 

An example of modem driver installation steps is given below.

 

wget -c http://frankandjacq.com/ubuntuguide/scanModem.gz

gunzip -c scanModem.gz > scanModem

chmod +x scanModem

sudo ./scanModem

gedit Modem/ModemData.txt

 

Read the ModemData.txt file to see which modem driver you need to download.

Download the appropriate driver from http://www.linuxant.com/drivers/.

You must download the suitable driver for your Linux kernel version.

 

Install the driver using following command

 

sudo dpkg -i hsfmodem_driver_file_name.deb

 

Answer the questions that Ubuntu asks during installation.

 

Then use this command to change modem setting configuration.

 

sudo gedit /etc/wvdial.conf

 

Now connect with

sudo wvdial

 

To disconnect, press Ctrl + C.

 

 

Which files reside where?

 

File system Hierarchy Standard

 

Root file system

 

/bin - Essential user command binaries (for use by all users)

/boot - Static files of the boot loader

/dev - Devices and special files

/etc - Host-specific system configuration (static file - no binaries)

/home - User home directories (optional)

/lib - Essential shared libraries and kernel modules

/media - Mount point for removable media

/mnt - Mount point for a temporarily mounted file system

/opt - Add-on application software packages

/root - Home directory for the root user (optional)

/sbin - System binaries

/srv - Data for services provided by this system

/tmp - Temporary files

 

/usr is shareable, read-only data

 

/usr/include - Directory for standard include files

/usr/lib - Libraries for programming and packages

/usr/sbin - Non-essential standard system binaries

/usr/share - Architecture-independent data

/usr/share/dict - Word lists (optional)

/usr/src - Source code

 

/var contains variable data files such as logs, databases, web sites and temporary e-mail files

 

 

Reference: http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

 

 

 

Comparison of common Linux equivalent of Microsoft products

 

 

Type of application

Microsoft

Linux/Ubuntu

Comment

Operating System

Windows 98/2000/XP

Linux flavours

 

Office package

Office 2000/XP

Open Office 2.0

(OO in short)

 

Text editor

Notepad

Gedit

More powerful than Notepad, offer multiple document interface (MDI), syntax coloring etc.

Word Processor

Word

OO Writer

Similar to Word

Spreadsheet

Excel

OO Calc

Majority of Excel functions are available.

Database

Access

OO Base

Access offers more features.

Presentation

Power Point

OO Impress/Drawing

 

Browser

Internet Explorer

Fire Fox

 

Email

Outlook Express

Evolution Email

 

Sound player

WinAmp

 

 

Movie player

Media Player

Totem movie player

 

Image editor

Paint Shop Pro

Photo shop

Several others

GIMP

 

File Manager

Explorer

Nautilus file browser

 

Scripting

Batch files

Shell scripts

PERL

Shell scripts are much more powerful than DOS/Windows batch files

C/C++

Visual C++

Borland C++ etc.

GNU C++

Not automatically installed in Ubuntu.

Usually C complier is built in with Linux.

Java

Java

Java

Usually available with Linux

Rapid Application Development

VB.NET

No equivalent

 

Enterprise Database

Oracle

SQL Server

Oracle *

Oracle is usually available for all Linux flavours. Oracle is free for personal use.

2D-CAD

Auto CAD

Linux CAD *

 

3D-CAD

Solid Works

No equivalent

 

PDF creator

Adobe Acrobat etc.

Built in

 

ZIP creator

Several applications

Built in

 

 

Please note: All or most Windows applications are not freeware. But most Linux applications are freeware. They are marked with * if Linux application is not freeware.

 

How to install new applications/programs in Ubuntu?

 

In Windows, you can get an installer package (downloaded or from a CD), often in setup.exe or .msi format. You then executed it and the program gets installed in you computer.

 

For Ubuntu, it is different. There is a special application called Synaptic (similar to Add/Remove program in Windows Control Panel). There you'll find list of programs that you can install (known as repository). When you select the required applications that you want to install, Ubuntu will download the relevant files from Internet and will install the new application in your system.

 

There is a command line version of Synaptic. It is apt-get.

 

But the problem with this approach is that it requires Internet connection and without broadband such downloading can be frustrating.

 

Where from can I download other applications?

 

You should remember that till now applications are fairy limited for Linux compared to Windows. There are few sites where from you can download version specific Linux applications.

 

Websites to be written.

 

 

Difference between Windows and Linux

 

 

Windows

Linux

Costs money.

Free!

Closed source. Source is considered as intellectual property.

Open source. Anyone can see and modify source code.

File extension EXE means executable.

Executable file permission determines executable file.

All disk drives are mounted automatically on start up.

Disk drives must be mounted manually.

An executable program will run nearly all versions of Windows.

An executable program will run only specific flavour of Linux. A different program is required for running in different version of Linux.

Recognizes most hardware without problem.

Some hardware recognition may be difficult.

Numerous available applications.

Limited number of applications available.

Security is poor. Virus, ad ware, spy ware are problems.

Not a problem with Linux. Its security is much better.

Widespread use in PC market.

Still limited use in PC market.

 

 

 

 

How do I connect to Internet using Broadband from Linux?

 

If you are using an USB modem it may not always be possible. However, if you are using a cable model thru Ethernet, it is often easy.

 

For Knoppix I verified that following trick works with ether net cable modem.

·       Switch on the modem first, before switching on the computer

·       Now boot up the computer with  Linux

·       After Linux  boots up, open the browser in Linux. You should be able to navigate to any website.

Most recent versions of Linux can also access wireless internet (as long as your computer hardware is wireless enabled).


What is the best Linux distro for running from of USB disk?

It is possible to install latest version of Ubuntu (8.10 at the time of this writing) on a USB disk using the steps described here

http://www.pendrivelinux.com/ubuntu-810-install-using-the-built-in-usb-installer/

 

So, I found an alternative Linux distro (which is a scaled down Mandriva) from here

 

http://www.pendrivelinux.com/2008/02/13/pendrivelinux-2008-install-from-windows/

 

This is called Pendrive Linux and it perfectly boots up from USB disk (at least 1 GB size). It saves all Linux session data (so it is persistence) in a loop file (i.e. the file itself is a full Linux file system). This file is visible from Windows. But access any "file" within this loop file from Windows, you need to use programs like Explorer FS (freeware).

 

The Pendrive Linux can also access wireless internet (provided your computer hardware is wireless enabled AND Linux has the driver for your WiFi card!).


I personally found Pendrive Linux is the best distro for running from USB disk which can also access wireless internet easily. Unlike Ubuntu, it also does not require USB disk to be formatted in Linux format (ext2). So, you can use the USB disk's remaining spaces to store files from Windows!

Recently I also tried Fedora 10 which can be easily installed on USB disk using liveusb-creator. First you need to download Fedora from here. Then use the liveusb-creator and the downloaded iso file to create a bootable USB disk. You can also save your changes in the disk using persistent option.

Fedora is a full fledged Linux operating system. It doesn’t come with too many installed applications, but you can add them easily. For example, you can download Open Office and install on Fedora.

Fedora is also very fast! It only takes 50 seconds to boot up from USB in my computer compared to same time taken by Windows Vista to boot from hard disk.

Fedora is also very good at recognizing hardware. It’s the only Linux distro which recognized my WiFi card and integrated web cam without fuss.

Remember, installing an operating system in USB disk might reduce its lifespan as OS reads/writes to disk very frequently. So, you may suddenly find your USB disk OS corrupt after several times of use. If it happens, simply reformat the disk and re-install Linux again.

 

 

© Saikat Basak

    February 2009