LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Fedora 12 no rescue option (https://www.linuxquestions.org/questions/linux-kernel-70/fedora-12-no-rescue-option-857108/)

Arno_H 01-18-2011 04:04 PM

Fedora 12 no rescue option
 
I have installed Fedora 12 and something went wrong when I tried to uninstall software (mgetty). The system hung and after switching the power off, I could not restart Fedora anymore. It hangs somewhere in the boot procedure, but I cannot see where, since the interactive mode cannot be activated.
I checked the forums and inserted the USB stick with the Fedora 12 installation. However, when it starts, it does not give a rescue option. I only get: boot, verify and boot, memory test, and boot from local drive.
The only way to get a terminal is to boot from the USB stick and login as a liveuser. But then I cannot mount my hard drive anymore.
I also tried to download the Fedora 14 installation ISO image and put it on an USB stick, but I cannot make my computer boot from that one. I stubbornly boots from the hard disk.
Can anyone help me get out of this mess.

Thanks in advance,

Arno

MS3FGX 01-18-2011 04:08 PM

It sounds like the filesystem might have been corrupted due to the hard shutdown. When you try and mount the partition from the live installer, what message do you get?

You will probably have to use the live installer to run fsck on the partition in question. Are you familiar with doing error checking on drives/partitions under Linux?

Arno_H 01-18-2011 04:19 PM

Thanks for the quick reply.
I am logged in as liveuser now, opened a terminal window , set myself as a superuser (su, no password required).
# fsck
fsck from util-linux-ng 2.16
# mount sda
mount: can't find sda in /etc/fstab or /etc/mtab
#

MS3FGX 01-18-2011 05:31 PM

That's not how it works at all...

First you need to figure out the partition you have Fedora installed onto. The easiest way to list partitions is to do:

Code:

fdisk -l
That should print out a list of partitions, filesystem types, and sizes. It should be relatively easy to figure out which one has Fedora on it, assuming it isn't a dual-boot or some other more complicated setup. Note that it is a lower-case L, not a one.

Once you have the partition (which will be something like sda1, sda2, not just sda), you run fsck against it, for example:

Code:

fsck /dev/sda1
It will then run through the filesystem and report any errors. Hopefully anything it finds will be fixable. Afterwards, you can try mounting the partition to see if everything is still there. To do that you need to first create a mount point, and them mount the partition to it. That would look something like this:

Code:

mkdir /mnt/target
mount /dev/sda1 /mnt/target
ls /mnt/target/
umount /mnt/target

Those commands first make a mount point under /mnt, mount /dev/sda1 to it, list the contents of the root of that partition, and then unmount it. Remember that /dev/sda1 may not be the partition in your case, so replace that with the appropriate device node if necessary.

Arno_H 01-19-2011 02:32 PM

OK, I tried to follow your suggestions. Here is the code:
[root@localhost liveuser]# fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000cd69e

Device Boot Start End Blocks Id System
/dev/sda1 * 1 26 204800 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 26 19457 156083521 8e Linux LVM

Disk /dev/dm-0: 156.1 GB, 156103606272 bytes
255 heads, 63 sectors/track, 18978 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 3724 MB, 3724541952 bytes
255 heads, 63 sectors/track, 452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table

Disk /dev/sdc: 1031 MB, 1031798272 bytes
255 heads, 63 sectors/track, 125 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x91f72d24

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 126 1007584 6 FAT16
Partition 1 has different physical/logical endings:
phys=(124, 254, 63) logical=(125, 112, 50)

Disk /dev/dm-2: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-2 doesn't contain a valid partition table

Disk /dev/dm-3: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-3 doesn't contain a valid partition table
[root@localhost liveuser]# fsck /dev/sda1
fsck from util-linux-ng 2.16
e2fsck 1.41.9 (22-Aug-2009)
/dev/sda1: clean, 46/51200 files, 62638/204800 blocks
[root@localhost liveuser]# mkdir /mnt/target
[root@localhost liveuser]# mount /dev/sda1 /mnt/target
[root@localhost liveuser]# ls /mnt/target/
config-2.6.32.21-168.fc12.i686 lost+found
config-2.6.32.23-170.fc12.i686 memtest86+-4.00
config-2.6.32.26-175.fc12.i686 System.map-2.6.32.21-168.fc12.i686
efi System.map-2.6.32.23-170.fc12.i686
elf-memtest86+-4.00 System.map-2.6.32.26-175.fc12.i686
grub vmlinuz-2.6.32.21-168.fc12.i686
initramfs-2.6.32.21-168.fc12.i686.img vmlinuz-2.6.32.23-170.fc12.i686
initramfs-2.6.32.23-170.fc12.i686.img vmlinuz-2.6.32.26-175.fc12.i686
initramfs-2.6.32.26-175.fc12.i686.img
[root@localhost liveuser]# umount /mnt/target

It looks like /dev/sda1 is my hard drive. The file system check went very rapidly. When mounting the hard disk to /mnt/target, I think I only got the LiveUser partition.

The fsck didn't resolve anything. Do you have any suggestions?

Arno

Arno_H 01-20-2011 03:58 PM

In the meantime, I got a little further. I found the grub.conf file in the grub directory. Through there, I found the filesystem in /dev/mapper/vg_linux1-lv_root. I also ran a fsck on that volume and it was also clean. I then removed the rhgb and quiet options from the kernel command and launched linux from my hard disk again. Then dracut told me to set selinux=0 in the kernal line. I did this and now dracut is haning after it told me: "Switching root"

John VV 01-20-2011 11:24 PM

this can be hard even for an experienced user seeing as the format is LVM
yes LVM is the default with fedora - they NEED PEOPLE testing it ,boy do they need people to test .


IF you have important data backed up ( say to dvd or an external drive )
i would just reformat and install fedora 14 . The install dvd should be able to do it .
If not then use Gparted's "live" cd ( a GREAT tool to have ) http://gparted.sourceforge.net/
or "SystemRescueCD http://www.sysresccd.org/Main_Page

NOW if there is data you NEED to recover . This might not be easy .Should be doable though .

the errors you are getting - like this
Quote:

Disk /dev/dm-2 doesn't contain a valid partition table
these ARE a problem
Quote:

"/dev/sda1 is my hard drive"
sda1 is the /boot partition and CAN NOT BE LVM in fedora 12 it must be ext3 format

but i am not an expert with LVM partition so that is about it .One of the LVM wizards around here will need to help

Arno_H 01-21-2011 03:33 PM

Indeed, this is what I did. I mounted /dev/mapper/LVM... to /mnt/target and then backed up everything I could think of. I then installed Fedora 14 and am now trying to install all the software again.

Thanks for the help.

Arno


All times are GMT -5. The time now is 11:24 AM.