LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 07-06-2005, 02:49 PM   #1
bsdpowa
Member
 
Registered: Jul 2005
Location: Srpska
Distribution: Fedora Core 4
Posts: 30

Rep: Reputation: 15
Linux on a floppy - kernel panic


Hi,

I'm building a LFS on a floppy, base on Floppy Linux Guide.
I have two floppies.
Floppy 1 = Grub stage1, Grub stage2, kernel
Floppy 2 = bash, nod console

I boot my computer with the first floppy and at the GRUB prompt I write:
kernel (fd0)/boot/vmlinuz init=/bin/sh root=/dev/fd0 load_ramdisk=1 prompt_ramdisk=1
boot

Then it loads everything and throws messages at the screen and it stops here:
logips2pp: Detected unknown logitech mouse model 62
input: ImExPS/2 Logitech Explorer Mouse on iso0060/serio1

I just push enter and it says:

VFS: Mounted root (ext2 filesystem) readonly
Freeing unused kernel memory: 100k freed
warning: unable to open an init console
kernel panic - not syncing: no init found.Try passing init= option to kernel

What should I do? I have passed the init option.What's it talking about?
 
Old 07-06-2005, 03:07 PM   #2
madluther
Member
 
Registered: Aug 2004
Distribution: LFS
Posts: 350

Rep: Reputation: 31
you have 'init=/bin/sh'
it might be better to use 'init=/bin/bash'

Mad.
 
Old 07-06-2005, 03:17 PM   #3
bsdpowa
Member
 
Registered: Jul 2005
Location: Srpska
Distribution: Fedora Core 4
Posts: 30

Original Poster
Rep: Reputation: 15
Still the same error.
 
Old 07-06-2005, 04:08 PM   #4
madluther
Member
 
Registered: Aug 2004
Distribution: LFS
Posts: 350

Rep: Reputation: 31
do you have a /dev/console and a /dev/null created on the floppy 2 filesystem ?
 
Old 07-07-2005, 02:14 AM   #5
bsdpowa
Member
 
Registered: Jul 2005
Location: Srpska
Distribution: Fedora Core 4
Posts: 30

Original Poster
Rep: Reputation: 15
I have /dev/console but not /dev/null.I created /dev/null with "mknod /dev/null c 5 1" but the same error persists.
 
Old 07-07-2005, 09:01 AM   #6
freegianghu
Member
 
Registered: Oct 2004
Location: somewhere in the street
Distribution: Window$
Posts: 192

Rep: Reputation: 30
Quote:
Originally posted by bsdpowa
I have /dev/console but not /dev/null.I created /dev/null with "mknod /dev/null c 5 1" but the same error persists.
In my system:
Code:
# mknod /dev/console c 5 1
# mknod /dev/null c 1 3
I have a suggestion: mount /dev/fd0 /mnt/floppy && chroot /mnt/floppy /bin/sh to test

Hopes it help
GH
 
Old 07-07-2005, 09:10 AM   #7
bsdpowa
Member
 
Registered: Jul 2005
Location: Srpska
Distribution: Fedora Core 4
Posts: 30

Original Poster
Rep: Reputation: 15
The thing is, it doesn't even get to the second floppy.It stops at loading at the first floppy.I have bash on the second one.

Floppy 1 - grub stage 1, grub stage 2, vmlinuz
Floppy 2 - bash, console, null

EDIT:
[root@localhost dev]# chroot /mnt/floppy /bin/sh
Bus error
 
Old 07-07-2005, 10:15 AM   #8
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939
That might be your problem.

You can see the actual source-code of the program that's generating this message: it's /init/main.c. The code in question looks like this:
Code:
        /*
         * We try each of these until one succeeds.
         *
         * The Bourne shell can be used instead of init if we are
         * trying to recover a really broken machine.
         */

        if (execute_command)
                execve(execute_command,argv_init,envp_init);
        execve("/sbin/init",argv_init,envp_init);
        execve("/etc/init",argv_init,envp_init);
        execve("/bin/init",argv_init,envp_init);
        execve("/bin/sh",argv_init,envp_init);
        panic("No init found.  Try passing init= option to kernel.");
So the root cause of the problem is that the file cannot be found.

But also notice that the program that we are looking for is not a shell (like "bash" or "sh"), but rather init. The granddaddy of them all... process #1. So I believe that you are specifying the incorrect program: it must be init. And it must be located on the first floppy.

(As for me, when I did the "floppy disk" exercise, I didn't actually use floppy disks. My computer doesn't even have a floppy drive.)
 
  


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
Mandrake linux 9.2 Kernel panic ravi2004 Linux - Enterprise 6 12-27-2004 07:50 AM
Linux Kernel Problem -- Kernel panic: CPU context corrupt crcooney Linux - Distributions 0 01-15-2004 08:48 AM
Redhat Linux 9 Kernel Panic cstoutxp Linux - Newbie 13 10-24-2003 05:18 PM
Linux error: Kernel Panic wilbasket23 Linux - Software 5 07-01-2003 12:19 PM
Linux Kernel Panic Westquote Linux - General 11 01-06-2002 02:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

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