3

I'm new with Gentoo and I got a pretty interesting task to do. Before I start with question, I must tell you that I installed Gentoo once for now, and this installation was successfull - without any problems. I'm using Linux a few years, but I didn't meet rolling releases before, so that's my first rolling release distribution. I have also some experience with basic Linux commands, so there aren't problems with this because I understand mostly all of them.

What's my job that I have to do? First of all I need to install Gentoo on some computer with LiveCD - partitioning, chrooting and other stuff. But during the install instead of compiling the kernel, I need to use kernel which I will get on USB disk and I need to import it into the system. I actually don't know how to do that and what this depends on - modules and what else? Also I don't know how to mount USB disk and what do I have to do after I finish this job - do I need to unmount it and when?

How to export already compiled kernel? As I mentioned, I already installed Gentoo with compiling kernel, so I would like to copy files which are connected with importing the kernel, to USB disk. Why I need them on USB disk? Because I have to practice importing of kernel on my system so after all I could do that without mistakes.

1 Answer 1

1

I've never tried that but assuming the system you're installing on is properly supported by the already compiled kernel you'll need to copy the kernel to proper place depending on your boot setup.

For example for one of my systems running grub my kernel is /boot/kernel-3.8.2-gentoo and in another instance one booting via stub directly from UEFI is /boot/efi/EFI/gentoo/gs382x64.efi of course you also need the modules and in my example they would get installed in /lib/modules/3.8.2-gentoo/.

I suggest you would be better off just to compile the kernel on the new system but if you know the config is right (or the above would be fruitless) copy the previously created /usr/src/linux/.config file to that directory on the new system, run "make oldconfig" then run "make && make modules_install" and you've skipped having to go through the configuration step which can sometimes test ones patience.

4
  • Actually I got this task for homework because sometime in the future we will have examination about Linux, but computers in school are not fast enough. So instead of compiling we'll get precompiled kernel made for these computers and there will be also limited time to finish all tasks. This are some old computers, so they don't have UEFI. How to "register" kernel files to the system that it will recognize it? Because I need to practice this - which files do I need to copy on USB disk, so that they I can use next time? Mar 9, 2013 at 8:03
  • As I wrote above - you need the kernel and the modules. Of course you will need to make your boot loader aware but that wasn't the scope of your question.
    – user168261
    Mar 9, 2013 at 14:05
  • Could you please help me with the last question there forums.gentoo.org/viewtopic-p-7263194.html . Thanks! Mar 10, 2013 at 10:25
  • I don't think you need those symlinks. However if testing shows you do or if you desire them just format your USB key with a suitable file system (ext4 as example). If you still want to use under Windows make a couple of partitions, leaving the first partition as FAT32 (Windows only sees the first partition) and formatting the second as ext4.
    – user168261
    Mar 10, 2013 at 15:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .