LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-25-2005, 03:01 PM   #1
apepost
Member
 
Registered: Oct 2003
Distribution: Fedora core 4
Posts: 113

Rep: Reputation: 15
Need inittab (preferabely Fedora core 3)


Okay, here's the thing.

While saving a file in vi I managed to overwrite my /etc/inittab file with something certainly not suited for being there. By adding single as a kernel argument in grub I am able to get into single-user mode and in that way type in a functioning inittab. In order to do so, however, i will need someone -- preferably running fedora core 3 -- to post their /etc/inittab file.

Thanks for your help.
 
Old 05-25-2005, 03:09 PM   #2
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
I use Fedora 3, the only thing you may want to modify is I boot to runlevel 3, no graphics until I give the startx command.

Code:
#
# inittab       This file describes how the INIT process should set up
#               the system in a certain run-level.
#
# Author:       Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
#               Modified for RHS Linux by Marc Ewing and Donnie Barnes
#

# Default runlevel. The runlevels used by RHS are:
#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
#   3 - Full multiuser mode
#   4 - unused
#   5 - X11
#   6 - reboot (Do NOT set initdefault to this)
#
id:3: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:respawn:/etc/X11/prefdm -nodaemon
Peace,
JimBass
 
Old 05-25-2005, 03:10 PM   #3
apepost
Member
 
Registered: Oct 2003
Distribution: Fedora core 4
Posts: 113

Original Poster
Rep: Reputation: 15
thanks.

I will start the typing right away.
 
Old 05-25-2005, 03:11 PM   #4
apepost
Member
 
Registered: Oct 2003
Distribution: Fedora core 4
Posts: 113

Original Poster
Rep: Reputation: 15
The lines starting with #'s are unneeded comments right?
 
Old 05-25-2005, 03:13 PM   #5
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
They are comments, but I would suggest leaving them in, as code without comments to explain what is going on can be tricky to edit later.

Peace,
JimBass
 
Old 05-25-2005, 03:16 PM   #6
apepost
Member
 
Registered: Oct 2003
Distribution: Fedora core 4
Posts: 113

Original Poster
Rep: Reputation: 15
Yes. I presume i will do that as soon as i can boot the system since copy-paste is far simpler than typing without the system knowing you have a norwegian keyboard.
 
Old 05-25-2005, 03:29 PM   #7
apepost
Member
 
Registered: Oct 2003
Distribution: Fedora core 4
Posts: 113

Original Poster
Rep: Reputation: 15
It seems my filesystem is mounted read only in single-user mode, does anyone know how to fix this?

It is a raid system.
 
Old 05-25-2005, 03:31 PM   #8
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
Did you take the "single" out of the grub bootloader?

Peace,
JimBass
 
Old 05-25-2005, 03:35 PM   #9
apepost
Member
 
Registered: Oct 2003
Distribution: Fedora core 4
Posts: 113

Original Poster
Rep: Reputation: 15
Did you get me correct?

I were done typing in my inittab and when saving it didn't work like it should. After quitting vi I tried to delete the inittab file in order to retry making a new one. rm exited with the error "cannot remove "inittab" read only filesystem".

without the single in grub my system won't boot. ( as my inittab is rubbish)
 
Old 05-25-2005, 03:39 PM   #10
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
You're right, I misunderstood you. I haven't played in single user mode, but that sounds like a permissions issue. You can maybe (outside of vi) do a
Code:
mv /etc/inittab /etc/inittab.old
Maybe become su before opening the file to edit? Not sure of how permissions work in single user mode. You could accomplish this easier I'd suspect with knoppix or any live CD, or the recovery disk from Fedora.

Peace,
JimBass
 
Old 05-25-2005, 03:44 PM   #11
apepost
Member
 
Registered: Oct 2003
Distribution: Fedora core 4
Posts: 113

Original Poster
Rep: Reputation: 15
moving (or rather renameing) the file failes with the same error as removing. But using a live CD sounds like a good idea. I will test it right away as i have one handy. I have tried using su, but it didn't make any difference. It seems like the fs is mounted read only.

Last edited by apepost; 05-25-2005 at 03:45 PM.
 
Old 05-25-2005, 03:57 PM   #12
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
Yeah, a live CD will (after changing a few things) allow you to modify files on the hard disk. They usually mount read only, but you can change that to allow writing. Then you can copy my inittab and paste it in, getting everything done at once, in about 30 seconds.

Peace,
JimBass
 
Old 05-25-2005, 05:17 PM   #13
apepost
Member
 
Registered: Oct 2003
Distribution: Fedora core 4
Posts: 113

Original Poster
Rep: Reputation: 15
I need to use windows in order to get this fil from the internet since i do not hav networking in my live-eval. I can't make it work, and believe it is because windows stores the file in another format (vi reports [dos] when viewing the file.)

Do you know any workaround for this? / Can you post the file as a file instead of as text so that i want have to edit it in windows?
 
Old 05-25-2005, 05:31 PM   #14
apepost
Member
 
Registered: Oct 2003
Distribution: Fedora core 4
Posts: 113

Original Poster
Rep: Reputation: 15
I just want to say i managed to get it working by copying a few lines of my fstab into the inittab so that vi didn't look at it as an dos file and remove all the artifacts that appeared.
 
  


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
Fedora Core 4 x86_64 on a Shuttle XPC SN25P with an AMD 64 X2 (Dual core) gwiesenekker Linux - Hardware 4 12-06-2005 11:53 PM
Severe problems with Fedora Core 1 and Fedora Core 2 installatiom TheOneKEA Fedora - Installation 2 07-14-2004 02:12 PM
Upgrading via Internet Fedora Core 1 to Fedora Core 2 cdean Linux - Newbie 2 05-30-2004 11:14 PM
Fedora Core 2 - Just days away! Final comments on Fedora Core 1 lrt2003 Fedora 3 05-12-2004 02:09 AM
Will Fedora Core 1 RPMs still be compatable with Fedora Core 2? yarjar Linux - Software 1 05-02-2004 01:02 AM


All times are GMT -5. The time now is 07:31 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration