0

I'm trying to compile and install my own Kernel. Right now the issue is that after installing and trying to boot into the Kernel, I'm stuck on the "Loading init ramdisk" message.

My steps are following:

  1. Download the Kernel from https://kernel.org (4.13.2)
  2. Extract the tar.xz package and modify the source (I needed to add one line into intel-lpss-pci.c module).
  3. Open Terminal
  4. terminal -> cd [the extracted folder path]
  5. terminal -> make oldconfig, just clicking Enter until it's done
  6. terminal -> make menuconfig, exit (and save if I get that prompt). I don't do any changes cause I don't think I should fiddle with them if I don't know what I'm doing
  7. terminal -> make -j 4
  8. terminal -> make modules -j4
  9. terminal -> depmod -a
  10. terminal -> sudo make modules_install
  11. terminal -> sudo make install
  12. terminal -> cd to /boot/
  13. terminal -> sudo mkinitramfs -ko initrd.img-4.13.2 4.13.2
  14. terminal -> sudo update-grub
  15. reboot and try to launch the Kernel.

I got through the "Loading init ramdisk" message once, but after that I just had a blinking textcursor for a while and then message the following message:

"Gave up waiting for root device. Common problems: — Boot args (cat /proc/cmdline) — Check rootdelay= (did the system wait long enough?) — Check root= (did the system wait for the right device?) — Missing modules (cat /proc/modules; ls /dev) ALERT! UUID=26c82e2e-e58e-4559-be76-fe281b33476e does not exist. Dropping to a shell!

BusyBox v.1.22.1 (Ubuntu 1:1.22.0-1ubuntu1) built-in shell (ash)
Enter 'help' for list of built-in commands."

What am I doing wrong, which of the steps am I doing wrong?

F4irline
  • 21
  • 4
  • Hard to know and custom kernels are not well supported as it is complex. I would use localmodconfig rather than make oldconfig. See https://askubuntu.com/questions/718381/how-to-compile-and-install-custom-mainline-kernel/718662#718662 – Panther Sep 18 '17 at 17:16
  • You do everything wrong. It is too broad to answer. – Pilot6 Sep 18 '17 at 17:19
  • @Pilot6 is there a guide somewhere that I should follow? I've seen a couple and I've done every action according to them... :| – F4irline Sep 18 '17 at 17:21
  • There is a lot of guides. It is wrong to download a mainline kernel, it is wrong to install the kernel this way, etc. You should download an Ubuntu kernel and build it a Debian way. Then install deb files, not make install. – Pilot6 Sep 18 '17 at 17:23
  • Goddaymn, so I'm doing it wrong from the step one. Do you happen to have a link to a proper guide? – F4irline Sep 18 '17 at 17:24
  • 2
  • See https://askubuntu.com/a/830723/167850 – Pilot6 Sep 18 '17 at 17:25
  • @Pilot6 Alright, I'm going to try the method in there. The steps in there seem quite hard to understand, but I hope I'll manage... Thank you – F4irline Sep 18 '17 at 17:28
  • @Pilot6 It is not wrong to download and compile / install the mainline kernel, it is just that neither compiling a custom kernel or the mainline kernel is supported here. – Panther Sep 18 '17 at 17:40
  • The thing is that I need to add a single line to the intel-lpss-pci.c module. By downloading the mainline kernel from https://kernel.org I was actually able to find the file and add the line into it. How can I do it with this other method? – F4irline Sep 18 '17 at 17:44
  • The same way you can add a line there. – Pilot6 Sep 18 '17 at 17:49
  • @bodhi.zazen It is a really bad idea to install a mainline kernel with make install to Ubuntu. And there is no need to build a mainline kernel to add a line to the code. – Pilot6 Sep 18 '17 at 17:50
  • https://help.ubuntu.com/community/Kernel/Compile – Pilot6 Sep 18 '17 at 17:51
  • And you don't really need to build a whole kernel, you can build only si476x-core.ko – Pilot6 Sep 18 '17 at 17:57
  • That sound tempting but I don't know how to do that, I'll try to struggle with the method you linked earlier – F4irline Sep 18 '17 at 18:34
  • If you do exactly what I wrote here, it will work. I have compiled the kernel.org kernel that way more than 500 times, and have revised my how to notes when I have had troubles due to things changing. – Doug Smythies Sep 18 '17 at 19:00
  • The Kernel compiling guide @Pilot6 linked earlier might work. I just need to figure out why after building with the fakeroot I don't seem to have all required .deb files. I seem to have only the "linux-headers-4.10.0-35_4.10.0-35.39_all.deb" but not the "linux-headers-4.10.0-35-generic_4.10.0-35.39_amd64.deb" or the "linux-image-4.10.0-35-generic_4.10.0-35.39_amd64.deb" files... – F4irline Sep 18 '17 at 19:14
  • Yes, you only need the two .deb files, the headers and the image. Ubuntu does it different, with "all" "generic" "extra" .... – Doug Smythies Sep 18 '17 at 19:27
  • HOLY FUCKING SHIT IT WORKS! Thank you guys for the help, I got my touchpad working. <3 – F4irline Sep 18 '17 at 19:43

0 Answers0