Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Classic very old grub kernel & initramfs
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4160
Location: Bavaria

PostPosted: Sat Feb 24, 2024 1:40 pm    Post subject: Reply with quote

Moriah wrote:
[...] This should give me a nice clean system to work with.

I wish you every success. And I think you will be successful because the worst is behind you; upgrading from 5.15 to 6.6 should not cause any problems (but check again framebuffer and console).
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2365
Location: Kentucky

PostPosted: Sat Feb 24, 2024 1:54 pm    Post subject: Reply with quote

Thanks so much for your excellent help, and especially for all the articles. I had never seen those before, and they are extremely helpful and informative.
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.


Last edited by Moriah on Sat Feb 24, 2024 2:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4160
Location: Bavaria

PostPosted: Sat Feb 24, 2024 2:00 pm    Post subject: Reply with quote

Moriah wrote:
Thanks so much for you excellent help, [...]

You are very Welcome ! :D
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2365
Location: Kentucky

PostPosted: Mon Mar 04, 2024 10:57 pm    Post subject: Reply with quote

I finally got the time to get back to my new system and its kernel build.

I built linux-5.15.32-gentoo-r1 by doing a make oldconfig and the .config from my working but ancient linux-4.14.83-gentoo kernel. It worked well enough to boot, but I noticed some lockup and/or crash problems when viewing youtube videos; it appears that there is something slightly off in the audio, because one time it kept repeating a short section of the audio, and the second time it just stopped. Just my hunch that it is an audio problem.

Anyway, since I do not want to be running linux-5.15.32-gentoo-r1 anyway, I decided to emerge the linux-6.6.13-gentoo kernel and trouble shoot that if the problem still appeared. My approach was to take the .config from the linux-5.15.32-gentoo-r1 build (after the make oldconfig) and do another make oldconfig in the linux-6.6.13-gentoo directory.

I always save the original virgin .config to .config.old before I copy the old .config and do a make oldconfig, but I did not see any .config in the linux-6.6.13-gentoo directory that I could rename to .config.old; where is the linux-6.6.13-gentoo .config file?

Code:

onesimus /usr/src/linux-6.6.13-gentoo # ls -la
total 1108
drwxr-xr-x  27 root root   4096 Mar  4 17:38 .
drwxr-xr-x  44 root root   4096 Mar  4 17:37 ..
-rw-r--r--   1 root root  20561 Mar  4 17:37 .clang-format
-rw-r--r--   1 root root     59 Mar  4 17:37 .cocciconfig
-rw-r--r--   1 root root    151 Mar  4 17:37 .get_maintainer.ignore
-rw-r--r--   1 root root    105 Mar  4 17:37 .gitattributes
-rw-r--r--   1 root root   2087 Mar  4 17:37 .gitignore
-rw-r--r--   1 root root  36608 Mar  4 17:37 .mailmap
-rw-r--r--   1 root root    369 Mar  4 17:37 .rustfmt.toml
-rw-r--r--   1 root root    496 Mar  4 17:37 COPYING
-rw-r--r--   1 root root 102435 Mar  4 17:37 CREDITS
drwxr-xr-x  76 root root   4096 Mar  4 17:38 Documentation
-rw-r--r--   1 root root   2573 Mar  4 17:37 Kbuild
-rw-r--r--   1 root root    580 Mar  4 17:37 Kconfig
drwxr-xr-x   6 root root     71 Mar  4 17:37 LICENSES
-rw-r--r--   1 root root 726660 Mar  4 17:37 MAINTAINERS
-rw-r--r--   1 root root  67441 Mar  4 17:37 Makefile
-rw-r--r--   1 root root    727 Mar  4 17:37 README
drwxr-xr-x  24 root root    326 Mar  4 17:37 arch
drwxr-xr-x   3 root root   4096 Mar  4 17:37 block
drwxr-xr-x   2 root root    288 Mar  4 17:37 certs
drwxr-xr-x   4 root root   8192 Mar  4 17:37 crypto
drwxr-xr-x   2 root root     21 Mar  4 17:38 distro
drwxr-xr-x 143 root root   4096 Mar  4 17:38 drivers
drwxr-xr-x  81 root root   8192 Mar  4 17:38 fs
drwxr-xr-x  31 root root   4096 Mar  4 17:38 include
drwxr-xr-x   2 root root    298 Mar  4 17:38 init
drwxr-xr-x   2 root root   4096 Mar  4 17:38 io_uring
drwxr-xr-x   2 root root    213 Mar  4 17:38 ipc
drwxr-xr-x  22 root root   8192 Mar  4 17:38 kernel
drwxr-xr-x  21 root root  12288 Mar  4 17:38 lib
drwxr-xr-x   6 root root   8192 Mar  4 17:38 mm
drwxr-xr-x  73 root root   4096 Mar  4 17:38 net
drwxr-xr-x   7 root root    219 Mar  4 17:38 rust
drwxr-xr-x  41 root root   4096 Mar  4 17:38 samples
drwxr-xr-x  17 root root   8192 Mar  4 17:38 scripts
drwxr-xr-x  14 root root   4096 Mar  4 17:38 security
drwxr-xr-x  27 root root   4096 Mar  4 17:38 sound
drwxr-xr-x  43 root root   4096 Mar  4 17:38 tools
drwxr-xr-x   4 root root    187 Mar  4 17:38 usr
drwxr-xr-x   4 root root     44 Mar  4 17:38 virt
onesimus /usr/src/linux-6.6.13-gentoo #

_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2365
Location: Kentucky

PostPosted: Mon Mar 04, 2024 11:09 pm    Post subject: Reply with quote

Never mind. :oops:

I see one must do a make menuconfig and save the result to get the initial .config file.

Sorry to bother you.
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4160
Location: Bavaria

PostPosted: Mon Mar 04, 2024 11:09 pm    Post subject: Reply with quote

Moriah wrote:
[...] but I did not see any .config in the linux-6.6.13-gentoo directory that I could rename to .config.old; where is the linux-6.6.13-gentoo .config file?

After emerging "gentoo-sources" there is NO .config file in the directory UNTIL you do a "make menuconfig" (with saving) OR you do a "make defconfig" ...

... BUT there is also no need to save a config file in a fresh emerged gentoo-sources (because there is no config). Just copy the (recent) .config FROM 5.5 into 6.6.13 and do a "make oldconfig". (after answering all question you will have a (new) .config file)


P.S.: I was too late ... :lol:
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2365
Location: Kentucky

PostPosted: Tue Mar 05, 2024 12:11 am    Post subject: Reply with quote

I did the make menuconfig and then did a save without changing anything. This gave me a .config which I renamed to l.config.old, then I copied to .config from the 5.15.32kernel that I already built and did a make oldconfig. I followed that with a make menuconfig just to look around and make sure everything looked sane. I am now in the process of building the kernel by running make after running make modules-prepare.

We shall see how this works after everything gets built...
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2365
Location: Kentucky

PostPosted: Tue Mar 05, 2024 1:44 am    Post subject: Reply with quote

I have built a 6.6.13 kernel by doing a make oldconfig on the 5.15.32 kernel, which was made with a make oldconfig on the 4.14.83 kernel that I have been running for several years.

As mentioned earlier, I saw a bit of trouble with the 5.15.32 kernel, but I went ahead and built the 6.6.13 kernel anyway, since that is what I want to migrate to, and I figure if any problems with it, then I can fix them there and forget about the 5.15.32 kernel.

I need to put some hours of actual typical use on the 6.6.13 kernel to build confidence in it, but at least it boots, X works, and the network works, as does firefox and thunderbird. I will run it for a few days and see how it does...
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4160
Location: Bavaria

PostPosted: Tue Mar 05, 2024 2:09 am    Post subject: Reply with quote

Moriah wrote:
[...] but at least it boots, X works, and the network works, as does firefox and thunderbird. I will run it for a few days and see how it does...

Happy to hear that ! :D
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2365
Location: Kentucky

PostPosted: Tue Mar 12, 2024 1:39 am    Post subject: Reply with quote

Once I had the 6.6.13 kernel working, I rebuilt my lenovo thinkpad w530 from scratch, since it was pretty bit-rotted.

I did have compete backup on my backup server of its previous contents . 8)

So I built it per the gentoo handbook, but when I tried to boot it, the cryptsetup luksOpen failed !!! :evil:

So I rebooted back into the live boot usb stick and manually did the cryptsetup luksOpen, and it worked fine. :D

The kernel and its associated initramfs are on my usb bootstick, and it worked before I rebuild the laptop disk, so I am puzzled as to what could have gone haywire. Could it be that when I did the cryptsetup luksFormat, since I was using possibly a newer version of cryptsetup that what the initramfs was built with, that I got bit by the version change? I don't even know if the version of cryptsetup changed on the live usb boot stick, but thats all I can think of.

I haven't tried updating the version of cryptsetup in the initramfs yet. I wanted to get some other opinions before I did that.

Any ideas?
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4160
Location: Bavaria

PostPosted: Tue Mar 12, 2024 12:23 pm    Post subject: Reply with quote

Unfortunately I'm not an expert in automated cryptsetup solutions, but maybe this thread will help, in which @sMueggli has put the PO on the right track:
https://forums.gentoo.org/viewtopic-p-8819254-highlight-.html
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21637

PostPosted: Tue Mar 12, 2024 12:52 pm    Post subject: Reply with quote

From the description, my guess would be that the newer cryptsetup changed some default parameter, that the live kernel + live initramfs have support for a wide variety of choices, and that the custom kernel has support for only a limited number of choices. The old LUKS was made with choices that the limited system can handle. The new one was made with choices that the limited system cannot handle, but that the live kernel, with its broad support, can handle.

If you need further help, please use cryptsetup luksDump device to produce a report on it. Do NOT post the output in full, as it may, depending on options, include the volume key, which you must keep secret. I want to see these fields:
  • Version
  • Cipher name
  • Cipher mode
  • Hash spec
Check, or post the kernel configuration so we can check, that the ciphers and hash are supported for your limited system.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2365
Location: Kentucky

PostPosted: Tue Mar 12, 2024 6:23 pm    Post subject: Reply with quote

So here is the luksDump for my failing laptop

Code:
Version:        1
Cipher name:    aes
Cipher mode:    xts-plain64
Hash spec:      sha256


And here is the luksDump for another machine that uses the same initramfs but works:

Code:
Version:        1
Cipher name:    aes
Cipher mode:    cbc-essiv:sha256
Hash spec:      sha1


So it looks like the laptop disk was lukFormat-ed with a newer version of cryptsetup; therefore, I suspect what I need to do is update the version of cryptsetup that is in the initramfs on the usb bootstick.

Do you conclude the same? I will await your reply before I go messing with the initramfs version of cryptsetup. I know how to do this, having done it many times before: I first need to make a staticly linked version of cryptsetup, then copy it over the version on the /usr/src/initramfs; the version there now is rather old, to say the least:

Code:
(chroot) livecd /usr/src/initramfs # ls -l bin/cryptsetup
-rwxr-xr-x 1 root root 1167536 Jan 30  2010 bin/cryptsetup
(chroot) livecd /usr/src/initramfs #


Given that the old version uses sha1 for anything at all is not a good sign today... :(

I will eventually be updating all my systems, so I will be using the newer version of cryptsetup for whole disk encryption on each of these as I update them. That's going to take a while on the backup server, as it uses a 3-way RAID1 mirror under md, and the drives are 16 TB each. The other systems are not so big.
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21637

PostPosted: Tue Mar 12, 2024 6:40 pm    Post subject: Reply with quote

Updating cryptsetup is a good idea, but as I noted above, I am also concerned about whether your custom kernel supports all the right features for the failing laptop. That is why I suggested that you either check the kernel configuration, or share it so we can check it.

Updating only cryptsetup and changing nothing else is unlikely to make things worse, but if your kernel support is lacking, then updating only cryptsetup will not solve this.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2365
Location: Kentucky

PostPosted: Tue Mar 12, 2024 7:20 pm    Post subject: Reply with quote

Well if you look at this thread earlier, you will see that the same kernel has been successfully used with a disk that was encrypted the old way, and that I boot from a usb drive that has the kernel on the usb drive.

Do you still want to see my .config file? Its pretty big.
Code:
-rw-r--r--  1 root root   124245 Mar  4 18:52 config-6.6.13-gentoo

How should I make it available to you? I could put it on my web server and you could look at it there. I would post the URL in this thread.

BTW Not to change the subject, but I have been using XFS for many years, but I switched to SSD on my laptop a few years back, and never changed the filesystem to one well suited for SSD use. What filesystem would you recommend for use with an SSD so that TRIM would be properly supported?
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2365
Location: Kentucky

PostPosted: Wed Mar 13, 2024 10:45 pm    Post subject: Reply with quote

There is a discussion at https://forums.gentoo.org/viewtopic-t-1030222-start-0.html about building a cryptsetup for an initramfs, but it is 9 years old. My initramfs is 14 years old. I built a static linked cryptsetup for it back then. Now the discussion is whether to build static linked, or to just use the cryptsetup in the normal distribution and put the needed libraries in the lib directory of the initramfs. There is also conccerns about dependencies on the kernel. I don't want to have to update my initramfs for many more years. Should I static link my cryptsetup, or use libraries in lib?
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
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