LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-06-2005, 12:23 PM   #1
felixc
Member
 
Registered: Jul 2005
Distribution: Debian
Posts: 94

Rep: Reputation: Disabled
Boot problems with LILO and GRUB


Hello everyone,

I am a complete newbie who recently tried installing the Mandriva (formerly Mandrake) Linux distribution on a Toshiba notebook. I partitioned the drive so as to keep Windows (98, if that makes a difference) using FIPS, which worked fine. I then followed the installation instructions and installed Mandriva, and opted to use LILO as my bootloader. This, however, did not work. I got an error message regarding a file that could not be found, which resulted in "Kernel panic" and "not syncing." I searched on google for the cause of this, and found various proffered solutions. Unfortunately, I am too new to Linux to even be able to try to solve the problem the way they suggested, since most involved editing the file. I booted up using the installation CD and went into rescue mode, and cd-ed my way to the appropriate directory, but do not know what to do then.

I then went for the second solution suggested, which was to reinstall and make sure I configured things correctly to start with. I tried this, this time selecting GRUB as my bootloader, and configured everything to the best of my ability. Now, however, when I boot up, I get half a screenful of 99s, which is, according to a google search, a LILO error.

Any ideas on what I should do? I would like to not have to reformat the whole disk, as this would entail losing Windows. If this is, however, the only way, then I will do that, I have all important data backed up anyway.

Thank you,

-Felix



Edit: I should probably clarify, I have no idea how to do anything on Linux, so if you are suggesting to edit some file or something like that, please tell me what commands to use and so on. Thank you very much and sorry for the bother.

Last edited by felixc; 07-06-2005 at 12:31 PM.
 
Old 07-06-2005, 01:16 PM   #2
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,144

Rep: Reputation: 56
so are you not able to log in to windows too???

Most likely your grub installation didn't go well and you won't have to reformat the whole hard drive...may be just reinstalling grub would solve your problem.

