LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 05-17-2005, 03:28 PM   #1
PapaSmurf88
Member
 
Registered: May 2005
Distribution: Mandriva 2005 LE
Posts: 41

Rep: Reputation: 15
Need to edit LILO


Hey guys I had to reinstall my Windows XP over the weekend and now my boot.ini file is controlling my boot, and I cant access Mandrake 10.1. I dont know how I can set it back up to use LILO to select my OS i want to boot into. I am trying to run Windows XP and Mandrake 10.1 on a singel boot. I have a Knoppix live CD but im not sure if that would be the best way to edit it or what. Plz respond if you have any ideas. Thanks in advance.
 
Old 05-17-2005, 03:43 PM   #2
iwpcs
LQ Newbie
 
Registered: Apr 2005
Location: Isle of Wight (UK)
Distribution: Assorted Mandrake
Posts: 23

Rep: Reputation: 15
Presumeably you had lilo set up before, so you won't need to edit the lilo.conf file.

Boot up with the knoppix disk. When you get the boot prompt, type ' linux root=/dev/hda4 ' or wherever your Linux is. This should load your Linux instead of knoppix. Then type lilo as root & reboot.

Or run knoppix, mount the linux root partition of the hard drive somewhere, chroot to this place and run lilo.

Reboot and you should get your lilo menu back.
 
Old 05-17-2005, 05:39 PM   #3
PapaSmurf88
Member
 
Registered: May 2005
Distribution: Mandriva 2005 LE
Posts: 41

Original Poster
Rep: Reputation: 15
Okay now Im lost. I tried to do both the commands that you said and niether of them worked. I booted up knoppix and checked QTparted to find my partitions and heres what i got.

/dev/sda1 NTFS
/dev/sda2 extended
/dev/sda5 ext3
/dev/sda6 linux-swap
/dev/sda7 ext3

I tried to boot knoppix with the
Code:
linux root=/dev/sda5-7
evertime they kept just booting into regular knoppix. Then I tried to mount sda5 and run
Code:
chroot dev/sda5
as root and got this error
Code:
chroot: cannot change root directory to /dev/sda5: Not a directory
then I tried doing
Code:
chroot /mnt/sda5
and I got this
Code:
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
I then went through and tried the same thing with sda7 and both time got the Not a directory error. I tried to mount sda6 my linux-swap partition but could not get it to mount and there for could not try it.

I am completly lost with no clue what to do from here. PLZ help me out I am a compleat linux so if you could give me step by step instructions it would make it much easier for me. Thanks in advance.
 
Old 05-18-2005, 12:53 AM   #4
sgrayban
Member
 
Registered: Nov 2004
Location: Spokane, WA
Distribution: Debian 6.0
Posts: 369

Rep: Reputation: 30
start knoppix -- look at lilo.conf and find what root=/dev is to boot then reboot with knoppix and type:

linux root=/dev/what-lilo.conf-shows


or ------

start knoppix -- look at lilo.conf and find what root=/dev is.
then look at the mount points that knoppix mounted the partitions and find the mount point for the root from the lilo.conf

then type:

chroot /the/mount/path/from/knoppix
example ---> chroot /mnt/dev/hda

then type:

lilo

and reboot

Last edited by sgrayban; 05-18-2005 at 12:56 AM.
 
Old 05-18-2005, 12:58 AM   #5
iwpcs
LQ Newbie
 
Registered: Apr 2005
Location: Isle of Wight (UK)
Distribution: Assorted Mandrake
Posts: 23

Rep: Reputation: 15
Hmmm - I just tried my first method and it didn't work - used to....

So here's step by step instructions for the 2nd method:

Boot knoppix, open a console.

Enter the following :

Code:
su

mkdir /mnt/root

mount /dev/sda5 /mnt/root

chroot /mnt/root

lilo

halt

Just tested this on my box - works for me...
 
Old 05-18-2005, 01:05 AM   #6
sgrayban
Member
 
Registered: Nov 2004
Location: Spokane, WA
Distribution: Debian 6.0
Posts: 369

Rep: Reputation: 30
mount /dev/sda5 /mnt/root

Only good if sda5 is his root. All we know it could be sda7.
 
Old 05-18-2005, 01:18 AM   #7
PapaSmurf88
Member
 
Registered: May 2005
Distribution: Mandriva 2005 LE
Posts: 41

Original Poster
Rep: Reputation: 15
Sda7 is my Home folder for my User. Im gonna go try ur second idea iwpcs. Thanks for your guys help
 
Old 05-18-2005, 01:21 AM   #8
sgrayban
Member
 
Registered: Nov 2004
Location: Spokane, WA
Distribution: Debian 6.0
Posts: 369

Rep: Reputation: 30
welcome
 
Old 05-18-2005, 07:10 PM   #9
PapaSmurf88
Member
 
Registered: May 2005
Distribution: Mandriva 2005 LE
Posts: 41

Original Poster
Rep: Reputation: 15
Sry it took me so long to respond I just tried what you said iwpcs and when I entered the command
Code:
lilo
I got this error
Code:
Unrecognized token "! Please edit /etc/lilo.conf before running lilo!" at or above line 20 in file '/etc/lilo.conf'
I went to take a look at the lilo.conf but couldnt understand what it ment so I didnt want to mess with it. Any ideas what it means
 
Old 05-19-2005, 01:03 AM   #10
sgrayban
Member
 
Registered: Nov 2004
Location: Spokane, WA
Distribution: Debian 6.0
Posts: 369

Rep: Reputation: 30
paste lilo.conf here
 
Old 05-19-2005, 05:27 AM   #11
PapaSmurf88
Member
 
Registered: May 2005
Distribution: Mandriva 2005 LE
Posts: 41

Original Poster
Rep: Reputation: 15
Okay here's my lilo.conf

Code:
# File generated by DrakX/drakboot
# WARNING: do not forget to run lilo after modifying this file

default="linux"
boot=/dev/sda
map=/boot/map
keytable=/boot/us.klt
prompt
nowarn
timeout=100
message=/boot/message
menu-scheme=wb:bw:wb:bw
image=/boot/vmlinuz
	label="linux"
	root=/dev/sda5
	initrd=/boot/initrd.img
	append="acpi=ht resume=/dev/sda6 splash=silent"
	vga=788
	read-only
image=/boot/vmlinuz
	label="linux-nonfb"
	root=/dev/sda5
	initrd=/boot/initrd.img
	append="acpi=ht resume=/dev/sda6"
	read-only
image=/boot/vmlinuz-2.6.8.1-12mdk
	label="2681-12"
	root=/dev/sda5
	initrd=/boot/initrd-2.6.8.1-12mdk.img
	append="acpi=ht resume=/dev/sda6 splash=silent"
	vga=788
	read-only
image=/boot/vmlinuz
	label="failsafe"
	root=/dev/sda5
	initrd=/boot/initrd.img
	append="failsafe acpi=ht resume=/dev/sda6 devfs=nomount"
	read-only
other=/dev/sda1
	label="windows"
	table=/dev/sda
Hope that helps you out. Again thanks for all your help
 
Old 05-19-2005, 06:18 AM   #12
iwpcs
LQ Newbie
 
Registered: Apr 2005
Location: Isle of Wight (UK)
Distribution: Assorted Mandrake
Posts: 23

Rep: Reputation: 15
As a troubleshooting exercise, hash out the lines you probably don't need, so it looks like the one below, then run lilo again.

Please post the contents of your /boot directory
Code:
ls -l /boot/
Code:
default="linux"
boot=/dev/sda
#map=/boot/map
#keytable=/boot/us.klt
prompt
nowarn
timeout=100
#message=/boot/message
menu-scheme=wb:bw:wb:bw
image=/boot/vmlinuz
	label="linux"
	root=/dev/sda5
	initrd=/boot/initrd.img
	append="acpi=ht resume=/dev/sda6 splash=silent"
	vga=788
	read-only
#image=/boot/vmlinuz
#	label="linux-nonfb"
#	root=/dev/sda5
#	initrd=/boot/initrd.img
#	append="acpi=ht resume=/dev/sda6"
#	read-only
#image=/boot/vmlinuz-2.6.8.1-12mdk
#	label="2681-12"
#	root=/dev/sda5
#	initrd=/boot/initrd-2.6.8.1-12mdk.img
#	append="acpi=ht resume=/dev/sda6 splash=silent"
#	vga=788
#	read-only
#image=/boot/vmlinuz
#	label="failsafe"
#	root=/dev/sda5
#	initrd=/boot/initrd.img
#	append="failsafe acpi=ht resume=/dev/sda6 devfs=nomount"
#	read-only
other=/dev/sda1
	label="windows"
	table=/dev/sda
 
Old 05-19-2005, 06:32 AM   #13
sgrayban
Member
 
Registered: Nov 2004
Location: Spokane, WA
Distribution: Debian 6.0
Posts: 369

Rep: Reputation: 30
hmm i dont see anything wrong there in his lilo.conf

but it looks like its crapping out at:
Code:
image=/boot/vmlinuz
        label="linux-nonfb"
        root=/dev/sda5
        initrd=/boot/initrd.img
        append="acpi=ht resume=/dev/sda6"
        read-only

Last edited by sgrayban; 05-19-2005 at 06:41 AM.
 
Old 05-19-2005, 12:56 PM   #14
PapaSmurf88
Member
 
Registered: May 2005
Distribution: Mandriva 2005 LE
Posts: 41

Original Poster
Rep: Reputation: 15
Okay guys sry bout this but heres the deal. My friend came over last night with his copy of Mandriva 2005 LE. So I just upgraded from Mandrakelinux 10.1 to Mandriva 2005 LE. Thanks for all you help everyone, and im sry I wasted your time
 
Old 05-19-2005, 01:10 PM   #15
iwpcs
LQ Newbie
 
Registered: Apr 2005
Location: Isle of Wight (UK)
Distribution: Assorted Mandrake
Posts: 23

Rep: Reputation: 15
No probs - that's the other way of doing it

Chris
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
edit lilo to show only win/lin phoneix Linux - General 5 06-29-2005 03:00 PM
edit lilo file in slackware :King_58: Linux - Newbie 6 12-02-2004 06:56 AM
How to edit Lilo.conf? jmr0311 Linux - Newbie 17 07-07-2004 12:23 AM
lilo config edit problem lestoil Linux - Newbie 2 05-03-2004 03:31 PM
Can I edit the LILO setup? Wraith2288 Linux - Software 2 06-23-2003 11:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 11:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration