LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   LinuxQuestions.org Member Success Stories (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/)
-   -   Problem with lilo [backtrack] (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/problem-with-lilo-%5Bbacktrack%5D-690595/)

abd el-hamid ibrahim 12-14-2008 07:33 PM

Problem with lilo [backtrack]
 
hey, every one
last i was installed backtrack final 3 and then my brother install windows then the lilo boot loader disappeared !!
please , any one tell me how can i fix this problem :scratch:

laitcg 12-14-2008 10:03 PM

Windows install may reset the bootable partition and mbr. Make sure your MBR is clean (from linux boot cd: dd if=/dev/zero of=/dev/hda1 bs=446 count=1) and use a partition manager to reset your boot partition to your lilo/grub partition.

whansard 12-15-2008 01:40 AM

Quote:

Originally Posted by laitcg (Post 3375709)
Windows install may reset the bootable partition and mbr. Make sure your MBR is clean (from linux boot cd: dd if=/dev/zero of=/dev/hda1 bs=446 count=1) and use a partition manager to reset your boot partition to your lilo/grub partition.


that would just zero out the boot record of the first partition, not the MBR. hda1. the master boot record would be at the beginning of hda. I think doing this will just make things worse. If hda1 is a linux partition, you could mess up something there. If it's a windows partition, you could mess up something there.
You should be able to boot from a rescue cd and reinstall lilo from there.

abd el-hamid ibrahim 12-15-2008 03:29 AM

when i installed fedora before i fixed the grub boot loader by using the grub shell in ubuntu live cd
can't i fix the lilo one by using the backtrack live cd ?? because i havn't the rescue one
if can then how i can do that !!??

duncan_roe 12-15-2008 02:54 PM

Sure you can rebuild your boot from the live CD.
The method I use is: mount your regular root disk and chroot to it.
Mount /proc.
You may need to create a device node for you HDD using mknod (I never do, but my system is old). E.g. if your lilo.conf references /dev/hda and there is no such file, do:
cd /dev
mknod hda b 3 0
Now you should be able to run lilo without changing lilo.conf. You may get a warning about a mismatch between (I forget what) but if it's jus a warning then no need to worry.
If you had a separate /boot, you'll need to mount it (*after* doing chroot). You may need to make the device node for that disk as well - check in another window (not chroot'd) what the numbers are for that device (use ls -l)

mastemmer 12-15-2008 02:55 PM

1. Boot from a Linux live CD.
2. Mount your main Linux partition. Assuming your Linux partition is in
/dev/hda5 do:

mkdir /mnt
mount /dev/hda5 /mnt

3. chrrot to your Linux partition:

chroot /mnt

4. Check the lilo configuration: (/etc/lilo.conf) and run lilo
lilo

This will reinstall lilo, restoring the mbr.

duncan_roe 12-15-2008 02:58 PM

You might want to update your lilo.conf so it will boot windows - this is from my lilo.conf:

# DOS bootable partition config begins
other = /dev/hda1
label = Windows
table = /dev/hda
# DOS bootable partition config ends

abd el-hamid ibrahim 12-17-2008 12:13 PM

Quote:

Originally Posted by mastemmer (Post 3376554)
1. Boot from a Linux live CD.
2. Mount your main Linux partition. Assuming your Linux partition is in
/dev/hda5 do:

mkdir /mnt
mount /dev/hda5 /mnt

3. chrrot to your Linux partition:

chroot /mnt

4. Check the lilo configuration: (/etc/lilo.conf) and run lilo
lilo

This will reinstall lilo, restoring the mbr.

the problem is solved .. THANQ:D


All times are GMT -5. The time now is 03:10 PM.