View previous topic :: View next topic |
Author |
Message |
leyvi Guru

Joined: 08 Sep 2023 Posts: 305
|
Posted: Sun Mar 30, 2025 6:29 pm Post subject: |
|
|
NeddySeagoon wrote: | You should see the panic but you don't report that. Just nothing after grub.
What console driver are you trying to use? | Indeed, nothing (at all) happens after GRUB.
I think I have a few console drivers installed: grep CONSOLE /mnt/gentoo/usr/src/linux-6.14.0-gentoo/.config: | # CONFIG_NETCONSOLE is not set
CONFIG_CONSOLE_TRANSLATIONS=y
CONFIG_VT_CONSOLE=y
CONFIG_VT_CONSOLE_SLEEP=y
CONFIG_VT_HW_CONSOLE_BINDING=y
# CONFIG_SERIAL_8250_CONSOLE is not set
# CONFIG_LP_CONSOLE is not set
CONFIG_VIRTIO_CONSOLE=y
CONFIG_VGA_CONSOLE=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_DUMMY_CONSOLE_COLUMNS=80
CONFIG_DUMMY_CONSOLE_ROWS=43
CONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7
CONFIG_CONSOLE_LOGLEVEL_QUIET=4 | Not sure if this answers your question, let me know. |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 55110 Location: 56N 3W
|
Posted: Sun Mar 30, 2025 6:51 pm Post subject: |
|
|
leyvi,
Don't be shy, put the entine .config onta pastebin site.
You may need to play with the -s and -S options to wgetpaste.
Your fragment partially answers the question. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
pingtoo Veteran


