I am using CentOS 6 and grub 0.97
1. Launched a Virtual Machine (VM) with CentOS 6. (This step is done.)
2. After the VM comes up, copy latest kernel and initrd from remote server to /boot through a script present at /etc/init.d/ (This step is done)
3. How to edit grub config file either by command or by script (but not manually), to update the new kernel and initrd so that next time it boots up with the new kernel ?
Thanks Santosh
Hi,
I believe that you have to go into:
/etc/syconfig/grub
and edit according to your needs.
Then you have to use:
sudo bash -x grub2-mkconfig -o /boot/grub2/grub.cfg
This should update grub for now and for ever.
Thanks! Ranjan
On Thu, 27 Nov 2014 02:10:11 +0530 santosh santosh.iitg@gmail.com wrote:
I am using CentOS 6 and grub 0.97
Launched a Virtual Machine (VM) with CentOS 6. (This step is done.)
After the VM comes up, copy latest kernel and initrd from remote
server to /boot through a script present at /etc/init.d/ (This step is done)
- How to edit grub config file either by command or by script (but
not manually), to update the new kernel and initrd so that next time it boots up with the new kernel ?
Thanks Santosh -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
On Wed, Nov 26, 2014 at 1:40 PM, santosh santosh.iitg@gmail.com wrote:
I am using CentOS 6 and grub 0.97
Launched a Virtual Machine (VM) with CentOS 6. (This step is done.)
After the VM comes up, copy latest kernel and initrd from remote
server to /boot through a script present at /etc/init.d/ (This step is done)
- How to edit grub config file either by command or by script (but
not manually), to update the new kernel and initrd so that next time it boots up with the new kernel ?
Put the kernel and kernel-modules rpms in a directory, cd to that directory, then
# yum install *rpm
The post-install scripts will call grubby which will insert the proper GRUB menu entry.
FWIW, there is no GRUB legacy equivalent for GRUB2's grub-mkconfig command so there isn't a way to generate a new one from scratch.
On Wed, 26 Nov 2014 23:12:46 -0700 Chris Murphy lists@colorremedies.com wrote:
On Wed, Nov 26, 2014 at 1:40 PM, santosh santosh.iitg@gmail.com wrote:
I am using CentOS 6 and grub 0.97
Launched a Virtual Machine (VM) with CentOS 6. (This step is done.)
After the VM comes up, copy latest kernel and initrd from remote
server to /boot through a script present at /etc/init.d/ (This step is done)
- How to edit grub config file either by command or by script (but
not manually), to update the new kernel and initrd so that next time it boots up with the new kernel ?
Put the kernel and kernel-modules rpms in a directory, cd to that directory, then
# yum install *rpm
Should this not be
yum localinstall *rpm
or is yum install good enough?
Thanks, Ranjan
The post-install scripts will call grubby which will insert the proper GRUB menu entry.
FWIW, there is no GRUB legacy equivalent for GRUB2's grub-mkconfig command so there isn't a way to generate a new one from scratch.
-- Chris Murphy -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
On Thursday, November 27, 2014 12:20:20 AM Ranjan Maitra wrote:
Should this not be
yum localinstall *rpm
or is yum install good enough?
yum install is good enough.
localinstall Is used to install a set of local rpm files. If required the enabled repositories will be used to resolve dependencies. Note that the install command will do a local install, if given a filename. This command is maintained for legacy reasons only.
On Sat, 29 Nov 2014 17:27:06 +0530 Sudhir Khanger ml@sudhirkhanger.com wrote:
On Thursday, November 27, 2014 12:20:20 AM Ranjan Maitra wrote:
Should this not be
yum localinstall *rpm
or is yum install good enough?
yum install is good enough.
localinstall Is used to install a set of local rpm files. If required the enabled repositories will be used to resolve dependencies. Note that the install command will do a local install, if given a filename. This command is maintained for legacy reasons only.
I see: thanks for the detailed elucidation!
Best wishes, Ranjan
____________________________________________________________ Can't remember your password? Do you need a strong and secure password? Use Password manager! It stores your passwords & protects your account. Check it out at http://mysecurelogon.com/password-manager
On 11/26/2014 11:12 PM, Chris Murphy wrote:
On Wed, Nov 26, 2014 at 1:40 PM, santosh santosh.iitg@gmail.com wrote:
I am using CentOS 6 and grub 0.97
Launched a Virtual Machine (VM) with CentOS 6. (This step is done.)
After the VM comes up, copy latest kernel and initrd from remote
server to /boot through a script present at /etc/init.d/ (This step is done)
- How to edit grub config file either by command or by script (but
not manually), to update the new kernel and initrd so that next time it boots up with the new kernel ?
Put the kernel and kernel-modules rpms in a directory, cd to that directory, then
# yum install *rpm
The post-install scripts will call grubby which will insert the proper GRUB menu entry.
FWIW, there is no GRUB legacy equivalent for GRUB2's grub-mkconfig command so there isn't a way to generate a new one from scratch.
Recently, someone sent me a script, and it contained
/usr/bin/dracut /boot/initramfs-$version.img $version && \ /usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
Where version is set to the value of the kernel version numbers, like 3.17.3-200