LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-25-2018, 02:54 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
Building the initrd before installation.


Hi: in partition 3 I have Slackware, installed by the Slackware installer skipping the lilo thing. In partition 1 there is Arch Linux. Now I want to build the slackware initrd file and, in order to do so I have two options, if I don't want to repeat the install: (a) boot the installer, enter as root and try to run mkinitrd, which I think is meaningless. (b) Use arch and run mkinitrd after doing
Code:
# mount /dev/mmcblk0p3 /mnt
# chroot /mnt/root
Does any of these options make sense?

NOTE: for the curious mind: in order to boot Slackware I need first to have a generic kernel with an initrd, due to the eMMC memory device playing the part of a hard disk and tell grub 2 to act in consecuence.
 
Old 05-25-2018, 03:00 PM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104
Just follow https://www.linuxquestions.org/quest...1/#post5849509 and be creative.
 
Old 05-25-2018, 03:52 PM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Thanks a lot. That's done. Now, would you be so kind as to give me a grub stanza to put in, say /etc/grub.d/42_custom such as
Code:
echo "Adding Slackware-current." >&2
cat << EOF
menuentry "Slackware-current" {
set root=(hd0,3)
linux /mnt/boot/vmlinuz-generic root=/dev/mmcblk0p3 ro quiet splash
initrd  /mnt/boot/initrd.gz
}
EOF
I mean, I don't think this will work but is an idea. Now all that is lacking is to run grub-mkconfig but, I think, this must be run from Arch. Does the command set root=(hd0,3) tell grub to look for the grub.cfg file in the third partition? For in that case it should be the Arch partition, partition 1.

EDIT: that's a naive question for the command, executed from Arch will be
Code:
# grub-mkconfig -o /boot/grub/grub.cfg
so there can be no mistake. What the set root= command does I really don't know.

Last edited by stf92; 05-25-2018 at 04:29 PM.
 
Old 05-25-2018, 04:24 PM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,922
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Member response

Hi,


Look at; https://docs.slackware.com/start and you will find loads of helpful information. You can do a search for particular topics.

Hope this helps.
Have fun & enjoy!
 
Old 05-25-2018, 04:32 PM   #5
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Thanks, but that seems to be rather elementary, it doesn't seem to speak about grub.
 
Old 05-25-2018, 07:25 PM   #6
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,773

Rep: Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419
I'd like to know why or for what you think you need an initrd.
 
Old 05-25-2018, 07:42 PM   #7
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware
Posts: 484

Rep: Reputation: Disabled
Because grub is booting vmlinuz-generic, not vmlinuz-huge. That means, at the very least, the correct filesystem kernel module must be in the initrd, in order to mount the real, physical root partition and continue booting.
 
Old 05-26-2018, 12:28 PM   #8
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,773

Rep: Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419
Thank you, gus3, of course I do know most reasons people use initrd and the generic kernel may even be top on the list since few people bother to "roll their own" anymore like us old-timers, but my point in asking is mainly that it should be asked since simply addinf file system support is so easy and the resulting simplicity makes life a bit simpler sometimes for years through "make oldconfig" which copies any customization to any new kernel build. AFAIK the only truly compelling reason for initrd is encryption.
 
Old 05-26-2018, 05:08 PM   #9
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware
Posts: 484

Rep: Reputation: Disabled
Another compelling reason is to use less memory for the kernel, meaning more memory for user-space.

Yet another reason is less power usage for building a new kernel at every release. Granted, someone (else) spent the power to build the shipping kernel, but could you imagine the load on the grid if *everyone* built the new kernel every time Linus made an announcement? Not to mention the wear-and-tear on the CPU and the spinning platters/SD card!

Point is, stf92's reasons don't need justification. I did offer one possible reason, which is common enough that Pat allows for it in the Slackware software packages. Unseen possibilities are still possibilities.
 
Old 05-27-2018, 11:44 AM   #10
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,773

Rep: Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419
Quote:
Originally Posted by gus3 View Post
Another compelling reason is to use less memory for the kernel, meaning more memory for user-space.
Pretty sure that's a non sequitur ever since on-demand module loading was adopted.

Quote:
Originally Posted by gus3 View Post
Yet another reason is less power usage for building a new kernel at every release. Granted, someone (else) spent the power to build the shipping kernel, but could you imagine the load on the grid if *everyone* built the new kernel every time Linus made an announcement? Not to mention the wear-and-tear on the CPU and the spinning platters/SD card!
I suppose many have that illogical Update Fever, but your "well" is poisoned before the "first bucket is drawn" by inserting the caveat that people update as soon as any minor revision is created. The only truly compelling reason to update a kernel is hardware support. In my case I tend to keep any particular kernel version for many months, if not more than a year.

Quote:
Originally Posted by gus3 View Post
Point is, stf92's reasons don't need justification. I did offer one possible reason, which is common enough that Pat allows for it in the Slackware software packages. Unseen possibilities are still possibilities.
Ah now I see. You misunderstood me. Choices within an OpSys never require justification as the choice is by nature "yours". You are who must live with those choices, not me. My6 opinion is more often than not, irrelevant. My question was not even "righteous indignation" let alone any sort of attack. My purpose was twofold, to stand and be counted for maintaining simplicity and also to keep track of new changes that may change the playing field and alter my perspective, changing my behaviour. That's all.
 
Old 05-27-2018, 01:11 PM   #11
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
My reason was the following: https://www.linuxquestions.org/quest...8/#post5844823
 
Old 05-27-2018, 05:13 PM   #12
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by enorbet View Post
The only truly compelling reason to update a kernel is hardware support.
Fixing security holes isn't a truly compelling reason?
 
Old 05-28-2018, 01:37 AM   #13
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,773

Rep: Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419
Quote:
Originally Posted by stf92 View Post
Thank you. EZPZ...eMMC drives.... I see.
 
Old 05-28-2018, 01:39 AM   #14
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,773

Rep: Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419Reputation: 4419
Quote:
Originally Posted by Richard Cranium View Post
Fixing security holes isn't a truly compelling reason?
I see little occurrence of needing to scrap an entire kernel version for a new one when patching is both sufficient and common.
 
Old 05-28-2018, 06:46 AM   #15
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware
Posts: 484

Rep: Reputation: Disabled
Quote:
Originally Posted by enorbet View Post
I see little occurrence of needing to scrap an entire kernel version for a new one when patching is both sufficient and common.
Meltdown and Spectre would disagree.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Speed up dracut building CentOS 6.5 initrd in qemu64 paulfurtado Linux - Virtualization and Cloud 1 12-17-2014 08:24 PM
Building initrd.img with dracut-network dazdaz Linux - Networking 0 01-18-2013 10:44 AM
initrd issue, building new kernel jcas1411 Slackware 7 12-03-2010 08:33 PM
Building an initrd - how to find correct module name? Yalla-One Slackware 7 06-13-2009 03:28 PM
Necessity of initrd in building a kernel? Erik_the_Red Linux - Newbie 3 08-13-2005 08:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

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