Showing posts with label boot. Show all posts
Showing posts with label boot. Show all posts

How to Boot Linux from USB Drive?

Most of the notebook owners are always on the run, what if the Linux operating system installed gets corrupt. One can suggest for such cases Linux data recovery software are available in the market to backup your data and save your data from damage. But, will those data recovery software will help resume the work again? No, then what should be done? Today we will look how to get rid of such a problem.


For note book users a thumb drive is easy to use, we will create a bootable USB Drive by which it will be easy to boot the system any where in the world. Yes, this is possible Ubuntu 9.10 CD/DVD ISO images has necessary Linux and Windows utilities to get the system on a USB.

What you require is:

1)1 GB USB drive is required, back up of the data on the drive should be taken in advance.

2)Another computer, Ubuntu notebook remix ISO.

3)ISO image File

For desktop, Windows or a Mac PC users the configuration will totally change. These configuration will work only for notebook users.

Process:

Download the ISO for notebooks from http://www.ubuntu.com/getubuntu/download-netbook..Once downloaded, copy the file to the USB drive. The next step in the process is to run the usb-creator, Linux users are much familiar with the option, if not installed you can get it installed from the Synaptic Package Manager. You need to select “other” and locate the ISO image. Once you select the ISO image insert USB drive you want to make bootable. You will get a notification “USB drive in use”. Now just make sure that the correct device connected before you proceed to create a start up disk out of it. If in case you encounter a error like “two partition created” try selecting each of them, one of them should work. If not, restart your system and try booting from the USB again. Your disk is ready to use. Try booting your system using the thumb drive but before that you need to move to the system BIOS and put hard drive or removable drive depending on your system.

Need to care about:

The quality of the USB drive matters a lot, no matter how fast, spacious it is what matters is you don't lose the data. It's always recommended to go for branded USB dive. Even then if the data is lost the recovery is possible for branded drives, which has a low probability in non branded drives.

For notebook users like me this works as a boon. Now next time you need to boot the system you can do it in fraction of seconds.

Boot From USB/CD-ROM Without BIOS Support

PLoP Boot Manager can launch from floppy, CD, network or existing boot manager like LILO, GRUB, Windows boot menu and DOS, once launched you can use PLoP to boot from USB and CD-ROM even if BIOS does not support these options.
To use PLoP from existing Windows Boot Manager on Windows 2K, XP and VISTA, Download PLoP Boot Manager and follow the procedure described inside the zip file or at the official website here .

Safely uninstall Linux when Dual boot is installed with Windows 7/Vista/XP

When asked to most of the users “How will you uninstall Linux when it is Dual Boot installed with Windows XP/Vista/7 ?” The common answers we got was “Start Windows XP/Vista/7 and format Linux Partition“. Well they were half correct, you do have to format the Linux partition but what about the grub loader? The grub loader will still be showing you the option to boot Linux during the start up and by mistake if anybody goes for booting Linux, the system will not find any Linux on your machine and it will restart. so what can you do in this situation?

There is a simple procedure to uninstall or delete Linux completely and safely by following a step by step procedure illustrated below and it is tested by me .

Requirements:
You need a Windows XP/Vista/7 startup disk or Windows XP(verified with XP only) bootable floppy .

How to do it:

1. Boot up in Windows XP/Vista/7.

2. Start > Control Panel > Administrative Tools > Computer Management

(UAC or User Account Control in Vista/7)

3. Go to Disk Management under “Storage

4. Select your Hard Disk and then the Linux partition.

5. Delete the Linux partition this will delete Linux and grub.

6. Now reboot your Laptop/Desktop with Windows XP start up disc or floppy and type the command “fixmbr” .

7. Above command will repair ur bootloader and rewrite ntldr which will replace corrupted grub.

8. Thats it done now boot your Laptop or Desktop normally it will be booted by default in Windows XP/Vista/7.

If you have any problem in the procedure given above leave a comment here…

Boot your PC in less than 10 seconds



So you came here to see how to bootup your PC in 10 seconds lesser? Well, you have come to the right place. To a daily user, shaving that extra few seconds for booting up can go a long way. Before I proceed, may I ask for you to backup your data and registry first just to be safe. You are warned, use with caution.

How to bootup computer in 10 seconds lesser?

1) Press Windows Key and "R" to launch the run command.

2) Type "regedit" inside the input space.

3) Navigate to the registry key

HKEY_LOACAL_MECHINE\SYSTEM\CurrentControlSet\Control\ContentIndex

4) Locate the key"Startup Delay" and double click on it.



5) Select Decimal, and change the value to 40000



Enjoy the reduction in startup time and I look forwarding to hearing good news from all of you.

making a bootable floppy disk

Tutorial Objective

In this tutorial, it will guide the user on how he/she is able to make a bootable floppy disc that can boot into Windows.


Tutorial Introduction & Background & Facts

Many people are able to boot into an Operating System without any problems. But in one day, what if the boot files that include NTLDR, Boot.ini, and Ntdetect.com[/] file are corrupted due to virus infected, you are not able to boot into the OS. You will end up with reinstalling and repairing the OS in order to be able to boot into the OS again. Doing so will take you a lot of time. Therefore, in this tutorial, it will teach the user how to make the bootable floppy disc that can boot into Windows. So, when the user encounter the OS booting in the future due to boot files corruption, they are still able to boot into the OS and repair the OS bootup in less than a minute.


Pre-requites Tools

* A blank floppy disc

* A PC with running Windows 2000 series, Windows XP series, or 2003 series


Terminology & Explanation

(None)


Implementation

This tutorial and its procedure will guide the user on how he/she make the bootable floppy disc that can boot into Windows so that he/she is able to boot into Windows eventhough the Windows bootup is corrupted. All you have to do,

1-1) Go to [i]My Computer

1-2) Make sure that you unhide hidden system file in order for you to see the OS boot file

If you know how to unhide the hidden system, you can skip the following procedures to procedure # 2-1. Otherwise continue on with the following procedure.

1-3) Go to Tools menu, and choose Folder Options...

1-4) Go to the View tab

1-5) Under the Hidden files and folders, choose the option that says, "Show hidden files and folders"

1-6) Uncheck the checkbox that says, "Hide extensions for known file types"

1-7) Uncheck the checkbox that says, "Hide protected operating system files (Recommended)"

When the message box appears on the screen, just click the OK button to continue.

1-8 ) Click the OK button to continue

Now you should be able to see all the hidden files and the hidden system files.

2-1) Insert the blank floppy disc into the floppy drive

In order to be able to make the bootable floppy disc, you will have to first format it.

2-2) Go to Command Prompt (In Windows mode, that means Start -> Run -> cmd)

2-3) Change to A Drive (Floppy Drive) by typing the following in the Command Prompt and hit [Enter] key:

CODE
a:


2-4) After you change to A Drive in Command Prompt, format the floppy disc by typing the following in the Command Prompt and then press [Enter] key and follow the prompt:

CODE
format a:


Now the formatting floppy disc begins. When the formatting process completed,

2-5) Go back to My Computer

2-6) Go to the primary partition of the primary HDD (that means C Drive)

2-7) Copy all the following files from C Drive into A Drive (Floppy drive)

NTLDR
Boot.ini
Ntdetect.com

NTLDR, Boot.ini, and Ntdetect.com file are the boot files that are required to boot into the OS.

Once you copied those boot files into the A Drive (Floppy Drive), you just created the bootable floppy disc that can boot into Windows. Now you will have to verify it to see if booting from floppy disc works. Before you do that, it is recommended that you take the floppy disc out and set it to write-protected; therefore, your floppy disc is set to read-only. Doing that can prevent that any virus goes onto the floppy disc. After you do that, put that floppy back in.

3-1) Reboot the PC and enter the mobo BIOS setting

3-2) Verify the Boot Sequence to make sure that the Floppy Drive is set to first boot.

3-3) Save and exit the BIOS setting to reboot the system.

Once the system reboots, after the POST process, the system will boot from the floppy drive. If the system is able to boot from the floppy disc and enter to Windows, that means your bootable floppy disc for booting into Windows is working. Be sure that you label the floppy disc and put it in the safe place just for in case of that you need that to troubleshoot the Windows bootup in the future.


Benefical

* So that the user can enjoy the new method for troubleshooting the Windows bootup

* The user is able to boot into the OS by using that bootable floppy disc in case of that the Windows cannot bootup anymore due to the NTLDR is missing or corrupted error message.

* Users can spend their less time to troubleshoot and repair the Windows bootup. To repair the Windows bootup, boot from that bootable floppy drive, and then go to the C Drive (Active Partition from primary partition of primary HDD from My Computer applet. Then copy all bootup files from Floppy Disc into C Drive.


Additional Information

(None)


Search Keyword

boot bootup bootable floppy ntldr boot.ini ntdetect ntdetect.com create windows window missing corrupted

Inside the Linux boot process

Take a guided tour from the Master Boot Record to the first user-space application

The process of booting a Linux® system consists of a number of stages. But whether you're booting a standard x86 desktop or a deeply embedded PowerPC® target, much of the flow is surprisingly similar. This article explores the Linux boot process from the initial bootstrap to the start of the first user-space application. Along the way, you'll learn about various other boot-related topics such as the boot loaders, kernel decompression, the initial RAM disk, and other elements of Linux boot.

In the early days, bootstrapping a computer meant feeding a paper tape containing a boot program or manually loading a boot program using the front panel address/data/control switches. Today's computers are equipped with facilities to simplify the boot process, but that doesn't necessarily make it simple.

Let's start with a high-level view of Linux boot so you can see the entire landscape. Then we'll review what's going on at each of the individual steps. Source references along the way will help you navigate the kernel tree and dig in further.

Overview

Figure 1 gives you the 20,000-foot view.


Figure 1. The 20,000-foot view of the Linux boot process
High-level view of the Linux kernel boot

When a system is first booted, or is reset, the processor executes code at a well-known location. In a personal computer (PC), this location is in the basic input/output system (BIOS), which is stored in flash memory on the motherboard. The central processing unit (CPU) in an embedded system invokes the reset vector to start a program at a known address in flash/ROM. In either case, the result is the same. Because PCs offer so much flexibility, the BIOS must determine which devices are candidates for boot. We'll look at this in more detail later.

When a boot device is found, the first-stage boot loader is loaded into RAM and executed. This boot loader is less than 512 bytes in length (a single sector), and its job is to load the second-stage boot loader.

When the second-stage boot loader is in RAM and executing, a splash screen is commonly displayed, and Linux and an optional initial RAM disk (temporary root file system) are loaded into memory. When the images are loaded, the second-stage boot loader passes control to the kernel image and the kernel is decompressed and initialized. At this stage, the second-stage boot loader checks the system hardware, enumerates the attached hardware devices, mounts the root device, and then loads the necessary kernel modules. When complete, the first user-space program (init) starts, and high-level system initialization is performed.

That's Linux boot in a nutshell. Now let's dig in a little further and explore some of the details of the Linux boot process.


System startup

The system startup stage depends on the hardware that Linux is being booted on. On an embedded platform, a bootstrap environment is used when the system is powered on, or reset. Examples include U-Boot, RedBoot, and MicroMonitor from Lucent. Embedded platforms are commonly shipped with a boot monitor. These programs reside in special region of flash memory on the target hardware and provide the means to download a Linux kernel image into flash memory and subsequently execute it. In addition to having the ability to store and boot a Linux image, these boot monitors perform some level of system test and hardware initialization. In an embedded target, these boot monitors commonly cover both the first- and second-stage boot loaders.

Extracting the MBR

To see the contents of your MBR, use this command:

# dd if=/dev/hda of=mbr.bin bs=512 count=1
# od -xa mbr.bin

The dd command, which needs to be run from root, reads the first 512 bytes from /dev/hda (the first Integrated Drive Electronics, or IDE drive) and writes them to the mbr.bin file. The od command prints the binary file in hex and ASCII formats.

In a PC, booting Linux begins in the BIOS at address 0xFFFF0. The first step of the BIOS is the power-on self test (POST). The job of the POST is to perform a check of the hardware. The second step of the BIOS is local device enumeration and initialization.

Given the different uses of BIOS functions, the BIOS is made up of two parts: the POST code and runtime services. After the POST is complete, it is flushed from memory, but the BIOS runtime services remain and are available to the target operating system.

To boot an operating system, the BIOS runtime searches for devices that are both active and bootable in the order of preference defined by the complementary metal oxide semiconductor (CMOS) settings. A boot device can be a floppy disk, a CD-ROM, a partition on a hard disk, a device on the network, or even a USB flash memory stick.

Commonly, Linux is booted from a hard disk, where the Master Boot Record (MBR) contains the primary boot loader. The MBR is a 512-byte sector, located in the first sector on the disk (sector 1 of cylinder 0, head 0). After the MBR is loaded into RAM, the BIOS yields control to it.


Stage 1 boot loader

The primary boot loader that resides in the MBR is a 512-byte image containing both program code and a small partition table (see Figure 2). The first 446 bytes are the primary boot loader, which contains both executable code and error message text. The next sixty-four bytes are the partition table, which contains a record for each of four partitions (sixteen bytes each). The MBR ends with two bytes that are defined as the magic number (0xAA55). The magic number serves as a validation check of the MBR.


Figure 2. Anatomy of the MBR
Anatomy of the MBR

The job of the primary boot loader is to find and load the secondary boot loader (stage 2). It does this by looking through the partition table for an active partition. When it finds an active partition, it scans the remaining partitions in the table to ensure that they're all inactive. When this is verified, the active partition's boot record is read from the device into RAM and executed.


Stage 2 boot loader

The secondary, or second-stage, boot loader could be more aptly called the kernel loader. The task at this stage is to load the Linux kernel and optional initial RAM disk.

GRUB stage boot loaders

The /boot/grub directory contains the stage1, stage1.5, and stage2 boot loaders, as well as a number of alternate loaders (for example, CR-ROMs use the iso9660_stage_1_5).

The first- and second-stage boot loaders combined are called Linux Loader (LILO) or GRand Unified Bootloader (GRUB) in the x86 PC environment. Because LILO has some disadvantages that were corrected in GRUB, let's look into GRUB. (See many additional resources on GRUB, LILO, and related topics in the Resources section later in this article.)

The great thing about GRUB is that it includes knowledge of Linux file systems. Instead of using raw sectors on the disk, as LILO does, GRUB can load a Linux kernel from an ext2 or ext3 file system. It does this by making the two-stage boot loader into a three-stage boot loader. Stage 1 (MBR) boots a stage 1.5 boot loader that understands the particular file system containing the Linux kernel image. Examples include reiserfs_stage1_5 (to load from a Reiser journaling file system) or e2fs_stage1_5 (to load from an ext2 or ext3 file system). When the stage 1.5 boot loader is loaded and running, the stage 2 boot loader can be loaded.

With stage 2 loaded, GRUB can, upon request, display a list of available kernels (defined in /etc/grub.conf, with soft links from /etc/grub/menu.lst and /etc/grub.conf). You can select a kernel and even amend it with additional kernel parameters. Optionally, you can use a command-line shell for greater manual control over the boot process.

With the second-stage boot loader in memory, the file system is consulted, and the default kernel image and initrd image are loaded into memory. With the images ready, the stage 2 boot loader invokes the kernel image.


Kernel

Manual boot in GRUB

From the GRUB command-line, you can boot a specific kernel with a named initrd image as follows:

grub> kernel /bzImage-2.6.14.2
[Linux-bzImage, setup=0x1400, size=0x29672e]

grub> initrd /initrd-2.6.14.2.img
[Linux-initrd @ 0x5f13000, 0xcc199 bytes]

grub> boot

Uncompressing Linux... Ok, booting the kernel.

If you don't know the name of the kernel to boot, just type a forward slash (/) and press the Tab key. GRUB will display the list of kernels and initrd images.

With the kernel image in memory and control given from the stage 2 boot loader, the kernel stage begins. The kernel image isn't so much an executable kernel, but a compressed kernel image. Typically this is a zImage (compressed image, less than 512KB) or a bzImage (big compressed image, greater than 512KB), that has been previously compressed with zlib. At the head of this kernel image is a routine that does some minimal amount of hardware setup and then decompresses the kernel contained within the kernel image and places it into high memory. If an initial RAM disk image is present, this routine moves it into memory and notes it for later use. The routine then calls the kernel and the kernel boot begins.

When the bzImage (for an i386 image) is invoked, you begin at ./arch/i386/boot/head.S in the start assembly routine (see Figure 3 for the major flow). This routine does some basic hardware setup and invokes the startup_32 routine in ./arch/i386/boot/compressed/head.S. This routine sets up a basic environment (stack, etc.) and clears the Block Started by Symbol (BSS). The kernel is then decompressed through a call to a C function called decompress_kernel (located in ./arch/i386/boot/compressed/misc.c). When the kernel is decompressed into memory, it is called. This is yet another startup_32 function, but this function is in ./arch/i386/kernel/head.S.

In the new startup_32 function (also called the swapper or process 0), the page tables are initialized and memory paging is enabled. The type of CPU is detected along with any optional floating-point unit (FPU) and stored away for later use. The start_kernel function is then invoked (init/main.c), which takes you to the non-architecture specific Linux kernel. This is, in essence, the main function for the Linux kernel.


Figure 3. Major functions flow for the Linux kernel i386 boot
Major Functions in Linux Kernel i386 Boot Process

With the call to start_kernel, a long list of initialization functions are called to set up interrupts, perform further memory configuration, and load the initial RAM disk. In the end, a call is made to kernel_thread (in arch/i386/kernel/process.c) to start the init function, which is the first user-space process. Finally, the idle task is started and the scheduler can now take control (after the call to cpu_idle). With interrupts enabled, the pre-emptive scheduler periodically takes control to provide multitasking.

During the boot of the kernel, the initial-RAM disk (initrd) that was loaded into memory by the stage 2 boot loader is copied into RAM and mounted. This initrd serves as a temporary root file system in RAM and allows the kernel to fully boot without having to mount any physical disks. Since the necessary modules needed to interface with peripherals can be part of the initrd, the kernel can be very small, but still support a large number of possible hardware configurations. After the kernel is booted, the root file system is pivoted (via pivot_root) where the initrd root file system is unmounted and the real root file system is mounted.

decompress_kernel output

The decompress_kernel function is where you see the usual decompression messages emitted to the display:

Uncompressing Linux... Ok, booting the kernel.

The initrd function allows you to create a small Linux kernel with drivers compiled as loadable modules. These loadable modules give the kernel the means to access disks and the file systems on those disks, as well as drivers for other hardware assets. Because the root file system is a file system on a disk, the initrd function provides a means of bootstrapping to gain access to the disk and mount the real root file system. In an embedded target without a hard disk, the initrd can be the final root file system, or the final root file system can be mounted via the Network File System (NFS).


Init

After the kernel is booted and initialized, the kernel starts the first user-space application. This is the first program invoked that is compiled with the standard C library. Prior to this point in the process, no standard C applications have been executed.

In a desktop Linux system, the first application started is commonly /sbin/init. But it need not be. Rarely do embedded systems require the extensive initialization provided by init (as configured through /etc/inittab). In many cases, you can invoke a simple shell script that starts the necessary embedded applications.


Summary

Much like Linux itself, the Linux boot process is highly flexible, supporting a huge number of processors and hardware platforms. In the beginning, the loadlin boot loader provided a simple way to boot Linux without any frills. The LILO boot loader expanded the boot capabilities, but lacked any file system awareness. The latest generation of boot loaders, such as GRUB, permits Linux to boot from a range of file systems (from Minix to Reiser).


Related Posts:


Removing Multiple Boot Screens:

If you are getting unwanted multiple boot screen
Then Follow these Steps.
1> Right Click on My Computer
2>Select Properties
3>Select Advanced Tab
4>Select Settings In the Startup & Recovery Section(3rd grp)
5>Select the operating system which u want.
6>And Click OK.
7>Further again press the setting and click on Edit.
8>It will open boot.ini File.
9>Now u can delete those o/s which you don't want to be displayed.

Note: For deleting operating systems from boot.ini file, keep it mind that you can't
delete that o/s which is selected by default there. Before
making any changes make a copy of boot.ini file.

Editing the Boot.ini file

Have you ever received a bootup error or startup error thats says correputed Boot.ini file? Or maybe you just need to make a minor change to boot.ini file but didn’t now where to locate it?

The boot.ini file is a simple text file that is stored on the root of the boot drive / hard drive.

Read the rest of this entry »

Hardware firewall

The best firewall is a hardware firewall that is completely separate from your operating system. It need not be a dedicated router, could be an old pentium box running Linux. Below I have found some sites that have How To's on setting up an outside hardware router using an old computer and using a little linux program that fits on a single floppy disk.

Brief Description:
floppyfw is a router with the advanced firewall-capabilities in Linux that fits on one single floppy disc.

Features:
Access lists, IP-masquerading (Network Address Translation), connection tracked packet filtering and (quite) advanced routing. Package for traffic shaping is also available.
Requires only a 386sx or better with two network interface cards, a 1.44MB floppy drive and 12MByte of RAM ( for less than 12M and no FPU, use the 1.0 series, which will stay maintained. )
Very simple packaging system. Is used for editors, PPP, VPN, traffic shaping and whatever comes up. (now this is looking even more like LRP (may it rest in peace) but floppyfw is not a fork.)
Logging through klogd/syslogd, both local and remote.
Serial support for console over serial port.
DHCP server and DNS cache for internal networks.

floppyfw


h#tp://www.zelow.no/floppyfw/



Sentry Firewall CD-ROM is a Linux-based bootable CDROM suitable for use as an inexpensive and easy to maintain firewall, server, or IDS(Intrusion Detection System) Node. The system is designed to be immediately configurable for a variety of different operating environments via a configuration file located on a floppy disk, a local hard drive, and/or a network via HTTP(S), FTP, SFTP, or SCP.

The Sentry Firewall CD is a complete Linux system that runs off of an initial ramdisk, much like a floppy-based system, and a CD. The default kernel is a current 2.4.x series kernel with various Netfilter patches applied. An OpenWall-patched current 2.2.x kernel is also available on the CD.

Booting from the CDROM is a fairly familiar process. The BIOS execs the bootloader(Syslinux) - which then displays a bootprompt and loads the kernel and ramdisk into memory. Once the kernel is running, the ramdisk is then mounted as root(/). At this point our configuration scripts are run(written in perl) that configure the rest of the system. It is the job of these configure scripts to put the various startup and system files into the proper location using either what is declared in the configuration file(sentry.conf) or the system defaults located in the /etc/default directory.

Most of the critical files used at boot time can be replaced with your own copy when declared in the configuration file. This is essentially how we allow the user to configure the system using his/her own configuration and init files.

All of the binaries, files, scripts, etc, used to create the CD-ROM are also available on the CD-ROM. So, with a little practice, you can easily build and customize your own bootable Sentry Firewall CD. Please see the HOWTO for more details.


Sentry Firewall


ht*p://www.sentryfirewall.com/docs.html#overview