Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] not booting anymore after incorrect shutdown
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Raban
n00b
n00b


Joined: 24 Jun 2007
Posts: 4

PostPosted: Sun Jun 24, 2007 4:21 pm    Post subject: [solved] not booting anymore after incorrect shutdown Reply with quote

Having a functioning computer - or at least access to my data - is very important to me, because I need it as pupil as well as for work. So I really hope to find someone here to help me.

As I was trying to emerge spring-svn a little while ago the computer suddenly froze and I barely had a black screen. So I had to push the restart-button of my computer.

After booting I got:

Quote:
# checking root filesystem...
/etc/init.d/checkroot: line 35: fsck: command not found


My root partition was not mounted anymore and pressing Ctrl+D to continue only led to another restart.

Does my hard disk have to be damaged or could it just be a software problem? And if so: How could I fix it? Any ideas?


Last edited by Raban on Sun Jun 24, 2007 6:45 pm; edited 4 times in total
Back to top
View user's profile Send private message
grooveman
Veteran
Veteran


Joined: 24 Feb 2003
Posts: 1217

PostPosted: Sun Jun 24, 2007 4:26 pm    Post subject: Reply with quote

Have you tried booting to the gentoo live cd (or knoppix), then running the fsck from there? You will have better results. Try that, then post back.

Good luck. I feel your pain.
_________________
To look without without looking within is like looking without without looking at all.
Back to top
View user's profile Send private message
Raban
n00b
n00b


Joined: 24 Jun 2007
Posts: 4

PostPosted: Sun Jun 24, 2007 4:33 pm    Post subject: Reply with quote

My partitioning structure is:
hda1: boot
hda2: swap
hda3: root
hda4: truecrypt-encrypted home

The terminal in Knoppix gave me:
Quote:
root@Knoppix:~# fsck /dev/hda1
fsck 1.40-WIP (14-Nov-2006)
e2fsck 1.40-WIP (14-Nov-2006)
/dev/hda1 was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/hda1: 45/26104 files (11.1% non-contiguous), 18370/104388 blocks

root@Knoppix:~# fsck /dev/hda3
fsck 1.40-WIP (14-Nov-2006)
e2fsck 1.40-WIP (14-Nov-2006)
Adding dirhash hint to filesystem.

/dev/hda3: clean, 396900/3842720 files, 2759265/7681078 blocks


Trying it again with hda1:
Quote:
root@Knoppix:~# fsck /dev/hda1
fsck 1.40-WIP (14-Nov-2006)
e2fsck 1.40-WIP (14-Nov-2006)
/dev/hda1: clean, 45/26104 files, 18370/104388 blocks


But system boot still gives the same error message.
Back to top
View user's profile Send private message
grooveman
Veteran
Veteran


Joined: 24 Feb 2003
Posts: 1217

PostPosted: Sun Jun 24, 2007 4:51 pm    Post subject: Reply with quote

Quote:
My partitioning structure is:
hda1: boot
hda2: swap
hda3: root
hda4: truecrypt-encrypted home


I assume "root" here = "/".

Is hda3 the one giving you the problem? It looks like it scans as clean, and it still won't boot? Have you tried again, because it looks good...

Or is hda4 your problem? It is encrypted, and I know nothing about that... but maybe fsck doesn't like encrypted file systems? If hda4 is giving you the problem, you can comment it out in your fstab, or put in the noauto option, let the system boot, then try working with it form there (mounting it, checking it -- whatever tools might come with the truecrypt package..).

I hope you know what you are doing with encrypting that partition... that should not be done lightly, as recoving data from one is, by design, effectively impossible...

G
_________________
To look without without looking within is like looking without without looking at all.
Back to top
View user's profile Send private message
Raban
n00b
n00b


Joined: 24 Jun 2007
Posts: 4

PostPosted: Sun Jun 24, 2007 4:56 pm    Post subject: Reply with quote

Thank you for your suggestions.

At boot time I get the error right after it says
Quote:
# Checking root filesystem...

But I think my problem might not be a broken partition rather than fsck being broken for some reasons. Is there any way to repair it?

