Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux:lilo [2012/05/15 18:03] 188.143.232.12 lsWIzeciYWMuowEE |
linux:lilo [2012/05/16 12:02] (current) a old revision restored |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | First of All, Congratulations Chrome TeamOk... Now, please imelmepnt smooth scrolling natively | + | ====== LILO ====== |
+ | |||
+ | ==== Partition Table Backup ==== | ||
+ | Many of us are doing backups of all kinds of data: from regular files, databases, to full partitions or hard drives. What I have noticed that very few peoples even think about the partition table. Given the importance of the partition table I would suggest to have a backup of it, in case you will have a corrupted partition table, if you made a change by mistake or even if that gets deleted somehow (by mistake or intentionally). You still have the data on the disk but without recreating the correct partition table it will not be very easy to get the data back. Anyway this is very easy to do, so it is better to have it on hand, than regret that you have not done this when needed. | ||
+ | |||
+ | We can get a quick look on all the existing partitions on all the available | ||
+ | |||
+ | fdisk -l | ||
+ | Disk /dev/sda: 74.3 GB, 74355769344 bytes | ||
+ | 255 heads, 63 sectors/ | ||
+ | Units = cylinders of 16065 * 512 = 8225280 bytes | ||
+ | |||
+ | | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | |||
+ | Disk /dev/sdb: 73.4 GB, 73407820800 bytes | ||
+ | 255 heads, 63 sectors/ | ||
+ | Units = cylinders of 16065 * 512 = 8225280 bytes | ||
+ | |||
+ | | ||
+ | / | ||
+ | |||
+ | If we add to the command line the particular device that corresponds to a hard disk, like /dev/sdb we get the same result only for that device: | ||
+ | |||
+ | fdisk -l /dev/sdb | ||
+ | |||
+ | Disk /dev/sdb: 73.4 GB, 73407820800 bytes | ||
+ | 255 heads, 63 sectors/ | ||
+ | Units = cylinders of 16065 * 512 = 8225280 bytes | ||
+ | |||
+ | | ||
+ | / | ||
+ | |||
+ | Of course someone might use only this information to recreate | ||
+ | |||
+ | | ||
+ | # partition table of /dev/sda | ||
+ | unit: sectors | ||
+ | |||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | |||
+ | Using sfdisk with the -d option we can get a dump of the current partition table in a regular file, and if needed we can restore it from that file: | ||
+ | |||
+ | | ||
+ | |||
+ | and to restore | ||
+ | |||
+ | | ||
+ | |||
+ | Regardless on the method used, having a backup of the partition table might be handy. ;) | ||
+ | |||
+ | One more tip: another usage of sfdisk with -d is to create an identical partition table from another | ||
+ | |||
+ | | ||
+ | |||
+ | of course this can be handy when the hard drives are identical, in raid1 setups, etc. | ||
+ | |||
+ | |||
+ | ==== Cleaning a MBR ==== | ||
+ | |||
+ | **Windows/ | ||
+ | fdisk /mbr | ||
+ | |||
+ | **Linux: | ||
+ | dd if=/ | ||
+ | |||
+ | ===== LILO ERROR codes ===== | ||
+ | |||
+ | <note tip>LILO errors do not contain any message. When it loads, it shows the LILO word. Every letter of this word is printed after or before performing some particular actions. When LILO fails to load at any point, you can use the letters that are printed so far for identifying the problem. Below is the description | ||
+ | |||
+ | * **L** : It means the first stage of boot loader is loaded | ||
+ | |||
+ | * **LI** : The first stage of boot loader has loaded second state of the boot loader, but it is unable to execute it. It can occur when you move / | ||
+ | |||
+ | * **LIL** :It states that second stage of boot loader is started, but descriptor table can not be loaded from map file. It is generally caused due to media failure. | ||
+ | |||
+ | * **LIL-** : It denotes descriptor table corruption. | ||
+ |