View previous topic :: View next topic |
Author |
Message |
yhtycf n00b


Joined: 26 Jun 2020 Posts: 8
|
Posted: Fri Jun 26, 2020 1:33 pm Post subject: [SOLVED] copying bzImage into /boot |
|
|
hi, i've been trying to install gentoo (GPT/UEFI on an NVMe drive) for the past 4-5 days on a new pc build and this is my first linux distro. after many retries this time i went all the way, and after lots of trouble with firmware binary blobs and umounting /mnt/gentoo, i finished and then when i rebooted without my usb i get "loading linux 5.4.38-gentoo ..." which i guess means that grub is hanging. so i went back and realized simple framebuffer existed and changed it. then i did make && make modules_install which worked. now im trying to get the bzImage which is presumably in /usr/src/linux/arch/x86/boot/bzImage into the /boot folder. make install says "/boot/vmlinuz-5.4.38-gentoo: No such file or directory" so i'm wondering which file that i replace it with? i don't see any named kernel or gentoo or vmlinuz or anything in /boot. is it the config.gz file? i dont wanna mess this part up
thank you for your time
Last edited by yhtycf on Fri Jun 26, 2020 4:14 pm; edited 1 time in total |
|
Back to top |
|
 |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 3631
|
|
Back to top |
|
 |
yhtycf n00b


Joined: 26 Jun 2020 Posts: 8
|
Posted: Fri Jun 26, 2020 2:53 pm Post subject: |
|
|
shouldnt there already be a file in /boot named bzImage then? what's the name of the one that its current using to try to boot? also /boot/efi doesnt seem to be a directory that i have either, or at least ls /boot/efi cant find it. my ESP is mounted on /boot like it says altho i followed the gpt/efi amd64 guide which suggested a bios boot partition and an esp (which i kno isnt necessary but i did it anyway) but i dont think that should be a problem?
thanks for the response
Last edited by yhtycf on Fri Jun 26, 2020 2:58 pm; edited 1 time in total |
|
Back to top |
|
 |
Ralphred Tux's lil' helper

Joined: 31 Dec 2013 Posts: 127
|
Posted: Fri Jun 26, 2020 2:56 pm Post subject: Re: copying bzImage into /boot |
|
|
yhtycf wrote: | presumably in /usr/src/linux/arch/x86/boot/bzImage |
That would be the 32bit kernel image, you would normally want ./arch/x86_64/boot/bzImage
Make sure the /boot partition is mounted when you run make install && make modules_install
Config.gz is a gzipped copy of the .config file found in /usr/src/linux-[version]/ directory, it's kinda handy sometimes. |
|
Back to top |
|
 |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 3631
|
Posted: Fri Jun 26, 2020 2:58 pm Post subject: |
|
|
yhtycf wrote: | .. i followed the gpt/efi amd64 guide which suggested ... |
I am not aware of such guide. Sorry, cannot help then. |
|
Back to top |
|
 |
yhtycf n00b


Joined: 26 Jun 2020 Posts: 8
|
Posted: Fri Jun 26, 2020 3:03 pm Post subject: Re: copying bzImage into /boot |
|
|
Ralphred wrote: | yhtycf wrote: | presumably in /usr/src/linux/arch/x86/boot/bzImage |
That would be the 32bit kernel image, you would normally want ./arch/x86_64/boot/bzImage
Make sure the /boot partition is mounted when you run make install && make modules_install
Config.gz is a gzipped copy of the .config file found in /usr/src/linux-[version]/ directory, it's kinda handy sometimes. |
yap i was worried about that but apparently the x86_64 folder just points to the x86 one (i forgot what thats called)? when i type ls -l /usr/src/linux/arch/x86_64/boot/bzImage it shows me that same directory in lightblue pointing to ../.../x86/boot/bzImage which i think is what that means. also my /boot partition is mounted (at /mnt/gentoo/boot). and ah i see, config.gz isnt wat i was looking for then
thanks for the reposne |
|
Back to top |
|
 |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 3631
|
Posted: Fri Jun 26, 2020 3:03 pm Post subject: Re: copying bzImage into /boot |
|
|
Ralphred wrote: | That would be the 32bit kernel image, you would normally want ./arch/x86_64/boot/bzImage |
Code: | $ ls -l arch/x86_64/boot/
total 0
lrwxrwxrwx 1 root root 22 Jun 23 10:43 bzImage -> ../../x86/boot/bzImage
|
|
|
Back to top |
|
 |
Ralphred Tux's lil' helper

Joined: 31 Dec 2013 Posts: 127
|
Posted: Fri Jun 26, 2020 3:06 pm Post subject: |
|
|
yhtycf wrote: | shouldnt there already be a file in /boot named bzImage then? |
No, the bzImage will be renamed to vmlinuz-[version]-gentoo by the make install command, so you can have multiple kernels (as backups mainly) in /boot without a naming conflict. |
|
Back to top |
|
 |
yhtycf n00b


Joined: 26 Jun 2020 Posts: 8
|
|
Back to top |
|
 |
yhtycf n00b


Joined: 26 Jun 2020 Posts: 8
|
Posted: Fri Jun 26, 2020 3:11 pm Post subject: |
|
|
Ralphred wrote: | yhtycf wrote: | shouldnt there already be a file in /boot named bzImage then? |
No, the bzImage will be renamed to vmlinuz-[version]-gentoo by the make install command, so you can have multiple kernels (as backups mainly) in /boot without a naming conflict. |
ah sweet, is there any reason i can't find a vmlinuz file in my /boot then? even though i already previously used "make install" for the kernel before i found it wouldnt work because grub hangs?
thanks for the response |
|
Back to top |
|
 |
Ralphred Tux's lil' helper

Joined: 31 Dec 2013 Posts: 127
|
Posted: Fri Jun 26, 2020 3:15 pm Post subject: |
|
|
So, lets get this straight before we go on, are you trying to directly boot the kernel as an EFI stub, or use grub and boot the kernel from there? |
|
Back to top |
|
 |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 3631
|
Posted: Fri Jun 26, 2020 3:20 pm Post subject: |
|
|
That second article got marked for deletion for good reason. I have to admit I didn't read your OP very carefully. Usage of grub stuff is out of my scope.
Sorry. |
|
Back to top |
|
 |
yhtycf n00b


Joined: 26 Jun 2020 Posts: 8
|
Posted: Fri Jun 26, 2020 3:20 pm Post subject: |
|
|
Ralphred wrote: | So, lets get this straight before we go on, are you trying to directly boot the kernel as an EFI stub, or use grub and boot the kernel from there? |
i dont know what a EFI stub is, im just following the amd64 handbook using grub:2 so i believe thats what im doing
charles17 wrote: |
That second article got marked for deletion for good reason. I have to admit I didn't read your OP very carefully. Usage of grub stuff is out of my scope.
Sorry. |
i thought it was just marked for redundant info as opposed to faulty info but the sentiment where it says "In other words, after creating and formatting the ESP (...), simply mount it at /boot.[2]" seemed to have helped me get over an error i got on my first install so i stuck with it. oops, hopefully i can recover this cos i spent a million hours on this kernel
thanks for the response |
|
Back to top |
|
 |
Ralphred Tux's lil' helper

Joined: 31 Dec 2013 Posts: 127
|
Posted: Fri Jun 26, 2020 3:29 pm Post subject: |
|
|
Cool.
So you ran Code: | grub-install --target=x86_64-efi --efi-directory=/boot | from your chroot environment?
And fear not mate, you're pretty close, you've just stumbled at a late hurdle. |
|
Back to top |
|
 |
yhtycf n00b


Joined: 26 Jun 2020 Posts: 8
|
Posted: Fri Jun 26, 2020 3:42 pm Post subject: |
|
|
Ralphred wrote: | Cool.
So you ran Code: | grub-install --target=x86_64-efi --efi-directory=/boot | from your chroot environment?
And fear not mate, you're pretty close, you've just stumbled at a late hurdle. |
on my first try installing that was the exact command that gave me an error but this time i did that after making sure my ESP was mounted on /boot (in chroot) and it worked fine. my grub seems to be working and in the right spot because when i go to boot it mentions grub and then says something like "loading linux .. .." which i think is from grub. all the guides i see on how to reconfigure kernels say that I should copy the bzImage from my reconfigured kernel into /boot, presumably to overwrite the other bzImage but i can't find it anywhere
thanks for the response |
|
Back to top |
|
 |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 3631
|
Posted: Fri Jun 26, 2020 3:54 pm Post subject: |
|
|
Sorry. Wrong post - deleted.
Last edited by charles17 on Fri Jun 26, 2020 3:56 pm; edited 1 time in total |
|
Back to top |
|
 |
Ralphred Tux's lil' helper

Joined: 31 Dec 2013 Posts: 127
|
Posted: Fri Jun 26, 2020 3:55 pm Post subject: |
|
|
yhtycf wrote: | all the guides i see on how to reconfigure kernels say that I should copy the bzImage from my reconfigured kernel into /boot |
This is correct, but running make install from /usr/src/linux with /boot mounted will copy the new kernel over the old one for you (all in your chroot environment).
If you've checked that /boot is mounted, and there is no vmlinuz-* or no EFI directory then that would suggest some earlier command exited with errors, or something wasn't mounted correctly when the commands were issued.
If you want to move this discussion to the #gentoo IRC or some other IM just message me and we can speed up the exchange a bit. |
|
Back to top |
|
 |
yhtycf n00b


Joined: 26 Jun 2020 Posts: 8
|
Posted: Fri Jun 26, 2020 4:09 pm Post subject: |
|
|
Ralphred wrote: | yhtycf wrote: | all the guides i see on how to reconfigure kernels say that I should copy the bzImage from my reconfigured kernel into /boot |
This is correct, but running make install from /usr/src/linux with /boot mounted will copy the new kernel over the old one for you (all in your chroot environment).
If you've checked that /boot is mounted, and there is no vmlinuz-* or no EFI directory then that would suggest some earlier command exited with errors, or something wasn't mounted correctly when the commands were issued.
If you want to move this discussion to the #gentoo IRC or some other IM just message me and we can speed up the exchange a bit. |
THANKS FOR THE HELP! u were right, im a total dumbass and did not have /mnt/gentoo/boot mounted properly. I don't even know what happened with my first "mount /dev/nvme0n1p2 /mnt/gentoo/boot" command tho it went through. Apparently when its mounted properly I'm only supposed to see like 4 things in the /boot folder (rather than 100). I did it again and it worked. I exited and rebooted and my kernel reconfig even worked! Thank you for your time (and soz for wasting it) and the help! |
|
Back to top |
|
 |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 3631
|
Posted: Fri Jun 26, 2020 4:18 pm Post subject: |
|
|
yhtycf wrote: | ... and did not have /mnt/gentoo/boot mounted properly. ... |
Over the time you will collect some more such "lessons learned". No one else could explain it better. |
|
Back to top |
|
 |
|