I am using the encrypted home partition for months now without any problems. And the computer does definitely not need it for boot.
Back to top
View user's profile Send private message
gsoe
Apprentice
Apprentice


Joined: 10 Dec 2006
Posts: 289
Location: Denmark

PostPosted: Sun Jun 24, 2007 5:14 pm    Post subject: Reply with quote

Raban wrote:
But I think my problem might not be a broken partition rather than fsck being broken for some reasons. Is there any way to repair it?
Yes, that was my thought too. I suggest you boot the minimal Gentoo CD and mount your / partition as well as the /dev and /proc as per the handbook, then chroot into the system and reinstall fsck. I don't remember the package name and I'm not in Gentoo right now, but
Code:
equery belongs /sbin/fsck
should tell you.

Last edited by gsoe on Sun Jun 24, 2007 5:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
grooveman
Veteran
Veteran


Joined: 24 Feb 2003
Posts: 1217

PostPosted: Sun Jun 24, 2007 5:16 pm    Post subject: Reply with quote

If it is an fsck thing: As you know, after so many mounts (unless you specifically formatted it to NOT do this), it will force an fsck. The shutdown command with the -F flag does this, and it drops a file to the root of the partition, and I think it is called .fsck (it is some hidden file). If you find this file, mv or delete it, then it will not try an fsck on boot (supposedly).

Quote:
I am using the encrypted home partition for months now without any problems. And the computer does definitely not need it for boot.

That is good news. It isn't that it is less stable, it is just that if you ever need to salvage the data after a crash, and you don't have the key, you are going to be in trouble! If you recognize what is involved here, all the power to you, if you don't have a restore plan for the data on that partition, then it behooves you to come up with one! ;)

But, while it might not *need* it for boot, if it is in your fstab to autoload (which is default), and it is damaged, then it *will* crash-out the boot process, and drop you to the ctrl+D prompt -- just fyi.

Can you chroot to /dev/hda3 while in knoppix? or does that bomb too? In any event, you might want to, while booted in knoppix, dump that data to external media while you can before you fiddle too much -- just in case you have to reformat or repartition. You should be able to dump the data back and not lose a beat (after the partition is fixed, of course).
_________________
To look without without looking within is like looking without without looking at all.
Back to top
View user's profile Send private message
Raban
n00b
n00b


Joined: 24 Jun 2007
Posts: 4

PostPosted: Sun Jun 24, 2007 6:44 pm    Post subject: Reply with quote

Quote:
Yes, that was my thought too. I suggest you boot the minimal Gentoo CD and mount your / partition as well as the /dev and /proc as per the handbook, then chroot into the system and reinstall fsck. I don't remember the package name and I'm not in Gentoo right now, but

That basically did it for me.

I had to download the Gentoo-LiveCD, because my Knoppix-CD is built for the x86 structure whereas my gentoo system is a 64bit one. After booting into console:
Quote:
gentoo nox


I typed in:
Quote:

# mount /dev/hda3 /mnt/gentoo
# mount -t proc none /mnt/gentoo/proc
# mount -o bind /dev /mnt/gentoo/dev
# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile
# export PS1="(chroot) $PS1"
# emerge e2fsprogs
# reboot


Thank you both for your help!
=>SOLVED!
Back to top
View user's profile Send private message
gsoe
Apprentice
Apprentice


Joined: 10 Dec 2006
Posts: 289
Location: Denmark

PostPosted: Mon Jun 25, 2007 1:49 pm    Post subject: Reply with quote

Glad to hear that did help. Now, one wonders what other files might have been damaged by the hard reset.... But whatever, there's always the lengthy cure :P
Back to top
View user's profile Send private message
grooveman
Veteran
Veteran


Joined: 24 Feb 2003
Posts: 1217

PostPosted: Tue Jun 26, 2007 4:51 pm    Post subject: Reply with quote

Good to hear!

But -- please remember to explicitly state that you are using a 64bit system at the beginning of the thread! That is significant information. ;)
_________________
To look without without looking within is like looking without without looking at all.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum