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 12-22-2016, 12:16 PM   #1
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Determine mapped name of encrypted rootpartition when generating initrd


I have installed slackware 14.2 on a fully encrypted disk and after a lot of debugging got it finally to boot. One thing is still bothering me, though. When the system boots the initrd maps the root partition to '/dev/mapper/lukssda2'. I would, however, like it to map it to something else like '/dev/mapper/cryptroot'. Is there a way to let 'mkinitrd' know which mapped name I prefer?
 
Old 12-22-2016, 12:36 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
It's not mkinitrd which determines that name "lukssda2". The choice of name occurs in the 'init' script inside the initrd.gz image. Currently there is no provision for changing that name. You will have to edit the script "/boot/initrd-tree/init" to use your own name for the mapped device (look for the variable 'CRYPTDEV'), then run "mkinitrd" to recreate the initrd.gz image file.
 
2 members found this post helpful.
Old 12-22-2016, 01:58 PM   #3
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Original Poster
Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Quote:
Originally Posted by Alien Bob View Post
You will have to edit the script "/boot/initrd-tree/init" to use your own name ...
Thanks for the response. The initrd-tree folder is (re)generated dynamically, so the changes will be gone after it is deleted. I would also have to run 'mkinitrd' twice to restore the changes.
Where is the original script actually located on the System?


EDIT:
Nevermind, I found it.

Last edited by crts; 12-22-2016 at 02:35 PM.
 
  


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
Generating /boot/initrd.img-3.13.0-53-generic was interrupted before it could finish JustAnotherHuman Linux - Newbie 4 05-22-2015 07:47 PM
Encrypted LVM process loops "already mapped or mounted", Mint 16 Cinnamon x64 RickDeckard Linux Mint 1 01-22-2014 07:30 AM
[SOLVED] I can't enter my LUKS encrypted hd after creating new initrd PreguntoYo Slackware 2 06-16-2013 06:45 AM
Encrypted LVM needs a initrd Zmyrgel Slackware 3 09-10-2006 09:46 AM
Hacking the initrd for encrypted partitions sonicbuddha Linux - Security 2 12-20-2005 08:23 PM

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

All times are GMT -5. The time now is 02:04 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
Open Source Consulting | Domain Registration