You are not logged in.

#1 2010-10-08 09:28:36

Neuneck
Member
From: Germany
Registered: 2009-05-01
Posts: 21

[SOLVED] Misspelled while changing inittab file

Hi,

while I was maintaining and looked what changes in *.pacnew files were made I decided to carry my changes in the inittab file to the inittab.pacnew, save the old inittab as inittab.old and then executed:

sudo mv inittab.pacnew initab

I accidentially misspelled inittab with just one t. However I didn't notice until after a reboot, since now INIT tells me it can't find inittab and asks for a runlevel. On runlevels 1, 3 and 5 it then tells me "No more processes left in this runlevel" and I cannot interact with the computer anymore, short of forcing a hard shutdown.

Is there any chance of repairing my stupid mistake, short of downloading an arch iso and boot from USB? The only stages I can interfere with the process is BIOS and GRUB.

Any advice will be appreciated!

Neuneck

Last edited by Neuneck (2010-10-09 19:54:05)

Offline

#2 2010-10-08 09:34:46

madeye
Member
From: Denmark
Registered: 2006-07-19
Posts: 331
Website

Re: [SOLVED] Misspelled while changing inittab file

I would boot a livecd (any linux livecd), mount the drive and just rename the file. Then reboot again and everything should work.


MadEye | Registered Linux user #167944 since 2000-02-28 | Homepage

Offline

#3 2010-10-08 12:29:38

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Misspelled while changing inittab file

Maybe you can boot to recovery console from grub.

Offline

#4 2010-10-08 17:26:34

Neuneck
Member
From: Germany
Registered: 2009-05-01
Posts: 21

Re: [SOLVED] Misspelled while changing inittab file

How would I do that? What do I need to edit in my grub command line? Thanks for the tips!

Offline

#5 2010-10-08 17:50:20

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Misspelled while changing inittab file

Neuneck wrote:

How would I do that? What do I need to edit in my grub command line? Thanks for the tips!

Hmm, seems that w/o the inittab it's not possible, sorry.
I can recommend Tiny Core liveCD - it's very small, boots in seconds, all you need to do is mount the right partition and rename that file.

Offline

#6 2010-10-08 21:04:17

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] Misspelled while changing inittab file

As already suggested, use any live CD/USB - if you don't have at least one lying around, deduct 10 1337 points from your total and go stand in the corner. tongue

Offline

#7 2010-10-08 21:58:47

Primoz
Member
From: Ljubljana-Slovena-EU
Registered: 2009-03-04
Posts: 688

Re: [SOLVED] Misspelled while changing inittab file

i'd use chroot. look up in the ArchWiki big_smile


Arch x86_64 ATI AMD APU KDE frameworks 5
---------------------------------
Whatever I do, I always end up with something horribly mis-configured.

Offline

#8 2010-10-08 22:00:51

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Misspelled while changing inittab file

Primoz wrote:

i'd use chroot. look up in the ArchWiki big_smile

No need for that, just boot a liveCD and rename the misspelled file. It took me 30s with Tiny Core.

Offline

#9 2010-10-08 22:06:43

Primoz
Member
From: Ljubljana-Slovena-EU
Registered: 2009-03-04
Posts: 688

Re: [SOLVED] Misspelled while changing inittab file

karol wrote:
Primoz wrote:

i'd use chroot. look up in the ArchWiki big_smile

No need for that, just boot a liveCD and rename the misspelled file. It took me 30s with Tiny Core.

Oh so you can just mount the partition and that's that. And I always mucked around with chroot... Good to know.


Arch x86_64 ATI AMD APU KDE frameworks 5
---------------------------------
Whatever I do, I always end up with something horribly mis-configured.

Offline

#10 2010-10-08 22:09:59

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Misspelled while changing inittab file

Primoz wrote:
karol wrote:
Primoz wrote:

i'd use chroot. look up in the ArchWiki big_smile

No need for that, just boot a liveCD and rename the misspelled file. It took me 30s with Tiny Core.

Oh so you can just mount the partition and that's that. And I always mucked around with chroot... Good to know.

Obviously you need to chroot if you want to run pacman etc., but it's not necessary for renaming a file.

Offline

#11 2010-10-08 22:16:15

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED] Misspelled while changing inittab file

karol wrote:
Primoz wrote:
karol wrote:

No need for that, just boot a liveCD and rename the misspelled file. It took me 30s with Tiny Core.

Oh so you can just mount the partition and that's that. And I always mucked around with chroot... Good to know.

Obviously you need to chroot if you want to run pacman etc., but it's not necessary for renaming a file.

# pacman --root /mnt/arch --cachedir /mnt/arch/var/cache/pacman/pkg --config /mnt/arch/etc/pacman.conf

Offline

#12 2010-10-08 22:16:24

Primoz
Member
From: Ljubljana-Slovena-EU
Registered: 2009-03-04
Posts: 688

Re: [SOLVED] Misspelled while changing inittab file

karol wrote:
Primoz wrote:
karol wrote:

No need for that, just boot a liveCD and rename the misspelled file. It took me 30s with Tiny Core.

Oh so you can just mount the partition and that's that. And I always mucked around with chroot... Good to know.

Obviously you need to chroot if you want to run pacman etc., but it's not necessary for renaming a file.

Oh yeah that makes sense. thanks even though I'm not OP.
But this still helps OP.

Also to make it easier to OP:

mount /dev/sda{#number of your root partition} /mnt/root

and then I guess just cd to it. maybe i'm not the best to give advice?
because I don't know if mounting this:

mount -t proce none /mnt/proc
mount -t sysfs none /mnt/sys
mount --bind

Are needed for just editing a text file or is this only for chroot. I guess it's only for chroot.


Arch x86_64 ATI AMD APU KDE frameworks 5
---------------------------------
Whatever I do, I always end up with something horribly mis-configured.

Offline

#13 2010-10-08 22:16:45

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: [SOLVED] Misspelled while changing inittab file

just boot with init=/bin/bash, remount / as rw, edit inittab, remount / as ro (optional), exec /sbin/init

EDIT: oops newbie section! at grub promp for kernel command line add init=/bin/bash and boot, then on # root prompt:

mount / -o remount,rw
nano /etc/inittab
exec /sbin/init

Last edited by djgera (2010-10-08 22:38:17)

Offline

#14 2010-10-09 19:53:41

Neuneck
Member
From: Germany
Registered: 2009-05-01
Posts: 21

Re: [SOLVED] Misspelled while changing inittab file

Thank you all for your suggestions! Fortunately I did not have to get a liveCD or anything (however, my 1337 score is at -9 now, +1 for using arch, -10 for not having a liveCD big_smile)
The init = /bin/bash thing worked perfectly and saved me a lot of trouble! Thanks too for the minute description.

Now I can go on to tackle the real issue of X crashing due to a conflict with the Wacom tablet drivers...

Neuneck

Offline

Board footer

Powered by FluxBB