To temporarily get windows back (assuming you can't login to windows), take your windows install disk and go into the recovery mode and fix MBR.

I am not sure if fixmbr command works for win98, you can search google for that or you can even try searching this forum.
 
Old 07-06-2005, 02:04 PM   #3
felixc
Member
 
Registered: Jul 2005
Distribution: Debian
Posts: 94

Original Poster
Rep: Reputation: Disabled
Thank you for that advice,

Since I could not get into windows, I tried your restoring idea, although I used the mbr backup that FIPS made when partitioning instead. I will retry installing, but I would greatly appreciate some advice, as I don't want to mess up for the third time.

Firstly, I have read that it is customary to partition the Linux portion of the harddrive into three, one root, one swapfile, and... what on earth is the third part for? I simply partitioned it into two last time.

Secondly, how much space should I allocate to each partition? I am running this on an old old notebook, and only have about a gig and a half available for Linux. I have previously given 64mb to the swapfile and the rest to root. 64mb I chose fairly arbitrarily, simply to match the puny 64mb RAM the notebook has. So basically, should I give more/less to the swapfile? How much should I give to root and whatever the other partition is for?

Thirdly, and most crucially, based on the experiences of my two previous installs, what should I do about bootloaders? How on earth do I configure them?

Thank you very much,

-Felix

PS - I don't know if this is normal, but my partitions were numbered 1 (windows), 2 (root), and then it jumped to 5 for the swapfile. What's going on here?
 
Old 07-06-2005, 02:28 PM   #4
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,144

Rep: Reputation: 56
Quote:
customary to partition the Linux portion of the harddrive into three, one root, one swapfile, and... what on earth is the third part for?
Nope technically, you would need atleast two partitions (one for / and one for swap) but you could increase the number of partitions to spread your system across multiple partitons which can make administration and backup easier.

Quote:
Secondly, how much space should I allocate to each partition?
For the kind of ram you have, I would recommend you go with the thumb rule which is,
swap space = 2 X RAM

The rest of the space for linux can be devoted to root or you may choose to make a seperate /home partition.

I am not aware about the default bootloader in mandriva but I guess its grub. I would prefer grub since I've always used it. If you mess up grub or lilo it doesn't mean you have to repartition & reinstall the whole OS. You can fix it. Bad bootloader install has nothing do with actual OS not running properly.

Your partition jumped from 2 to 5 because your partition tool made an extended partition and put swap on extended partition.

Tux,
 
Old 07-06-2005, 02:43 PM   #5
felixc
Member
 
Registered: Jul 2005
Distribution: Debian
Posts: 94

Original Poster
Rep: Reputation: Disabled
Thank you once again,

I will try reinstalling, and will follow those tips. The default bootloader is actually LILO, which is why I used it the first time. However I think I will use GRUB, just because of the bad experiences I have had with LILO, as well as because I used GRUB once or twice when I was looking at Knoppix to see what Linux was like.

I will run the reinstall, and hopefully GRUB will work. If not, well, I guess I'll be back here again. To try to avoid that though, what are some tips I should keep in mind when configuring GRUB? I tried to do it myself for LILO and GRUB, but it didn't really work out. In particular, where should I direct GRUB to when it looks for files?

Thank you very much for all this help, and sorry I keep running into This Should Not Happen situations...

- Felix
 
Old 07-06-2005, 03:02 PM   #6
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,144

Rep: Reputation: 56
only thing you should keep in mind while installing grub is to install it on the MBR. In your case, you are good to go since you have only one hard drive. Grub actually installs everything decently and you don't have to direct it...you can always tweak it after you install and everything is it. Having said that, we are far from it so till you get it working...we won't be needing any tweaking
 
Old 07-06-2005, 08:00 PM   #7
felixc
Member
 
Registered: Jul 2005
Distribution: Debian
Posts: 94

Original Poster
Rep: Reputation: Disabled
Hello all, again,

So the latest developments in this saga:

I installed Mandriva again, and it put LILO as my bootloader automatically. When I rebooted after the install, LILO appears and everything, but when I select "linux," I get a bit into loading and then this appears:

Code:
Mounting root filesystem with flags noatime
mount: error 6 mounting ext3 flags noatime
well, retrying without the option flags
mount: error 6 mounting ext3
well, retrying read-only without any flag
mount: error 6 mounting ext3
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
umount /initrd/sys failed: 2
umount /initrd/proc failed: 2
Initrd finished
Freeing unused kernel memory: 240k freed
Kernel panic - not syncing: no init found. Try passing init= option to kernel.
The above may not be verbatim, but it should be fairly close. What now then?

Thanks in advance,

-Felix
 
Old 07-07-2005, 09:18 AM   #8
felixc
Member
 
Registered: Jul 2005
Distribution: Debian
Posts: 94

Original Poster
Rep: Reputation: Disabled
Hi again,

Lots of new problems for you to chew on, I'm afraid

My latest attempt was to use Loadlin. I set up all the windows files properly, but ran into difficulties with copying vmlinuz to the windows c: partition. I am not familiar enough with the concept of "mounting" and the linux file structure to handle this properly, I think. I looked at some docs on it, but I still don't know how to proceed. Any advice would be greatly appreciated. What I am doing is running the rescue mode of the mandriva install CDs, then selecting the option "mount all partitions" (or something like that, mounting everything anyway), which tells me they are now all mounted. I then try to copy vmlinuz, but I don't know where to. (Problem One)

Also windows just conked out after loading fine a few times using the modified config.sys and autoexec.bat files. It now says (even when I have no floppy in the drive) that "booting from a floppy is now disabled" and asks me to "please use a boot loader instead." I tried putting ina GRUB floppy I had, which loaded fine, but when I select Windows from its menu, the same message appears. (Problem Two)

I am willing to use a GRUB floppy to boot linux, however I am not familiar with the syntax used in its menu.lst file, and the accompanying documentation was no help at all. I have not yet tried tldp.org for this, but I think personal help would benefit me far more. My attempt at inserting a Mandriva Linux option into the menu yielded an error about "selected disk does not exist". What I put was this:

Code:
# boot Mandriva Linux from hda2
title Mandriva Linux
root (hd1,0)/boot/vmlinuz root=/dev/hda2
Clarification: My harddrive is partitioned into three: hda1 is windows, hda2 is linux, and hda5 is linux swap. Furthermore, GRUB counts from zero, meaning that, to it, it is hd0 is windows, hd1 is linux.

What should I put/have put to make this work? (Problem 3)

Thank you so much,

-Felix

Last edited by felixc; 07-07-2005 at 09:21 AM.
 
Old 07-07-2005, 09:45 AM   #9
felixc
Member
 
Registered: Jul 2005
Distribution: Debian
Posts: 94

Original Poster
Rep: Reputation: Disabled
Sorry to be posting again so soon, but fairly big update on Problem 3:

My GRUB menu.lst now reads

Code:
# boot Mandriva Linux from hda2
title Mandriva Linux
root (hd0,1)
kernel /boot/vmlinuz root=/dev/hda2
Which produces a significant improvement, but still grinds to a halt with

Code:
VFS: Cannot open root device hda2 or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
I can definitely feel we're getting somewhere, but what now? Thanks,

-Felix

PS - Problems One and Two, as described above, still stump me!
 
Old 07-07-2005, 09:48 AM   #10
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,144

Rep: Reputation: 56
Quote:
GRUB counts from zero, meaning that, to it, it is hd0 is windows, hd1 is linux
You would be right if you were referring to discs (seperate hard drives) but I believe you are referring to partitions here.

so instead of this

Code:
# boot Mandriva Linux from hda2
title Mandriva Linux
root (hd1,0)/boot/vmlinuz root=/dev/hda2
You should try this:

Code:
# boot Mandriva Linux from hda2
title Mandriva Linux
root (hd0,1)/boot/vmlinuz root=/dev/hda2
In the earlier post, your lilo complained about initrd file. You should look into your /boot partition and you would see a initrd file...just put an entry after the kernel line in the lilo config file and you would be good to go. I've hardly used lilo so I won't be able to help you on that but there is lot of info available on the net.

Tux,
 
Old 07-07-2005, 09:52 AM   #11
felixc
Member
 
Registered: Jul 2005
Distribution: Debian
Posts: 94

Original Poster
Rep: Reputation: Disabled
Thank you, and sorry to have wasted your time there, but I already got the part about hd0,1. Unfortunately it still does not work, and this time I have no idea at all why.

I will try reinstalling LILO and doing what you said, but I will need a bit more clarification. You said to add something to the initrd file - what exactly should I add? Thanks and sorry to be such a pest with tons of different problems!

-Felix
 
Old 07-07-2005, 09:59 AM   #12
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,144

Rep: Reputation: 56
Go to this link and see how the lilo.conf is constructed. Pay special attention to initrd part. Construct the line in your lilo.conf but fill in the name of your initrd image from your /boot directory.

Tux,
 
Old 07-07-2005, 10:44 AM   #13
felixc
Member
 
Registered: Jul 2005
Distribution: Debian
Posts: 94

Original Poster
Rep: Reputation: Disabled
Hi again

Nope, still not working.

When I run rescue, all partitions are mounted to /mnt/. In /mnt/boot I have two initrd files: initrd.img@ and initrd-2.6.11-6mdk-i586-up-1GB.img

I edited /mnt/etc/lilo.conf to have initrd= set to the latter, long filename, one. I still get the same message.

What now? I am going to try setting it to initrd.img@ - Edit: Tried, did not work.

-Felix

EDIT:

By "same message" I mean

Mounting root filesystem with flags noatime
mount: error 6 mounting ext3 flags noatime
well, retrying without the option flags
mount: error 6 mounting ext3
well, retrying read-only without any flag
mount: error 6 mounting ext3
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
umount /initrd/sys failed: 2
umount /initrd/proc failed: 2
Initrd finished
Freeing unused kernel memory: 240k freed
Kernel panic - not syncing: no init found. Try passing init= option to kernel.

Last edited by felixc; 07-07-2005 at 10:53 AM.
 
Old 07-07-2005, 11:03 AM   #14
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,144

Rep: Reputation: 56
did you run lilo again??? Whenever you make change to your lilo.conf, you have to update your lilo installation.
do
# /sbin/lilo

and try rebooting...
 
Old 07-07-2005, 11:29 AM   #15
felixc
Member
 
Registered: Jul 2005
Distribution: Debian
Posts: 94

Original Poster
Rep: Reputation: Disabled
Hello again, hopefully I'm alomost done.

I did not know one needed to do that, so here it goes again. I have editied the lilo.conf file again, but typing /sbin/lilo returns a bash error about no such file or directory. I have tried from various places, notably /, /mnt, and /sbin itself
when in /sbin/ i can ls and see that lilo* is listed there, but trying to just type "lilo" in there returns the same error. What am I doing wrong? is there a command I am missing? Thanks,

-Felix
 
  


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
GRUB LILO boot floppy idris1388 Linux - Software 2 04-12-2005 06:53 AM
LILO did not overwrite GRUB- can't boot riemann_noodles Linux - General 2 03-03-2005 07:48 PM
lilo and grub won't boot winXP mshahwan Linux - Software 2 10-21-2004 07:57 PM
no LILO, no GRUB, NO BOOT !!! mioche Linux - Newbie 4 08-25-2003 05:55 AM
can linux boot without lilo or grub? murshed Linux - General 13 06-01-2002 05:39 AM


All times are GMT -5. The time now is 01:09 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration