Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 26th May 2012, 04:14 PM
osce0 Offline
Registered User
 
Join Date: May 2011
Posts: 34
linuxfirefox
custom systemd targets and grub2 menu

Ok, I'm in the process of moving to Fedora 17 from Fedora 14. That means converting my custom setup of SysV/init+grub to systemd+grub2. And I have two questions.

1. If I create a custom systemd target, is there a way to tell systemctl to disable services only for that custom target? I couldn't find in the man page how to specify that. It looks like most services are already tied to an existing target like multi-user, so any changes (enable/disable) affect both the multi-user target and all targets that depend on it. I can't seem to tell to disable or exclude one service just for the custom target. Unless I create another separate copy of multi-user and other depending targets and manually modify them, which I would like to avoid doing.

2. If I want to create two separate menu entries in grub2 for each kernel versions (for running different custom systemd targets), is this going to involve learning the internals of grub2 scripts and writing a custom script? Or is there an easier way of justing editing some configuration file?

I don't mind doing the learning and script writing. I just want to know if there is a simpler alternative before I undertake this conversion effort.
Reply With Quote
  #2  
Old 31st May 2012, 05:02 AM
osce0 Offline
Registered User
 
Join Date: May 2011
Posts: 34
linuxfirefox
Re: custom systemd targets and grub2 menu

I guess from no response, my guess was correct: I have to invest some time to learn grub2 script, and understand the hierarchical structure of systemd. Marking solved since it is not a problem, I just need to invest time to learn.
Reply With Quote
  #3  
Old 31st May 2012, 09:33 AM
stevea's Avatar
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,304
linuxfirefox
Re: custom systemd targets and grub2 menu

How do you intend to manage the systemd targets from grub2 ?

FWIW grub2 seems pretty direct and straightforward from my hacking. I doubt it will ne a big learning curve.

systemd is a different story. The motivation for it's design is obtuse. The implementation of targets & servies, even in F16 is certainly imperfect ('feels' somewhat better in F17). The utility documentation is not sufficient, Lenart Poeterings blog paper are pretty useful.

Note that you can use your legacy /etc/init.d inisrcript with systemd. So you can switch first and play with systemd later.
I
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
Reply With Quote
  #4  
Old 5th June 2012, 04:34 PM
osce0 Offline
Registered User
 
Join Date: May 2011
Posts: 34
linuxfirefox
Re: custom systemd targets and grub2 menu

Thank you for the info, stevea. I'm still learning the systemd to see if I can create a custom target that I can switch back and forth.

So far, it was a miserable experience. I spent 4 days on it and can't find a solution.

Here are some basic steps that I did:
1. Copy everything in /etc/systemd/system/multi-user.target.wants to /etc/systemd/system/custom.target.wants
2. Copy /usr/lib/systemd/system/multi-user.target to /etc/systemd/system/custom.target and just change one line: Description=Custom

I thought this was enough to start, but no way. When I enter the boot parameter in grub2 as systemd.unit=custom.target and reboot, it behaves differently:

The virtual console will not come up until I ssh into the machine remotely.

I was hoping to have a custom target with wired network off and wireless on for road warrior mode, which I had it working in previous Fedora by using sysv init level 2.

Going back to init.d initscript as you suggest.

---------- Post added at 08:24 AM ---------- Previous post was at 08:14 AM ----------

Hmm, after reading my post, I finally realized that multi-user.target.wants has services in /usr/lib/systemd in addition to /etc/systemd. Guess I'll have to hack away for a few more days.

---------- Post added at 08:34 AM ---------- Previous post was at 08:24 AM ----------

Phew, that solved it. So I had to check both /etc/systemd/system/multi-user and /usr/lib/systemd/system/multi-user to see if any service needs to be copied to custom.target.
Reply With Quote
Reply

Tags
custom, grub2, menu, systemd, targets

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub2 boot menu F/16 KDE rich52 Using Fedora 2 8th February 2013 04:48 AM
How do i remove the default GRUB2 menu entry for Windows? Browser Using Fedora 3 21st March 2012 09:32 AM
grub2 finds other os but doesn't add to menu. fedvasu Hardware & Laptops 6 22nd February 2012 05:09 PM
Grub2: Menuentries in grub.cfg, but not on boot menu Mack Using Fedora 0 16th December 2011 04:10 AM
emergency vs rescue systemd targets chrismurphy Using Fedora 1 15th October 2011 03:10 PM


Current GMT-time: 05:45 (Sunday, 26-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat