On Sat, 7 Aug 2010, James Bensley wrote:
To: CentOS mailing list centos@centos.org From: James Bensley jwbensley@gmail.com Subject: Re: [CentOS] ext4?
On 7 August 2010 19:59, Akemi Yagi amyagi@gmail.com wrote:
They are all installed. Are you using RAID by any chance? Your grub.conf indicates that is from the second drive.
/dev/sda1 / (ext3) /dev/sda2 /storage (the ext4 in question, hardware RAID5 3.4TB) /dev/sdb1 /boot (ext3)
It seems like grub and/or yum have gone wrong somewhere over the years and perhaps downloaded new kernels but not installed them?
What would be a solution I should seek to achieve, compile them myself? Or is there a way I can tell my CentOS box "these are here, look you fool, use them!"?
Well that's sort of what I do.
If you have space to create a separate boot partition for GRUB, about 20MB should be plenty. You can create it as an ext3 logical partition, inside an extended partition. That should solve the GRUB Centos issue.
You then need to reinstall GRUB to that separate boot partition, otherwise GRUB will still be looking to boot from the MBR of the first drive - if that's where it is now.
You can install GRUB to separate boot partition by:
Create the separate boot partition, and label it something like GrubBoot, using e2label /dev/sd?? GrubBoot.
create the mountpoint; /mnt/GrubBoot
================================================================== ** AutoLinuxInstaller Fedora Installation
I have created a seperate Grub boot logical partition, in the extended partition, called GrubBoot /dev/sda13. This enables me to do fresh Linux installations into /dev/sda1 and /dev/sda2, without destroying the GrubBoot partition.
Here's a URL to my partition layout:
http://i34.tinypic.com/r9nccz.jpg
from grub-install man page:
`--root-directory=DIR' Install GRUB images under the directory DIR instead of the root directory. This option is useful when you want to install GRUB into a separate partition or a removable disk. Here is an example in which you have a separate "boot" partition which is mounted on `/boot' (I use /mnt/GrubBoot):
The installation of grub to the seperate partition was done by:
First mount the GrubBoot partition with:
mount -v -t ext3 -L GrubBoot /mnt/GrubBoot
then
grub-install --root-directory=/mnt/GrubBoot hd0
This was done with F12 as the active OS. Centos 5.5 and F12 will boot now from the GrubBoot partition.
I noticed that re-installing GRUB from Centos 5.5 did not allow Fedora 12 to boot. But for some strange reason, when I re-installed GRUB from Fedora 12, this also allowed Centos 5.5 root partition to boot.
Here is what my /mnt/GrubBoot/boot/grub/grub.conf file looks like. Note I've added some dummy entries at the end to distinguish where GRUB is booting from:
# grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You do not have a /boot partition. This means that # all kernel and initrd paths are relative to /, eg. # root (hd0,0) # kernel /boot/vmlinuz-version ro root=/dev/sda1 # initrd /boot/initrd-version.img #boot=/dev/sda
# GRUB Linux # hd0,0 /dev/sda1 1st hard drive,1st partition # hd0,1 /dev/sda2 1st hard drive,2nd partition # hd0,2 /dev/sda3 1st hard drive,3rd partition
# GRUB Linux # hd1,0 /dev/sdb1 2nd hard drive,1st partition # hd1,1 /dev/sdb2 2nd hard drive,2nd partition # hd1,2 /dev/sdb3 2nd hard drive,3rd partition
# GRUB Linux # hd2,0 /dev/sdc1 3rd hard drive,1st partition # hd2,1 /dev/sdc2 3rd hard drive,2nd partition # hd2,2 /dev/sdc3 3rd hard drive,3rd partition
default=0 timeout=5 splashimage=(hd0,12)/boot/grub/splash.xpm.gz hiddenmenu
title Initial CentOS 5.5 DVD kernel (vmlinuz-2.6.18-194.el5) root (hd0,0) kernel /boot/vmlinuz-2.6.18-194.el5 ro root=LABEL=Centos-5-root noapm apm=off ide=nodma initrd /boot/initrd-2.6.18-194.el5.img
title CentOS 5.5 system (vmlinuz-2.6.18-194.8.1.el5) root (hd0,0) kernel /boot/vmlinuz-2.6.18-194.8.1.el5 ro root=LABEL=Centos-5-root noapm apm=off ide=nodma initrd /boot/initrd-2.6.18-194.8.1.el5.img
title Fedora 12 system (vmlinuz-2.6.32.12-115.fc12.i686.PAE) root (hd0,1) kernel /boot/vmlinuz-2.6.32.12-115.fc12.i686.PAE ro root=LABEL=Fedora-12-root noapm apm=off ide=nodma nomodeset initrd /boot/initramfs-2.6.32.12-115.fc12.i686.PAE.img
title Fedora 12 system (2.6.31.9-174.fc12.i686.PAE) root (hd0,1) kernel /boot/vmlinuz-2.6.31.9-174.fc12.i686.PAE ro root=LABEL=Fedora-12-root noapm apm=off ide=nodma nomodeset initrd /boot/initramfs-2.6.31.9-174.fc12.i686.PAE.img
title Fedora 12 system (2.6.31.5-127.fc12.i686.PAE) root (hd0,1) kernel /boot/vmlinuz-2.6.31.5-127.fc12.i686.PAE ro root=LABEL=Fedora-12-root noapm apm=off ide=nodma nomodeset initrd /boot/initramfs-2.6.31.5-127.fc12.i686.PAE.img
title ... root (hd0,0) kernel /boot/vmlinuz-2.6.27.5-117.fc10.i686 ro root=LABEL=Fedora-10-root noapm apm=off ide=nodma initrd /boot/initrd-2.6.27.5-117.fc10.i686.img
title ... root (hd0,0) kernel /boot/vmlinuz-2.6.27.5-117.fc10.i686 ro root=LABEL=Fedora-10-root noapm apm=off ide=nodma initrd /boot/initrd-2.6.27.5-117.fc10.i686.img
title *** (Booting from GrubBoot logical partition /dev/sda13) *** root (hd0,0) kernel /boot/vmlinuz-2.6.27.5-117.fc10.i686 ro root=LABEL=Fedora-10-root noapm apm=off ide=nodma initrd /boot/initrd-2.6.27.5-117.fc10.i686.img
Sorry for all the noise. Just want to help the guy.
Kind Regards,
Keith Roberts
----------------------------------------------------------------- Websites: http://www.php-debuggers.net http://www.karsites.net http://www.raised-from-the-dead.org.uk
All email addresses are challenge-response protected with TMDA [http://tmda.net] -----------------------------------------------------------------
Hi Keith, thanks for your detailed reply. I haven't tried this yet..
What I have done is follow this tutorial to build the latest kernel (http://wiki.centos.org/HowTos/Custom_Kernel) which in the end game me an rpm of it for installation however when it came to install the rpm the follow was displayed;
package kernel-2.6.18-194.8.1.el5.x86_64 is already installed file /boot/.vmlinuz-2.6.18-194.8.1.el5.hmac from install of kernel-2.6.18-194.8.1.el5.x86_64 conflicts with file from package kernel-2.6.18-194.8.1.el5.x86_64 file /boot/System.map-2.6.18-194.8.1.el5 from install of kernel-2.6.18-194.8.1.el5.x86_64 conflicts with file from package kernel-2.6.18-194.8.1.el5.x86_64 file /boot/config-2.6.18-194.8.1.el5 from install of kernel-2.6.18-194.8.1.el5.x86_64 conflicts with file from package kernel-2.6.18-194.8.1.el5.x86_64 file /boot/symvers-2.6.18-194.8.1.el5.gz from install of kernel-2.6.18-194.8.1.el5.x86_64 conflicts with file from package kernel-2.6.18-194.8.1.el5.x86_64 file /boot/vmlinuz-2.6.18-194.8.1.el5 from install of kernel-2.6.18-194.8.1.el5.x86_64 conflicts with file from package kernel-2.6.18-194.8.1.el5.x86_64
However none of these files exist in /boot?
[nf5002@eros ~]$ ls -la /boot total 5727 drwxr-xr-x 4 root root 1024 Aug 9 12:04 . drwxr-xr-x 25 root root 4096 Aug 9 11:46 .. -rw-r--r-- 1 root root 62395 Jun 11 2008 config-2.6.18-92.el5 drwxr-xr-x 2 root root 1024 Aug 9 11:34 grub -rw------- 1 root root 2544058 Oct 27 2008 initrd-2.6.18-92.el5.img drwx------ 2 root root 12288 Oct 27 2008 lost+found -rw-r--r-- 1 root root 80032 Nov 22 2007 message -rw-r--r-- 1 root root 92749 Jun 11 2008 symvers-2.6.18-92.el5.gz -rw-r--r-- 1 root root 1162656 Jun 11 2008 System.map-2.6.18-92.el5 -rw-r--r-- 1 root root 1859484 Jun 11 2008 vmlinuz-2.6.18-92.el5
This must some how relate to the fact the boot is on a different device, so where does CentOS think /boot is? I mean, the system is booting, has been for a few years so its working? If I unmount /boot I can't ls /boot, its empty?
[nf5002@eros ~]$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 28G 8.3G 18G 33% / /dev/sdb1 119M 12M 103M 10% /boot
/dev/sda2 is a 3.3TB ext4 partition, so /dev/sda uses GPT hence /boot being on a seperate device.
On 9 August 2010 12:08, James Bensley jwbensley@gmail.com wrote:
Hi Keith, thanks for your detailed reply. I haven't tried this yet..
What I have done is follow this tutorial to build the latest kernel (http://wiki.centos.org/HowTos/Custom_Kernel) which in the end game me an rpm of it for installation however when it came to install the rpm the follow was displayed;
package kernel-2.6.18-194.8.1.el5.x86_64 is already installed file /boot/.vmlinuz-2.6.18-194.8.1.el5.hmac from install of kernel-2.6.18-194.8.1.el5.x86_64 conflicts with file from package kernel-2.6.18-194.8.1.el5.x86_64 file /boot/System.map-2.6.18-194.8.1.el5 from install of kernel-2.6.18-194.8.1.el5.x86_64 conflicts with file from package kernel-2.6.18-194.8.1.el5.x86_64 file /boot/config-2.6.18-194.8.1.el5 from install of kernel-2.6.18-194.8.1.el5.x86_64 conflicts with file from package kernel-2.6.18-194.8.1.el5.x86_64 file /boot/symvers-2.6.18-194.8.1.el5.gz from install of kernel-2.6.18-194.8.1.el5.x86_64 conflicts with file from package kernel-2.6.18-194.8.1.el5.x86_64 file /boot/vmlinuz-2.6.18-194.8.1.el5 from install of kernel-2.6.18-194.8.1.el5.x86_64 conflicts with file from package kernel-2.6.18-194.8.1.el5.x86_64
However none of these files exist in /boot?
[nf5002@eros ~]$ ls -la /boot total 5727 drwxr-xr-x 4 root root 1024 Aug 9 12:04 . drwxr-xr-x 25 root root 4096 Aug 9 11:46 .. -rw-r--r-- 1 root root 62395 Jun 11 2008 config-2.6.18-92.el5 drwxr-xr-x 2 root root 1024 Aug 9 11:34 grub -rw------- 1 root root 2544058 Oct 27 2008 initrd-2.6.18-92.el5.img drwx------ 2 root root 12288 Oct 27 2008 lost+found -rw-r--r-- 1 root root 80032 Nov 22 2007 message -rw-r--r-- 1 root root 92749 Jun 11 2008 symvers-2.6.18-92.el5.gz -rw-r--r-- 1 root root 1162656 Jun 11 2008 System.map-2.6.18-92.el5 -rw-r--r-- 1 root root 1859484 Jun 11 2008 vmlinuz-2.6.18-92.el5
This must some how relate to the fact the boot is on a different device, so where does CentOS think /boot is? I mean, the system is booting, has been for a few years so its working? If I unmount /boot I can't ls /boot, its empty?
[nf5002@eros ~]$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 28G 8.3G 18G 33% / /dev/sdb1 119M 12M 103M 10% /boot
/dev/sda2 is a 3.3TB ext4 partition, so /dev/sda uses GPT hence /boot being on a seperate device.
-- Regards, James.
http://www.jamesbensley.co.cc/
There are 10 kinds of people in the world; Those who understand Vigesimal, and J others...? _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Okay James let's take a step back for a minute....
Your previous posts do show kernel-2.6.18-194.8.1.el5 as being installed so far as the RPM database is aware but your /boot listing and grub config do not show it....
Unless you have *very* specific circumstances there is no need to roll your own kernel and in terms of easing support it is preferred to use the vendor kernel and kmods for any modules not part of it that are required....
Does verifying the kernel RPM show anything missing?
rpm -V kernel-2.6.18-194.8.1.el5
*So long as* uname does not show the kernel version as the current one try to do:
yum reinstall kernel-2.6.18-194.8.1.el5
This *should* reinstall that kernel and with the files in place grubby should pick it up in the grub rebuild...
After reinstalling the kernel check grub.cfg and /boot and see if they are pointing to the most recent kernel.
Once you are on that we can work on the ext4 issue (following the advice in the RHEL release note advisories). So long as your kernel version is old it will cause issues with such recent development.
James
On 9 August 2010 12:54, James Hogarth james.hogarth@gmail.com wrote:
Unless you have *very* specific circumstances there is no need to roll your own kernel and in terms of easing support it is preferred to use the vendor kernel and kmods for any modules not part of it that are required....
Agreed, I was just trying to rebuild a forcefully install a newer kernel which is why I took this step...
Does verifying the kernel RPM show anything missing?
rpm -V kernel-2.6.18-194.8.1.el5
Yes it said that /boot/vmlinz..... and /boot/initrd..... where all missing
*So long as* uname does not show the kernel version as the current one try to do:
yum reinstall kernel-2.6.18-194.8.1.el5
This *should* reinstall that kernel and with the files in place grubby should pick it up in the grub rebuild...
After reinstalling the kernel check grub.cfg and /boot and see if they are pointing to the most recent kernel.
I assume this would fix my issue, instead I ran; sudo rpm -ivh --force kernel....rpm and that produced the results you predicted, and now after a reboot I ahve ssh'ed back in and...
[nf5002@eros ~]$ uname -a Linux eros 2.6.18-194.8.1.el5 #1 SMP Sun Aug 8 13:16:09 BST 2010 x86_64 x86_64 x86_64 GNU/Linux [nf5002@eros ~]$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 28G 8.3G 18G 33% / /dev/sda2 3.4T 198M 3.2T 1% /backup /dev/sdb1 119M 18M 97M 16% /boot tmpfs 1004M 0 1004M 0% /dev/shm
"Bloody cushty mate" ;)
"Bloody cushty mate" ;)
Nice :) Glad to hear you got it worked out...
RHEL kernels do have ext4 enabled by default but in 5.4 (I think....) it was labelled ext4dev to indicate that there was the *possibility* of changes to it as a development system that could potentially result in manual steps required due to low level changes - for example see how the btrfs stuff changed at one point in the main kernel development line....
In 5.5 (I think... would need to double check the relevant release notes to be sure... I may be one point release in front) the label was changed from ext4dev to ext4 to indicate that no low level changes would occur any more (ie the structure of the filesystem was finalized) however it was still considered a technology preview.... There was something (a tunefs change needed if I recall correctly off the top of my head) to allow old ext4dev systems to be relabelled as ext4 systems to be recognised and mountable....
That's the blah of it ;) Of course RHEL6 will have ext4 by default and not just supported (IIRC) and I imagine that the next point release in the 5 series will take it from technology preview to a formally supported filesystem...
Is disk I/O an issue for you? I'll be testing RHEL6 beta 2 with our applications in the next few weeks and I've been wondering whether it would be wise to tune the mount options to improve disk I/O as it is pretty intensive for us at times (lots of read and writing in functional testing)... I recall when ext4 first came with Ubuntu Karmic I had to tune the mount options to have our stuff perform sensibly on the development desktops here...
James
At Mon, 9 Aug 2010 12:08:29 +0100 CentOS mailing list centos@centos.org wrote:
Hi Keith, thanks for your detailed reply. I haven't tried this yet..
What I have done is follow this tutorial to build the latest kernel (http://wiki.centos.org/HowTos/Custom_Kernel) which in the end game me an rpm of it for installation however when it came to install the rpm the follow was displayed;
package kernel-2.6.18-194.8.1.el5.x86_64 is already installed file /boot/.vmlinuz-2.6.18-194.8.1.el5.hmac from install of kernel-2.6.18-194.8.1.el5.x86_64 conflicts with file from package kernel-2.6.18-194.8.1.el5.x86_64 file /boot/System.map-2.6.18-194.8.1.el5 from install of kernel-2.6.18-194.8.1.el5.x86_64 conflicts with file from package kernel-2.6.18-194.8.1.el5.x86_64 file /boot/config-2.6.18-194.8.1.el5 from install of kernel-2.6.18-194.8.1.el5.x86_64 conflicts with file from package kernel-2.6.18-194.8.1.el5.x86_64 file /boot/symvers-2.6.18-194.8.1.el5.gz from install of kernel-2.6.18-194.8.1.el5.x86_64 conflicts with file from package kernel-2.6.18-194.8.1.el5.x86_64 file /boot/vmlinuz-2.6.18-194.8.1.el5 from install of kernel-2.6.18-194.8.1.el5.x86_64 conflicts with file from package kernel-2.6.18-194.8.1.el5.x86_64
Do the rpm install with --force. This will forcably re-install the rpms.
However none of these files exist in /boot?
Somehow when you installed the kernels before /boot was not mounted or something.
Question: is /boot mounted readonly?
[nf5002@eros ~]$ ls -la /boot total 5727 drwxr-xr-x 4 root root 1024 Aug 9 12:04 . drwxr-xr-x 25 root root 4096 Aug 9 11:46 .. -rw-r--r-- 1 root root 62395 Jun 11 2008 config-2.6.18-92.el5 drwxr-xr-x 2 root root 1024 Aug 9 11:34 grub -rw------- 1 root root 2544058 Oct 27 2008 initrd-2.6.18-92.el5.img drwx------ 2 root root 12288 Oct 27 2008 lost+found -rw-r--r-- 1 root root 80032 Nov 22 2007 message -rw-r--r-- 1 root root 92749 Jun 11 2008 symvers-2.6.18-92.el5.gz -rw-r--r-- 1 root root 1162656 Jun 11 2008 System.map-2.6.18-92.el5 -rw-r--r-- 1 root root 1859484 Jun 11 2008 vmlinuz-2.6.18-92.el5
This must some how relate to the fact the boot is on a different device, so where does CentOS think /boot is? I mean, the system is booting, has been for a few years so its working? If I unmount /boot I can't ls /boot, its empty?
[nf5002@eros ~]$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 28G 8.3G 18G 33% / /dev/sdb1 119M 12M 103M 10% /boot
/dev/sda2 is a 3.3TB ext4 partition, so /dev/sda uses GPT hence /boot being on a seperate device.
On 9 August 2010 13:00, Robert Heller heller@deepsoft.com wrote:
Do the rpm install with --force. This will forcably re-install the rpms.
Yep, this is what I did to fix said issue, now I feel like a fool!
However none of these files exist in /boot?
Somehow when you installed the kernels before /boot was not mounted or something.
Question: is /boot mounted readonly?
No its not, its read and write however maybe as you mentioned the last time the box was update /boot may not have been uninstalled, not that I would ever un-mount it, but I wouldn't of thought to check that is was mounted. Some food for thought for next time!
Thank you.