-
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.
-
Senior Member
registered user
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 cant 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 disks 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 cant 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
-
By GCMartin in forum General Support
Replies: 2
Last Post: 06-21-2010, 01:40 PM
-
By Gemu in forum Hdd Install / Debian / Apt
Replies: 2
Last Post: 03-05-2009, 03:45 AM
-
By andyc in forum Hardware & Booting
Replies: 2
Last Post: 12-01-2006, 06:46 AM
-
By tomjermy in forum Hardware & Booting
Replies: 1
Last Post: 03-17-2005, 01:07 AM
-
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
-
Forum Rules
ORICO Multi Bay RAID Hard Drive Enclosure USB 3.0/ Type-C For 2.5/3.5'' HDD SSDs
$149.99
36TB SanDisk G-RAID 2 Thunderbolt 3 External Hard Drive - Excellent Condition
$700.00
Dell EMC 092GD6 Broadcom 9305-16i LSI Quad Port 4 Port SAS RAID Controller
$84.99
G-TECHNOLOGY G-RAID GR4 2000 2TB EXTERNAL HARD DRIVE USBFIREWIREeSATA *LOW USE*
$37.99
Inspur LSI 9300-8i Raid Card 12Gbps HBA HDD Controller High Profile IT MODE
$15.98
LSI MegaRAID 9361-8i 12Gbps PCIe 3 x8 SATA SAS 3 8 Port RAID + BBU & CacheVault
$39.00
9207-8i PCIE3.0 6Gbps HBA LSI FW:P20 IT Mode ZFS FreeNAS unRAID 2* SFF-8087 US
$32.88
Dell PERC H810 RAID Adapter Controller High Profile NDD93 PowerEdge
$22.99
ORICO 5 Bay Raid Hard Drive Enclosure USB C, 3.5” SATA HDD, Up To 80TB, NS500RC3
$139.99
SanDisk Professional 44TB G-RAID Mirror 2-Bay RAID Array 2 x 22TB, Thunderbolt 3
$1000.00