LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 08-27-2003, 09:59 AM   #1
bwMarkus
LQ Newbie
 
Registered: Aug 2003
Posts: 13

Rep: Reputation: 0
problems with self-created boot disk


Hi,
I read the bootdisk howto from tldp and tried to make my own boot disk. The problem is that when I boot I always get a "kernel panic / init not found".
Although I tried many things I couldn't solve this problem, so perhaps somebody here know what I'm doing wrong.

So here is what I did to create the boot disk:

1. I formatted a disk with FAT
2. Installed SysLinux to the disk
3. took a normal gentoo kernel and stripped it from some things I don't need (audio, usb, etc).
4. Kept support für ext2fs, ramdisk, fat, serial io and so on in the kernel
5. changed all I need from "module" to "kernel"
6. build the kernel and copied it to disk
7. created a loopback root with 4mb
8. created all the necessary directories the how to told me (bin, sbin, etc and so on)
9. statically compiled a program and copied it to /sbin/init.
10. gzip-ed the rootfs.gz
11. copied kernel and rootfs.gz to the disk
12. changed syslinux.cfg to "DEFAULT smallest root=/dev/ram initrd=rootfs.gz init=/sbin/init"

But it doesn't work ! The root is mounted read-only but when the kernel tries to start init I get the kernel panic.


Btw: the reasing why I'm trying this: I have an old, self-written ms-dos based tui program which has to boot from a floppy. Although I still like DOS for some applications I would like to switch to linux. So I try to create a minimalistic boot disk which allows me to run the program from linux.
The statically linked program works fine under gentoo, but not as an init replacement.

Can anyone tell me what I'm doing wrong ?

Thanks in advance.
 
Old 08-27-2003, 10:30 AM   #2
mad_ady
Member
 
Registered: Jan 2003
Location: I'm all in your mind!
Distribution: Debian
Posts: 248

Rep: Reputation: 30
I believe you should add a 'init=/bin/bash' to the line that starts the whole thing...

If I remember correctly, this is used in lilo to start something else... Dig on ...
 
Old 08-29-2003, 12:08 PM   #3
bwMarkus
LQ Newbie
 
Registered: Aug 2003
Posts: 13

Original Poster
Rep: Reputation: 0
Hi Ady,

I don't need a shell, I simply want to start directly my application. If the bootdisk howto is correct, it doesn't matter which binary you start. With a normal distribution it would be "init" then some scripts and finally the shell.
But I would like to safe the space on disk and rather not use a shell.
 
Old 09-03-2003, 02:59 AM   #4
mad_ady
Member
 
Registered: Jan 2003
Location: I'm all in your mind!
Distribution: Debian
Posts: 248

Rep: Reputation: 30
Is it possible to start an application without starting a shell first? I didn't know that...
Try changing "init=/path/to/my/app/appname"... maybe it will work...
 
Old 09-08-2003, 04:31 AM   #5
bwMarkus
LQ Newbie
 
Registered: Aug 2003
Posts: 13

Original Poster
Rep: Reputation: 0
Hi Ady,
thanks again for your answer. According to the howto it's possible to start any other application instead of a shell. The application is the shell so to say.
I will try to "dig further" but if someone has a shovel to help me ... ;-)
 
  


Reply



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
Mounting a qemu created root disk image Valhalla Linux - Software 4 10-26-2005 08:34 PM
Disk space used after initial partition is created Wraezor Linux - General 2 04-21-2005 10:01 AM
Boot disk problems unclephil Linux - Software 5 09-20-2004 09:10 AM
boot disk problems XYNaPSE Linux - Newbie 7 07-10-2003 11:32 AM
boot disk problems mrtwice Linux - Newbie 1 02-01-2002 08:35 PM

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

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