Todd Cary
2011-Mar-09 02:58 UTC
[CentOS] Creating the symbolic links in the /boot and /boot/grub/
I started a new thread since the original one is getting rather long. I have retrieved the files I deleted in /boot and /boot/grub, however I need to make links for /boot/System.map (System.map -> System.map-2.6.9-89.35.1) /boot/vmlinuz (vmlinuz -> vmlinuz-2.6.9-89.35.1) /boot/grub/menu.lst (menu.lst -> ./grub.conf) If it was not so important to get it correct, I would appreciate the syntax for the command. Usually I would figure it out. Since I have restored the files (I will double check to make sure they are all there), do I need to run grub-install? My apologies for bothering everyone with such a dumb error on my part. Todd -- Ariste Software Petaluma, CA 94952 http://www.aristesoftware.com
Nico Kadel-Garcia
2011-Mar-09 03:04 UTC
[CentOS] Creating the symbolic links in the /boot and /boot/grub/
On Tue, Mar 8, 2011 at 9:58 PM, Todd Cary <todd at aristesoftware.com> wrote:> I started a new thread since the original one is getting rather long. > > I have retrieved the files I deleted in /boot and /boot/grub, > however I need to make links for > > /boot/System.map ?(System.map -> System.map-2.6.9-89.35.1) > /boot/vmlinuz ?(vmlinuz -> vmlinuz-2.6.9-89.35.1) > /boot/grub/menu.lst (menu.lst -> ./grub.conf)Instead, re-install your kernel. "yum reinstall kernel". This should regenerate your symlinks correctly, except possibly the grub.conf.> If it was not so important to get it correct, I would appreciate > the syntax for the command. ?Usually I would figure it out. > > Since I have restored the files (I will double check to make sure > they are all there), do I need to run grub-install?i think yes. The old location of the boot loader is listed in /boot/grub/grub.conf, and should be used as the argument to that command. grub is much smarter than LILO used to be, but I think the bootstrap procedure relies on knowing details of where the fiddly bits of grub live on the relevant ex2 compatible filesytem.> My apologies for bothering everyone with such a dumb error on my > part. > > Todd > > -- > Ariste Software > Petaluma, CA 94952 > > http://www.aristesoftware.com > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >
Nico Kadel-Garcia
2011-Mar-09 05:53 UTC
[CentOS] Creating the symbolic links in the /boot and /boot/grub/
On Wed, Mar 9, 2011 at 12:40 AM, Todd Cary <todd at aristesoftware.com> wrote:> My current kernel is "vmlinuz-2.6.9-89.35.1" per grub.conf: > > #boot=/dev/hdc > default=1 > timeout=5 > splashimage=(hd0,0)/grub/splash.xpm.gz > hiddenmenu > title CentOS (2.6.9-100.EL) > ? ?root (hd0,0) > ? ?kernel /vmlinuz-2.6.9-100.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet > ? ?initrd /initrd-2.6.9-100.EL.img > title CentOS (2.6.9-89.35.1.ELsmp) > ? ?root (hd0,0) > ? ?kernel /vmlinuz-2.6.9-89.35.1.ELsmp ro root=/dev/VolGroup00/LogVol00 rhgb > quiet > ? ?initrd /initrd-2.6.9-89.35.1.ELsmp.img > > What is the correct syntax for "rpm -U -replacepkgs [kernel-whatever].rpm" ? > ?What should go into [kernel-whaetver]? > > In like manner, I have forgotten how to do a query on it to see if it is > present as in > > # rpm -q [kernel-name] > > Sorry, but it has been a long time since I used rpm and my Admin book does > not give an example. > > ToddOK, this should all go to the list for other CentOS folks who run into this kind of adventure. To get the full list of RPM's, look at the syntax of the "/etc/cron.daily/rpm"nightly script.> man rpmto look up the available options and learn about them. It's usually worth learning about such an important command, and RPM components are what yum really uses, so it's helpful to understand.> rpm -qa | grep kernelto get the list of kernel related components. Because of this line in your grub.conf: kernel /vmlinuz-2.6.9-100.EL I can also deduce that the relevant vmlinuz file was at /boot/bmlinuz-2.6.9-100.EL, and you can use the command "rpm -q -f /boot/vmlinuz-2.6.9-100.EL" to figure out what package it belonged to.> rpm -q -f /boot/vmlinuz-2.6.9-100.EL --qf '%{name}-%{version}-%{release}.%{arch}.rpm\n'will get you the get the full package name of the actual kernel RPM. Download the latest RPM from your favorite CentOS repository, after all, updating your kernel is you got into this trouble in the first place.> rpm -U --replacepkgs [whatever the name of that actual downloaded rpm is]See, you shouldn't *care* about your actual running kernel. You wanted the update, right? Go for it!!!! The running kernel will present problems you want the most recent one.
Todd Cary
2011-Mar-09 06:03 UTC
[CentOS] Creating the symbolic links in the /boot and /boot/grub/
I inadvertently missed using the list...here are my recent messages. On 3/8/2011 8:39 PM, Nico Kadel-Garcia wrote:> On Tue, Mar 8, 2011 at 11:31 PM, Todd Cary<todd at aristesoftware.com> wrote: >> reinstall is not an option for yum. I ran "yum install kernel" and it >> completed without errors however there are no links created. > Oh, dear. Can you grab the RPM and do "rpm -U -replacepkgs > [kernel-whatver].rpm"? You should be able to use "yum remove" on the > old kernel packages, consistent with freeing up the space, and now > install your new kernel with yum. > >> Would this be the correct ln command for vmlinuz-2.6.9-89.35.1 >> >> # /boot/vmlinuz-2.6.9-89.35.1 /boot/vmlinuz >> >> Todd >> >> On 3/8/2011 7:04 PM, Nico Kadel-Garcia wrote: >>> On Tue, Mar 8, 2011 at 9:58 PM, Todd Cary<todd at aristesoftware.com> wrote: >>>> I started a new thread since the original one is getting rather long. >>>> >>>> I have retrieved the files I deleted in /boot and /boot/grub, >>>> however I need to make links for >>>> >>>> /boot/System.map (System.map -> System.map-2.6.9-89.35.1) >>>> /boot/vmlinuz (vmlinuz -> vmlinuz-2.6.9-89.35.1) >>>> /boot/grub/menu.lst (menu.lst -> ./grub.conf) >>> Instead, re-install your kernel. "yum reinstall kernel". This should >>> regenerate your symlinks correctly, except possibly the grub.conf. >>> >>>> If it was not so important to get it correct, I would appreciate >>>> the syntax for the command. Usually I would figure it out. >>>> >>>> Since I have restored the files (I will double check to make sure >>>> they are all there), do I need to run grub-install? >>> i think yes. The old location of the boot loader is listed in >>> /boot/grub/grub.conf, and should be used as the argument to that >>> command. grub is much smarter than LILO used to be, but I think the >>> bootstrap procedure relies on knowing details of where the fiddly bits >>> of grub live on the relevant ex2 compatible filesytem. >>> >>>> My apologies for bothering everyone with such a dumb error on my >>>> part. >>>> >>>> Todd >>>> >>>> -- >>>> Ariste Software >>>> Petaluma, CA 94952 >>>> >>>> http://www.aristesoftware.com >>>> >>>> _______________________________________________ >>>> CentOS mailing list >>>> CentOS at centos.org >>>> http://lists.centos.org/mailman/listinfo/centos >>>> >> -- >> Ariste Software >> Petaluma, CA 94952 >> >> http://www.aristesoftware.com >> >> >-- Ariste Software Petaluma, CA 94952 http://www.aristesoftware.com