Tag: grub

260px-GRUB_screenshotBy Eddison Sherry

Booting (booting up) in computing is the process of starting the Operating System when the computer is switched on. A boot sequence is the initial set of operations performed when the computer is switched on. Some commonly used bootloaders are GRUB, BOOTMGR, Syslinux, LILO, NTLDR. Linux booting process is much simple to understand and much things to learn.

300px-LiloFor Linux, the most common boot loaders are LILO(LInux Loader), LOADLIN (LOAD LINux) and GRUB (GRand Unified Bootloader). LILO is the most popular boot loader for those users who employ Linux as the main, or only, operating system.LILO is a very fast bootloader. LOADLIN is used by those who have multiple operating systems. LOADLIN is sometimes used as a backup boot loader for Linux in case LILO fails. GRUB is preferred by many users of Red Hat Linux.

A boot loader consists of three programs:

The boot sector program (512 bytes) is directly loaded by the BIOS at boot time.

The second stage program is loaded by the boot sector program and it can do everything you program it for.

The boot loader installer is used to install the boot loader and the second stage program onto the boot disk. These have to be stored in special locations, into the first sector of boot device. So they cannot be copied with a mere copy command.

Now we will compare the features of mostly used GRUB and LILO bootloaders.GRUB is capable of loading a variety of free and proprietary operating systems. GRUB will work well with Linux, DOS, Windows, or BSD. GRUB is dynamically configurable which means changes can be made during the boot time, which includes altering existing boot entries, adding custom entries, selecting different kernels, or modifying initrd. GRUB supports Logical Block Address mode meaning if the computer has a modern BIOS which can access more than 8GB (first 1024 cylinders) of hard disk space, GRUB will automatically be able to access it. Besides these GRUB can be run from or be installed to any device like floppy disk, hard disk, CD-ROM, USB drive, network drive and can load operating systems from just as many locations, including network drives. It can also decompress operating system images before booting them.

LILO is a sensible option for many Linux users and is a fast bootloader. LILO does not depend on a particular file system.One of up to sixteen different images can be selected at boot time. Parameters can be set independently for each kernel. LILO can be placed either in the master boot record (MBR) or the boot sector of a partition. At system start, only the BIOS drivers are available for LILO to access hard disks. So with very old BIOS, the accessible area is limited to cylinders 0 to 1023 of the first two hard disks. For later BIOS, LILO can use 32-bit logical block addressing (LBA) to access all the hard disks that the BIOS allows. LILO has some disadvantages when compared with GNU GRUB.

LILO supports only up to 16 different boot selections; GRUB supports an unlimited number of boot entries.

LILO cannot boot from network.

LILO must be written again every time you change the configuration file; GRUB does not.

LILO does not have an interactive command interface.

Finally, there are multiple choices of bootloaders which work with the Linux operating system of which the user can choose the ones best suited for the requirements.

Eddison Sherry had been working in Linux and other Unix flavours for long years. He had been writing blogs and article on the Linux Storage, Linux Commands and Linux Server Administration. If you are working on Linux or Unix Server its best to have a look on his blogs at Linux Technical Forum.

Tags: , ,

RAID1By Robert Camilleri

We start by listing the partition tables present on the server to locate the new hard disk

[root@mail ~]# fdisk -l

Disk /dev/hda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 13 104391 fd Linux raid autodetect
/dev/hda2 14 6387 51199155 fd Linux raid autodetect
/dev/hda3 6388 6769 3068415 fd Linux raid autodetect
/dev/hda4 6770 60801 434012040 fd Linux raid autodetect

Disk /dev/hdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/hdc doesn’t contain a valid partition table

Disk /dev/md1: 52.4 GB, 52427816960 bytes
2 heads, 4 sectors/track, 12799760 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn’t contain a valid partition table

Disk /dev/md3: 444.4 GB, 444428255232 bytes
2 heads, 4 sectors/track, 108502992 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md3 doesn’t contain a valid partition table

Disk /dev/md2: 3141 MB, 3141926912 bytes
2 heads, 4 sectors/track, 767072 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md2 doesn’t contain a valid partition table

Disk /dev/md0: 106 MB, 106823680 bytes
2 heads, 4 sectors/track, 26080 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md0 doesn’t contain a valid partition table

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 121601 976760001 83 Linux
[root@mail ~]#

The above output shows that there are two hard disks (hda and hdc). Partitions are visible on hda however hdc does not contain a valid partition table. In fact this is the replacement for the faulty disk.

To view the health of the Software RAID type cat /proc/mdstat

[root@mail ~]# cat /proc/mdstat

Personalities: [raid1]

md0: active raid1 hda1[1]

104320 blocks [2/1] [_U]

md2: active raid1 hda3[1]
3068288 blocks [2/1] [_U]

md3: active raid1 hda4[1]
434011968 blocks [2/1] [_U]

md1: active raid1 hda2[1]
51199040 blocks [2/1] [_U]

unused devices:
[root@mail ~]#

Note that [2/1] shows that there are 2 disks in the array however only 1 is active. The symbols [_U] mean that one of the two disks is missing from the array and must be reconfigured.

Since the new disk is /dev/hdc we need create the partitions required for the RAID. Use fdisk to create the boot partition on the new disk.

[root@mail ~]# fdisk /dev/hdc

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.

The number of cylinders for this disk is set to 60801.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0×0000 of partition table 4 will be corrected by w(rite)

Command (m for help): p

Disk /dev/hdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-60801, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-60801, default 60801): +100M

Command (m for help): p

Disk /dev/hdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 1 13 104391 83 Linux

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): l

