I've tried to compile a kernel and installing it on Linux Mint 18.1. I've tried to compile and install three different Kernel versions now, but with the same result:
ERROR MESSAGE
when I open up GRUB menu on boot, and choose the newly installed kernel, it hangs just after I see the text: "Loading initial ramdisk ..."
and then nothing.
I tried to change kernel boot mode to nomodeset, but it still hangs the same way.
If I choose to boot on the original kernel that ships with the Mint installation (with nomodeset) I see the terminal and all text that goes with it on boot.
This is how i compiled and installed my kernel:
Downloaded the kernel 4.0.1 and uncompressed it.
Then I copied the current configfile:
/boot/grub/config-[file] to directory /linux-4.0.1/.config
And after that I did this:
/linux-4.0.1/ make menuconfig
/linux-4.0.1/ make clean
/linux-4.0.1/ make deb-pkg
And after that reboot, and boot with new kernel and it hangs after "Loading initial ramdisk..."
I also tried installing the kernel this way:
sudo make modules_install install
I also tried to make .config file by typing: localmodconfig
I also tried to update grub by: sudo update-grub
But nothing I do helps.
So, two years ago I compiled a kernel and installed it on Ubuntu 14.04 this way, and it worked immediately, so for the fun of it I downloaded Ubuntu 14.04 yesterday and compiled and installed a kernel the same way, and of course it worked.
So, the question is: is there some special way in order to compile and install a kernel on Linux Mint?
(I'm not interested in installing a kernel in update-manager. I*m only interested in compiling and installing the kernel the old fashion way)
Here's my grub.cfg if you want to study it, I've highlighed the new kernel 4.0.1 below so it's easy to find:
Code: Select all
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 fb349731-8aa1-4c7b-a964-abb3739460f7
else
search --no-floppy --fs-uuid --set=root fb349731-8aa1-4c7b-a964-abb3739460f7
fi
font="/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=sv_SE
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=hidden
set timeout=0
# Fallback hidden-timeout code in case the timeout_style feature is
# unavailable.
elif sleep --interruptible 0 ; then
set timeout=0
fi
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/06_mint_theme ###
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
### END /etc/grub.d/06_mint_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Linux Mint 18.1 MATE 64-bit' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-f81fe850-7167-4d49-9838-f66d3b744511' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 fb349731-8aa1-4c7b-a964-abb3739460f7
else
search --no-floppy --fs-uuid --set=root fb349731-8aa1-4c7b-a964-abb3739460f7
fi
linux /vmlinuz-4.4.0-53-generic root=/dev/mapper/mint--vg-root ro quiet splash $vt_handoff
initrd /initrd.img-4.4.0-53-generic
}
submenu 'Advanced flags for Linux Mint 18.1 MATE 64-bit' $menuentry_id_option 'gnulinux-advanced-f81fe850-7167-4d49-9838-f66d3b744511' {
menuentry 'Linux Mint 18.1 MATE 64-bit, with Linux 4.4.0-53-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-53-generic-advanced-f81fe850-7167-4d49-9838-f66d3b744511' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 fb349731-8aa1-4c7b-a964-abb3739460f7
else
search --no-floppy --fs-uuid --set=root fb349731-8aa1-4c7b-a964-abb3739460f7
fi
echo 'Loading Linux 4.4.0-53-generic …'
linux /vmlinuz-4.4.0-53-generic root=/dev/mapper/mint--vg-root ro quiet splash $vt_handoff
echo 'Loading initial ramdisk …'
initrd /initrd.img-4.4.0-53-generic
}
menuentry 'Linux Mint 18.1 MATE 64-bit, with Linux 4.4.0-53-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-53-generic-init-upstart-f81fe850-7167-4d49-9838-f66d3b744511' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 fb349731-8aa1-4c7b-a964-abb3739460f7
else
search --no-floppy --fs-uuid --set=root fb349731-8aa1-4c7b-a964-abb3739460f7
fi
echo 'Loading Linux 4.4.0-53-generic …'
linux /vmlinuz-4.4.0-53-generic root=/dev/mapper/mint--vg-root ro quiet splash $vt_handoff init=/sbin/upstart
echo 'Loading initial ramdisk …'
initrd /initrd.img-4.4.0-53-generic
}
menuentry 'Linux Mint 18.1 MATE 64-bit, with Linux 4.4.0-53-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-53-generic-recovery-f81fe850-7167-4d49-9838-f66d3b744511' {
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 fb349731-8aa1-4c7b-a964-abb3739460f7
else
search --no-floppy --fs-uuid --set=root fb349731-8aa1-4c7b-a964-abb3739460f7
fi
echo 'Loading Linux 4.4.0-53-generic …'
linux /vmlinuz-4.4.0-53-generic root=/dev/mapper/mint--vg-root ro recovery nomodeset
echo 'Loading initial ramdisk …'
initrd /initrd.img-4.4.0-53-generic
}
[b]menuentry 'Linux Mint 18.1 MATE 64-bit, with Linux 4.0.1' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.0.1-advanced-f81fe850-7167-4d49-9838-f66d3b744511' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 fb349731-8aa1-4c7b-a964-abb3739460f7
else
search --no-floppy --fs-uuid --set=root fb349731-8aa1-4c7b-a964-abb3739460f7
fi
echo 'Loading Linux 4.0.1 …'
linux /vmlinuz-4.0.1 root=/dev/mapper/mint--vg-root ro quiet splash $vt_handoff
echo 'Loading initial ramdisk …'
initrd /initrd.img-4.0.1
}
[/b]menuentry 'Linux Mint 18.1 MATE 64-bit, with Linux 4.0.1 (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.0.1-init-upstart-f81fe850-7167-4d49-9838-f66d3b744511' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 fb349731-8aa1-4c7b-a964-abb3739460f7
else
search --no-floppy --fs-uuid --set=root fb349731-8aa1-4c7b-a964-abb3739460f7
fi
echo 'Loading Linux 4.0.1 …'
linux /vmlinuz-4.0.1 root=/dev/mapper/mint--vg-root ro quiet splash $vt_handoff init=/sbin/upstart
echo 'Loading initial ramdisk …'
initrd /initrd.img-4.0.1
}
menuentry 'Linux Mint 18.1 MATE 64-bit, with Linux 4.0.1 (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.0.1-recovery-f81fe850-7167-4d49-9838-f66d3b744511' {
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 fb349731-8aa1-4c7b-a964-abb3739460f7
else
search --no-floppy --fs-uuid --set=root fb349731-8aa1-4c7b-a964-abb3739460f7
fi
echo 'Loading Linux 4.0.1 …'
linux /vmlinuz-4.0.1 root=/dev/mapper/mint--vg-root ro recovery nomodeset
echo 'Loading initial ramdisk …'
initrd /initrd.img-4.0.1
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/10_lupin ###
### END /etc/grub.d/10_lupin ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry 'Memory test (memtest86+)' {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 fb349731-8aa1-4c7b-a964-abb3739460f7
else
search --no-floppy --fs-uuid --set=root fb349731-8aa1-4c7b-a964-abb3739460f7
fi
knetbsd /memtest86+.elf
}
menuentry 'Memory test (memtest86+, serial console 115200)' {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 fb349731-8aa1-4c7b-a964-abb3739460f7
else
search --no-floppy --fs-uuid --set=root fb349731-8aa1-4c7b-a964-abb3739460f7
fi
linux16 /memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
Here is /drwxr-xr-x 4 root root 1,0K jun 16 07:34 .
drwxr-xr-x 23 root root 4,0K jun 16 05:05 ..
-rw-r--r-- 1 root root 1,2M dec 2 2016 abi-4.4.0-53-generic
-rw-r--r-- 1 root root 175K jun 16 07:32 config-4.0.1
-rw-r--r-- 1 root root 186K dec 2 2016 config-4.4.0-53-generic
drwxr-xr-x 5 root root 1,0K jun 16 07:34 grub
-rw-r--r-- 1 root root 254M jun 16 07:34 initrd.img-4.0.1
-rw-r--r-- 1 root root 40M jun 16 05:05 initrd.img-4.4.0-53-generic
drwx------ 2 root root 12K jun 16 05:02 lost+found
-rw-r--r-- 1 root root 179K jan 28 2016 memtest86+.bin
-rw-r--r-- 1 root root 181K jan 28 2016 memtest86+.elf
-rw-r--r-- 1 root root 181K jan 28 2016 memtest86+_multiboot.bin
-rw-r--r-- 1 root root 3,5M jun 16 07:32 System.map-4.0.1
-rw------- 1 root root 3,7M dec 2 2016 System.map-4.4.0-53-generic
-rw-r--r-- 1 root root 6,5M jun 16 07:32 vmlinuz-4.0.1
-rw-r--r-- 1 root root 6,8M dec 13 2016 vmlinuz-4.4.0-53-generic
Here you can see the end of compiling+installation of the new kernel:drwxr-xr-x 23 root root 4,0K jun 16 05:05 .
drwxr-xr-x 23 root root 4,0K jun 16 05:05 ..
drwxr-xr-x 2 root root 4,0K jun 16 05:06 bin
drwxr-xr-x 4 root root 1,0K jun 16 07:34 boot
drwxr-xr-x 2 root root 4,0K jun 16 05:04 cdrom
drwxr-xr-x 20 root root 4,3K jun 17 10:08 dev
drwxr-xr-x 155 root root 12K jun 16 05:47 etc
drwxr-xr-x 3 root root 4,0K jun 16 05:05 home
rwxrwxrwx 1 root root 32 jun 16 05:05 initrd.img -> boot/initrd.img-4.4.0-53-generic[/b]
drwxr-xr-x 25 root root 4,0K jun 16 05:06 lib
drwxr-xr-x 2 root root 4,0K dec 13 2016 lib64
drwx------ 2 root root 16K jun 16 05:02 lost+found
drwxr-xr-x 2 root root 4,0K dec 13 2016 media
drwxr-xr-x 2 root root 4,0K dec 13 2016 mnt
drwxr-xr-x 2 root root 4,0K dec 13 2016 opt
dr-xr-xr-x 181 root root 0 jun 17 10:03 proc
drwx------ 7 root root 4,0K jun 16 05:51 root
drwxr-xr-x 31 root root 980 jun 17 10:23 run
drwxr-xr-x 2 root root 12K jun 16 05:06 sbin
drwxr-xr-x 2 root root 4,0K dec 13 2016 srv
dr-xr-xr-x 13 root root 0 jun 17 10:03 sys
drwxrwxrwt 13 root root 4,0K jun 17 10:23 tmp
drwxr-xr-x 10 root root 4,0K dec 13 2016 usr
drwxr-xr-x 11 root root 4,0K dec 13 2016 var
lrwxrwxrwx 1 root root 29 jun 16 05:05 vmlinuz -> boot/vmlinuz-4.4.0-53-generic
Can someone please help me before I loose my mind over this......
........
..........
INSTALL /lib/firmware/cpia2/stv0672_vp4.bin
INSTALL /lib/firmware/yam/1200.bin
INSTALL /lib/firmware/yam/9600.bin
DEPMOD 4.0.1
sh ./arch/x86/boot/install.sh 4.0.1 arch/x86/boot/bzImage \
System.map "/boot"
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.0.1 /boot/vmlinuz-4.0.1
run-parts: executing /etc/kernel/postinst.d/dkms 4.0.1 /boot/vmlinuz-4.0.1
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.0.1 /boot/vmlinuz-4.0.1
update-initramfs: Generating /boot/initrd.img-4.0.1
Warning: No support for locale: sv_SE.utf8
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.0.1 /boot/vmlinuz-4.0.1
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.0.1 /boot/vmlinuz-4.0.1
Generating configfile for grub …
Found linux-image: /boot/vmlinuz-4.4.0-53-generic
Found initrd-image: /boot/initrd.img-4.4.0-53-generic
Found linux-image: /boot/vmlinuz-4.0.1
Found initrd-image: /boot/initrd.img-4.0.1
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
Done
Thanks