LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 07-22-2023, 03:55 PM   #1
zvivered
Member
 
Registered: Sep 2007
Posts: 294

Rep: Reputation: 23
vanilla 5.4.249 : Secured boot


Hello,

I compiled vanilla 5.4.249 with a gcc created by buildroot.
Also created rootfs with the same buildroot.

I installed grub-efi on a FAT32 sata disk and copied bzImage to /boot
rootfs.tar was extracted to an ext3 partition on the same disk.

Then I booted the PC and got the linux login as expected.

But this does not make sense.
In the PC's BIOS secured boot is enabled.
I did not sign bzImage.
Can you please advise ?

Thank you,
Zvika
 
Old 07-22-2023, 06:18 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,661

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by zvivered View Post
Hello,
I compiled vanilla 5.4.249 with a gcc created by buildroot. Also created rootfs with the same buildroot. I installed grub-efi on a FAT32 sata disk and copied bzImage to /boot
rootfs.tar was extracted to an ext3 partition on the same disk.

Then I booted the PC and got the linux login as expected. But this does not make sense. In the PC's BIOS secured boot is enabled. I did not sign bzImage. Can you please advise ?
"Advise" what??? You (AGAIN) give us zero information about the hardware you're using, it's capabilities, or what you've actually done. You don't say what you downloaded, from where, what you did with it, etc., etc. This has been told to you many, MANY times...why can you not provide details when you ask a question???

If this is yet another thread where you will NOT provide information, say you're using custom hardware with a custom kernel, then don't share any with us, what do you think we'll be able to tell you now that hasn't been told to you in the past???
https://www.linuxquestions.org/quest...rt-4175721940/
https://www.linuxquestions.org/quest...ga-4175719035/
https://www.linuxquestions.org/quest...ll-4175708377/
https://www.linuxquestions.org/quest...ot-4175708180/

...including this from last year, where you're asking about secure boot:
https://www.linuxquestions.org/quest...on-4175705896/

You're claiming to have 15 years experience as a kernel developer, it's odd you don't know anything about this subject.
 
Old 07-23-2023, 09:48 PM   #3
zvivered
Member
 
Registered: Sep 2007
Posts: 294

Original Poster
Rep: Reputation: 23
Hello,

The CPU is:
Intel(R) Core(TM) i7-8700 CPU@3.20GHz
which is installed in a standard PC.

The attached capture.jpg contains a snapshot from BIOS.

The kernel was downloaded from:

The kernel source was not modified. I used x86-64_defconfig to create bzImage.

Can you please tell what further info is required ?
I expected that the kernel will not boot because secured boot is enabled.
Can you please tell why boot was OK ?

Thank you,
Zvika
Attached Thumbnails
Click image for larger version

Name:	Capture.jpg
Views:	13
Size:	35.8 KB
ID:	41370  

Last edited by zvivered; 07-23-2023 at 09:49 PM.
 
Old 07-24-2023, 08:06 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,661

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by zvivered View Post
Hello,
The CPU is: Intel(R) Core(TM) i7-8700 CPU@3.20GHz which is installed in a standard PC.

The attached capture.jpg contains a snapshot from BIOS.
And the snapshot shows nothing useful, at all.
Quote:
The kernel was downloaded from: SOME LINK
Great; so WHY did you download it from kernel.org, and build it yourself, rather than loading any version of Linux that already has a kernel??? And you're AGAIN posting in the "Embedded & Single board computer" forum...saying that you are using a 'standard PC'. If it's escaped your notice, the two are different.
Quote:
The kernel source was not modified. I used x86-64_defconfig to create bzImage.

Can you please tell what further info is required ? I expected that the kernel will not boot because secured boot is enabled. Can you please tell why boot was OK ?
You still, after 15 years, don't appear to be paying attention to what is asked of you, nor are you thinking about what you're posting. You claim to be a kernel developer, but can't figure out why your kernel is booting??? On the near-useless screenshot, you have "Key management" highlighted....did you bother to LOOK to see if a key/shim was imported when you loaded things???

Most importantly, did you bother to actually *LOOK IN THE FILE* you mentioned??? Might want to start there.
 
Old 07-24-2023, 09:41 AM   #5
zvivered
Member
 
Registered: Sep 2007
Posts: 294

Original Poster
Rep: Reputation: 23
Hello,

I tested the kernel on a regular PC.
But the final target is an embedded PC.

I can't use a distribution like ubuntu.
I need full control on the kernel source + root file system.

My question is simple:
I did not sign my kernel. So why does it boot if secure boot is ON ?

Thank you,
Zvika
 
Old 07-24-2023, 10:44 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,661

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by zvivered View Post
Hello,
I tested the kernel on a regular PC. But the final target is an embedded PC. I can't use a distribution like ubuntu. I need full control on the kernel source + root file system.
So absolutely nothing you've done thus far actually addresses your problem. This is, yet again, another one of your "I have custom hardware that I won't tell anyone about, but expect people to be able to help me" issues. How many times are you going to be asked what kind of hardware, and what your actual goals are, before you answer??? How many times in the past have you been asked these things???
Quote:
My question is simple: I did not sign my kernel. So why does it boot if secure boot is ON ?
You were *GIVEN AN ANSWER* Did you not read/understand it?? AGAIN: did you look in the file you used to generate the kernel??

And all of this is *ABSOLUTELY MEANINGLESS* for what you want to do with an embedded system, since everything will be different. AGAIN: you claim to be a kernel/custom hardware developer with 15 years experience...and cannot figure out/read the makefile for a kernel???
 
Old 07-24-2023, 02:54 PM   #7
zvivered
Member
 
Registered: Sep 2007
Posts: 294

Original Poster
Rep: Reputation: 23
Hello,

Attached x86_64_defconfig I used to configure the kernel.
I did not find a trace to SECURE_BOOT.

Thank you,
Zvika
Attached Files
File Type: txt x86_64_defconfig.txt (6.7 KB, 6 views)
 
Old 07-24-2023, 03:24 PM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,661

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by zvivered View Post
Hello,
Attached x86_64_defconfig I used to configure the kernel. I did not find a trace to SECURE_BOOT.
AGAIN:
  • You supposedly have 15 years experience doing this; you should easily be able to identify what's in that file.
  • You have been repeatedly asked about the hardware; you won't answer.
  • You have repeatedly been asked about what you're trying to accomplish; you won't answer
  • You say "standard PC"...and give us NO details about it
  • You don't say what other OS'es have ever been loaded on this mystery PC, and were...
  • ...told to check key management; did you??
  • You're apparently trying to build a kernel for an embedded system that (somehow) you want to boot on a standard PC; are you thinking about the fact that the two things are very different??
You've done this for years now, in most of your threads. I don't think anyone is going to be able to help you at this point, since you NEVER want to provide answers to questions you're asked.

You supposedly work with a 'team' engineering custom FPGA devices on custom embedded hardware; ask them.

Last edited by TB0ne; 07-24-2023 at 05:23 PM.
 
Old 07-24-2023, 10:04 PM   #9
zvivered
Member
 
Registered: Sep 2007
Posts: 294

Original Poster
Rep: Reputation: 23
Sorry,

All your angry questions are not relevant.

I wrote the exact type of my CPU. You did not specify what other hardware details are missing.
The PC is booting OK with he vanilla 5.4.249 kernel I built.
You replied that the answer is in the x86_64_defconfig I used. But you refuse to tell where in this file.

The PC has 2 physical disks. The first contains Win10. Is it relevant ?
In the boot menu I choose to boot with the second disk that contains grub 2.x which boots vanilla kernel.

I have 15 years of experience in linux. So what ? Does it mean I can't ask questions ?

Thank you,
Zvika
 
Old 07-25-2023, 08:34 AM   #10
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,661

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by zvivered View Post
Sorry,
All your angry questions are not relevant.
Sorry, but they are. And people get angry with you, because you *DO NOT LISTEN OR ANSWER*
Quote:
I wrote the exact type of my CPU. You did not specify what other hardware details are missing. The PC is booting OK with he vanilla 5.4.249 kernel I built. You replied that the answer is in the x86_64_defconfig I used. But you refuse to tell where in this file.
Yep; since you refuse to answer questions and provide details, please explain why others should spoon-feed you an answer, especially since you were TOLD which file it's in, and you have 15 years experience building kernels. Since you have that experience, you should EASILY be able to look at that file and see the relevant lines.

You were asked about the COMPUTER....not just the CPU. You were asked about the BIOS; you didn't answer. You were told to look at key management; you apparently haven't. You were asked SEVERAL things; you don't answer. AGAIN, since you don't pay attention....a 'standard pc' won't be the same as an embedded system. Not playing guessing games with you; this is fairly typical for your threads, and has been for years.
Quote:
The PC has 2 physical disks. The first contains Win10. Is it relevant ? In the boot menu I choose to boot with the second disk that contains grub 2.x which boots vanilla kernel.
Relevant?? You tell me, because...
Quote:
I have 15 years of experience in linux. So what ? Does it mean I can't ask questions ?
...you have 15 years experience in Linux, right??? You can ask all the questions you want, but *YOU* are claiming to be a kernel developer/custom hardware developer/FPGA developer, and can't figure out how to check a key in BIOS??? Or how to build a kernel???

Last edited by TB0ne; 07-25-2023 at 01:29 PM.
 
Old 07-25-2023, 01:14 PM   #11
zvivered
Member
 
Registered: Sep 2007
Posts: 294

Original Poster
Rep: Reputation: 23
You won.
It seems I will not get any answers here.
I give up.
 
Old 07-25-2023, 01:35 PM   #12
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,661

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by zvivered View Post
You won. It seems I will not get any answers here. I give up.
Again:
  • You got an answer; you cannot understand the answer, despite claiming 15 years experience doing what you are wanting to do.
  • You REFUSE to answer questions about your setup, or even state your goals.
  • You REFUSE to check things when suggested.
So what do you think anyone here can do for you?? Do you expect us to connect to your machine and type things in?? Provide you with free consulting services??? What???

Check any of your MANY other threads where you behave the same way, over the course of many years:
https://www.linuxquestions.org/quest...te-4175727120/
https://www.linuxquestions.org/quest...rt-4175721940/
https://www.linuxquestions.org/quest...ga-4175719035/
https://www.linuxquestions.org/quest...ll-4175708377/
https://www.linuxquestions.org/quest...ot-4175708180/
https://www.linuxquestions.org/quest...on-4175705896/
https://www.linuxquestions.org/quest...ce-4175702707/
 
Old 07-26-2023, 12:59 PM   #13
zvivered
Member
 
Registered: Sep 2007
Posts: 294

Original Poster
Rep: Reputation: 23
Hello,

I added few components to .config for 5.4.249 (x64) (attached)
For example: CONFIG_KEXEC_BZIMAGE_VERIFY_SIG
Did not sign the kernel yet.

The reason PC boots with a not signed kernel is because:
OS Type : Other OS
in the secured boot section in BIOS:

When I set it to: Windows UEFI mode, boot failed.
I got a big red message telling that BIOS will look for another bootable disk.

Thank you,
Zvika
Attached Files
File Type: txt config.secured.txt (120.4 KB, 3 views)
 
Old 07-26-2023, 01:13 PM   #14
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,661

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by zvivered View Post
Hello,
I added few components to .config for 5.4.249 (x64) (attached) For example: CONFIG_KEXEC_BZIMAGE_VERIFY_SIG Did not sign the kernel yet.

The reason PC boots with a not signed kernel is because:
OS Type : Other OS
in the secured boot section in BIOS:

When I set it to: Windows UEFI mode, boot failed.
I got a big red message telling that BIOS will look for another bootable disk.
Really??? You mean checking the BIOS settings (as you were told) worked?? Good to know. Too bad it won't apply to many other folks, since you've still not provided any useful details about your setup or your actual goals.

And the file you posted clearly says, at the top:
Code:
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 5.4.249 Kernel Configuration
...which is certainly *NOT* what you said you used to build the kernel with, is it??? Not the one that came with the kernel link, nor the one you posted here. Again, you provide no details, and change things, and somehow expect others to guess and try to help you.

Last edited by TB0ne; 07-26-2023 at 01:18 PM.
 
Old 07-26-2023, 02:53 PM   #15
zvivered
Member
 
Registered: Sep 2007
Posts: 294

Original Poster
Rep: Reputation: 23
Hello,

As I said before: My goal is to boot the PC with vanilla kernel (e.g 5.4.249) with secure boot enabled in BIOS.

Next step: install grub 2.x on the disk with secure boot enabled.
I tried the following under knoppix 9.1:

/dev/sdb1 is a SATA disk.

mkfs.fat -F32 /dev/sdb1
mount -t vfat /dev/sdb1 /media/sdb1
apt-get install grub-efi-amd64-signed
grub-install --boot-directory=/media/sdb1/boot --efi-directory=/media/sdb1 --uefi-secure-boot
I did not copy any grub.cfg to /media/sdb/boot/grub yet.
reboot

In boot menu I chose this disk but got the red message.
Any ideas ?

I'm aware that doing this with commercial distribution (e.g ubuntu) is much simpler.
But this is not what I'm looking.

Thank you,
Zvika
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Emulator woes - emulator: ../../src/xcb_io.c:249: process_responses: Assertion GunNam Linux - Mobile 1 03-30-2011 03:55 PM
Dell Ubuntu Netbook - $249. farslayer Linux - Laptop and Netbook 2 06-11-2009 03:27 PM
What about non secured cmd lines through AIM ?? (ssh like, non secured) frenchn00b Debian 2 11-17-2008 01:52 AM
top command shows 249% usage pudhiyavan Linux - Server 7 02-27-2008 12:29 AM
MS linux only $249.99 Alinuxnoob General 6 04-06-2002 08:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 02:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration