安装内核

让我们安装内核:

/# dpkg -i linux-image-2.6.26-2-486_2.6.26-21lenny4_i386.deb
Selecting previously deselected package linux-image-2.6.26-2-486.
(Reading database ... 12686 files and directories currently installed.)
Unpacking linux-image-2.6.26-2-486 (from linux-image-2.6.26-2-486_2.6.26-21lenny4_i386.deb) ...
Done.
Setting up linux-image-2.6.26-2-486 (2.6.26-21lenny4) ...
Running depmod.
Running mkinitramfs-kpkg.
Running postinst hook script update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.26-2-686
Found kernel: /boot/vmlinuz-2.6.26-2-486
Updating /boot/grub/menu.lst ... done
在Debian Chroot环境中安装DEB内核

下面是如何在chroot环境中安装自定义构建或者现有Debian内核的简单步骤。在本例中,我们没有在chroot环境中安装新版本的Debian,而是使用现有的安装。让我们为chroot环境创建目录:

挂载

# mount -o bind /proc /mnt/chroot/proc
# mount -o bind /proc /mnt/chroot/dev

现在我们已准备好进入Chroot环境

chroot:

# chroot /mnt/chroot

创建目录

# mkdir -p /mnt/chroot

首先,我们需要使用现有的Debian安装挂载一个分区。
在我们的例子中,现有安装的分区是/dev/hdb1。

# mount  /dev/hdb1 /mnt/chroot

接下来,我们需要将硬件与新的Chroot环境绑定。
下一个命令将确保连接的硬件有效,否则 update-grub 可能无法正常运行。

日期:2020-07-07 20:56:43 来源:oir作者:oir