LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices


Reply
  Search this Thread
Old 06-18-2015, 12:13 PM   #1
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
Problems with /home mount on a btrfs subvolume - systemd


Hello Guys;

I have been trying for the last day or so to get this working on my gentoo system.

I am currently using systemd as the runtime init system. My system has an encrypted root and home partitions that are sitting on a btrfs file system as subvolumes. In order to get this working I had to create a custom initramfs image. I attempted to use dracut but it simply hangs at boot and never prompts for the password.

The system will with my current initram mount root just fine however when I try and set my /home as auto mount systemd will try and start the dev-map-rootpool.device and fail. It fails because cryptsetup has already created the correct devices in /dev/mapper for the btrfs file system. Because / and /home are on the same physical device /dev/mapper/rootpool, and my initram does not include systemd the device is seen as down.

So my question is if there is a way to setup my init in my intramfs to pass on notification to systemd that the device is up? I have tried to move /dev and /proc and even /sys to the running system from the startup environment but to no avail.

I am also unable to just mount /home in the initram as when systemd starts it will see that home.device is attached to a down device and then unmount it.... This also goes for trying to make a custom .start file in /etc/local.d.

I would rather not try and embed systemd into my initramfs as doing so I am sure is painful in the small startup environment but I fear this is the only option. I have looked around online extensively and cant find good info on how to accomplish this the only info I can find is from freedesktop which simply states to imbed systemd into your initram.
 
Old 06-19-2015, 11:19 AM   #2
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Original Poster
Rep: Reputation: 87
I have actually solved this problem. I used dracut to make me a initramfs image and then decompressed the archive into a dir. I then checked for all the files it would need in the image and noticed that it was failing to include my crypttab file. I then manually added the file back in recreated the image using my own script.


Now I am prompted for my password on boot and everything works as intended.

I am still curious however if there is a way to inform systemd in some way that /dev/mapper devices are actually available when they are booted with a custom initramfs. I don't relish the idea of having a complicated initramfs that requires systemd to be imbeded.
 
  


Reply



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
install with BTRFS: subvolume/partition scheme? horizonbrave Linux - Newbie 5 01-05-2015 08:35 AM
[SOLVED] Btrfs: Moving a large chuck of data from filesystem to subvolume vinbob Linux - Software 1 09-18-2014 04:42 AM
Home server. btrfs or LVM with ext4? martdj Linux - Server 6 01-18-2014 03:41 PM
[SOLVED] Timeout of mount /home directory during boot (systemd and sysvinit) JZL240I-U Linux - Software 3 12-22-2011 11:02 AM
btrfs subvolume quota phil.d.g Linux - Software 0 08-29-2011 12:18 AM

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

All times are GMT -5. The time now is 10:26 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