Results 1 to 2 of 2

Thread: Restore lilo

  1. #1
    Member registered user
    Join Date
    May 2005
    Posts
    48

    Restore lilo

    Knoppix 3.8.1 is installed on my hard drive.
    I tried to defrag my partition with e2defrag from the Knoppix CD.
    Thinks looked running well.
    But now I am unable to boot again from the hard drive.
    When I try to restore lilo from the Knoppix CD I get a message saying the hard drive is protected against writing.
    How to proceed for the boot restoration?

    I tried to follow the procedure #52 described in the O'Reilly book "Knoppix at 200%".
    But remounting the hd is rejected because of the writing protection.

  2. #2
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    Long Island, NY USA
    Posts
    1,510
    Lets assume that hda1 is a windows C: drive & hda2 is your root partition.
    Boot with knoppix with the boot cheat code: knoppix 2 vga=normal
    At the prompt, mount the root partition: mount /dev/hda2 /mnt/hda2
    Chroot into the mounted root partition: chroot /mnt/hda2 /bin/bash
    Re-apply lilo: /sbin/lilo
    Exit the chroot:exit
    Unmount the root partition: umount /mnt/hda2
    reboot the machine.

    That said: Why would you defrag the root partition? Linux filesystems do not exhibit the same file fragmentation problems that occur with Windows FAT32 & NTFS filesystems.

    From https://www.redhat.com/archives/fedo.../msg04277.html
    Defragmentation is generally not necessary under Linux's
    ext2/ext3 filesystems. If fragmentation ever becomes an
    issue at all (which is very rare), it's mostly likely under these
    conditions:
    1. The filesystem is frequently near full capacity
    2. There is a lot of writing and deleting going on.
    For #2, it's especially troublesome for files that are written
    a little bit at a time (they "grow" slowly), such as log files--
    files written all in one shot are fairly imune to fragmentation.
    from Using Disks And Other Storage Media
    Fighting Fragmentation

    When a file is written to disk, it can’t always be written in consecutive blocks. A file that is not stored in consecutive blocks is fragmented. It takes longer to read a fragmented file, since the disk’s read-write head will have to move more. It is desirable to avoid fragmentation, although it is less of a problem in a system with a good buffer cache with read-ahead.

    The ext2 filesystem attempts to keep fragmentation at a minimum, by keeping all blocks in a file close together, even if they can’t be stored in consecutive sectors. ext2 effectively always allocates the free block that is nearest to other blocks in a file. For ext2, it is therefore seldom necessary to worry about fragmentation. There is a program for defragmenting an ext2 filesystem, see
    In most cases defragging a linux partition is not necessary and if it is necessary you would have enough experience & to know what to do & how to recover from it. If you do not know WHY you need to do something, then don't do it & seek someone's help.

Similar Threads

  1. Backup HDD to USB and Restore from USB to HDD
    By GCMartin in forum General Support
    Replies: 2
    Last Post: 06-21-2010, 01:40 PM
  2. Restore Permissions
    By Gemu in forum Hdd Install / Debian / Apt
    Replies: 2
    Last Post: 03-05-2009, 03:45 AM
  3. Help to restore files....
    By andyc in forum Hardware & Booting
    Replies: 2
    Last Post: 12-01-2006, 06:46 AM
  4. Reinstall lilo to hda, using hda lilo.conf and knoppix live
    By tomjermy in forum Hardware & Booting
    Replies: 1
    Last Post: 03-17-2005, 01:07 AM
  5. Kernel restore?
    By Linuxshark in forum Hdd Install / Debian / Apt
    Replies: 6
    Last Post: 07-20-2004, 12:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Fanxiang SSD 512GB 1TB 2TB 4TB 2.5''SATA III Internal Solid State Hard Drive LOT picture

Fanxiang SSD 512GB 1TB 2TB 4TB 2.5''SATA III Internal Solid State Hard Drive LOT

$188.99



Netac 1TB 2TB 512GB Internal SSD 2.5'' SATA III 6Gb/s Solid State Drive lot picture

Netac 1TB 2TB 512GB Internal SSD 2.5'' SATA III 6Gb/s Solid State Drive lot

$109.99



SAMSUNG SSD 870 EVO 1TB 500GB 250GB 2.5 inch SATA III 3 Solid State Drive US picture

SAMSUNG SSD 870 EVO 1TB 500GB 250GB 2.5 inch SATA III 3 Solid State Drive US

$97.99



Fanxiang M.2 SATA SSD 2TB 1TB 512GB 256GB SSD Internal M2 Solid State Drive Lot picture

Fanxiang M.2 SATA SSD 2TB 1TB 512GB 256GB SSD Internal M2 Solid State Drive Lot

$109.99



Patriot P210 128GB 256GB 512GB 1TB 2TB 2.5

Patriot P210 128GB 256GB 512GB 1TB 2TB 2.5" SATA 3 6GB/s Internal SSD PC/MAC Lot

$13.99



Crucial MX500 CT250MX500SSD1 250 GB SATA III 2.5 in Solid State Drive picture

Crucial MX500 CT250MX500SSD1 250 GB SATA III 2.5 in Solid State Drive

$14.99



850 EVO 2TB SATA 6Gb/s 2.5

850 EVO 2TB SATA 6Gb/s 2.5" SSD MZ-75E2T0 Laptop PC Drive

$88.95



Fanxiang M.2 SATA SSD 1TB 2TB 512GB 256GB NGFF M2 Internal Solid State Drive Lot picture

Fanxiang M.2 SATA SSD 1TB 2TB 512GB 256GB NGFF M2 Internal Solid State Drive Lot

$35.99



Fanxiang SSD 4TB 2TB 1TB PS5 SSD M.2 NVME SSD 7300MBS PCIe 4.0 Solid State Drive picture

Fanxiang SSD 4TB 2TB 1TB PS5 SSD M.2 NVME SSD 7300MBS PCIe 4.0 Solid State Drive

$237.49



Fanxiang SSD 512GB 1TB 2TB 4TB 2.5'' SSD SATA III Internal Solid State Drive lot picture

Fanxiang SSD 512GB 1TB 2TB 4TB 2.5'' SSD SATA III Internal Solid State Drive lot

$104.99