Debian Bug report logs -
#81419
kernel-package: grub: add new versions of kernel into boot menu automatically ?
Reported by: dancer@netfort.gr.jp
Date: Sat, 6 Jan 2001 20:33:02 UTC
Severity: wishlist
Found in version 7.20
Fixed in version kernel-package/7.24
Done: Manoj Srivastava <srivasta@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, Manoj Srivastava <srivasta@debian.org>:
Bug#81419; Package kernel-package.
(full text, mbox, link).
Acknowledgement sent to dancer@netfort.gr.jp:
New Bug report received and forwarded. Copy sent to Manoj Srivastava <srivasta@debian.org>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: kernel-package
Version: 7.20
Severity: wishlist
/boot/grub/menu.lst should be updated when every new version
of kernel is installed, and currently that is only done through
manual intervention.
It would be nice if installing a new kernel would append lines to
start up the new kernel.
An entry looks like this :
#Linux booting
title Linux 2.2.18
root (hd0,2)
kernel (hd0,2)/boot/vmlinuz-2.2.18 hdc=ide-scsi hdd=ide-scsi
and I think a blanc line is required between different entries for
different kernel versions.
And thus, the method to implement that I can think of is to have
a configuration file to have a template (with the necessary configs
and partition names), and then use sed to create the config.
/etc/kernel-package/grub.template
#Linux #VERSION#
title Linux #VERSION#
root (hd0,0)
kernel (hd0,0)/boot/vmlinuz-#VERSION#
Or, because this information can be recreated from
the "root partition" and "kernel location" and "kernel options"
information, maybe this is not necessary, and be
dumped in kernel-pkg.conf, or rather kernel-img.conf
-- System Information
Debian Release: testing/unstable
Kernel Version: Linux uekawa 2.2.18 #1 ¿å 1·î 3 22:56:40 JST 2001 i686 unknown
Versions of the packages kernel-package depends on:
ii dpkg 1.7.2 Package maintenance system for Debian
ii dpkg-dev 1.6.15 Package building tools for Debian
ii fileutils 4.0z-2 GNU file management utilities.
ii perl-5.005 5.005.03-7.1 Larry Wall's Practical Extracting and Report
^^^ (Provides virtual package perl5)
Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#81419; Package kernel-package.
(full text, mbox, link).
Acknowledgement sent to Manoj Srivastava <srivasta@debian.org>:
Extra info received and forwarded to list.
(full text, mbox, link).
Message #10 received at 81419@bugs.debian.org (full text, mbox, reply):
Hi,
I have now created a hook in the kernel image postinst where
you can specify a script to be run after all the symlinks etc are
created. This script is passed i the kernel version, and the location
of the vmlinuz file. That should be enough to append a stanza to the
grub menu.
Look for this in the next upload.
manoj
--
I know you're in search of yourself, I just haven't seen you
anywhere.
Manoj Srivastava <srivasta@debian.org> <http://www.debian.org/%7Esrivasta/>
1024R/C7261095 print CB D9 F4 12 68 07 E4 05 CC 2D 27 12 1D F5 E8 6E
1024D/BF24424C print 4966 F272 D093 B493 410B 924B 21BA DABB BF24 424C
Information forwarded to debian-bugs-dist@lists.debian.org, Manoj Srivastava <srivasta@debian.org>:
Bug#81419; Package kernel-package.
(full text, mbox, link).
Acknowledgement sent to Junichi Uekawa <dancer@netfort.gr.jp>:
Extra info received and forwarded to list. Copy sent to Manoj Srivastava <srivasta@debian.org>.
(full text, mbox, link).
Message #15 received at 81419@bugs.debian.org (full text, mbox, reply):
In 18 Jan 2001 23:58:52 -0600 Manoj Srivastava <srivasta@debian.org> cum veritate scripsit :
> I have now created a hook in the kernel image postinst where
> you can specify a script to be run after all the symlinks etc are
> created. This script is passed i the kernel version, and the location
> of the vmlinuz file. That should be enough to append a stanza to the
> grub menu.
>
> Look for this in the next upload.
Something that I have come up with:
.....[ entries to be added into kernel-img.conf ]
grub_menu_lst=/boot/grub/menu.lst # location of the file
grub_kernel_partition=(hd0,0) # the partition in grubtalk
grub_root_partition=(hd0,0) # the location of root filesystem.
# kernel_boot_options="hdc=ide-scsi" # any options come here.
.....[ A shell script to add a new entry ]
#!/bin/bash
# 19 jan 2001 Junichi Uekawa <dancer@debian.org>,
# a quick hack to add a line to /boot/grub/menu.lst
source /etc/kernel-img.conf
version="$1"
vmlinuz_location="$2"
echo $grub_menu_lst
if [ -f $grub_menu_lst ]; then
if grep "^kernel $grub_kernel_partition$vmlinuz_location" $grub_menu_lst; then
echo Seems like this kernel is already installed in grub menu.lst, skipping
else
echo Installing a new entry into menu.lst.
echo >> $grub_menu_lst
echo "#Autogenerated by kernel-package " >> $grub_menu_lst
echo title linux $version >> $grub_menu_lst
echo root $grub_root_partition >> $grub_menu_lst
echo kernel $grub_kernel_partition$vmlinuz_location $kernel_boot_options >> $grub_menu_lst
fi
fi
.....[ I just tested it and it seems to have produced a valid output with ]
$ ./testsh.bash 2.4.0-pre12888 /boot/vmlinuz-124124.123513.135
regards,
junichi
--
University: ti0113@mail4.doshisha.ac.jp Netfort: dancer@netfort.gr.jp
Debian: dancer@debian.org
dancer, a.k.a. Junichi Uekawa http://www.netfort.gr.jp/~dancer
Dept. of Knowledge Engineering and Computer Science, Doshisha University.
Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#81419; Package kernel-package.
(full text, mbox, link).
Acknowledgement sent to Manoj Srivastava <srivasta@debian.org>:
Extra info received and forwarded to list.
(full text, mbox, link).
Message #20 received at 81419@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Hi,
May I add a modified version of this script into the
contrib/example area for kernel-package? I would like to change the
config file that this script uses, and I have put in a few stylistic
changes (like redirecting the grep results away into /dev/null).
The resulting file is attached.
manoj
[kernel_grub_conf.sh (text/x-sh, attachment)]
[Message part 3 (text/plain, inline)]
--
It is very vulgar to talk like a dentist when one isn't a dentist. It
produces a false impression. Oscar Wilde.
Manoj Srivastava <srivasta@debian.org> <http://www.debian.org/%7Esrivasta/>
1024R/C7261095 print CB D9 F4 12 68 07 E4 05 CC 2D 27 12 1D F5 E8 6E
1024D/BF24424C print 4966 F272 D093 B493 410B 924B 21BA DABB BF24 424C
Information forwarded to debian-bugs-dist@lists.debian.org, Manoj Srivastava <srivasta@debian.org>:
Bug#81419; Package kernel-package.
(full text, mbox, link).
Acknowledgement sent to Junichi Uekawa <dancer@netfort.gr.jp>:
Extra info received and forwarded to list. Copy sent to Manoj Srivastava <srivasta@debian.org>.
(full text, mbox, link).
Message #25 received at 81419@bugs.debian.org (full text, mbox, reply):
In 19 Jan 2001 12:42:54 -0600 Manoj Srivastava <srivasta@debian.org> cum veritate scripsit :
> May I add a modified version of this script into the
> contrib/example area for kernel-package? I would like to change the
> config file that this script uses, and I have put in a few stylistic
> changes (like redirecting the grep results away into /dev/null).
You are welcome, please do as you like.
Reply sent to Manoj Srivastava <srivasta@debian.org>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to dancer@netfort.gr.jp:
Bug acknowledged by developer.
(full text, mbox, link).
Message #30 received at 81419-close@bugs.debian.org (full text, mbox, reply):
We believe that the bug you reported is fixed in the latest version of
kernel-package, which has been installed in the Debian FTP archive:
kernel-package_7.24_all.deb
to pool/main/k/kernel-package/kernel-package_7.24_all.deb
kernel-package_7.24.dsc
to pool/main/k/kernel-package/kernel-package_7.24.dsc
kernel-package_7.24.tar.gz
to pool/main/k/kernel-package/kernel-package_7.24.tar.gz
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 81419@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Manoj Srivastava <srivasta@debian.org> (supplier of updated kernel-package package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Format: 1.7
Date: Fri, 19 Jan 2001 00:23:23 -0600
Source: kernel-package
Binary: kernel-package
Architecture: source all
Version: 7.24
Distribution: unstable
Urgency: low
Maintainer: Manoj Srivastava <srivasta@debian.org>
Changed-By: Manoj Srivastava <srivasta@debian.org>
Description:
kernel-package - Debian Linux kernel package build scripts.
Closes: 81305 81419 81559 82742
Changes:
kernel-package (7.24) unstable; urgency=low
.
* In the images postrm, ensure that modules.{isapnpmap,pcimap,usbmap}
are also removed. closes: Bug#81559
* Added a user specified postinst script, run by the kernel image
postinst after creating all the symlinks, but before calling the
bootloader or offering to create a boot floppy. closes: Bug#82742
* changed the long description to not suggest tk4.x-dev packages (long
gone from Debian). Now we just say tkX.X-dev package. closes: Bug#81305
* The user specified postinst should address the needs of people using
grub who want a nerw line in the grub menu. closes: Bug#81419
* Allow the kerel-image package creator to specify additional
documentation that shall be installed in the documentation directory
/usr/share/doc/kernel-image-X.X.XX/ .
Files:
8932a9d0a97a2bf3950f06037194ba68 513 misc optional kernel-package_7.24.dsc
969eb9e47ea7400747c997564638318c 160409 misc optional kernel-package_7.24.tar.gz
b1df9d4729cfc70c1148df5479a5197a 168682 misc optional kernel-package_7.24_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE6Z93YIbrau78kQkwRAesyAKCN6GbThWPbVmOSw/loFQ5CmoafAQCeLeJa
guIQlArJ7HR9YP31S3mTFQU=
=k+ZQ
-----END PGP SIGNATURE-----
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Sun Jun 4 20:24:28 2023;
Machine Name:
bembo
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.