Joined: 10 Sep 2021 Posts: 1587 Location: Richmond Hill, Canada
|
Posted: Sun Mar 30, 2025 7:40 pm Post subject: |
|
|
leyvi.
I suggest you open a new thread for proceeding what you want to do.
It seems to me you are move away from your initial topic that wanting to create a secured (dm-encrypt) portable environment.
I feel things become "lost in translation", the context is unclear, what was discussed mostly relate to how security is not able using a USB drive or how to locate storage. Your current question seems more relate to misconfiguration (kernel or kernel command line) and/or possible booting issue (grub isn't doing what is suppose doing) but without more clear context it is hard to follow.
For example we don't know how currently your question relate to why kernel is not working. we don't know how you start grub, where is the grub.conf. i.e. the context is not clear. |
|
Back to top |
|
 |
leyvi Guru

Joined: 08 Sep 2023 Posts: 305
|
Posted: Sun Mar 30, 2025 8:04 pm Post subject: |
|
|
pingtoo wrote: | we don't know how you start grub, where is the grub.conf. | You should be able to find it in my first post, near the end; I will repost it.
pingtoo wrote: | Your current question seems more relate to misconfiguration (kernel or kernel command line) and/or possible booting issue (grub isn't doing what is suppose doing) but without more clear context it is hard to follow. | Same is true here.
leyvi wrote: | I tried to make a "Swiss-army-knife" Gentoo install on a high-speed USB stick (USB-C 3.2). The idea was that I'd make it super secure, so that I could even run it on untrusted hardware, on untrusted networks, etc. As such, I did the following:- Made an ESP, FAT32, with shimx64.efi, mmx64.efi, and grubx64.efi, as well as a grub.cfg, all in the directory \EFI\gentoo
- A boot partition, encrypted with cryptsetup/device-mapper (password protected), formatted with ext4, containing vmlinuz and initramfs-6.14.0-gentoo.efi
- A root filesystem, also encrypted using cryptsetup/device-mapper, using a keyfile stored in the initramfs, and also on this same root filesystem, for future kernel versions
I built all the drivers necessary for booting directly into the kernel, and compiled everything else as a signed, compressed module. Initramfs was made with dracut, and contained kernel arguments telling it how to decrypt my root filesystem, and where to find the keyfile:
Output of `bat /mnt/gentoo/etc/dracut.conf.d/*`: | compress="lz4"
do_strip="no"
drivers_dir="/lib/modules/6.14.0-gentoov1/"
install_items+=" /root/rootfs_keyfile "
kernel_cmdline="root=/dev/mapper/usb_rootfs cryptdevice=PARTUUID=3afd50e4-bca2-4c7f-90e1-0f5825dcd2ba:usb_rootfs:rw cryptkey=rootfs:rootfs_keyfile crypto=sha256:aes-xts-plain64:0:0 " |
Now what's the problem with all this, you might ask?- EFI firmware doesn't find shim, I'm using a VM to test it (with USB passthrough), so it drops me into an EFI shell.
- If I manually locate and execute the shim from the EFI shell, it loads GRUB. But GRUB does not show the kernel I configured, so I have to drop into a GRUB shell for the next part.
- If, in the GRUB shell, I manually locate the boot partition, GRUB will fail to decrypt it, since the secureboot signed GRUB image doesn't come with the necessary modules.
- If I instead use a different, non-secure GRUB install, with the appropriate modules loaded, it successfully decrypts the boot partition (with the correct password of course), and I can use the `linux` and `initrd` commands to set the kernel file and initramfs files, and use `boot` to boot with it. Except it doesn't; GRUB hangs there, and doesn't give any useful output.
|
I don't believe that the conversation has moved away from the original topic; I think it went on some tangents, but it's back on track now. |
|
Back to top |
|
 |
leyvi Guru

Joined: 08 Sep 2023 Posts: 305
|
Posted: Sun Mar 30, 2025 8:10 pm Post subject: |
|
|
NeddySeagoon wrote: | leyvi,
Don't be shy, put the entine .config onta pastebin site.
You may need to play with the -s and -S options to wgetpaste.
Your fragment partially answers the question. | Here's my .config file, as requested: https://0x0.st/82zb.txt. |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 55110 Location: 56N 3W
|
Posted: Sun Mar 30, 2025 8:35 pm Post subject: |
|
|
leyvi
is conspicuous by its absence.
can be made to work but not as a module.
Grub han to do the setup then pass the framebuffer to the kernel so that it ran draw on it.
FB_SIMPLE is so simple that it has no setup controls.
Anyway, you want FB_EFI.
At the moment you don't have any console driver, which is why your console is blank.
You don't have Code: | CONFIG_EFI_EARLYCON=y | either.
Its missing too.
Code: |
┌─────────────────────────────────────────────────────────────────────────── Search Results ────────────────────────────────────────────────────────────────────────────┐
│ Symbol: FB_EFI [=y] │
│ Type : bool │
│ Defined at drivers/video/fbdev/Kconfig:436 │
│ Prompt: EFI-based Framebuffer Support │
│ Depends on: HAS_IOMEM [=y] && FB [=y]=y [=y] && EFI [=y] │
│ Location: │
│ -> Device Drivers │
│ -> Graphics support │
│ -> Frame buffer Devices │
│ -> Support for frame buffer device drivers (FB [=y]) │
│ (1) -> EFI-based Framebuffer Support (FB_EFI [=y]) │
│ Selects: APERTURE_HELPERS [=y] && DRM_PANEL_ORIENTATION_QUIRKS [=y] && FB_IOMEM_HELPERS [=y] && SYSFB [=y] |
Ahh ... build your framebuffer into the kernel.
=m is probably the cause of FB_EFI being hidden.
-- edit --
Is the intent to boot the USB stick anywhere and use the host system (from the USB stick), or to be able to do that and inspect/manipulate the host install?
If its the former, you have a lot of junk in your kernel. If its the latter, there is a lot of stuff missing. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
pietinger Moderator

Joined: 17 Oct 2006 Posts: 5550 Location: Bavaria
|
Posted: Sun Mar 30, 2025 8:53 pm Post subject: |
|
|
NeddySeagoon wrote: | [...]Ahh ... build your framebuffer into the kernel.
=m is probably the cause of FB_EFI being hidden. |
Yes, this is the cause ... as also explained here:
https://wiki.gentoo.org/wiki/User:Pietinger/Experimental/Manual_Configuring_Current_Kernel#Framebuffer_Device_and_Console
leyvi,
you are also missing IOMMU (# CONFIG_IOMMU_SUPPORT is not set) ... see here:
https://wiki.gentoo.org/wiki/User:Pietinger/Experimental/Manual_Configuring_Current_Kernel#IOMMU
May I ask if you want to use this kernel to boot AMD + Intel machines? If yes, then enable everything for both:
Code: | Processor type and features --->
[*] Intel Low Power Subsystem Support |
Some remarks:
Code: | 1
# CONFIG_EFI_STUB is not set
2
CONFIG_VMD=m
3
CONFIG_EXTRA_FIRMWARE=""
4
CONFIG_DM_CRYPT=y |
1. If you want boot this kernel directly via UEFI (instead using grub) you will need this option.
2. This is for Intel machines only. If you want configure your kernel ONLY for AMD machines, then you dont need it.
3. Here you could include the CPU microcode and firmware files (if you want). If you dont do this, THEN your initramfs MUST have included all these.
4. Usually you need only this one and not all the other stuff like DM_ZERO, DM_MULTIPATH, DM_MIRROR, ... _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
 |
pingtoo Veteran


Joined: 10 Sep 2021 Posts: 1587 Location: Richmond Hill, Canada
|
Posted: Sun Mar 30, 2025 8:58 pm Post subject: |
|
|
leyvi,
Quote: | I don't believe that the conversation has moved away from the original topic; I think it went on some tangents, but it's back on track now. | understood. it is your choice.
beside Neddy's suggestion, we still don't have clear context. Let assume you did the point 4 in your post.
The context not clear are, - How you boot into grub? from EFI menu or from BIOS?
- How do you know if grub successfully load kernel image and initrd image file?
- Continue above, since we did not see what you typed in those "linux", "initrd" command, And
- How you decrypt boot partition
- What files are in boot partition
There could be more need to know before suggestion(s) can be provide. |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 55110 Location: 56N 3W
|
Posted: Sun Mar 30, 2025 9:12 pm Post subject: |
|
|
pietinger,
That's partly why I was asking for the intent.
is only required for some Intel hardware to be able to access the host storage.
If the host is only to be used to host the USB stick, that and a lot of other stuff can be omitted.
All the RAID support, for example.
It may be a good idea to include some of the popular DRM drivers too, as =M.
A GUI on top of EFI or Simple FB is not a pretty sight. :)
Microcode is a good idea as we know that the system will be exposed to external threats, so all the mitigations are required. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
leyvi Guru

Joined: 08 Sep 2023 Posts: 305
|
Posted: Mon Mar 31, 2025 6:14 pm Post subject: |
|
|
NeddySeagoon wrote: | leyvi
is conspicuous by its absence.
can be made to work but not as a module.
Grub han to do the setup then pass the framebuffer to the kernel so that it ran draw on it.
FB_SIMPLE is so simple that it has no setup controls.
Anyway, you want FB_EFI.
At the moment you don't have any console driver, which is why your console is blank.
You don't have Code: | CONFIG_EFI_EARLYCON=y | either.
Its missing too.
Code: |
┌─────────────────────────────────────────────────────────────────────────── Search Results ────────────────────────────────────────────────────────────────────────────┐
│ Symbol: FB_EFI [=y] │
│ Type : bool │
│ Defined at drivers/video/fbdev/Kconfig:436 │
│ Prompt: EFI-based Framebuffer Support │
│ Depends on: HAS_IOMEM [=y] && FB [=y]=y [=y] && EFI [=y] │
│ Location: │
│ -> Device Drivers │
│ -> Graphics support │
│ -> Frame buffer Devices │
│ -> Support for frame buffer device drivers (FB [=y]) │
│ (1) -> EFI-based Framebuffer Support (FB_EFI [=y]) │
│ Selects: APERTURE_HELPERS [=y] && DRM_PANEL_ORIENTATION_QUIRKS [=y] && FB_IOMEM_HELPERS [=y] && SYSFB [=y] |
Ahh ... build your framebuffer into the kernel.
=m is probably the cause of FB_EFI being hidden.
-- edit --
Is the intent to boot the USB stick anywhere and use the host system (from the USB stick), or to be able to do that and inspect/manipulate the host install?
If its the former, you have a lot of junk in your kernel. If its the latter, there is a lot of stuff missing. | Thanks! I'll enable the relevant options as soon as I can.
About your "-- edit --" section:
The latter. What's missing?
Last edited by leyvi on Mon Mar 31, 2025 6:55 pm; edited 1 time in total |
|
Back to top |
|
 |
leyvi Guru

Joined: 08 Sep 2023 Posts: 305
|
Posted: Mon Mar 31, 2025 6:23 pm Post subject: |
|
|
pietinger wrote: | NeddySeagoon wrote: | [...]Ahh ... build your framebuffer into the kernel.
=m is probably the cause of FB_EFI being hidden. |
Yes, this is the cause ... as also explained here:
https://wiki.gentoo.org/wiki/User:Pietinger/Experimental/Manual_Configuring_Current_Kernel#Framebuffer_Device_and_Console
leyvi,
you are also missing IOMMU (# CONFIG_IOMMU_SUPPORT is not set) ... see here:
https://wiki.gentoo.org/wiki/User:Pietinger/Experimental/Manual_Configuring_Current_Kernel#IOMMU
May I ask if you want to use this kernel to boot AMD + Intel machines? If yes, then enable everything for both:
Code: | Processor type and features --->
[*] Intel Low Power Subsystem Support |
Some remarks:
Code: | 1
# CONFIG_EFI_STUB is not set
2
CONFIG_VMD=m
3
CONFIG_EXTRA_FIRMWARE=""
4
CONFIG_DM_CRYPT=y |
1. If you want boot this kernel directly via UEFI (instead using grub) you will need this option.
2. This is for Intel machines only. If you want configure your kernel ONLY for AMD machines, then you dont need it.
3. Here you could include the CPU microcode and firmware files (if you want). If you dont do this, THEN your initramfs MUST have included all these.
4. Usually you need only this one and not all the other stuff like DM_ZERO, DM_MULTIPATH, DM_MIRROR, ... | Thanks. A few quick questions:- Why do I need IOMMU? I'm not doing PCIe passthrough.
- I intend for this to run on both Intel and AMD machines. I intended to enable options for both, thanks for pointing out my mistake. I'll check power management.
- About firmware and microcode: yeah, I intend to put it all in the initramfs.
|
|
Back to top |
|
 |
leyvi Guru

Joined: 08 Sep 2023 Posts: 305
|
Posted: Mon Mar 31, 2025 6:47 pm Post subject: |
|
|
pingtoo wrote: | The context not clear are, - How you boot into grub? from EFI menu or from BIOS?
- How do you know if grub successfully load kernel image and initrd image file?
- Continue above, since we did not see what you typed in those "linux", "initrd" command, And
- How you decrypt boot partition
- What files are in boot partition
There could be more need to know before suggestion(s) can be provide. |
- From the EFI shell. I was using a VM with USB passthrough to test it, and I was using TianoCore EFI firmware. If boot fails, it drops you into an EFI shell, a feature described in the EFI standard. It's kind of like a GRUB command-line, but even more minimal and restrictive.
- I don't. GRUB hung after I ran the `boot` command. Hopefully properly configured console drivers will help here (thanks NeddySeagoon).
- `initrd (crypto0)/initrd-[something, I forget, probably 6.14.0].img` and `linux (crypto0)/vmlinuz`, I think.
- I used `cryptomount` on all the partitions which could not be listed because they were encrypted, until one of them accepted my password, this being the boot partition. I then listed the contents of `(crypto0)`, found the kernel and initramfs, and you can probably guess the rest. I have had bootloader problems in the past, so I've learned how to use the GRUB shell.
- See earlier numbers.
|
|
Back to top |
|
 |
leyvi Guru

Joined: 08 Sep 2023 Posts: 305
|
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 55110 Location: 56N 3W
|
Posted: Mon Mar 31, 2025 7:34 pm Post subject: |
|
|
leyvi,
The problem space is too big at the moment.
Start simple. Do plain vanilla simple install on USB and make it boot. If that's a first for you, you will learn a lot.
Now add complexity and test as you go.
You can make space for several installs on a USB stick,
1. Plain and simple to get a grounding.
2. Everything except the ESP is LVM, as the EFI firmware insists on VFAT on a partition
3. LUKS/LVM.
I suspect that even 1. will fail as the kernel will want to mount root before starting USB.
That's a very bad thing when root is on USB.
I've either do this with no initrd, or with a home made initrd.
My router has everything except boot inside LVM on USB. It's a Pi4. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
zen_desu Apprentice

Joined: 25 Oct 2024 Posts: 220
|
Posted: Mon Mar 31, 2025 7:36 pm Post subject: |
|
|
I've gotten a bit lost reading through most of this thread, but what are the actual requirements here?
If you build the system directly on the usb, in a chroot, I think ugrd should handle the rest out of the box, as strange as "booting to a USB backed root" is. It should also make sure necessary kmods for USB stuff is included, if that is an issue. _________________ µgRD dev
Wiki writer |
|
Back to top |
|
 |
pingtoo Veteran


Joined: 10 Sep 2021 Posts: 1587 Location: Richmond Hill, Canada
|
Posted: Mon Mar 31, 2025 8:08 pm Post subject: |
|
|
leyvi wrote: | pingtoo wrote: | The context not clear are, - How you boot into grub? from EFI menu or from BIOS?
- How do you know if grub successfully load kernel image and initrd image file?
- Continue above, since we did not see what you typed in those "linux", "initrd" command, And
- How you decrypt boot partition
- What files are in boot partition
There could be more need to know before suggestion(s) can be provide. |
- From the EFI shell. I was using a VM with USB passthrough to test it, and I was using TianoCore EFI firmware. If boot fails, it drops you into an EFI shell, a feature described in the EFI standard. It's kind of like a GRUB command-line, but even more minimal and restrictive.
- I don't. GRUB hung after I ran the `boot` command. Hopefully properly configured console drivers will help here (thanks NeddySeagoon).
- `initrd (crypto0)/initrd-[something, I forget, probably 6.14.0].img` and `linux (crypto0)/vmlinuz`, I think.
- I used `cryptomount` on all the partitions which could not be listed because they were encrypted, until one of them accepted my password, this being the boot partition. I then listed the contents of `(crypto0)`, found the kernel and initramfs, and you can probably guess the rest. I have had bootloader problems in the past, so I've learned how to use the GRUB shell.
- See earlier numbers.
|
OK, thanks for the information.
I will use above information and define a "context" hopefully this will help for communication for everyone.
- This test is on QEMU VM
- TianoCore EFI firmware is used to provide UEFI environment as firmware boot loader.
- Initial boot into EFI shell
- Presumably GRUB environment were on the USB device.
- From EFI shell start GRUB efi app (I don't know how you name your grub.efi)
- Once GRUB drop to prompt use "cryptomount" to open/mount "/boot" partition
- ran loader command "linux" to load a file /vmlinuz in (crypto0) device
- ran second load command "initrd" to load a file "initrd-[something...].img
- ran "boot" command
- At this point nothing show on screen
Please correct me if I am wrong about any of items in the list.
Some questions- So the "/boot" is on a VM disk? or also on the USB device?
- What is the order you use for "linux" and "initrd" commands? grub require "linux" first follow by "initrd" if not, you will need to rerun "initrd" again after "linux"
- What kernel command line options you set?
- What grub modules you loaded? (try lsmod at grub prompt)
my recommendation would be knowing the boot process flow succsfully pass GRUB before go in to debug why kernel not displaying anything on screen.
One of possible debugging GRUB, use "set debug="efi,linux" before issue command "linux", This way grub should print out some information on how it see efi and how it load kernel/initrd images.
about the "guessing". I hope above had demonstrate the idea of being specific. The more information you share than more and quicker we can reach to the conclusion. My luck were very bad through out of my life, 99.9% of my guesses were wrong. Or else I will be rich now  |
|
Back to top |
|
 |
leyvi Guru

Joined: 08 Sep 2023 Posts: 305
|
Posted: Tue Apr 01, 2025 6:50 pm Post subject: |
|
|
pingtoo wrote: | - This test is on QEMU VM
- TianoCore EFI firmware is used to provide UEFI environment as firmware boot loader.
- Initial boot into EFI shell
- Presumably GRUB environment were on the USB device.
- From EFI shell start GRUB efi app (I don't know how you name your grub.efi)
- Once GRUB drop to prompt use "cryptomount" to open/mount "/boot" partition
- ran loader command "linux" to load a file /vmlinuz in (crypto0) device
- ran second load command "initrd" to load a file "initrd-[something...].img
- ran "boot" command
- At this point nothing show on screen
Please correct me if I am wrong about any of items in the list. | You are exactly right, except that GRUB freezes when I run `boot`.
pingtoo wrote: | Some questions- So the "/boot" is on a VM disk? or also on the USB device?
- What is the order you use for "linux" and "initrd" commands? grub require "linux" first follow by "initrd" if not, you will need to rerun "initrd" again after "linux"
- What kernel command line options you set?
- What grub modules you loaded? (try lsmod at grub prompt)
|
- All partitions, `/boot` included, are on the USB stick.
- I don't remember the order, I'm trying again as we speak.
- You can find my command line in the `dracut` configuration I posted earlier.
- I'll find out which modules, and post them here. I may need to use a screenshot, as I can't copy/paste.
pingtoo wrote: | my recommendation would be knowing the boot process flow succsfully pass GRUB before go in to debug why kernel not displaying anything on screen.
One of possible debugging GRUB, use "set debug="efi,linux" before issue command "linux", This way grub should print out some information on how it see efi and how it load kernel/initrd images.
about the "guessing". I hope above had demonstrate the idea of being specific. The more information you share than more and quicker we can reach to the conclusion. My luck were very bad through out of my life, 99.9% of my guesses were wrong. Or else I will be rich now | Thanks! I'll give it a shot and let you know what GRUB prints. |
|
Back to top |
|
 |
leyvi Guru

Joined: 08 Sep 2023 Posts: 305
|
Posted: Tue Apr 01, 2025 8:41 pm Post subject: |
|
|
UPDATE:- I tried to rebuild the kernel with all the recommended options. This error message popped up literally everywhere though: `ld.lld: error: Invalid summary version 12. Version should be in the range [1-10].`, whatever that means. Note that I am building with LLVM, as this is how I've always done it.
- I got rid of all the secure-boot junk from my ESP, and re-installed GRUB there with the `--removable` option. I then ran `grub-mkconfig -o /boot/grub/grub.cfg`. On booting in a VM, I was prompted for the password to my `boot` partition. After entering the password, what I later discovered was GRUB (it didn't look like how GRUB usually does) would hang for a bit, presumably mounting the `boot` partition. Then, it would print "Loading Linux 6.14.0 ..." and hang indefinitely. I tried interrupting the boot process, and pressed 'e' to edit the boot options. Everything looked fine, except that `initrd` was never called, so I added that after `linux` and added `set debug="efi,linux"` as requested by pingtoo. It printed the same thing, but now:
GRUB: | loader/i386/linux.c:204:linux: prot_mode_mem = 0x4200000, prot_mode_target = 4200000, prot_size = 2bab000
loader/i386/linux.c:870:linux: bzImage, setup=0x3e00, size=0x2bab000
loader/i386/linux.c:1111:linux: Initrd at addr 0x36a63000 which is expected in ranger 0x6dab000 ~ 0x37feffff
loader/i386/linux.c:1138:linux: Initrd (0x354d7000) at 0x354d7000, size=0x158b68d | All that was typed by hand, by the way. If anyone knows of some sort of OCR program I could use to extract this stuff from screenshots, that'd be awesome. |
|
Back to top |
|
 |
pingtoo Veteran


Joined: 10 Sep 2021 Posts: 1587 Location: Richmond Hill, Canada
|
Posted: Tue Apr 01, 2025 9:43 pm Post subject: |
|
|
leyvi,
May be you are or May be you are not, but I feel you deviate from the context I post earlier, Your description seems to indicate grub is executing setup in grub.conf. earlier context I post I am assuming you are execute interactively in grub prompt. Anyway it is not very important.
Code: | loader/i386/linux.c:204:linux: prot_mode_mem = 0x4200000, prot_mode_target = 4200000, prot_size = 2bab000
loader/i386/linux.c:870:linux: bzImage, setup=0x3e00, size=0x2bab000
loader/i386/linux.c:1111:linux: Initrd at addr 0x36a63000 which is expected in ranger 0x6dab000 ~ 0x37feffff
loader/i386/linux.c:1138:linux: Initrd (0x354d7000) at 0x354d7000, size=0x158b68d | Those messages indicate grub execution path gone where I did not expect. it seems to indicate this time the boot is NOT from UEFI firmware boot loader. (But I could be wrong here, I am no Grub expert)
Those messages after you enable grub debug indicate initrd command executed and successfully.
Quote: | After entering the password, what I later discovered was GRUB (it didn't look like how GRUB usually does) would hang for a bit, presumably mounting the `boot` partition. Then, it would print "Loading Linux 6.14.0 ..." and hang indefinitely. I tried interrupting the boot process, | I didn't know it is possible to interrupt grub after it pass execution to kernel. Do you mean you reset the computer then do it second time?
My iphone 11 seems to have OCR function. so may be modern cell phone all include this function? I think some online AI have OCR function may be you can search google for AI OCR.
Anyway currently I am not 100% sure you past grub, but we can assume that for now, as for kernel not displaying anything is out of my league. so hopefully someone else can step in to help on that.
One last thing, I would suggest don't make changes from established context while seeking for help. when changes happen after established context but not communicated properly it will become very hard for support to help and sometime lead to frustration in support and the end badly. |
|
Back to top |
|
 |
leyvi Guru

Joined: 08 Sep 2023 Posts: 305
|
Posted: Tue Apr 01, 2025 10:11 pm Post subject: |
|
|
pingtoo wrote: | I didn't know it is possible to interrupt grub after it pass execution to kernel. Do you mean you reset the computer then do it second time? | I mean I was able to interrupt GRUB after it had mounted my boot partition, but before it loaded the kernel, etc.
pingtoo wrote: | My iphone 11 seems to have OCR function. so may be modern cell phone all include this function? I think some online AI have OCR function may be you can search google for AI OCR. | Not possible with my phone
I use GrapheneOS, and I've never been able to find an OCR app that respects my privacy. I was inquiring about a desktop app, FOSS preferably.
pingtoo wrote: | One last thing, I would suggest don't make changes from established context while seeking for help. when changes happen after established context but not communicated properly it will become very hard for support to help and sometime lead to frustration in support and the end badly. | Got it, thanks. If you don't mind telling me, I would like to clarify anything that needs clarification. |
|
Back to top |
|
 |
pingtoo Veteran


Joined: 10 Sep 2021 Posts: 1587 Location: Richmond Hill, Canada
|
Posted: Tue Apr 01, 2025 10:25 pm Post subject: |
|
|
If you don't find things deserve clarification in my post then I don't have more question. |
|
Back to top |
|
 |
sublogic Guru


Joined: 21 Mar 2022 Posts: 330 Location: Pennsylvania, USA
|
Posted: Wed Apr 02, 2025 2:05 am Post subject: |
|
|
leyvi wrote: | All that was typed by hand, by the way. If anyone knows of some sort of OCR program I could use to extract this stuff from screenshots, that'd be awesome.[/list] |
If you have high-quality screenshots you can try app-text/tesseract , but expect to have to edit the output. (Mine confuses zeros and "@" characters for example.) |
|
Back to top |
|
 |
leyvi Guru

Joined: 08 Sep 2023 Posts: 305
|
Posted: Thu Apr 03, 2025 8:26 pm Post subject: |
|
|
leyvi wrote: | /etc/dracut.conf.d/kernel_cmdline: | kernel_cmdline="root=/dev/mapper/usb_rootfs cryptdevice=PARTUUID=3afd50e4-bca2-4c7f-90e1-0f5825dcd2ba:usb_rootfs:rw cryptkey=rootfs:rootfs_keyfile crypto=sha256:aes-xts-plain64:0:0 " |
| I still think I made a mistake here. From what I understand, it is possible to mitigate the issue NeddySeagoon mentioned earlier (kernel wants to mount root before USB is initialized) using the kernel command line. I have read the documentation extensively, but I just can't figure out what's wrong with it. I suspect that I'm using `cryptdevice` and `crypto` wrong here, but I don't know how. I did my best to follow the guides on the Gentoo Wiki, Arch Wiki, etc. Maybe I misunderstood the configuration of the LUKS partitions? I used `cryptsetup luksDump` on the root partition to find the information for the `crypto` argument, but I have no idea if I used the right output fields...
I am made even more certain that this is the issue, since GRUB seems to work now, and the kernel seems to load, it just never finishes. |
|
Back to top |
|
 |
zen_desu Apprentice

Joined: 25 Oct 2024 Posts: 220
|
Posted: Thu Apr 03, 2025 8:30 pm Post subject: |
|
|
leyvi wrote: | leyvi wrote: | /etc/dracut.conf.d/kernel_cmdline: | kernel_cmdline="root=/dev/mapper/usb_rootfs cryptdevice=PARTUUID=3afd50e4-bca2-4c7f-90e1-0f5825dcd2ba:usb_rootfs:rw cryptkey=rootfs:rootfs_keyfile crypto=sha256:aes-xts-plain64:0:0 " |
| I still think I made a mistake here. From what I understand, it is possible to mitigate the issue NeddySeagoon mentioned earlier (kernel wants to mount root before USB is initialized) using the kernel command line. I have read the documentation extensively, but I just can't figure out what's wrong with it. I suspect that I'm using `cryptdevice` and `crypto` wrong here, but I don't know how. I did my best to follow the guides on the Gentoo Wiki, Arch Wiki, etc. Maybe I misunderstood the configuration of the LUKS partitions? I used `cryptsetup luksDump` on the root partition to find the information for the `crypto` argument, but I have no idea if I used the right output fields...
I am made even more certain that this is the issue, since GRUB seems to work now, and the kernel seems to load, it just never finishes. |
I think many of those command line options are for the initramfs, such as cryptkey and cryptdevice. IIRC those are for mkinicpio as well. If the kernel starts and things fail before the system is running, there is a good chance it's initramfs related. _________________ µgRD dev
Wiki writer |
|
Back to top |
|
 |
leyvi Guru

Joined: 08 Sep 2023 Posts: 305
|
Posted: Fri Apr 04, 2025 11:38 am Post subject: |
|
|
zen_desu wrote: | I've gotten a bit lost reading through most of this thread, but what are the actual requirements here?
If you build the system directly on the usb, in a chroot, I think ugrd should handle the rest out of the box, as strange as "booting to a USB backed root" is. It should also make sure necessary kmods for USB stuff is included, if that is an issue. | I just checked out the wiki page for `µGRD`; it looks promising. I'm going to try using it instead of `dracut`. Sorry I didn't try it earlier. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|