LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 07-18-2011, 03:48 PM   #1
Firefox54
Member
 
Registered: Apr 2011
Distribution: #!
Posts: 65

Rep: Reputation: Disabled
Question Lilo boot freeze on booting kernel


I try to boot and lilo only to gets to booting the kernel, then it freezes.


What it gives me is below
Code:
Lilo 22.8  Loading Linux
Initial ramdisk loads below 4Mb; kernel overwrite is possible ..............................................................
BIOS data check successful 
Probing EDD (EDD=off to disable)

Decompressing Linux... Parsing ELF... booting the kernel.
Then it just sits there

Any help is appreciated
 
Old 07-19-2011, 10:13 AM   #2
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,492

Rep: Reputation: 567Reputation: 567Reputation: 567Reputation: 567Reputation: 567Reputation: 567
At a restart, it loads kernel & ramdisk, boots the kernel, then mounts root.

rerun lilo first. Then think. Can you boot from (any) install CD/DVD? I would comment out the ramdisk line and try that. If you still end up on the rocks, run memtest86.
 
1 members found this post helpful.
Old 07-19-2011, 07:17 PM   #3
padeen
Member
 
Registered: Sep 2009
Location: Perth, W.A.
Distribution: Slackware 14, Debian 7, FreeBSD, OpenBSD
Posts: 179

Rep: Reputation: 35
See this blog entry about running lilo in a chroot:

http://www.nickcoleman.org/blog/inde...6131822%21unix

To enter a chroot, boot with a rescue disk, mount your normal partitions somewhere (say, /mnt), mount /dev and /proc, chroot to where you mounted your partitions, and run lilo.

Also, check if you made or need to make an initrd before running lilo.
 
1 members found this post helpful.
Old 07-19-2011, 10:00 PM   #4
Firefox54
Member
 
Registered: Apr 2011
Distribution: #!
Posts: 65

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
At a restart, it loads kernel & ramdisk, boots the kernel, then mounts root.

rerun lilo first. Then think. Can you boot from (any) install CD/DVD? I would comment out the ramdisk line and try that. If you still end up on the rocks, run memtest86.
I can boot from small cds just fine. Its just Lilo and Grub that I have a problem with. I got Lilo to run, but upon reinstallation I picked the wrong settings and it doesn't boot.

Quote:
To enter a chroot, boot with a rescue disk, mount your normal partitions somewhere (say, /mnt), mount /dev and /proc, chroot to where you mounted your partitions, and run lilo.

Also, check if you made or need to make an initrd before running lilo.
This is the first time I've heard of chroot, as I'm fairly new to linux. If business_kid's method doesn't work, I'll be sure to try that.
 
Old 07-19-2011, 11:36 PM   #5
padeen
Member
 
Registered: Sep 2009
Location: Perth, W.A.
Distribution: Slackware 14, Debian 7, FreeBSD, OpenBSD
Posts: 179

Rep: Reputation: 35
Quote:
Originally Posted by Firefox54 View Post
I can boot from small cds just fine. Its just Lilo and Grub that I have a problem with. I got Lilo to run, but upon reinstallation I picked the wrong settings and it doesn't boot.

This is the first time I've heard of chroot, as I'm fairly new to linux. If business_kid's method doesn't work, I'll be sure to try that.
The issue is that when you boot from a rescue disk, the filesystem is that of the rescue disk, not the previous installation. (Unless the rescue disk specifically looks for and mounts your previously installed partitions, in which case you will need to read the documentation for your rescue disk.)

Therefore, when you run lilo, you are running it for the rescue disk, which means lilo affects the MBR record of the rescue disk, which is usually a ramdisk, not that of the installation.

So, you need to manually mount your installation partition(s) somewhere, commonly under /mnt. If you have separate /usr, /var and /etc partitions in your installation, mount them too. For example:
Code:
mount -t (whatever it is, say ext3) /dev/sda1 /mnt
mount -t (ditto) /dev/sda2 /mnt/usr
mount -t (ditto) /dev/sda3 /mnt/etc
chroot is an artificial way to switch to that mounted filesystem and "pretend" it is now the root filesystem, e.g. /. Once you have chroot'ed to /mnt, you are effectively now operating on your installation, not on your ramdisk.

This means that now, when you run lilo, it will use the correct /etc/lilo.conf file and will change the correct MBR on /dev/sda1 instead of the incorrect one on the ramdisk. Read the blog entry for more; don't forget to mount /dev and /proc.
 
1 members found this post helpful.
Old 07-20-2011, 09:16 PM   #6
Firefox54
Member
 
Registered: Apr 2011
Distribution: #!
Posts: 65

Original Poster
Rep: Reputation: Disabled
Since I told debian to put everything on one partition and I have two hard disks, I should only need to mount the two hard disks right(I have hda1 hba1 and two swap partitions)?

One other thing, how do run lilo once the OS is started? The only way I've run any boot manager is from a call from the BIOS.

Last edited by Firefox54; 07-21-2011 at 05:55 PM. Reason: Adding 2nd paragraph && corection
 
Old 07-21-2011, 09:43 AM   #7
polymath69
LQ Newbie
 
Registered: Oct 2004
Distribution: Debian, Ubuntu, DSL, TRK, etc.
Posts: 18

Rep: Reputation: 3
lilo is both the thing which boots and the command-name that installs it.
I'd go with grub, but it sounds like you've almost paid the learning tax.
 
1 members found this post helpful.
Old 07-21-2011, 05:16 PM   #8
Firefox54
Member
 
Registered: Apr 2011
Distribution: #!
Posts: 65

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by polymath69 View Post
lilo is both the thing which boots and the command-name that installs it.
I'd go with grub, but it sounds like you've almost paid the learning tax.
So typing lilo in the command line would run or install lilo?

The reason I didn't go with grub is because lilo only has one config file(lilo.config), and because grubs defaults gave me unable to mount root fs on unknown block 0,0
 
Old 07-21-2011, 05:52 PM   #9
polymath69
LQ Newbie
 
Registered: Oct 2004
Distribution: Debian, Ubuntu, DSL, TRK, etc.
Posts: 18

Rep: Reputation: 3
Quote:
So typing lilo in the command line would run or install lilo?
Lilo from the command line, as root, installs Lilo the boot-loader.
Mind you, it needs to be correctly configured first.

Quote:
The reason I didn't go with grub is because lilo only has one config file(lilo.config), and because grubs defaults gave me unable to mount root fs on unknown block 0,0
Grub doesn't require reinstallation whenever you update the kernel. That's
the biggest difference. (Of course, if it doesn't work, what help is that?)

Your first message upstream says that Lilo printed LILO... which means it's
pretty much finished successfully. I would look carefully into your initrd
location, contents, etc. The warning on your line 2 is a major red flag to me.

Dave
 
Old 07-21-2011, 05:52 PM   #10
Firefox54
Member
 
Registered: Apr 2011
Distribution: #!
Posts: 65

Original Poster
Rep: Reputation: Disabled
I tried

mount -t ext3 /dev/hda1/mnt
mount -t ext3 /dev/hdb/mnt

both of these gave me a help section

I tried

mount /dev/hda1/mnt
mount /dev/hba1/mnt

both of these gave me something to the effect of "cannot find hda1 in /etc/fstab or /etc/mtab
 
Old 07-21-2011, 06:07 PM   #11
polymath69
LQ Newbie
 
Registered: Oct 2004
Distribution: Debian, Ubuntu, DSL, TRK, etc.
Posts: 18

Rep: Reputation: 3
Quote:
Originally Posted by Firefox54 View Post
I tried

mount -t ext3 /dev/hda1/mnt
mount -t ext3 /dev/hdb/mnt
You shouldn't need "-t ext3" anymore; Linux detects filesystem types very well now.

Quote:
mount /dev/hda1/mnt
mount /dev/hba1/mnt

both of these gave me something to the effect of "cannot find hda1 in /etc/fstab or /etc/mtab
You do need to sort out your /etc/fstab eventually, but mount wants 2 parameters.
1. What to mount and 2. where to put it.

If /dev/hda1 is supposed to be your root directory, lilo needs to pass it
to the kernel as root=/dev/hda1 . But let's forget /dev/hdb for now, until
you can boot, OK?

Dave
 
1 members found this post helpful.
Old 07-21-2011, 06:13 PM   #12
Firefox54
Member
 
Registered: Apr 2011
Distribution: #!
Posts: 65

Original Poster
Rep: Reputation: Disabled
So first I need to mount. Then run the command lilo root=/dev/hda1 right
 
Old 07-21-2011, 06:25 PM   #13
polymath69
LQ Newbie
 
Registered: Oct 2004
Distribution: Debian, Ubuntu, DSL, TRK, etc.
Posts: 18

Rep: Reputation: 3
"root = /dev/hda1" needs to go into your /etc/lilo.conf. You can mount
from your rescue CD to do that. While there, (and I can offer no guarantees
to this part) you can run "/sbin/lilo -b /dev/hda1". Whether that works,
I'll still be here in half an hour.

Dave
 
1 members found this post helpful.
Old 07-21-2011, 09:28 PM   #14
padeen
Member
 
Registered: Sep 2009
Location: Perth, W.A.
Distribution: Slackware 14, Debian 7, FreeBSD, OpenBSD
Posts: 179

Rep: Reputation: 35
Firefox, I wonder if you are confused about mounting filesystems in Linux. I hesitate to go into an explanation because it could get very involved and confusing.

If you don't have anything you need to keep, honestly I would simply do the installation again, overwriting what you had before.

However, when you mount, you specify a device (a partition) and its location in the filetree. Your example of
Code:
mount /dev/hda1/mnt
is failing because you need a space between /dev/hda1 (the partition) and /mnt (the place in the filetree). Then, after that you are replacing what you just mounted by doing another mount
Code:
mount /dev/hdb1 /mnt
on the same place. I suspect that's not what you want to do.

What have you got on /dev/hda1 and /dev/hdb1? We need to know before we go further. Or just re-install the system.

Last edited by padeen; 07-21-2011 at 11:13 PM.
 
1 members found this post helpful.
Old 07-22-2011, 08:47 AM   #15
Firefox54
Member
 
Registered: Apr 2011
Distribution: #!
Posts: 65

Original Poster
Rep: Reputation: Disabled
Quote:
What have you got on /dev/hda1 and /dev/hdb1? We need to know before we go further. Or just re-install the system.

hda1 is a crunchbang install and hdb is a win2000 install that I don't need anymore. I don't want to reinstall unless I know what the correct setttings are for lilo, because one cd-rw is already dead from exploring the different distros(it was used before this too). I now use usb boot thru plop.


Quote:
However, when you mount, you specify a device (a partition) and its location in the filetree. Your example of
Code:

mount /dev/hda1/mnt

is failing because you need a space between /dev/hda1 (the partition) and /mnt (the place in the filetree). Then, after that you are replacing what you just mounted by doing another mount
Code:

mount /dev/hdb1 /mnt

on the same place. I suspect that's not what you want to do.
Thanks. This is my first yr of linux.

Last edited by Firefox54; 07-22-2011 at 08:51 AM. Reason: adding stuff
 
  


Reply

Tags
kernel, lilo


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
Kernel panic on Booting to Fedora Core 5 from LILO boot loader. vmniza Linux - General 1 06-30-2009 07:10 AM
Freeze booting kernel - mdk 9.2, kernel 2.4.22-10mdk, Acer TM252LC thekro Linux - Laptop and Netbook 19 03-25-2006 04:56 AM
Blank screen and KB/Mouse freeze when booting to kernel. testeng Linux - Newbie 1 03-05-2005 11:56 PM
Lilo freeze on WindozeME/Mandrake 9 dual boot... vince v Linux - General 9 08-27-2004 03:11 PM
LILO not Booting new KERNEL mehargags Slackware 12 04-28-2004 02:41 PM


All times are GMT -5. The time now is 07:08 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration