-   Red Hat (
-   -   how to rescue linux with rescue cd (

farooqnasim 08-04-2009 09:35 AM

how to rescue linux with rescue cd
i had a linux RHEL 4.4 box running on a local network. i had to shutdown the system forcefully coz it hanged. when i started it again it gave me the error
/dev/sdd unexpected inconsistency run fsck manually (i.e without -a or -p)
i run the following after giving root password
file#1 fsck /dev/sdd
the mesg i got was
fsck.ext3:attempt to read block from filesystem resulted in short while trying to open /dev/sdd

when i ran it again it gave the same mesg

any how system is not booting

is there any solution to make the system running? if i use installation cd and go to rescue mode, are there any files which i can correct to get the system as i have other systems running on the local network with almost same configuration
any help or suggested link would be appriciated

unSpawn 08-04-2009 12:47 PM


Originally Posted by farooqnasim (Post 3630927)
i had a linux RHEL 4.4 box running on a local network. i had to shutdown the system forcefully coz it hanged.

Hanged how? With what errors logged/shown? Shutdown how?


Originally Posted by farooqnasim (Post 3630927)
fsck /dev/sdd

You run fsck on a partition, not a whole disk. List partitions by running 'fdisk -l /dev/sdd' then run fsck on each of them. If they still give "short read" errors try using one of the backup superblocks. Find those by running 'dumpe2fs /dev/partitionname|grep super' or 'mke2fs -vnSF /dev/partitionname'.

farooqnasim 08-05-2009 12:58 AM

when i tried "fdisk -l /dev/sdd" it gives me the following mesg

disk /dev/sdd:500.1 GB 500107862016 bytes 255 heads, 63 sectors/track 60801 cylinders
units=cylinders of 16065*512=8225280 bytes
/dev/sdd doesn't contain a valid parition table

after that i tried
'dumpe2fs /dev/sdd|grep super' i got the this mesg

dumpe2fs 1.35 (date)
dumpe2fs: attempts to read block from filesystem resulted in short read while trying to open /dev/sdd
could not find valid filesystem superblock

and on this
'mke2fs -vnSF /dev/sdd' the mesg was

mke2fs 1.35(date)
Filesystem label=
OS type=Linux
Block size=4096 (log=2)
61063168 inodes, 122096646 blocks
6104832 blocks (5.00%) srserved for super user
First data block=0
Maximum filesystem blocks=125829120
3727 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
superblock backups stored on blocks

what to do now??????

unSpawn 08-05-2009 05:18 AM

I don't know if this is due to any language barrier, if you just read over it or you don't want to, but you didn't answer the shutdown questions. I also told you that you should not run 'fsck' on a disk but on a partition. The same goes for 'dumpe2fs' and 'mke2fs'. If you do not know what a command does then please look it up before you execute it. Do not execute commands blindly: if reading doesn't help answer your questions then ask before executing it. Anyway. Since the partition table is gone you'll have to recover or rewrite it. If you do not have a backup of the drive then it is advisable to make a ('dd') copy before proceeding. Boot the KNOPPIX LiveCD and run 'testdisk /debug /log' on your drive to recover the partition table. Testdisk may indicate a certain partition table layout but you should know how many partitions are on the disk and what filesystem they are formatted with for this to work.

farooqnasim 08-05-2009 06:36 AM

i had read your question about how the system was shutdown but immidiately after that you instructed to run fsck on partitions. basically im jave programmer trying to learn linux so plz dont mind if i ask any silly questins. let me try the way you have told to recover parition table otherwise let you know the situation. i shutdown the system by pressing restart button and it took me to the stage" give root password for maintenance"

unSpawn 08-05-2009 06:52 AM

I just put emphasis on things you should not read over lightly. You're not asking "silly" questions, it's just that you are not complete in answering but you can fix that. Note the 'testdisk /debug /log' will leave a log in the current directory so you can read it back and post from (or attach) it if necessary.

farooqnasim 08-06-2009 08:07 AM

I downloaded KNOPPIX and try to boot the system but it didn't work, I had another CD (SysRescureCD) and booted the system with that. Once the system was up, i used fdisk -l, it showed me

/dev/sda doesn't contain valid parition table and didn't show any other disks
i tried fdisk -l /dev/sdb and so on up to d, it gave me the mesage, device is not available
at this point i didn't know where to backup using dd as none of other disks were available(plz note i have 4 disks on the system 3 disks are 500GB SATA, and 1 is 1000GB)

again after restarting the computer and booting from the disk not cd , it took me to the same "root password for maintenance"
there when i try fdisk -l
/dev/sda is ok and showed parition table
for rest (sdb,sdc,sdd) same mesage('doesn't contain valid partition table)
plz advise what to do, i dont want to loose data of the disks

unSpawn 08-06-2009 04:33 PM

SysRescueCD comes with testdisk. Is there a reason why you could not run it? And since you have said that you have similar machines it would be good to state how the hardware is configured. Are these 4 separate SATA drives or does it use RAID? If so, is it hardware or software RAID? Does the machine use LVM? Anything else you think would be worth knowing? And rebooting the machine without making changes will not get you past the dreaded "root password for maintenance", however it would allow you to mount one of the other drives and 'dd' a copy of /dev/sda to a file on a partition with enough space on it.

farooqnasim 08-09-2009 05:51 AM

its not raid, all 4 are separate disks, and there is no LVM, what i am doing now is attaching a new disk 1000GB with this system and backup /dev/sda on that new disk, after that i will try to run 'testdisk /debug /log' . one thing is confusing me! when i boot the system with sysrescuecd and use fdisk -l, it shows me
/dev/sda doesn't contain valid parition table and didn't show any other disks
but when i go to "give root password for maintenance" without "sysrescurecd" and do fdisk -l it shows all the disks as i had pointed out earlier. my question is while using "sysrescuecd" why it is not showing all the disks

linus72 08-09-2009 06:11 AM

Not sure about that
you got newest sysrescue cd?

Another good choice(s) are GRML full

and PMagic 4.4. (testing) has testdisk, dd rescue and more too

the mini pm there is cool too

unSpawn 08-10-2009 07:04 PM


Originally Posted by farooqnasim (Post 3636505)
what i am doing now is attaching a new disk 1000GB with this system and backup /dev/sda on that new disk, after that i will try to run 'testdisk /debug /log'

Any progress?

farooqnasim 08-11-2009 06:07 AM

i had to face another problem which needed more attention, could you plz have a look at that and suggest something

unSpawn 08-11-2009 06:24 AM

That thread is being dealt with there so you have to be patient for those helping you to return.

All times are GMT -5. The time now is 12:06 AM.