LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   kernel panic during boot. is there something I can do (https://www.linuxquestions.org/questions/slackware-14/kernel-panic-during-boot-is-there-something-i-can-do-912607/)

nass 11-09-2011 04:30 AM

kernel panic during boot. is there something I can do
 
Hello everyone,
the other day I was logging off KDE (to go to command line again), at the moment the KDE was logging off, there was a power failure.

I can't startup the pc ever since:)
I get a kernel panic during boot - it says it can't find /dev/sda1 to mount it.
The filesystem is xfs.
The pc is an old toshiba laptop with a dead battery and a broken dvd-drive (i actually installed slackware through pxe)

I can't even boot using single mode, but that's sort of expected too

Is there anything I can do to avoid the reinstallation (in this order plase)?
1. locally - add some magical kernel init string
2. through pxe


thank you for your help

ponce 11-09-2011 04:50 AM

can you try booting a rescue disk (the slackware install's one should do) via pxe/usb? I would check if /dev/sda1 (or the whole /dev/sda) is still usable.

H_TeXMeX_H 11-09-2011 09:59 AM

What is the exact error message before it fails to boot ?

ReaperX7 11-09-2011 11:32 PM

XFS can have serious issues if you have a power loss. More than likely, parts of the kernel, the modules, or the configuration of the system got lost due to the file system possibly being lost or corrupted due to the loss of power. This is noted during the LILO installation of Slackware BTW.

There is a way to fix it however.

If you can get a bootable Live Disk of any Linux installation that matches your architecture (x86 or x64) try to run the xfs_repair utility, if provided to see if it can recover the filesystem.

If phase 1 fails you'll need to recover your files from a backup. If phase 2 fails you can attempt to recover the data and make a backup and then recover that way. To to this mount the disk in read-only mode, and then run the xfsdump utility to create a backup. Then use the mkfs utility to create a new partition after the file system has been dumped. Then lastly, use xfsrestore to restore your files.

nass 11-10-2011 03:11 AM

H_TexMex_H, i'll get back to you on that message ( i can't recall it right now, i'll have to see it )

Ponce, ReaperX7 . i'll ave to do a bit of mixing here of what you both say... in order to run a live session, i'll have to setup a pxe boot option to run it. So far so good. The problem lies in that the live cd's usually have hardcoded kernel init strings to look for the kernel and files from the cd mountpoint, or they try to extract from a squashfs filesystem, and all sort of similar obstructions.
Can I find a slackware live somewhere (i know of salix , but i'd prefer smth like slackware instead)?

ReaperX7 11-10-2011 03:32 AM

Quote:

Originally Posted by nass (Post 4520392)
H_TexMex_H, i'll get back to you on that message ( i can't recall it right now, i'll have to see it )

Ponce, ReaperX7 . i'll ave to do a bit of mixing here of what you both say... in order to run a live session, i'll have to setup a pxe boot option to run it. So far so good. The problem lies in that the live cd's usually have hardcoded kernel init strings to look for the kernel and files from the cd mountpoint, or they try to extract from a squashfs filesystem, and all sort of similar obstructions.
Can I find a slackware live somewhere (i know of salix , but i'd prefer smth like slackware instead)?

I don't know of too many Live Disks of Slackware based installs other than SlaX (recommended as it can be placed on a Flash Drive), STUX, and Recovery Is Possible (RIPLinux) (Salix is only for 32-bit sadly). Usually most Slackware and Slackware derived installs are simply installation disks only. An alternative that I would recommend would be a Gentoo or Ubuntu LiveDVD because they can grab program through emerge and apt even if only temporary to work with which can prove to be invaluable even if Ubuntu isn't the as stable as Slackware and Gentoo is a pain to work with. If you can get a USB Optical drive that might be a great tool to have around with a unit that has a dead, dying, or non-existent optical drive.

nass 11-11-2011 06:52 AM

i'm not even sure about whether this pc can boot from a usb attached cd-drive, but i'll have a look.

still i was hoping you'd tell me that there exist a way to copy a live distro to another pc's folder, set up pxe boot and tftp and be able to start it up from there... :) no chance for some hints or a tutorial in that direction eh?

ponce 11-11-2011 07:21 AM

http://alien.slackbook.org/blog/out-...ackware-13-37/

nass 11-11-2011 07:54 AM

ponce, i hadn't looked into this 'easteregg' to be honest.
but it'n not quite what i'm looking for, i don't have a pc around to use it as a pxe server, even though i have setup a pxe server using AlienBOB's guide in the past.

problem is afterwards, when you load a live distro and it looks for the root filesystem in some dvd related path and tries to extract a squashfs 'ed image.

I will try RIPLinux though, if its slack based and talks about recovery in its title, it looks promising..

ponce 11-11-2011 08:23 AM

consider you have the same xfs utils available in the slackware install disk, you shouldn't need no special live/recovery distro.

but judging from the symptoms described (it cannot find your root partition) I think your hard drive is kaput (hope to got it wrong: happens also when you build a custom kernel and you forget to add support for your ata/sata chipset/filesystem).

nass 11-11-2011 08:27 AM

Quote:

happens also when you build a custom kernel and you forget to add support for your ata/sata chipset/filesystem
but it can't be the case now since the pc was used for the past few years eh ?:)


you're quite right about the xfs utils... as long as I can use them directly from cd...
EDIT: yes, I can

nass 11-11-2011 09:33 PM

so it got repaired.
i managed to borrow the neighbours laptop,
use the pxesetup from slack13.37 dvd
run xfs_repair on /dev/sda1 and voila i'm back online! (yuhu!)

thank you all for the help!

(H_TexMex_H i'm sorry i didn't manage to get the dump from the boot!)


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