PDA

View Full Version : FC7 Booting woes



satchfan
14th June 2007, 05:55 AM
I successfully installed FC7 on a Dell640m (single boot, no other OS), and things were working great. All of a sudden, booting the laptop goes into the grub menu. I tried the rescue mode (chroot /mnt/sysimage) using the installation DVD, and tried grub-install as follows.

grub-install /dev/sda

and got the error message

The file /boot/grub/stage1 not read correctly.

even though I can see /boot/grub/stage1. Assuming that grub-install looks for the boot partition ( I have /boot, / and /home partitions).

mount -a

gave me

mount: special device LABEL=/boot does not exist

Going back to the grub menu and typing

grub> root (hd0, [tab] shows me three partitions

Partition num:0, Filesystem is fat, partition type 0xc
Partition num:1, Filesystem type is ext2fs, partition type 0x83
Partition num:2, Filesystem type unknown partition type 0x8e

Changing root to (hd0,0) (boot partition)

grub> root (hd0,0)
grub> cat (hd0,0)/
Possible files are: windows boot.ini bootmgr md3.txt ntdetect.com etc.

I'm at a loss now. I have no clue why /boot is a fat filesystem or why windows files are showing up in the boot partition (possible partition table corruption?). I spent a lot of time trying to get the laptop to run FC7 including a special software that I'm working on now. I would hate to reinstall FC7 and lose all the previous data. Any help to recover the boot partition is greatly appreciated!

ankit
14th June 2007, 06:56 AM
Hope you will find solution from below procedure:

====================
[root@ankit ~]# fdisk /dev/sda
Command (m for help): p

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

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 c Windows
/dev/sda2 14 1288 10241437+ 83 Linux
/dev/sda3 1289 1419 1052257+ 82 Linux swap / Solaris
/dev/sda4 1420 19457 144890235 5 Extended
/dev/sda5 1420 2694 10241406 83 Linux
/dev/sda6 2695 3969 10241406 83 Linux
/dev/sda7 3970 5244 10241406 83 Linux

Command (m for help): d
Partition number (1-7): 1
Command (m for help): p

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

Device Boot Start End Blocks Id System
/dev/sda2 14 1288 10241437+ 83 Linux
/dev/sda3 1289 1419 1052257+ 82 Linux swap / Solaris
/dev/sda4 1420 19457 144890235 5 Extended
/dev/sda5 1420 2694 10241406 83 Linux
/dev/sda6 2695 3969 10241406 83 Linux
/dev/sda7 3970 5244 10241406 83 Linux

Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
p
Selected partition 1
First cylinder (1-19457, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-13, default 13):
Using default value 13

Command (m for help): p

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

Device Boot Start End Blocks Id System
/dev/sda1 1 13 104391 83 Linux
/dev/sda2 14 1288 10241437+ 83 Linux
/dev/sda3 1289 1419 1052257+ 82 Linux swap / Solaris
/dev/sda4 1420 19457 144890235 5 Extended
/dev/sda5 1420 2694 10241406 83 Linux
/dev/sda6 2695 3969 10241406 83 Linux
/dev/sda7 3970 5244 10241406 83 Linux

Command (m for help): a
Partition number (1-7): 1

Command (m for help): p

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

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1288 10241437+ 83 Linux
/dev/sda3 1289 1419 1052257+ 82 Linux swap / Solaris
/dev/sda4 1420 19457 144890235 5 Extended
/dev/sda5 1420 2694 10241406 83 Linux
/dev/sda6 2695 3969 10241406 83 Linux
/dev/sda7 3970 5244 10241406 83 Linux

Command (m for help): q

[root@ankit ~]# fsck.ext3 /dev/sda1
[root@ankit ~]# e2label /dev/sda1 /boot
[root@ankit ~]# grub
grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0,0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... yes
Checking if "/grub/stage2" exists... yes
Checking if "/grub/e2fs_stage1_5" exists... yes
Running "embed /grub/e2fs_stage1_5 (hd0,0)"... failed (this is not fatal)
Running "embed /grub/e2fs_stage1_5 (hd0,0)"... failed (this is not fatal)
Running "install /grub/stage1 (hd0,0) /grub/stage2 p /grub/grub.conf "... succeeded
Done.

grub> quit

====================

lmo
14th June 2007, 12:11 PM
Looks like you just need it to be

root (hd0,1)

then will be ok.


Get into grub.
root (hd0,1)
setup (hd0)

If it were my machine, and that second partition were the /boot partition (Filesystem type is ext2fs, partition type 0x83), then that would work. I always have a fat32 first partition (hd0,0) for DOS and WinX.

satchfan
15th June 2007, 05:31 AM
Ankit, lmo thanks for both your help. I deleted the boot partition and created a new boot partition. But the fsck check failed. However, I was able to go into the grub shell mode and do a setup on (hd0,0). Yay, no need for reinstall!