LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-14-2004, 09:57 PM   #1
schevon
LQ Newbie
 
Registered: Sep 2003
Posts: 5

Rep: Reputation: 0
Unhappy kernel install while running Knoppix CD


I have both Windows XP and Debian testing on my laptop, with lilo as boot loader. I was playing with making a new 2.6.5 kernel and made a stupid mistake - compiled ext3 into the kernel instead of as a module, so that when I booted up the new kernel it fixed the filesystem so as to cause my old 2.4 kernel to panic. Unfortunately the new kernel booted up nicely but absolutely would not give me a shell, so it's unusable.

So I booted off a Knoppix CD with the intention of recompiling my 2.4 kernel with ext3 built in. All went fine, up to installing the new kernel package, until I tried to run lilo. This is what happened:

chroot /mnt/hda7
dpkg -i kernel-image-2.4.22-rc2-ac1_123.Custom_i386.deb
<messages indicating that all was well>
lilo
Fatal: open /dev/hda: Permission denied

I'd had no problems running lilo after prior kernel builds.

I can't think why this is happening or how to get around it - does anybody have any ideas?? In case it has something to do with the mount options, here is the Knoppix fstab:

# Added by KNOPPIX
/dev/hda1 /mnt/hda1 ntfs noauto,users,exec,ro,umask=000,uid=knoppix,gid=knoppix 0 0
# Added by KNOPPIX
/dev/hda5 /mnt/hda5 vfat noauto,users,exec,umask=000,uid=knoppix,gid=knoppix 0 0
# Added by KNOPPIX
/dev/hda6 none swap defaults 0 0
# Added by KNOPPIX
/dev/hda7 /mnt/hda7 ext3 noauto,users,exec 0 0

Thanks!!
 
Old 06-15-2004, 02:24 AM   #2
indeterminate
Member
 
Registered: Oct 2003
Location: Virginia, US
Distribution: Debian, Ubuntu, Knoppix.
Posts: 76

Rep: Reputation: 17
You might try running "lilo -C <path to the lilo.conf file you want> -b /dev/hd<c,d,a, whatever>". Run this without chrooting to the hard drive, and it should install the configuration from that file to the hard drive listed after -b. I tried the same thing a while ago, but I messed it up by using -M instead of -b. I could never get lilo to work from a chrooted environment... I think because the Knoppix kernel isn't using the /dev directory from the hard drive. Anyway, hope that helps.
 
Old 06-15-2004, 06:11 AM   #3
schevon
LQ Newbie
 
Registered: Sep 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the suggestion...I'd tried that, and I got the following error message:

Fatal: creat boot.map: read-only file system

I tried the option to specifiy the map file but that didn't help either...
 
Old 06-15-2004, 06:34 AM   #4
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Is /dev/hda mounted (rw) when you do this? Even if you're not chrooting (which I don't know why you wouldn't), it still has to be mounted, doesn't it?
 
Old 06-15-2004, 09:02 AM   #5
schevon
LQ Newbie
 
Registered: Sep 2003
Posts: 5

Original Poster
Rep: Reputation: 0
I don't think you can mount a hard drive like that...all the partitions are mounted rw except for the ntfs system containing windows xp...

I just realized why the /dev/hda error message comes up...the device directory under /mnt/hda7 doesn't apply when I'm running from the Knoppix CD! So, it makes no sense to run lilo under chroot. I think it will work if I can figure out how to tell lilo the location of the boot directory, but I can't find an option for that. Anybody know?
 
Old 06-15-2004, 01:15 PM   #6
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Quote:
the device directory under /mnt/hda7 doesn't apply when I'm running from the Knoppix CD! So, it makes no sense to run lilo under chroot.
What exactly are you chrooting then? Is there some reason that you can't chroot /mnt/hda7 (which I assume is your Debian install with the bad LiLO)?

That is, after all, the whole purpose of chroot.

Or am I missing something?
 
Old 06-16-2004, 08:49 AM   #7
schevon
LQ Newbie
 
Registered: Sep 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Solved the problem - the root device has to mounted from an su shell in Knoppix. Then lilo worked perfectly. Phew!
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
i got knoppix on cd and it rocks when booted! wut can i do to install knoppix on HD? kublador Linux - Distributions 4 12-12-2005 04:08 PM
KNOPPIX INSTALL Kernel error cantrea Linux - Newbie 0 08-11-2005 01:33 PM
How does one remove the custom KNOPPIX graphics from a KNOPPIX HD Install? apache363 Linux - Distributions 2 03-29-2004 05:08 AM
Knoppix 3.2, kernel 2.6 install Likosin Debian 3 01-17-2004 05:09 PM
Tryin' to install debian thru Knoppix but kernel panic Kgi Debian 1 10-14-2003 04:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:37 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