There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
black screen blue screen boot bsod computer connection crash css dell display driver drivers email error firefox firefox 3 freeze game hard drive internet internet explorer itunes laptop malware monitor network networking nvidia outlook outlook 2003 outlook express partition password printer problem ram router security slow software sound sprtcmd.exe trojan usb video virus vista windows windows xp wireless
UNIX/Linux
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Operating Systems > UNIX/Linux >
Linux experiment


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
TimBrigham's Avatar
Junior Member with 9 posts.
 
Join Date: Jun 2002
08-Jul-2002, 11:11 AM #1
Linux experiment
Hey all.
I'm working on an experiment using Slackware Linux (ZipSlack) in an effort to create a complete operating system that can boot from CD. I'm not talking about an install CD here; I'm talking about installing the OS to the CD. I decided on Slackware for the simplicity, mainly that I could already create DOS bootable CDs that can access the CD drives without problems. I'm currently at the point where I can use loadlin to start getting Linux to boot, but it stops cold with a kernel panic error stating an initial terminal can't be opened. I've tracked down the device names (I'm assuming they'd be the same under Red Hat which I have installed.. right?)
So what I'm wondering is what is necessary to mount the CD drive at boot and mount it as root. Any help would be much appreciated.
Tim
codejockey's Avatar
Senior Member with 1,410 posts.
 
Join Date: Feb 2002
09-Jul-2002, 12:21 PM #2
Interesting project. How are you attempting to use loadlin to boot from the CD? I assume you already have a root filesystem on the CD and are using a command such as loadlin root=/dev/hdc1 ro. Also, you will need a /dev directory on the CD with the appropriate device nodes. What messages do you see during your boot attemp?

Any info appreciated.

Hope this helps.
__________________
The slowest component still sits at the keyboard.
TimBrigham's Avatar
Junior Member with 9 posts.
 
Join Date: Jun 2002
09-Jul-2002, 08:55 PM #3
I'm using loadlin with the following parameters:
loadlin vmlinuz root=/dev/scd0
or
loadlin vmlinuz root=/dewv/scd0 ro

(for my F drive.. I know the scd0 is right if it's the same for my Red Hat install on my hard drive)
Result is this error message for both:
Warning: unable to open an initial console.
Kernel panic: No init found. Try passing init= option to kernel.

I'm still at a stopping point cause I don't know exactly how to proceed. I can do a normal install and do basic stuff with Linux but I've never tried anything quite like this before. And none of the web cites I've found to this point have had any specifics on this procedure either.

Tim
codejockey's Avatar
Senior Member with 1,410 posts.
 
Join Date: Feb 2002
11-Jul-2002, 03:26 AM #4
Your error messages were very helpful (thanks!). Here is the relevant code:
Code:
if (open("/dev/console", O_RDWR, 0) < 0)
        printk("Warning: unable to open an initial console.\n");

    (void) dup(0);
    (void) dup(0);

    /*
     * 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 there are a number of possibilities. The warning message comes because /dev/console is not available (check for the proper device node); the panic comes because none of the default init executables are found on the root filesystem (verify that your CD has a root filesystem with these executables).

Hope this helps.

P.S. Don't get discouraged! -- I never think I'm making real progress until my machine won't boot! (8-)).
__________________
The slowest component still sits at the keyboard.
TimBrigham's Avatar
Junior Member with 9 posts.
 
Join Date: Jun 2002
11-Jul-2002, 05:45 PM #5
All right, I've looked and I belive I have all the nodes on the CD.
I am positive I have (scd0) (hdd) and (console).

Looked at the information for Slackware and added a correct init line (init=/etc/inittab).
This along with adding the line
si:S:sysinit:/etc/rc.cdrom/rc.cdrom
to the inittab file in an attempt to get the CD drives functional results in a change in the error message I'm getting. At present it is:

VFS: Cannot open root device scd0 or 0b:00 please append a correct "root=" boot option
Kernel panic: VFS: unable to mount root fs on 0b:00

So I still need to find a way to mount my CD drive to be able to mount my root file system to it.. Any suggestions?

Tim
trev.h's Avatar
Senior Member with 170 posts.
 
Join Date: Mar 2002
Location: Surrey, England
12-Jul-2002, 12:47 PM #6
Sounds like a great idea.

Just a thought, but distros that boot from the CD and have install GUIs have probably had to address most of the problems you will come across.

Why not grab a CD and check out how they do it to save yourself a lot of time.
codejockey's Avatar
Senior Member with 1,410 posts.
 
Join Date: Feb 2002
12-Jul-2002, 03:16 PM #7
I believe that many distributions create a minimal root filesystem in RAM, then unpack things from the CD and install on the hard drive. This is fine for an installation, but isn't practical for normal operation (unless you just had more RAM than you could shake a stick at). I'm sort of wondering how the root filesystem can be made writable when it's on CD (as opposed to CD-RW, which likely isn't practical, either). One possibility that occurs to me is that all of the superblock information, etc. could be in RAM (which it is, anyway, for the most part, and is flushed to disk periodically). You might be able to use the same approach for device nodes (ttys, for example, must be writable in order to get output). I haven't really thought much about this, but it's definitely an interesting idea. Maybe I'll find some time to play with it a bit ...
__________________
The slowest component still sits at the keyboard.
Brooks's Avatar
Distinguished Member with 2,376 posts.
 
Join Date: Oct 2001
Location: Homewood, Al
12-Jul-2002, 10:01 PM #8
You might want to take a look at virtual-linux which is a version of Mandrake modified to run completely off a cd-rom drive. You might can get some hints about how to do it with slackware.



http://www.virtual-linux.org/
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 11:20 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.