LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-21-2019, 07:29 AM   #16
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,192

Rep: Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853Reputation: 1853

Quote:
i canrt find any logs... does te mkinitrd generator log anywhere/?
Try 'cat /boot/initrd-tree/command_line' to show the last command used to build the initrd.

This has been in -current since Tue Oct 10 18:08:31 UTC 2017.

Last edited by allend; 01-21-2019 at 08:05 AM.
 
Old 01-21-2019, 08:42 AM   #17
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 7,531

Rep: Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887
Quote:
Originally Posted by business_kid View Post
If you're on Slackware, ignore that and simply run (as root)
Code:
# /sbin/mkinitrd  -c -f <your root filesystem> -r <root device>
You might want to add -m <modules> but this in mounted on /. Itonly has to get your root filesystem loaded and mounted on /, at which point it's overwritten by the root filesystem, and vanishes. You don't need the kitchen sink in it.
I think it's you who ignored information.
Quote:
Originally Posted by wigums View Post
fresh current install with lvm/luks
Your own trivial mkinitrd command will only work for trivial installs. It won't result in a useful commandline for a LUKS/LVM configuration.
 
Old 01-21-2019, 10:04 AM   #18
wigums
Member
 
Registered: Oct 2013
Location: Detroit
Distribution: slackware and raspbian
Posts: 73

Original Poster
Rep: Reputation: Disabled
here are the asked for results of mkinitrd generator vs the interactive mkinitrd

NOT INTERACTIVE
mkinitrd -c -k 4.19.16 -f ext4 -r /dev/cryptvg/root -C /dev/sda2 -L -u -o /boot/initrd.gz


INTERACTIVE
mkinitrd -c -k 4.19.16 -f ext4 -r /dev/cryptvg/root -m xhci-pcihci-pci:ehci-pci:xhci-hcd:uhci-hcd:ehci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-asus:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:crc32c-intel:ext4 -C /dev/sda2 -L -u -o /boot/initrd.gz

Last edited by wigums; 01-21-2019 at 10:19 AM.
 
Old 01-22-2019, 04:12 AM   #19
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 10,124

Rep: Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111
I don't know why it has all that usb stuff. You don'y need any of it to mount /.

What's the errors? Why doesn't it work?
 
Old 01-22-2019, 04:30 AM   #20
wigums
Member
 
Registered: Oct 2013
Location: Detroit
Distribution: slackware and raspbian
Posts: 73

Original Poster
Rep: Reputation: Disabled
if i knew why it didnt work id fix it. all i know is the non interactive command doesnt produce a working initrd while the interactive command does create a working initrd
 
Old 01-22-2019, 04:32 AM   #21
wigums
Member
 
Registered: Oct 2013
Location: Detroit
Distribution: slackware and raspbian
Posts: 73

Original Poster
Rep: Reputation: Disabled
alienBOB do what?!?!

Quote:
Your own trivial mkinitrd command will only work for trivial installs. It won't result in a useful commandline for a LUKS/LVM configuration.
i dont use my own command. i use the generator. i think you dont understand my problem
 
Old 01-22-2019, 07:47 AM   #22
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 7,531

Rep: Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887
Quote:
Originally Posted by wigums View Post
alienBOB do what?!?!



i dont use my own command. i use the generator. i think you dont understand my problem
Nah, that was not meant as a comment to you. It was meant for business_kid who showed a trivial mkinitrd command that will not work for your LUKS/LVM setup.
 
Old 01-22-2019, 08:36 AM   #23
_peter
Member
 
Registered: Sep 2014
Distribution: slackware
Posts: 39

