Commit c98c9f01 authored by Manoj Srivastava's avatar Manoj Srivastava

cscvs to tla changeset 433

Author: srivasta
Date: 2002/01/22 03:51:06
   * Add the option minimal_swap,                             closes: Bug#128885

git-archimport-id: srivasta@debian.org--2003-primary/kernel-package--devel--0.1--patch-432
parent a60aee3e
$Id: Problems,v 1.14 2001/07/11 21:37:52 srivasta Exp $
$Id: Problems,v 1.15 2002/01/22 03:51:06 srivasta Exp $
This is an (incomplete) list of problems that people have encountered
in the past while using kernel-package. Please remember to configure
......@@ -154,4 +154,17 @@ make[1]: *** No rule to make target `arch/i586/Makefile'. Stop.
make[1]: i386-linux-gcc: Command not found
This is a result of having the env variable ARCH set when you do
not intend to cross compile the kernel. Unsetting ARCH works fine.
\ No newline at end of file
not intend to cross compile the kernel. Unsetting ARCH works fine.
o) booting from the new kernel fails with
VFS: Cannot open root device "308" or 03:08
immediately followed by a kernel panic
The cause for this is either you have not compiled the file
system type of the root file system into the kernel, or you
have instructed yout boot loader to expect an initrd kernel
(this is required for running a recent official kernel image
package from Debian), and have installed a non-initrd garden
variety kernel image. You need to go back and recompile the
kernel image, either including the root file system type as a
builtin, or adding a --initrd flag to the make-kpkg run.
$Id: README,v 1.49 2002/01/07 15:46:52 srivasta Exp $
$Id: README,v 1.50 2002/01/22 03:51:06 srivasta Exp $
This is the Debian GNU/Linux packaging scripts for the Linux kernel.
This package has been put together by Manoj Srivastava <srivasta@debian.org>.
......@@ -49,7 +49,14 @@ Phase TWO: Create a portable kernel image .deb file
3% make-kpkg clean
4% $Get_Root make-kpkg --revision=custom.1.0 kernel_image
(Get_Root is whatever you need to become root -- fakeroot or
sudo are examples that come to mind).
sudo are examples that come to mind). NOTE: if you have
instructed your boot loader to expect initrd kernels (which is
the norm for recent official kernel image packages) you need to
addd --initrd to the line above
% $Get_Root make-kpkg --initrd --revision=custom.1.0 kernel_image
Personally, I prefer non initrd images for my personal machines,
since then adding third party modules to the machine has fewere
gotchas
Phase THREE: Install the kernel image on one or more machines
5# dpkg -i ../kernel-image-X.XXX_1.0_<arch>.deb
6# shutdown -r now # If and only if LILO/SILO/QUIK/PALO/VMELILO/ZIPL/yaboot/..
......@@ -187,6 +194,20 @@ kernel enabled, you'll type:
different revision, or else the revision flag shall not have any
effect)
NOTE about using initial ram disk images (initrd). Recent official
kitchen sink kernel image packages tend to use this, in order to
accomodate as wide a vareity of root file system types as humanly
possible without building them all into the kernel. In order to use
these images, you need to instruct you boot loader that this is a
kernel image using intrd, and tell the boot loader where to find the
initrd image. Unfortunately, you can't just substitute a non initrd
image afterwards without changing the boot loader instructions. So,
if your boot loader configuration expects to see an initrd image, add
--initrd to the above invocation, like so:
make-kpkg clean
$Get_Root make-kpkg --initrd --revision=3:custom.2.0 kernel_image
When make-kpkg is finished, you'll have
kernel-image-2.0.29_custom.1.0_i386.deb and all it takes now is to
install the package (as root):
......@@ -471,7 +492,9 @@ To generate a new kernel image, just run
% make-kpkg clean
% $Get_Root make-kpkg --revision=custom.1.0 kernel_image
(Get_Root is whatever you need to become root -- fakeroot or
sudo are examples that come to mind).
sudo are examples that come to mind) or (if you use initrd)
$Get_Root make-kpkg --initrd --revision=3:custom.2.0 kernel_image
This will create a default kernel image (as in the image package or
available on the boot disks. The kernel image package produced, on
......@@ -516,6 +539,12 @@ With a custom .config file in place (created as above) run again:
| % $Get_Root make -f debian/rules kernel-image-deb |
| shall generate a kernel image with the username of the user embedded |
| in it. |
| |
| If you use initrd images (and have told your boot loader so) you need |
| to include the --initrd option on the command line, like so |
| |
| % $Get_Root make-kpkg --initrd --revision=3:custom.2.0 kernel_image |
| |
-------------------------------------------------------------------------
To create a source or header package, run
......
kernel-package (7.82) unstable; urgency=low
* Add the option minimal_swap, closes: Bug#128885
-- Manoj Srivastava <srivasta@debian.org> Mon, 21 Jan 2002 21:50:28 -0600
kernel-package (7.81) unstable; urgency=low
* Hmm. The fix for Bug#126319 and Bug#126739 instead broke all kinds of
......
......@@ -21,7 +21,7 @@
.\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
.\" USA.
.\"
.\" $Id: kernel-img.conf.5,v 1.15 2001/09/10 16:49:08 srivasta Exp $
.\" $Id: kernel-img.conf.5,v 1.16 2002/01/22 03:51:06 srivasta Exp $
.\"
.TH KERNEL\-IMG.CONF 5 "Mar 21 2000" "Debian" "Debian GNU/Linux manual"
.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
......@@ -81,6 +81,17 @@ if this option is set to No, no symbolic link is ever created. This
for people who have other means of booting their machines, and do not
like the symbolic links cluttering up their / directory. Defaults to Yes.
.TP
.B minimal_swap
By default, if the /vmlinuz symbolic link does not point to an image
which is the same as the image being installed, the postinst moves
/vmlinuz to /vmlinuz.old, and creates a symbolic link to the kernel
image in /vmlinuz (the exception is to prevent both /vmlinuz and
/vmlinuz.old from pointing to the current kernel image -- potentially
disastrous if the current image is defective or lacking in any
way). However, if this option is enabled, no action is taken if
/vmlinuz.old points to the currently installed image (by default, the
symbolic links are swapped). Defaults to no.
.TP
.B no_symlinks
Whether to use symlinks to the
.I image
......
$Id: README,v 1.51 2002/01/07 15:46:52 srivasta Exp $
$Id: README,v 1.52 2002/01/22 03:51:07 srivasta Exp $
This is the Debian GNU/Linux prepackaged version of the Linux kernel.
Linux was written by Linus Torvalds <Linus.Torvalds@cs.Helsinki.FI> and
......@@ -69,7 +69,14 @@ Phase TWO: Create a portable kernel image .deb file
3% make-kpkg clean
4% $Get_Root make-kpkg --revision=custom.1.0 kernel_image
(Get_Root is whatever you need to become root -- fakeroot or
sudo are examples that come to mind).
sudo are examples that come to mind). NOTE: if you have
instructed your boot loader to expect initrd kernels (which is
the norm for recent official kernel image packages) you need to
addd --initrd to the line above
% $Get_Root make-kpkg --initrd --revision=custom.1.0 kernel_image
Personally, I prefer non initrd images for my personal machines,
since then adding third party modules to the machine has fewere
gotchas
Phase THREE: Install the kernel image on one or more machines
5# dpkg -i ../kernel-image-X.XXX_1.0_<arch>.deb
6# shutdown -r now # If and only if LILO/SILO/QUIK/PALO/VMELILO/ZIPL/yaboot/..
......@@ -208,6 +215,19 @@ kernel enabled, you'll type:
different revision, or else the revision flag shall not have any
effect)
NOTE about using initial ram disk images (initrd). Recent official
kitchen sink kernel image packages tend to use this, in order to
accomodate as wide a vareity of root file system types as humanly
possible without building them all into the kernel. In order to use
these images, you need to instruct you boot loader that this is a
kernel image using intrd, and tell the boot loader where to find the
initrd image. Unfortunately, you can't just substitute a non initrd
image afterwards without changing the boot loader instructions. So,
if your boot loader configuration expects to see an initrd image, add
--initrd to the above invocation, like so:
make-kpkg clean
$Get_Root make-kpkg --initrd --revision=3:custom.2.0 kernel_image
When make-kpkg is finished, you'll have
kernel-image-2.0.29_custom.1.0_i386.deb and all it takes now is to
install the package (as root):
......@@ -492,7 +512,8 @@ To generate a new kernel image, just run
% make-kpkg clean
% $Get_Root make-kpkg --revision=custom.1.0 kernel_image
(Get_Root is whatever you need to become root -- fakeroot or
sudo are examples that come to mind).
sudo are examples that come to mind) or (if you use initrd)
$Get_Root make-kpkg --initrd --revision=3:custom.2.0 kernel_image
This will create a default kernel image (as in the image package or
available on the boot disks. The kernel image package produced, on
......@@ -516,7 +537,9 @@ With a custom .config file in place (created as above) run again:
% make-kpkg clean
% $Get_Root make-kpkg --revision=custom.1.0 kernel_image
(Get_Root is whatever you need to become root -- fakeroot or
sudo are examples that come to mind).
sudo are examples that come to mind)
$Get_Root make-kpkg --initrd --revision=3:custom.2.0 kernel_image
|-----------------------------------------------------------------------|
| Special needs |
......@@ -537,6 +560,12 @@ With a custom .config file in place (created as above) run again:
| % $Get_Root make -f debian/rules kernel-image-deb |
| shall generate a kernel image with the username of the user embedded |
| in it. |
| |
| If you use initrd images (and have told your boot loader so) you need |
| to include the --initrd option on the command line, like so |
| |
| % $Get_Root make-kpkg --initrd --revision=3:custom.2.0 kernel_image |
| |
-------------------------------------------------------------------------
To create a source or header package, run
......
......@@ -12,7 +12,7 @@
# HISTORY :
# Description :
#
# $Id: image.postinst,v 1.91 2002/01/13 06:48:19 srivasta Exp $
# $Id: image.postinst,v 1.92 2002/01/22 03:51:07 srivasta Exp $
#
#
......@@ -72,6 +72,7 @@ my $realimageloc = "/$image_dir/";
my $have_conffile = "";
my $silent_modules = '';
my $silent_loader = '';
my $minimal_swap = ''; # Do not swap symlinks
my $CONF_LOC = '/etc/kernel-img.conf';
......@@ -111,6 +112,7 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$use_hard_links = '' if /use_hard_links\s*=\s*(no|false|0)\s*$/ig;
$silent_modules = '' if /silent_modules\s*=\s*(no|false|0)\s*$/ig;
$silent_loader = '' if /silent_loader\s*=\s*(no|false|0)\s*$/ig;
$minimal_swap = '' if /minimal_swap\s*=\s*(no|false|0)\s*$/ig;
$do_symlink = "Yes" if /do_symlinks\s*=\s*(yes|true|1)\s*$/ig;
$no_symlink = "Yes" if /no_symlinks\s*=\s*(yes|true|1)\s*$/ig;
......@@ -126,6 +128,7 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$use_hard_links = "Yes" if /use_hard_links\s*=\s*(yes|true|1)\s*$/ig;
$silent_modules = 'Yes' if /silent_modules\s*=\s*(yes|true|1)\s*$/ig;
$silent_loader = 'Yes' if /silent_loader\s*=\s*(yes|true|1)\s*$/ig;
$minimal_swap = 'Yes' if /minimal_swap\s*=\s*(yes|true|1)\s*$/ig;
$image_dest = "$1" if /image_dest\s*=\s*(\S+)/ig;
$postinst_hook = "$1" if /postinst_hook\s*=\s*(\S+)/ig;
......@@ -387,26 +390,33 @@ sub image_magic {
$vmlinuz_target = CanonicalizePath($vmlinuz_target);
if ("$vmlinuz_target" ne "$target")
{
if (-l "$kimage.old")
if ($minimal_swap)
{
my $old_target = readlink "$kimage.old";
if ($old_target !~ m|^/|o)
if (-l "$kimage.old")
{
$old_target = $cwd . "/" . $old_target;
$old_target =~ s|/+|/|o;
}
$old_target = CanonicalizePath($old_target);
if ("$old_target" ne "$target")
{
$force_move = 1;
my $old_target = readlink "$kimage.old";
if ($old_target !~ m|^/|o)
{
$old_target = $cwd . "/" . $old_target;
$old_target =~ s|/+|/|o;
}
$old_target = CanonicalizePath($old_target);
if ("$old_target" ne "$target")
{
$force_move = 1;
}
else
{
warn "$kimage.old --> $target -- doing nothing";
$force_move = 0;
}
}
else
{
warn "$kimage.old --> $target -- doing nothing";
$force_move = 0;
$force_move = 1;
}
}
else
else
{
$force_move = 1;
}
......
......@@ -12,7 +12,7 @@
# HISTORY :
# Description :
#
# $Id: image.postrm,v 1.17 2002/01/11 20:57:54 srivasta Exp $
# $Id: image.postrm,v 1.18 2002/01/22 03:51:07 srivasta Exp $
#
......@@ -39,6 +39,7 @@ my $do_initrd = ''; # Normally, we don't
my $use_hard_links = ''; # hardlinks do not work across fs boundaries
my $postinst_hook = ''; #Normally we do not
my $postrm_hook = ''; #Normally we do not
my $minimal_swap = ''; # Do not swap symlinks
my $Loader = "NoLOADER"; #
$Loader = "LILO" if $loader =~ /^lilo/io;
......@@ -104,6 +105,7 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$use_hard_links = '' if /use_hard_links\s*=\s*(no|false|0)\s*$/ig;
$silent_modules = '' if /silent_modules\s*=\s*(no|false|0)\s*$/ig;
$silent_loader = '' if /silent_loader\s*=\s*(no|false|0)\s*$/ig;
$minimal_swap = '' if /minimal_swap\s*=\s*(no|false|0)\s*$/ig;
$do_symlink = "Yes" if /do_symlinks\s*=\s*(yes|true|1)\s*$/ig;
......@@ -120,6 +122,7 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$use_hard_links = "Yes" if /use_hard_links\s*=\s*(yes|true|1)\s*$/ig;
$silent_modules = 'Yes' if /silent_modules\s*=\s*(yes|true|1)\s*$/ig;
$silent_loader = 'Yes' if /silent_loader\s*=\s*(yes|true|1)\s*$/ig;
$minimal_swap = 'Yes' if /minimal_swap\s*=\s*(yes|true|1)\s*$/ig;
$image_dest = "$1" if /image_dest\s*=\s*(\S+)/ig;
$postinst_hook = "$1" if /postinst_hook\s*=\s*(\S+)/ig;
......
......@@ -38,6 +38,7 @@ my $initrd = "=I"; # initrd kernel
my $use_hard_links = ''; # hardlinks do not wirk across fs boundaries
my $postinst_hook = ''; #Normally we do not
my $postrm_hook = ''; #Normally we do not
my $minimal_swap = ''; # Do not swap symlinks
my $Loader = "NoLOADER"; #
......@@ -96,6 +97,7 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$use_hard_links = '' if /use_hard_links\s*=\s*(no|false|0)\s*$/ig;
$silent_modules = '' if /silent_modules\s*=\s*(no|false|0)\s*$/ig;
$silent_loader = '' if /silent_loader\s*=\s*(no|false|0)\s*$/ig;
$minimal_swap = '' if /minimal_swap\s*=\s*(no|false|0)\s*$/ig;
$do_symlink = "Yes" if /do_symlinks\s*=\s*(yes|true|1)\s*$/ig;
$no_symlink = "Yes" if /no_symlinks\s*=\s*(yes|true|1)\s*$/ig;
......@@ -111,6 +113,7 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
$use_hard_links = "Yes" if /use_hard_links\s*=\s*(yes|true|1)\s*$/ig;
$silent_modules = 'Yes' if /silent_modules\s*=\s*(yes|true|1)\s*$/ig;
$silent_loader = 'Yes' if /silent_loader\s*=\s*(yes|true|1)\s*$/ig;
$minimal_swap = 'Yes' if /minimal_swap\s*=\s*(yes|true|1)\s*$/ig;
$image_dest = "$1" if /image_dest\s*=\s*(\S+)/ig;
$postinst_hook = "$1" if /postinst_hook\s*=\s*(\S+)/ig;
......
......@@ -13,7 +13,7 @@
# Description :
#
#
# $Id: image.prerm,v 1.15 2001/09/10 16:49:08 srivasta Exp $
# $Id: image.prerm,v 1.16 2002/01/22 03:51:07 srivasta Exp $
#
#
#use strict;
......@@ -37,6 +37,7 @@ my $initrd = "=I"; # initrd kernel
my $use_hard_links = ''; # hardlinks do not wirk across fs boundaries
my $postinst_hook = ''; #Normally we do not
my $postrm_hook = ''; #Normally we do not
my $minimal_swap = ''; # Do not swap symlinks
my $Loader = "NoLOADER"; #
$Loader = "LILO" if $loader =~ /^lilo/io;
......
......@@ -22,7 +22,7 @@
.\" USA.
.\"
.\"
.\" $Id: make-kpkg.8,v 1.47 2002/01/07 15:46:52 srivasta Exp $
.\" $Id: make-kpkg.8,v 1.48 2002/01/22 03:51:06 srivasta Exp $
.\"
.TH MAKE\-KPKG 1 "May 2 1997" "Debian" "Debian GNU/Linux manual"
.SH NAME
......@@ -360,10 +360,16 @@ file in the kernel source directory, a default configuration is
provided similar to the one used to create the
.B Debian
boot\-floppies. At install time, it updates symbolic links in the
symlinkk destination directory (the root directory by default)
symlink destination directory (the root directory by default)
to point to the new kernel image in the image directory, which is
nominally
.I /boot.
If the symbolic link already points to the current kernel image, no
action is taken. If a prior symbolic link exists, it is rotated out
with a suffix.old, and a new symbolic link, properly updated is
installed in its place (the variable minimal_swap in
.I /etc/kernel-img.conf
further modifies this behaviour).
On installation, it also offers to run the Linux loader,
.I LILO
(or alternates like
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment