LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Suggested update to README.initrd in Slackware 14 (https://www.linuxquestions.org/questions/slackware-14/suggested-update-to-readme-initrd-in-slackware-14-a-4175424135/)

mrascii 08-26-2012 10:27 PM

Suggested update to README.initrd in Slackware 14
 
Using the mkinitrd command in the README.initrd file linked to in the /boot directory will not work with a luks-encrypted file system. The result will be a system that won't boot.

I suggest that a line be added either giving the correct command or a reference to the README_CRYPT.TXT which includes the correct command.

DNA
AKA mrascii

ReaperX7 08-26-2012 10:50 PM

People still use an initrd.gz file? I though the huge kernel solved that issue entirely.

T3slider 08-26-2012 11:14 PM

I'm pretty sure the generic kernel+initrd was solving the problem of on-demand module loading with configurable options. The huge kernel solved installation with a single monolithic kernel rather than having to ship several but its purpose in a running system has always been as a backup.

As to the question at hand, if you're using LUKS encryption then you're expected to read README_CRYPT.TXT anyway, which gives you more than enough information including how to create a satisfactory initrd. I think that file is more appropriate since it is more specific (and thus trumps the more generic README.initrd). Just my opinion though.

willysr 08-26-2012 11:14 PM

huge kernel does solve that problem, but for daily usage, people tends to use generic kernel

ruario 08-26-2012 11:28 PM

Sure people use initrd.gz files. Not everyone needs everything included in the huge kernel. Yes, you could compile your own kernel with everything you need and no more but it is simpler and faster just to use the generic kernels with an initrd.gz.

kikinovak 08-27-2012 12:03 AM

Quote:

Originally Posted by ReaperX7 (Post 4765017)
People still use an initrd.gz file? I though the huge kernel solved that issue entirely.

First thing I do after hitting "EXIT Slackware Setup", even before the first reboot, is chroot into my freshly installed Slackware and build an initrd.

If you stay with the huge kernel, just look out for "unsupported features" in your boot messages.

Besides, with some Intel graphics cards, you need to include i915 and intel_agp into your initrd for KMS to work.

ruario 08-27-2012 12:12 AM

Quote:

Originally Posted by kikinovak (Post 4765054)
First thing I do after hitting "EXIT Slackware Setup", even before the first reboot, is chroot into my freshly installed Slackware and build an initrd.

Snap, I do exactly the same! ;)

Richard Cranium 08-27-2012 02:07 AM

Quote:

Originally Posted by ReaperX7 (Post 4765017)
People still use an initrd.gz file? I though the huge kernel solved that issue entirely.

Stop pulling my leg.

brianL 08-27-2012 03:23 AM

Quote:

Originally Posted by kikinovak (Post 4765054)
First thing I do after hitting "EXIT Slackware Setup", even before the first reboot, is chroot into my freshly installed Slackware and build an initrd.

I do it after the first reboot, using /usr/share/mkinitrd/mkinitrd_command_generator.sh as a guideline. Is there any advantage to doing it before the first reboot?

ruario 08-27-2012 03:35 AM

Quote:

Originally Posted by brianL (Post 4765175)
I do it after the first reboot, using /usr/share/mkinitrd/mkinitrd_command_generator.sh as a guideline. Is there any advantage to doing it before the first reboot?

One less reboot? Also it means you don't even have to install the huge kernel at all, even for first boot (granted you could have also avoided this by booting from the huge kernel on the Live CD at the isolinux boot prompt but configuring everything up front seems neater).

In my case I don't use Lilo (and hence don't install it) any more. Instead I use extlinux. I manually setup and configure extlinux at the same time as making my initrd. By doing it all immediately after install, the whole boot process is configured and complete, without having to boot from the CD or USB disk again.

GazL 08-27-2012 03:36 AM

Quote:

Originally Posted by ruario (Post 4765061)
Snap, I do exactly the same! ;)

+1
Along with moving /tmp into a tmpfs.

ruario 08-27-2012 03:39 AM

Quote:

Originally Posted by GazL (Post 4765183)
Along with moving /tmp into a tmpfs.

I don't do this but have been considering it of late. Perhaps I will when I do my first clean install of Slackware 14.

Ramurd 08-27-2012 04:04 AM

afaik you need to build an initrd.gz also for LVM; at least if your entire setup is on LVM. iirc I would get kernel panics if I didn't build the initrd before the first reboot... A simple mkinitrd -k <kernel version> -f <filesystem> -r <root device> -h <resume from hibernate device> -L -o <outputfile> is all that's needed, but still, it's needed.

zerouno 08-27-2012 04:43 AM

Why not to add mkinitrd&generic kernel to the slackware installer?

ruario 08-27-2012 05:05 AM

Quote:

Originally Posted by zerouno (Post 4765226)
Why not to add mkinitrd&generic kernel to the slackware installer?

I believe the team have looked at this. I recall the following discussion from another thread.

Quote:

Originally Posted by Richard Cranium (Post 4004281)
Actually, the installer already should know what filesystems you intend to use for your partitions. It asks you fairly early in the process.

How many disk drive controllers are you going to build into the generic image? The installer doesn't know about that.

I think you'll end up with what we already have: a kernel with everything in it so that you can do an initial install and a generic kernel with the bare minimum to boot with which you use an initrd.

Unless someone can write a script that would troll through /sys to figure out what minimum set of modules should be loaded by initrd to allow you to boot into runlevel 3.

Quote:

Originally Posted by Alien Bob (Post 4004295)
The script /usr/share/mkinitrd/mkinitrd_command_generator.sh does just that.

Quote:

Originally Posted by Richard Cranium (Post 4004601)
Cool. Does the installer ask if you want to run this? (I haven't done a full install in quite a while.)

Quote:

Originally Posted by Alien Bob (Post 4004620)
No, but internally, the team had this working end of 2008 already. It's just never gone public.

Not sure why it was never included in the installer, though presumably they hit an problem.

In any case they are certainly aware this would be a nice to have addition. So I suspect it could indeed turn up one day. As for the exact time scale of when that it is, I suspect it it like everything else in Slackware. It'll appear when it is ready. ;)

kikinovak 08-27-2012 05:09 AM

Quote:

Originally Posted by brianL (Post 4765175)
I do it after the first reboot, using /usr/share/mkinitrd/mkinitrd_command_generator.sh as a guideline. Is there any advantage to doing it before the first reboot?

One less reboot, since you'd have to configure LILO accordingly. When you have more than twenty machines to install (as I do right now in a school), this sort of detail is a timesaver. (Thus I can spend the time saved playing minesweeper or posting on LQ :D)

brianL 08-27-2012 05:20 AM

Quote:

Originally Posted by kikinovak (Post 4765248)
When you have more than twenty machines to install (as I do right now in a school), this sort of detail is a timesaver. (Thus I can spend the time saved playing minesweeper or posting on LQ :D)

Ah, yes, never thought of that. I've only got three. :)

mrascii 08-27-2012 08:24 AM

Quote:

Originally Posted by Ramurd (Post 4765204)
afaik you need to build an initrd.gz also for LVM; at least if your entire setup is on LVM. iirc I would get kernel panics if I didn't build the initrd before the first reboot... A simple mkinitrd -k <kernel version> -f <filesystem> -r <root device> -h <resume from hibernate device> -L -o <outputfile> is all that's needed, but still, it's needed.

Exactly right. I should have made it clear that I encrypted /, /home and swap. Even booting huge.s an initrd is needed. In addition, following the recovery instructions to boot using "root=/dev/sdax" will not work if root is encrypted. The / volume must first be decrypted and made active then /proc and /sys mounted before lilo can be used to write a new lilo.comf file.

DNA
AKA mrascii

mrascii 08-27-2012 08:33 AM

Quote:

Originally Posted by T3slider (Post 4765025)
I'm pretty sure the generic kernel+initrd was solving the problem of on-demand module loading with configurable options. The huge kernel solved installation with a single monolithic kernel rather than having to ship several but its purpose in a running system has always been as a backup.

As to the question at hand, if you're using LUKS encryption then you're expected to read README_CRYPT.TXT anyway, which gives you more than enough information including how to create a satisfactory initrd. I think that file is more appropriate since it is more specific (and thus trumps the more generic README.initrd). Just my opinion though.

Yes, The README_CRYPT.TXT is excellent and your point his well taken, T3slider. However, a sentence in README.initrd would remind anyone to use the instructions in the README.CRYPT.TXT instead if they are using luks and LVM. I purposely used the mkinitrd command in README.initrid upgrading from RC2 to RC3 to see if it would break my test box which it did and to make sure I could recover from a non-bootable encrypted LVM if needed.

DNA
AKA mrascii

ReaperX7 08-29-2012 12:35 AM

Choosing a kernel was, at one time, included originally in the Slackware installation, but the scripts were removed possibly because it was confusing to do so and using the generic kernel with initrd.gz was considered a customization feature that often proved unnecessary for common systems.

Plus with the addition of rerunning LILO each time you reconfigured the kernel, you would also have to regenerate the initrd.gz with the specific modules you needed if you upgraded the kernel. Huge eliminated the need to hunt down and trial and error solve which modules were needed at load time so it became the default.

The last time I saw this was between releases 10.0 and 13.0 before EXT4 was finalized as the recommended default Slackware filesystem. Haven't seen it since.

T3slider 08-29-2012 11:50 AM

From -current's CHANGES_AND_HINTS.TXT (and as far as I know CHANGES_AND_HINTS.TXT from at least 12.0, which introduced the huge/generic split):
Code:

Use one of the provided generic kernels for daily use.  Do not report
  bugs until/unless you have reproduced them using one of the stock
  generic kernels.  You will need to create an initrd in order to boot
  the generic kernels - see /boot/README.initrd for instructions.
  The huge kernels are primarily intended as "installer" and "emergency"
  kernels in case you forget to make an initrd.

The generic kernel replaced the myriad of specific kernels shipped with pre-12.0 Slackware, and was always meant to be used as the standard kernel. Even in 12.0's CHANGES_AND_HINTS.TXT it mentions the huge kernel's use as primarily an install kernel. Huge has always been the default kernel because it requires no setup, but it has always been advised to switch to the generic kernel. An initrd should be nothing new to those using post-11.0 Slackware.

ReaperX7 08-29-2012 03:49 PM

The good thing is we do have a choice.

ottavio 08-30-2012 01:25 PM

Quote:

Originally Posted by kikinovak (Post 4765054)

If you stay with the huge kernel, just look out for "unsupported features" in your boot messages.

I am using the huge kernel but nothing here:
Code:

root@local:~# grep -i 'unsupported features' /var/log/dmesg
root@local:~# grep -i 'unsupported feature' /var/log/dmesg
root@local:~# grep -i 'unsupported' /var/log/dmesg
root@local:~#



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