0 Empty 1e Hidden W95 FAT1 80 Old Minix be Solaris boot
1 FAT12 24 NEC DOS 81 Minix / old Lin bf Solaris
2 XENIX root 39 Plan 9 82 Linux swap / So c1 DRDOS/sec (FAT-
3 XENIX usr 3c PartitionMagic 83 Linux c4 DRDOS/sec (FAT-
4 FAT16 5 Extended 41 PPC PReP Boot 85 Linux extended c7 Syrinx
6 FAT16 42 SFS 86 NTFS volume set da Non-FS data
7 HPFS/NTFS 4d QNX4.x 87 NTFS volume set db CP/M / CTOS /.
8 AIX 4e QNX4.x 2nd part 88 Linux plaintext de Dell Utility
9 AIX bootable 4f QNX4.x 3rd part 8e Linux LVM df BootIt
a OS/2 Boot Manag 50 OnTrack DM 93 Amoeba e1 DOS access
b W95 FAT32 51 OnTrack DM6 Aux 94 Amoeba BBT e3 DOS R/O
c W95 FAT32 (LBA) 52 CP/M 9f BSD/OS e4 SpeedStor
e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a0 IBM Thinkpad hi eb BeOS fs
f W95 Ext’d (LBA) 54 OnTrackDM6 a5 FreeBSD ee EFI GPT
10 OPUS 55 EZ-Drive a6 OpenBSD ef EFI (FAT-12/16/
11 Hidden FAT12 56 Golden Bow a7 NeXTSTEP f0 Linux/PA-RISC b
12 Compaq diagnost 5c Priam Edisk a8 Darwin UFS f1 SpeedStor
14 Hidden FAT16 16 Hidden FAT16 63 GNU HURD or Sys ab Darwin boot f2 DOS secondary
17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fd Linux raid auto
18 AST SmartSleep 65 Novell Netware b8 BSDI swap fe LANstep
1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid ff BBT
1c Hidden W95 FAT3 75 PC/IX
Hex code (type L to list codes): fd
Changed system type of partition 1 to fd (Linux raid autodetect)

Command (m for help): p

Disk /dev/hdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 1 13 104391 fd Linux raid autodetect

Command (m for help):w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@mail ~]#

Type fdisk -l to verify creation of partition on the second disk

[root@mail ~]# fdisk -l

Disk /dev/hda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 13 104391 fd Linux raid autodetect
/dev/hda2 14 6387 51199155 fd Linux raid autodetect
/dev/hda3 6388 6769 3068415 fd Linux raid autodetect
/dev/hda4 6770 60801 434012040 fd Linux raid autodetect

Disk /dev/hdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 1 13 104391 fd Linux raid autodetect

Disk /dev/md1: 52.4 GB, 52427816960 bytes
2 heads, 4 sectors/track, 12799760 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn’t contain a valid partition table

Disk /dev/md3: 444.4 GB, 444428255232 bytes
2 heads, 4 sectors/track, 108502992 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md3 doesn’t contain a valid partition table

Disk /dev/md2: 3141 MB, 3141926912 bytes
2 heads, 4 sectors/track, 767072 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md2 doesn’t contain a valid partition table

Disk /dev/md0: 106 MB, 106823680 bytes
2 heads, 4 sectors/track, 26080 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md0 doesn’t contain a valid partition table

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 121601 976760001 83 Linux
[root@mail ~]#

Software RAID requires disks in the array to be partitioned identically. You can try to do this manually calculating the exact number of cylinders required for each partition to match their counterparts on the other disk. This is highly discouraged. Instead we use the sfdisk command.

[root@mail ~]# sfdisk -d /dev/hda

# partition table of /dev/hda

unit: sectors

/dev/hda1: start= 63, 208782, Id=fd
/dev/hda2: start= 208845, Id=fd
/dev/hda3: start=102607155, 6136830, Id=fd
/dev/hda4: start=108743985, Id=fd
[root@mail ~]#

The output above displays the partition sizes on the primary disk

In order to create identical partitions on the secondary disk we type the following

[root@mail ~]# sfdisk -d /dev/hda | sfdisk /dev/hdc

Checking that no-one is using this disk right now... 

OK

Disk /dev/hdc: 60801 cylinders, 255 heads, 63 sectors/track
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/hdc1 0+ 12 13- 104391 fd Linux raid autodetect
/dev/hdc2 0 – 0 0 0 Empty
/dev/hdc3 0 – 0 0 0 Empty
/dev/hdc4 0 – 0 0 0 Empty
New situation:
Units = sectors of 512 bytes, counting from 0

Device Boot Start End #sectors Id System
/dev/hdc1 63 208844 208782 fd Linux raid autodetect
/dev/hdc2 208845 102607154 102398310 fd Linux raid autodetect
/dev/hdc3 102607155 108743984 6136830 fd Linux raid autodetect
/dev/hdc4 108743985 976768064 868024080 fd Linux raid autodetect
Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.
Successfully wrote the new partition table

Re-reading the partition table…

If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
[root@mail ~]#

Typing fdisk -l once again displays that the partitions on both disks are in fact identical

[root@mail ~]# fdisk -l

Disk /dev/hda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 13 104391 fd Linux raid autodetect
/dev/hda2 14 6387 51199155 fd Linux raid autodetect
/dev/hda3 6388 6769 3068415 fd Linux raid autodetect
/dev/hda4 6770 60801 434012040 fd Linux raid autodetect

Disk /dev/hdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 1 13 104391 fd Linux raid autodetect
/dev/hdc2 14 6387 51199155 fd Linux raid autodetect
/dev/hdc3 6388 6769 3068415 fd Linux raid autodetect
/dev/hdc4 6770 60801 434012040 fd Linux raid autodetect

Disk /dev/md1: 52.4 GB, 52427816960 bytes
2 heads, 4 sectors/track, 12799760 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn’t contain a valid partition table

Disk /dev/md3: 444.4 GB, 444428255232 bytes
2 heads, 4 sectors/track, 108502992 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md3 doesn’t contain a valid partition table

Disk /dev/md2: 3141 MB, 3141926912 bytes
2 heads, 4 sectors/track, 767072 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md2 doesn’t contain a valid partition table

Disk /dev/md0: 106 MB, 106823680 bytes
2 heads, 4 sectors/track, 26080 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md0 doesn’t contain a valid partition table

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 121601 976760001 83 Linux
[root@mail ~]#

Now that the partitions are identical we can re-sync the information across the RAID configuration

Type mdadm -a /dev/md0 /dev/hdc1 to add /dev/hdc1 partition to the /dev/md0 RAID partition.

[root@mail ~]# mdadm -a /dev/md0 /dev/hdc1

mdadm: added /dev/hdc1

[root@mail ~]#

Type cat /proc/mdstat to view the re-syncing process

[root@mail ~]# cat /proc/mdstat

Personalities: [raid1]

md0: active raid1 hdc1[2] hda1[1]

104320 blocks [2/1] [_U]

[=>... ] recovery = 7.8% (8512/104320) finish=0.7min speed=2128K/sec

md2: active raid1 hda3[1]
3068288 blocks [2/1] [_U]

md3: active raid1 hda4[1]
434011968 blocks [2/1] [_U]

md1: active raid1 hda2[1]
51199040 blocks [2/1] [_U]

unused devices:
[root@mail ~]# cat /proc/mdstat
Personalities: [raid1]
md0: active raid1 hdc1[2] hda1[1]
104320 blocks [2/1] [_U]
[=======>... ] recovery = 37.2% (39808/104320) finish=0.5min speed=1809K/sec

md2: active raid1 hda3[1]
3068288 blocks [2/1] [_U]

md3: active raid1 hda4[1]
434011968 blocks [2/1] [_U]

md1: active raid1 hda2[1]
51199040 blocks [2/1] [_U]

unused devices:

The below shows how the output should be when the re-syncing process has ended. Note the “[UU]“. This confirms that both disks are active.

[root@mail ~]# cat /proc/mdstat

Personalities: [raid1]

md0: active raid1 hdc1[0] hda1[1]

104320 blocks [2/2] [UU]

md2: active raid1 hda3[1]
3068288 blocks [2/1] [_U]

md3: active raid1 hda4[1]
434011968 blocks [2/1] [_U]

md1: active raid1 hda2[1]
51199040 blocks [2/1] [_U]

unused devices:
[root@mail ~]#

The same process has to be performed on the other partitions

[root@mail ~]# mdadm -a /dev/md1 /dev/hdc2

mdadm: added /dev/hdc2

[root@mail ~]# mdadm -a /dev/md2 /dev/hdc3

mdadm: added /dev/hdc3

[root@mail ~]# mdadm -a /dev/md3 /dev/hdc4

mdadm: added /dev/hdc4

[root@mail ~]# cat /proc/mdstat

Personalities: [raid1]

md0: active raid1 hdc1[0] hda1[1]

104320 blocks [2/2] [UU]

md2: active raid1 hdc3[2] hda3[1]
3068288 blocks [2/1] [_U]
resync=DELAYED

md3: active raid1 hdc4[2] hda4[1]
434011968 blocks [2/1] [_U]
resync=DELAYED

md1: active raid1 hdc2[2] hda2[1]
51199040 blocks [2/1] [_U]
[>... ] recovery = 0.0% (37376/51199040) finish=501.5min speed=1698K/sec

unused devices:
[root@mail ~]#

Finally we need to install GRUB on the second disk’s MBR.

[root@mail ~]# grub
GNU GRUB version 0.97 (640K lower / 3072K upper memory)

[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]

grub> find /grub/grub.conf
(hd0,0)
(hd1,0)

grub> root (hd1,0)
Filesystem type is ext2fs, partition type 0xfd

grub> setup (hd1)
Checking if “/boot/grub/stage1″ exists… no
Checking if “/grub/stage1″ exists… yes
Checking if “/grub/stage2″ exists… yes
Checking if “/grub/e2fs_stage1_5″ exists… yes
Running “embed /grub/e2fs_stage1_5 (hd1)”… 15 sectors are embedded.
succeeded
Running “install /grub/stage1 (hd1) (hd1)1+15 p (hd1,0)/grub/stage2 /grub/grub.conf”… succeeded
Done.

grub> quit

Tags: , , , , ,

Redhat Linux Runlevels

Redhat Linux Runlevels

By Tom Connelly

The order in which Linux starts system services is governed by what runlevel is assigned to the service in question. Some runlevels will boot or halt the system itself, while others control regular system services or even programs that the administrator installs and wants started at a particular time in the boot cycle. These runlevels are controlled with scripts that are defined by runlevel named directories in which they reside. The default runlevel for the system is set in the /etc/inittab file, but it can be overridden from the GRUB boot loader menu. Redhat Enterprise Linux has six runlevels.

Runlevel 0: Halt the system. When the system is sent to this runlevel, everything shuts down and the system is completely halted. If the computer’s BIOS supports it, the machine is powered off at the end of the process.

Runlevel 1: This is single user mode. In single user mode an administrator can do all sorts of maintenance, like backups, restores, and repairs. This is useful because no other users can be logged in and the system is not prone to having others change things, which is important when this sort of work is being done. Networking is not enabled so the network interfaces and infrastructure are offline.

Runlevel 2: In this runlevel, multiuser functionality is enabled with only some networking services enabled.

Runlevel 3: Multiuser mode is enabled with full networking functionality.

Runlevel 4: This runlevel is currently not used.

Runlevel 5: The X Windows graphical user interface system is enabled and the user is brought to a graphical login screen. After logging in, the user is taken to their graphical desktop as in all of the popular operating systems of today. Networking is fully enabled.

Runlevel 6: This is the reboot runlevel. It does what it says and reboots the system. You should never set the /etc/inittab default runlevel to number 6 for obvious reasons. Your system would be in an endless reboot loop.

Each runlevel has a bunch of scripts associated with it. Runlevel 3 scripts are located in the /etc/rc.d/rc3.d directory. The runlevel directories are rc0.d through rc6.d, and they are all located under the /etc/rc.d directory. Whatever the default runlevel is set to in the /etc/inittab file, the system will look in the appropriate runlevel directory and execute the scripts in numeric order, starting and killing services according to the scripts. The start scripts start with an “S” and the kill scripts with a “K”. The scripts in the runlevel directories are really just symbolic links to the real script files in the /etc/rc.d/init.d directory. The /etc/rc.d/ rc(number).d directory is hard linked to /etc/rc(number).d directory, so you can use the shorter one to get to the same place.

Knowing about Linux runlevels is an important part about knowing how to handle a Linux system, and the knowledge translates to UNIX systems as well. There will be minor and subtle differences, such as varying directory names and different boot loaders, but it is essentially the same framework.

Tom has worked for technology companies for 15+ years starting as a software quality assurance tech and migrating over to IT as a UNIX, Linux, and Windows systems operator and administrator. The Techbait technology and tech products portal is the place to be for geeks on the go. http://techbait.net

Tags: , , , ,

How to Perform Linux Data Recovery

By Kuldeep Kulmii

Linux is the UNIX like operating system that uses the Linux kernel of Monolithic type. The OS is being installed on a vast range of tablet computers, mobiles, video game consoles, mainframes, super computers etc. Even, statistics says that as, server OS, Linux accounts more than 50% of the whole global installations. Also,over the years, Linux operating system has gained fair amount of popularity among the common home users with the Fedora, Ubuntu and OpenSUSE distributions. Moreover, with the egression of smart phones, netbooks etc, which are running on embedded Linux, the operating system has been more closely used by many users. Though Linux has advanced technology and features, sometimes, some errors lead to data loss or inaccessibility and you need to look for any Linux data recovery software to recover back your valuable data.

In day to day usage of a Linux system, there can be enormous possibility of data loss situations, and you may not always successful in trouble shooting the system to gain access of your data. Hence, if you don’t have a valid backup available or failed to restore the data from the backup, Linux recovery is the answer to bring back your data.

Common data loss situations in Linux:

Error – Mount wrong fs type, bad option, bad super block on /dev/hdb2.

Error – Too many mounted file systems.

File system error.

Grub Error 12 – Invalid device requested.

Grub Error 17 – Can not mount selected partition.

There can be many such errors leading to the loss or inaccessibility of your Linux data. In such cases, if you are a technical person, then you can trouble shoot at the low-level. You can run the ‘fsck’ command to detect and fix such error. Prior to running the ‘fsck’ command, first, you need to go to the single user mode. Then, you have to unmount the file system partition, you are going to work upon, if it is not the root file system. If you don’t take enough care to unmount the file system, the ‘fsck warns you, such as- ‘The file system is mounted, do you want to continue anyway?’ Saying yes to the message, may result in the loss of your data, because, at times, ‘fsck’ writes directly to the disk.

If you need to check the root file system based partition, you have to boot the system in single user mode and run the ‘fsck’ with a ‘-b’ option so that it will run in a read-only mode. Also, the ‘-b’ option directly go to the ‘init’ and makes an emergency booting while skipping the other start-up scripts.

Sometimes, ‘fsck’ fails to run or exits without running at all. At that time, you need to force run the utility with ‘-f’ option. This is a case of severe corruption and you need to give additional information to ‘fsck’, such as the size of the alternate superblock or the address of the superblock to fetch the data and fix the error.

However, sometimes, these low-level recovery process is tedious as well as risky with respect to your valuable data. Hence, you can go for any Linux data recovery software, which can recover the data for you safely.

Stellar Phoenix Linux Data Recovery is a risk free Linux recovery utility to recover your lost, deleted, formatted or inaccessible data from ext2, ext4, ext3, FAT and NTFS file system based volumes. Moreover, with step-wise-instructions based GUI, the software can be easily used by any user without much technical knowledge.

Kuldeep a techno geek is a technical writer doing research on different file system in linux like Ext2, Ext3. And Ext4. He is also interested in linux data recovery, Linux Partition Recovery And Linux file recovery. He is currently working with http://www.data-recovery-linux.com

Tags: , , , ,

Well, I tried to get Puppy Linux installed on my old Presario notebook PC as I wrote about recently, but I just couldn’t get the install to take.

Old Compaq Presario

Old Compaq Presario

For some reason we could not get the Grub boot loader to boot it up properly. No big deal, that gave me a good excuse to try another distro, and I’m glad I did!

CrunchBang Linux 8.10 is the distro that I was interested in trying on this old machine because it was advertised as being lightweight, and made for lesser machines. I tried the “Lite” version, that ran very well, so I the opted for the “Standard” version, and it’s been great ever since. It installed without a hitch.

CrunchBang is tightly based on Ubuntu with Openbox as the window manager, a much lighter-weight one than Ubuntu’s standard, Gnome.

CrunchBang Linux 8.10

CrunchBang Linux 8.10

It is also interesting looking because it makes use of Conky, which is a free software system monitor for the X Window System. and since it is prominently sitting on the desktop, it makes it seem easy to check it out and start to configure it, with all the examples out there it really isn’t that tough. CrunchBang ran great on that 192MB of RAM dinosaur with Firefox running (with the included Adobe Flash, by the way!), only bogging down when the Package Manager was also running.

All in all, whether or not your PC is old and worn out, CrunchBang Linux is a great player in Linux arena!

Tags: , , , , , , , , , ,

Multi boot or Multi booting (usually dual booting, but many OSes can be booted from the same computer) is the act of installing multiple operating systems on a computer, and being able to choose which one to boot when switching on the computer power. The program which makes multi booting possible is called a boot loader.grub_with_ubuntu_and_windows_vista1

Multi booting is useful in many situations, such as those where several pieces of software require different operating systems and cannot be run on a single system. A multi boot configuration will allow a user to use all of this software on one computer. Another reason for setting up a multi boot system can be that one wants to investigate or test a new operating system without switching completely. Multi booting allows one to get to know the new system, configure all applications needed and migrate data before making the final step and removing the old operating system. This is often accomplished by using a boot loader that can boot more than one operating system, such as NTLDR, LILO, or GRUB.

Multi booting can also aid software developers where multiple operating systems are required for development or testing purposes. Having these systems on one machine can greatly reduce hardware costs. (However hardware costs are counterbalanced by system management costs, and the costs of the unavailability of the software that cannot be run at any given moment. Another solution to these problems is to use virtual machine software to emulate another computer from within the operating system of choice.)

A popular multi-boot configuration is a mixed-OS system in which Linux is one of the secondary (or primary) installations. In terms of business strategy, Windows does not facilitate or support multi-boot systems, other than allowing for partition-specific installations, and no choice of boot loader is offered. To deal with such installs requires consultation with Linux afficionados and techs, who are typically well-versed in the concept.

The basic concept involves partitioning a disk, to accommodate each planned installation, including separate partitions for data storage or backups. The partitions should be done with a Windows partitioning tool (diskpart, Disk Management), rather than a Linux tool (parted, QTparted), for the simple reason that Windows is more particular (cf. “picky”) about how the partition table is written and will occasionally complain or even show errors if its installed to a Linux-created (or sometimes modified) partition table. Linux tools are powerful, (ie. shrinking an NTFS drive) but Windows has particularities which must be considered. (See master boot record and extended boot record).

Windows should be installed to the first primary drive. Though Windows can be installed to another drive, certain particularities (drive letter assignments, expected system partition number) can make such installations problematic, while Linux installations on primary or logical drives have no such problems whatsoever.

The boot manager/loader should be installed by the Linux distribution. All Windows installations will be easily found by Linux, but Windows boot managers do not find Linux installations (nor does Windows deal natively with Linux file systems).

Get Linux Today!

Excellent resources below:

How to dual boot Windows XP and Linux (XP installed first) — the step-by-step guide with screenshots

Illustrated Dual Boot Site – Awesome site with all things Linux!

Tags: , , , , , , , , , ,
Back to top