Rep: Reputation: Disabled
Quote:
Originally Posted by wigums View Post
re: the command the interactive output theres no was i can remember it. it was 3 full screen lines
(thats adds up to a string approx 69" long LOL)
always have had long strings upon failed boot with fresh /boot/initrd.gz when i forgot to re-run lilo or made mistakes with its configuration

LVM/LUKS, probably not running lilo, are you ?

as said by business_kid, the usb stuff, try disconnecting anything non-native to your hardware before booting & re-running the below

Code:
/usr/share/mkinitrd/mkinitrd_command_generator.sh
 
Old 01-22-2019, 08:50 AM   #24
GazL
LQ Guru
 
Registered: May 2008
Posts: 5,003
Blog Entries: 16

Rep: Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601
Quote:
Originally Posted by wigums View Post
if i knew why it didnt work id fix it. all i know is the non interactive command doesnt produce a working initrd while the interactive command does create a working initrd
Well, from a cursory glance, your "non-interactive" command is missing at least '-m ext4' which will be required when using the slackware 'generic' kernel.


BTW, '-u' is unnecessary. It's been the default for quite a while.

Last edited by GazL; 01-22-2019 at 08:52 AM.
 
Old 01-22-2019, 12:43 PM   #25
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 7,531

Rep: Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887
Let's take a step back.

You do realize that you need to run the command inside chrooted Slackware installation, right? If you run the generator command in the Slackware installer environment, you will not get the correct results.

I tried my own machine for fun. This is what the non-interactive command returns:
Code:
root@hogan:/# /usr/share/mkinitrd/mkinitrd_command_generator.sh  
#
# mkinitrd_command_generator.sh revision 1.45
#
# This script will now make a recommendation about the command to use
# in case you require an initrd image to boot a kernel that does not
# have support for your storage or root filesystem built in
# (such as the Slackware 'generic' kernels').
# A suitable 'mkinitrd' command will be:

mkinitrd -c -k 4.19.2 -f ext4 -r /dev/nvme0n1p7 -m usb-storage:xhci-hcd:xhci-pci:ohci-pci:ehci-pci:uhci-hcd:ehci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:crc32c-intel:ext4 -u -o /boot/initrd.gz
You notice that this non-interactive comandline lists a lot of kernel modules (the "-m" parameter). It is a Slackware 14.2 machine with a custom kernel, additional USB storage attached and the root partition is a ext4 filesystem on a NVMe drive.
I used this exact output to generate the initrd and my computer boots just fine.
 
1 members found this post helpful.
Old 01-22-2019, 03:17 PM   #26
philanc
Member
 
Registered: Jan 2011
Posts: 193

Rep: Reputation: 152Reputation: 152
Quote:
Originally Posted by business_kid View Post
I don't know why it has all that usb stuff. You don'y need any of it to mount /
@business_kid: Yes the USB stuff is needed because a keyboard is needed to read the cryptsetup/LUKS password, and the PC may have only a USB keyboard.
 
Old 01-22-2019, 05:14 PM   #27
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 10,124

Rep: Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111Reputation: 1111
Quote:
Originally Posted by philanc View Post
@business_kid: Yes the USB stuff is needed because a keyboard is needed to read the cryptsetup/LUKS password, and the PC may have only a USB keyboard.
Well, if his hd is encrypted, then I suppose it is needed. I wasn't aware it was added by default.
 
Old 01-22-2019, 06:54 PM   #28
wigums
Member
 
Registered: Oct 2013
Location: Detroit
Distribution: slackware and raspbian
Posts: 73

Original Poster
Rep: Reputation: Disabled
i wrote this.... tell me its wrong

https://slackwiki.com/LVM/Luks_Encryption

Last edited by wigums; 01-22-2019 at 07:48 PM.
 
Old 01-22-2019, 11:24 PM   #29
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 3,282

Rep: Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643
Quote:
Originally Posted by wigums View Post
i wrote this.... tell me its wrong

https://slackwiki.com/LVM/Luks_Encryption
I haven't tried what you wrote, but it looks correct to me. I've used LVM and LUKS on both of my laptops (down to one laptop after I dropped one and broke the screen). Encrypting the PV is the way to go, IMO.
 
Old 01-23-2019, 04:15 PM   #30
wigums
Member
 
Registered: Oct 2013
Location: Detroit
Distribution: slackware and raspbian
Posts: 73

Original Poster
Rep: Reputation: Disabled
point being is that i know how to do it and im getting crap commands from the generator.
im over it. i can get a valid command from the interactive generator. youd think id know better than to ask slackers for help with slackware by now
 
  


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
sudo mkinitrd -o /boot/initrd.img-2.6.32.9 2.6.32.9 sudo: mkinitrd: command not foun vishwas181 Linux - Newbie 1 02-27-2010 01:16 AM
mkinitrd and root=LABEL not working slackuser46 Slackware 61 12-08-2008 02:35 AM
mkinitrd not working cobweb Linux - Newbie 1 02-22-2006 02:45 PM
Why 'mkinitrd' not working? chandrakanta Linux - Software 1 09-08-2004 10:54 AM

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

All times are GMT -5. The time now is 12:56 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration