LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-29-2003, 07:27 PM   #1
jtX
Member
 
Registered: May 2003
Distribution: Gentoo (amd64 ppc x86)
Posts: 39

Rep: Reputation: 15
Setting up an initrd, having probs with /linuxrc


I need some help setting up an initrd image and booting a system with it.

In lilo.conf this is what I have:

image=/boot/vmlinuz
label=Linux_initrd
image=/boot/vmlinuz
initrd=/boot/initrd.img
append="root=/dev/ram0 init=/linuxrc rw"


Here's my linuxrc file:

#!/bin/sh

# Mount the new root filesystem.
/bin/mount -n -t ext2 -o ro /dev/hda5 /mnt

# Pivot to the new root filesystem.
cd /mnt
/sbin/pivot_root . initrd

# Pass control to init.
exec chroot . /sbin/init <dev/console >dev/console 2>&1

# Unmount initrd
umount -n /initrd


Here's my error I get:

RAMDISK: ext2 filesystem found at block 0
RAMDISK: Loading 4096 blocks [1 disk] into ram disk... done.
Freeing initrd memory: 4096k freed
VFS: Mounted root (ext2 filesystem)
Freeing unused kernel memory: 112k freed
umount /linuxrc: not mounted
kernel panic: Attempted to kill init!


Heres the error I get when I remove linuxrc from the initrd:

RAMDISK: ext2 filesystem found at block 0
RAMDISK: Loading 4096 blocks [1 disk] into ram disk... done.
Freeing initrd memory: 4096k freed
VFS: Mounted root (ext2 filesystem)
Freeing unused kernel memory: 112k freed
umount /linuxrc: not mounted
Usage: umount [-hV]
umount -a [-f] [-r] [-n] [-v] [-t vfstypes] [-O opts]
umount [-f] [-r] [-n] [-v] special | node...
kernel panic: Attempted to kill init!

almost the same... Has anyone else been in a similar situation and can help me?
 
Old 12-03-2003, 10:30 PM   #2
jtX
Member
 
Registered: May 2003
Distribution: Gentoo (amd64 ppc x86)
Posts: 39

Original Poster
Rep: Reputation: 15
Scratch that, created a new initrd from scratch and this new one's working without a problem.
 
  


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
linuxrc problem? cstovall Linux - Software 0 11-08-2005 08:22 PM
when linuxrc will get crash? alwar Linux - Software 0 01-20-2005 12:56 AM
GENTOO - "init=/linuxrc" (/linuxrc: not found | kernel panic!!) halo14 Linux - Distributions 6 01-14-2005 02:03 PM
Setting up DNS server probs nidputerguy Linux - Networking 5 10-17-2003 12:57 PM
Dissecting linuxrc ( initrd ) nxny Linux - General 2 03-02-2003 04:32 AM


All times are GMT -5. The time now is 12:41 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration