# Solved: centos 4.4 install errors



## needsleep (Sep 27, 2005)

I installed CENTos (RHEL) 4.4 last week. I have a dual boot system with xp on the other side. I use partition commander, diminutive of system commander, to switch them. 
The installer runs X-based Disk Druid, a partition tool. The errors I'm getting - and I'll post those in a moment - complain of missing mount points. Since I have no system access, I cannot run Disk Druid manually to see what's out there (I've since found a better way), but just for kicks, I ran the installer again, and when I got into Disk Druid, I found there were no mount points defined for any partitions.

The RedHat document, "Installation Guide x86.pdf" on pdf page 48, document page 36, states, "The partition holding the system's root file system has a label of 'Red Hat Enterprise Linux' (for GRUB)". When I try to re-label this to conform, e2label reports "Label too long, will be truncated." Should it be 'RHEL', instead?

I have not messed with partition commander with respect to the new install. Do I need to delete the option to boot linux and recreate it, to reset it to start GRUB? How it does this, I don't know. Is there a way to tell if it's partition commander that is not linked in to start GRUB? I'm afraid it might be pointing to a now non-existent location in the old distro.

These errors appear on the screen when I boot --
missing mount point
mount: error 2 mounting none
switchroot: mount failed: 22
umount /inintrd/dev failed: 2
kernel panic - not syncing: attempted to kill init!


Using the install CD, I can go into "rescue" mode, which gives me shell access to my hard disks.

fdisk -l
/dev/hda 100 Gb

volume
device	boot	start	end	blocks	id	system
hda1	*	690	5023 7	NTFS
hda2 5024	12161 f	W95 ext'd (LBA)
hda3 1	13 83	linux
hda4 14	689 17	Hidden NTFS
hda5 5024	6247 83	Linux
hda6 6248	10071 7	NTFS
hda7 10072	10219 82	Linux swap
hda8 10220	12161 83	Linux

/dev/hdb 203 Gb
device	boot	start	end	blocks	id	system
hdb1	*	1	18237 83	Linux
hdb2 18238	24792 82	Linux

/boot is hda3 (in regular partition)
/ is hda8 (extended/logical partition)
/var is hda5 (extended/logical partition)
/orafs is hdb1 (extended/logical partition)
/scripts is hdb2 (extended/logical partition)

This looks like it is trying to boot hda1 and hdb1. Do I read that correctly?

I don't know how/why hdb2 is type 82 swap, it should be type 83, ext3.
This I can fix.

dmesg > boot.messages
last lines... anaconda is the redhat installation program

running anaconda script /usr/bin/anaconda
isys.py: mount() - going to mount /tmp/hda3 on /mnt/sysimage
/hda5
/hda8
/hdb1
/hdb2
going to mount hda8 on /mnt/sysimage as ext3
isys.ps:mount() - going to mount /tmp/hda8 on /mnt/sysimage
trying to mount none on /proc
isys.py:mount()- going to mount none on /mnt/sysimage/proc
trying to mount none on /sys
isys.py:mount()- going to mount none on /mnt/sysimage/sys


I found that my /etc/fstab does not exist. Created following --
/dev/hda3 /boot ext3 
/dev/hda8 / ext3 
/dev/hda5 /var ext3
/dev/hdb1 /orafa ext3
/dev/hdb2 /scripts ext3

I know there's more to fstab, something about 0's and 1 at the end of those lines having to do with dump backup command and then permissions. I don't have access in XP, but next time I'm in linux I'll post.

mount with no options (same as contents of /etc/mtab) --
/dev/root.old on / type ext2 (rw)
/proc on /proc type proc (rw, nodiratime)
/dev/pts in /dev/pts type devpts (rw)
/sys on /sys type sysfs (rw)
none on /tmp type ramfs (rw)
none on /tmp/ramfs type ramfs (rw)
/proc/bus/usb on /proc/bus/usb type usbfs (rw)
/tmp/loop0 on /mnt/runtime type cramfs (ro)
/selinux on /selinux type selinuxfs (rw)
none on /mnt/sysimage/proc type proc (rw,nodiratime)
none on /mnt/sysimage/sys type sysfs (rw)

I'd appreciate any ideas you might have. Thanks.


----------



## saikee (Jun 11, 2004)

Can you show us the /boot/grub/menu.lst (or /grub/grub.conf in /dev/hda3)?

Also /boot/grub/device.map (or /grub/device.map in /dev/hda3)?


----------



## needsleep (Sep 27, 2005)

I am not able to get into these directories...

cd /boot
"directory does not exist"

cd /dev/hda3
"not a directory"
/dev/hda3 does exist as a binary file(?) when I do an 'ls -l /dev/hda3'.

cd /grub
"directory does not exist"


----------



## saikee (Jun 11, 2004)

OK if you need to be taken by the hand (as I only used one partition to install CentOS and you used 5 partitions so I assume you would know where to find your information).

You need to mount the partitions before you can see them.

Assuming you boot up with installation CD rescue mode and using its boot-up Linux here are the steps to to get the information.

Basically you create a temporary directory in the /mnt of the boot-up Linux (I use /mnt/hda3) so that you can mount the device hda3 on it. Thereafter you 

```
mkdir /mnt/hda3
mount /dev/hda3 /mnt/hda3
cat /mnt/hda3/grub/grub.conf
cat /mnt/hda3/grub/device.map
```
If you use a Live CD that allows you to log in as root to the GUI, say using Slax, you should be able to cut and paste the information to send it via the Internet.

With the grub.conf we could diagnose how Grub boots your Centros.

I also need your confirmation of which one between hda and hdb is the first bootable disk.

Currently I am assuming hda boots first.

If you are changing the boot disk order you should stop it now because it is counterproductive if you have a booting problem to solve.


----------



## needsleep (Sep 27, 2005)

Thanks for the extra help.

-/bin/sh-3.00# cat /mnt/hda3/grub/grub.conf
grub.conf generated by anaconda
# 
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,2)
# kernel /vmlinuz-version ro root-/dev/hda7
# initrd /initrd-version.img
#boot=/dev/hda3
default=0
timeout=5
splashimage=(hd0,2)/grub/splash.xpm.gz
hiddenmenu
title CentOS-4 i386 (2.6.9-42.ELsmp)
root (hd0,2)
kernel /vmlinuz-2.6.9-42.ELsmp ro root=LABEL=RHEL 15GB rhgb quiet
initrd /initrd-2.6.9-42.ELsmp.img
title CentOS-4 i386-up (2.6.9-42.EL)
root (hd0,2)
kernel /vmlinuz-2.6.9-42.EL ro root=LABEL=RHEL 15GB rhgb quiet
initrd /initrd-2.6.9-42.EL.img
title Other
rootnoverify (hd0,3)
chainloader +1
-/bin/sh-3.00# 

-/bin/sh-3.00# cat /mnt/hda3/grub/device.map
# this device map was generated by anaconda
(fd0)	/dev/fd0
(hd0) /dev/hda
-/bin/sh-3.00#

You are correct, hda boots first.


----------



## saikee (Jun 11, 2004)

CentOS is a Red Hat and the Red Hat family likes to address the root partition as a "label" instead of the normal device name used by every non-Red Hat Linux.

I never like Red Hat system myself and always change it to the normal way because its installer seldom gets it right. In your case I can't see any error in grub.conf but I also forget to ask you to post the /etc/fstab which would tell us the partition for mounting "/".

I suspect the "Label=RHEL 15GB" may be causing problem here as any space in the kernel statement constitutes a parameter and "15GB" is clearly not one of them.

Therefore I suggest to you to do the following

(1) Amend your /mnt/hda3/grub/grub.conf with parts marked red


```
default=0
timeout=5
splashimage=(hd0,2)/grub/splash.xpm.gz
hiddenmenu
title CentOS-4 i386 (2.6.9-42.ELsmp)
root (hd0,2)
kernel /vmlinuz-2.6.9-42.ELsmp ro root=[color=red]/dev/hda8[/color]  rhgb quiet
initrd /initrd-2.6.9-42.ELsmp.img
title CentOS-4 i386-up (2.6.9-42.EL)
root (hd0,2)
kernel /vmlinuz-2.6.9-42.EL ro root=[color=red]/dev/hda8[/color] rhgb quiet
initrd /initrd-2.6.9-42.EL.img
title Other
rootnoverify (hd0,3)
chainloader +1
```
(2) Change the partition reference (believed to be "LABEL=RHEL 15GB ") for the root of "/" to /dev/hda8


----------



## needsleep (Sep 27, 2005)

I made the corrections, but the system still produced the same errors.

I changed grub/grub.conf per your suggestion, replacing 
'root=LABEL=RHEL 15GB' to /dev/hda8. 
When that didn't work, I changed it to reference the correct label,
(RHEL instead of 'RHEL 15GB'), but that didn't work either.

I started poking around. When I looked at mtab, I found that it was trying to 
mount my swap space as my root partition, so I fixed that.

That did something, as now I boot and I am left at a GRUB> prompt. I tried to run boot
from there, but it complains that I haven't loaded the kernel yet.

When I get into Linux Rescue now, it successfully finds the linux installation, and 
mounts the system image to /mnt/sysimage. But I can't find my /boot anymore. 
boot is a directory in /mnt/sysimage, but contains nothing. When I try to follow previous 
steps to mount /boot via this method,
cd /mnt
mkdir hda3
mount /dev/hda3 /mnt/hda3
cd hda3

that too, is empty.
I tried to mount it to /mnt/sysimage/boot, but that failed as well.

Just before I lost the ability to get into hda3, I pounded out unwanted options in 
grub/grub.conf. I only have a single processor pc, so the smp version should never be run 
(smp=symettric multiprocessor version). 

I also commented out the option to boot into "other". grub.conf says it will boot 
partition 3 when other is selected. Partition 3 is my old windows 2000 partition. It is
slated to be reformatted to linux to become my /tmp partition. 

If there is only one option in grub.conf, is grub smart enough simply fire that up without 
asking you? 

I can't access /etc/fstab either, now. Here is the old version of fstab. I changed 
these lines: 
line 1: 'RHEL 15GB' -> 'RHEL'
line 2: 'RHEL BOOT' -> 'Booter'
last line: hda6 -> hda7

LABEL=RHEL 15GB / ext3 defaults 1 1
LABEL=RHEL BOOT /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tempfs defaults 0 0
none /proc proc	defaults 0 0
none /sys sysfs	defaults 0 0
/dev/hda6 swap swap defaults 0 0

Thanks.


----------



## saikee (Jun 11, 2004)

The succesful booting of your CentOS depends on the correct entries in /etc/fstab.

You can now proceed to boot the Linux manually with a Grub prompt by entering these lines (as per grub.conf except omitting the "title" statement and finish it last with a "boot" statement)

```
root (hd0,2)
kernel /vmlinuz-2.6.9-42.EL ro root=/dev/hda8 rhgb quiet
initrd /initrd-2.6.9-42.EL.img
[color=red]boot[/color]
```
Grub will respond to each line but a silence means the line is acceptable to Grub. Thus in manual booting you know exactly the line Grub is having a problem with.

Please note /etc/fstab should be in the root partition of hda8


----------



## needsleep (Sep 27, 2005)

I had errors, but decided I had spent enough time trying to solve, so I re-installed. Then everything worked. I learned a lot in this thread: fstab, grub, grub interface commands, grub.conf. It was because you had said in another thread with someone else, that you can learn a lot by working through the problems, that I was encouraged to do so here. 
I'm not sorry I did. Thanks for your help.


----------

