LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 02-26-2008, 01:35 AM   #1
mathimca05
Member
 
Registered: Oct 2007
Posts: 66

Rep: Reputation: 15
Thumbs up /etc/inittab not working


Hai all
We already have fc6,windows xp installed in our system.our kernel is 2.6.19.2.
we created a new partition and we installed a new kernel 2.6.15 in that.

we changed the /etc/inittab file. also and also the grub file.after that we rebooted our system.we tried to enter in to newly installed kernel 2.6.15.
we have got errors like this,

setup [/B]root:mounting /dev failed:No such file or directory
setup root:error mounting /proc failed:No such file or directory
setup root:error mounting /sys failed:No such file or directory
failed 2 rmdir //proc:Device or resource busy
failed 2 rmdir //dev:Device or resource busy
Error opening /dev/console:No such file or directory
Trying 2 use fd0 instead
warning can't access (null)
exec of init((null)) failed !!!:Bad address
Kernel panic not syncing:attempted to kill init:'[/B]

so we tried to enter into 2.6.19.2.we are not getting gui.instead it is entering into bash shell.

we already had a backup of original inittab file,so we tried to replace the new inittab file with original inittab file.using vi i entered to change the new init tab file.its saying that u r attempting to change a read only file.i can't write anything in that file...i tried Esc:wq,and also Esc:wq! it didn't work.then i tried to change the permission of that file using chmod.its saying that u are trying to change a read only file system.
wt 2 do for that?


how can i change the inittab file?can anyone help me?

thanks in advance

Last edited by reddazz; 02-27-2008 at 05:13 AM. Reason: disable smilies
 
Old 02-26-2008, 08:38 PM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
1) using a live cd, can you post the original and new contents of your grub and inittab files pls

2) I do not know why you changed your inittab

3) Can you explain our kernel is 2.6.19.2 and we created a new partition and we installed a new kernel 2.6.15 in that?

a) it looks like you have gone backwards in k numbers.
b) it is not clear to me, why you needed to create a new partition to test a "new' kernel
c) how exactly did you create this new partition?
d) did you confirm the old system still booted with this new partition before making any changes to this partition?

sorry about the ruder questions, but maybe you received bad advice?
 
Old 02-26-2008, 10:49 PM   #3
mathimca05
Member
 
Registered: Oct 2007
Posts: 66

Original Poster
Rep: Reputation: 15
Thumbs up

hai
thanks for ur reply..

our aim is to build a customized linux system entirely from source rather than using any one of the available distribution.
one of the steps involved here is to configure and build kernel.we can use any version of kernel for that.so we selected 2.6.15.

we created a logical partition using fdisk command.its created properly.

original inittab file
id:5:initdefault:

# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit

l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6

# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now

# When our UPS tells us power has failed, assume we have a few minutes
# of power left. Schedule a shutdown for 2 minutes from now.
# This does, of course, assume you have powerd installed and your
# UPS connected and working correctly.
pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"

# If power was restored before the shutdown kicked in, cancel it.
pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"


# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

# Run xdm in runlevel 5
x:5:once:/etc/X11/prefdm -nodaemon



these are the lines we included in our new inittab file

id:1:initdefault:
l1:1:wait:/etc/init.d.sj/rcS
1:1:repawn:/bin/bash
2.6:wait:/etc/init.d.sj/umountfs

here rcS is nothing but a shell script with the following lines
/bin/mount -n -o remount,rw/
>/etc/mtab
/bin/mount -a


umountfs script
/bin/umount -f -a -r
/bin/mount -n -o remount,ro/

Original grub.conf
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.19.2)
root (hd0,0)
kernel /boot/vmlinuz-2.6.19.2 ro root=LABEL=/1 rhgb quiet
initrd /boot/initrd-2.6.19.img
title Other
rootnoverify (hd0,1)
chainloader +1


we changed this file like this
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Linux (2.6.15-1)
root (hd0,0)
kernel /boot/bzImage ro root=/dev/hdb9 quiet vga=0x317
initrd /boot/initrd-2.6.15.1.img
title Fedora Core (2.6.19.2)
root (hd0,0)
kernel /boot/vmlinuz-2.6.19.2 ro root=LABEL=/1 rhgb quiet
initrd /boot/initrd-2.6.19.img
title Other
rootnoverify (hd0,1)
chainloader +1

Last edited by reddazz; 02-27-2008 at 05:12 AM. Reason: disable smilies
 
Old 02-27-2008, 12:26 AM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Quote:
id:1:initdefault:
Here's your first problem - single user mode must be mounting the fielsystem as readonly.

I'm sure you can over-ride this from grub, but I don't recall how off the top of my head. Boot with a live CD and mount the partition with inittab on it and edit it.
 
Old 02-27-2008, 02:06 AM   #5
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
thanks billy

and I will make comments on your grub.

The new kernel is being built in hdb9 but you are claiming root (hd0,0) for both?

What I am hoping you are trying to do is.....install a compiled linux system completely into hdb9.

but you have a kernel line with /boot/etc which is saying /boot is a sub-folder to / and / is on hdb9 but your first command root (hd0,0) contradicts this.

maybe you mean?

title new kernel
root (hd1,8)
kernel /boot/bzImage ro root=/dev/hdb9 quiet vga=0x317
initrd /boot/initrd-2.6.15.1.img

now this has its /boot/grub stuff located at hd1,8 = drive 2 partition 9 = hdb9 which matches the root=/dev/hdb9

unless you have a typo?

unless you are trying to share /boot sub-folders? which is not recommended.
 
Old 02-27-2008, 05:21 AM   #6
mathimca05
Member
 
Registered: Oct 2007
Posts: 66

Original Poster
Rep: Reputation: 15
hai
thanks for ur reply.
we changed (hd0,0) to (hd1,8) in grub file and tried to do the same thing.


our grub file looks like this,
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Linux 2.6.15-1
root(hd1,8)
kernel /boot/bzImage ro root=/dev/hdb9 rhgb quiet
initrd /boot/initrd-2.6.15.1.img

title Fedora Core (2.6.19.2)
root (hd0,0)
kernel /boot/vmlinuz-2.6.19.2 ro root=LABEL=/1 rhgb quiet
initrd /boot/initrd-2.6.19.img
title Other
rootnoverify (hd0,1)
chainloader +1

while booting the 2.6.15,we have got these errors
mount:could not find filesystem '/dev/root'
setup root:mounting /dev failed:No such file or directory
setup root:error mounting /proc failed:No such file or directory
setup root:error mounting /sys failed:No such file or directory
switchroot:mount failed :No such file or directory
Kernel panic not syncing:attempted to kill init
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
About /etc/inittab zaxonus Linux - General 3 06-04-2007 06:01 AM
Inittab edit not working right jstephens84 Debian 13 07-12-2006 06:08 AM
inittab not working correctly with X qtran2 Red Hat 2 06-13-2005 02:58 AM
/etc/inittab sakeeb Linux - General 9 05-29-2002 09:04 AM
Graphical login not working? Edited inittab... streamalot Linux - General 6 02-22-2002 09:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 10:50 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
Open Source Consulting | Domain Registration