Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a query for those of you who are proficient with Linux Redhat 8.
The following occurs after i've pressed b in grub to load up the latest kernel (.26 i believe).
error trying to mount root filesystem
Kernel Panic
try passing init=
yes yes, i understand there are thousands of posts here all under the same circumstances.
What makes this case interesting is that i ran the recovery CD, while detecting the installation it came up with an error (notably "cannot mount /mnt/sysimage/ from /dev/hda5"), then promptly told me i had no installation on the harddisk
(To believe this would be extremely niave)
I got into the recovery prompt and ran the following (without my file system mounted) fsck -y /dev/hda5 to which i got a lovely welcomed sight of lots of repairs going on.
I once more tried booting, this time i got a slighly different response from the machine :-
init not found
kernel panic
try passing init=
So i went back into recovery and successfully mounted my /dev/hda5
this is where it gets INTERESTING (or not depending on how much you know about linux) :-
it mounted the filesystem very nicely to my /mnt/temp folder
however half of the files were missing from my /etc directory (fstab for instance)
So i took a look at the lost+found directory and there are a few hundred files there all named with LOTS of numbers all preceded by a HASH (i.e #)
could you guys please explain to me how to recover these files ? (if this is the correct course of action)
if not then please explain how i could go about recovering my filesystem.
My level of understanding of linux is minimal - such to say i understand my boot fs is off /dev/hda1 i think
and i use a GRUB loader to load my kernel up
Im using REDHAT 8 with the latest up2date
ahh yes, i was not doing anything with the machine prior to crash.
Originally posted by hiren_a Good evening gentlemen,
I have a query for those of you who are proficient with Linux Redhat 8.
The following occurs after i've pressed b in grub to load up the latest kernel (.26 i believe).
error trying to mount root filesystem
Kernel Panic
try passing init=
yes yes, i understand there are thousands of posts here all under the same circumstances.
What makes this case interesting is that i ran the recovery CD, while detecting the installation it came up with an error (notably "cannot mount /mnt/sysimage/ from /dev/hda5"), then promptly told me i had no installation on the harddisk
(To believe this would be extremely niave)
I got into the recovery prompt and ran the following (without my file system mounted) fsck -y /dev/hda5 to which i got a lovely welcomed sight of lots of repairs going on.
I once more tried booting, this time i got a slighly different response from the machine :-
init not found
kernel panic
try passing init=
So i went back into recovery and successfully mounted my /dev/hda5
this is where it gets INTERESTING (or not depending on how much you know about linux) :-
it mounted the filesystem very nicely to my /mnt/temp folder
however half of the files were missing from my /etc directory (fstab for instance)
So i took a look at the lost+found directory and there are a few hundred files there all named with LOTS of numbers all preceded by a HASH (i.e #)
could you guys please explain to me how to recover these files ? (if this is the correct course of action)
if not then please explain how i could go about recovering my filesystem.
My level of understanding of linux is minimal - such to say i understand my boot fs is off /dev/hda1 i think
and i use a GRUB loader to load my kernel up
Im using REDHAT 8 with the latest up2date
ahh yes, i was not doing anything with the machine prior to crash.
i had similiar problem while using jfs as the root partition in my mandrake linux distribution
after you use fsck you cannot go back to your previous state
so there are two ways of solving your problem
manually add the fstab ,inittab
(provided your rc.sysinit and rc.d,init.d are intact)
or browse through each individual file in your lost+found directory
i preferred the former and came up with a working system again
if you have money to spare there is a utility called
r-linux which recovers most files (from windows) http://www.r-tt.com/RLinux.shtml
though you can individually search each sector too(if you can do it)
to recover your files
keep posted
Non of the utilities above worked, so ended up having to reinstall.
I'm wondering if there is any way to create an image of the ENTIRE harddisk once its set up so that if a crash occurs again, i can transfer the image to the drive and maintain all my backed up settings.
Originally posted by hiren_a Thankyou kindly for your expertise,
Non of the utilities above worked, so ended up having to reinstall.
I'm wondering if there is any way to create an image of the ENTIRE harddisk once its set up so that if a crash occurs again, i can transfer the image to the drive and maintain all my backed up settings.
I'm runnig a squiddy proxy server and i use webmin to administer it.
It has some backup facilities built into it. I currently have 7 ibm 120 gig disks in the machine on raid and backed my
/
/usr
/var
/boot
to appriopriate files on my raid.
I also found that when my computer initially crashed, it was the /swap partition that became corrupted. Do i have to backup the swap partition? If so how. Or are the steps to backup i've already taken sufficient.
Webmin uses dump and restore (i checked the manual)
Originally posted by hiren_a Hello again, im wondering if this is acceptable:-
I'm runnig a squiddy proxy server and i use webmin to administer it.
It has some backup facilities built into it. I currently have 7 ibm 120 gig disks in the machine on raid and backed my
/
/usr
/var
/boot
to appriopriate files on my raid.
I also found that when my computer initially crashed, it was the /swap partition that became corrupted. Do i have to backup the swap partition? If so how. Or are the steps to backup i've already taken sufficient.
Webmin uses dump and restore (i checked the manual)
well you should not back your swap partition
swap means the swap usued in memory management of the operating system
(ie it is a partition where pages of memory are stored in a multiprogramming os like linux when they are not in physical memory)
so if the swap becomes corrupted
just delete it
(initially i don't think swap can be corrupted -becoz when the os boots it adds the swap and the content is cleared)
keep posted
I dont think the data got corrupted, its the partition. It kept telling me bad superblock number and that there was something wrong with the magic number.
Originally posted by hiren_a I dont think the data got corrupted, its the partition. It kept telling me bad superblock number and that there was something wrong with the magic number.
Maybe i should hire a sourcerer.
give the content of the command
fdisk -l
and the file
/etc/fstab
then i could try
Distribution: Redhat 8.0, Immunix 7.0 a few others
Posts: 222
Rep:
STOP. Please.
I've had experience of this and believe me, if you don't know what you're doing you can easily make a mess of a fs (and I should know!)
Grub is looking for the init program - you know ... the one to change runlevels, usually located in /sbin/init.
If you try to mount the fs using a recovery CD or floppy, you won't be able to run init. All you needed to do actully was append init=/dev/hdax where x is the location of your root partition (not the boot partition).
People get confused because grub doesn't recognise this boot option, but this boot option is not for grub - it's for the kernel.
So next time just append init=/dev/hdax and save youself a lot of time and trouble.
right i'd just like to remind you guys that im a complete newbie to linux.
I am completely confused by rch's last post and Q*berts post while i understand he is telling me not to do what rch has said i'm lost by what is says after the (and i should know!) comment.
really sorry for being so ignorant, but we all have to start somewhere .
Originally posted by hiren_a
right i'd just like to remind you guys that im a complete newbie to linux.
I am completely confused by rch's last post and Q*berts post while i understand he is telling me not to do what rch has said i'm lost by what is says after the (and i should know!) comment.
really sorry for being so ignorant, but we all have to start somewhere .
well i have to say nothing about Q*bert as apparently he did not understood the problem
i was talking about your swap partition
and i was wondering whether it has been swapon'ed' properly
so i asked you to give the output of
fdisk -l(from command line)
and the content of /etc/fstab
anyway
if you can't do that
just give the output of the commands
cat /proc/partitions
and
cat /proc/swap
Disk /dev/hde: 255 heads, 63 sectors, 15017 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hde1 * 1 15017 120624021 c Win95 FAT32 (LBA)
Disk /dev/hda: 255 heads, 63 sectors, 1216 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 680 5357677+ 83 Linux
/dev/hda3 681 924 1959930 83 Linux
/dev/hda4 925 1216 2345490 5 Extended
/dev/hda5 925 989 522081 83 Linux
/dev/hda6 990 1086 779121 82 Linux swap
/dev/hda7 1087 1216 1044193+ 83 Linux
Disk /dev/hdb: 255 heads, 63 sectors, 19929 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 2 19929 160071660 f Win95 Ext'd (LBA)
/dev/hdb2 * 1 1 8001 1 FAT12
/dev/hdb5 2 19929 160071628+ b Win95 FAT32
Partition table entries are not in disk order
and /etc/fstab i've editted
btw my SWAP is now ok, the system is running, i just want to know how to repair the swap partition if it happens again, i cannot afford to keep reinstalling linux.
Distribution: Redhat 8.0, Immunix 7.0 a few others
Posts: 222
Rep:
Quote:
Originally posted by rch well i have to say nothing about Q*bert as apparently he did not understood the problem
Nope. The problem is that I understod the problem all too well, because I've been here before.
The recovery CD tries to mount the sysimage so that you can repair it, only because of a bug in the installer for RH8.0 it will remount and write to it and abort (just like if you try to do a dummy run upgrade which also won't work).
What I'm saying is you're fs is borked if you do a hard reboot a few times after getting this init message.
Quote:
Originally posted by hiren_a btw my SWAP is now ok, the system is running, i just want to know how to repair the swap partition if it happens again, i cannot afford to keep reinstalling linux.
Append init=/dev/hdx where x is the root partition (where the sbin directory is) and you'll never see this nightmare again.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.