Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Making an initrd for suspend2?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
ttuttle
Tux's lil' helper
Tux's lil' helper


Joined: 03 Oct 2004
Posts: 131

PostPosted: Mon Jun 27, 2005 2:27 pm    Post subject: Making an initrd for suspend2? Reply with quote

The latest version of Software Suspend 2 has removed the text-mode user interface. It has been replaced/ported to the UserUI system, which uses a usermode binary to show a user interface. Unfortunately, because the code for the interface is on disk in a binary instead of in the kernel, it is impossible to get a "pretty" interface for most of the resume process. The only way to do it is with an initrd.

Currently I don't have an initrd, since I run vanilla-sources (patched with suspend2, of course) and have a relatively normal (no encryption, loopback, RAID, LVM2, EVMS, etc... although I might eventually try LVM2) disk/partition setup. I know genkernel can make one, but I presume it is tailored to the genkernel/livecd approach to hardware detection, which would be redundant with a hand-built kernel.

So my question is, what are the responsibilities of an initrd? If I have one, is it enough just to do the suspend2 things I need to do (set up the interface, echo > /proc/software_suspend/do_resume, etc...), or does it become responsible for mounting disks as well?

Sorry to ask this, because I know it should be clear, but every tutorial/HOWTO on initrd's is about how to update/enhance one distro's initrd to add a feature. I just want to know what the minimum required to make one is. Alternatively, is there a Gentoo Official Developer-Sanctioned Policy (TM) [1] about how to make an initrd and what it should contain?

[1] Note the subtle hint of sarcasm here. This is mostly due to the fact that gentoo-sources, an otherwise wonderful patchset, doesn't include suspend2. I know why, and it's a good reason, but I wish it included it, because it includes tons of other great stuff and would make my life easier and less deviant from how Gentoo does things.
Back to top
View user's profile Send private message
alkan
Guru
Guru


Joined: 06 Aug 2004
Posts: 385
Location: kasimlar yaylasi

PostPosted: Mon Jun 27, 2005 7:41 pm    Post subject: Reply with quote

I don't know what suspend2 should do in initrd, but if you have one, it does what ever you want it do. It can be just suspend2 stuff. You can tailor it to your needs. distributions usally use initrd to detect hardware, to load modules, etc. There is a nice documentation about how to make one and how it works in the kernel source tree.

Basically there is this /linuxrc script that executes the tasks you want, You should only put binaries and libraries that you use in the linuxrc into initrd to keep it small.
Back to top
View user's profile Send private message
dadodrake
n00b
n00b


Joined: 19 Mar 2005
Posts: 55
Location: Slovakia

PostPosted: Sat Jul 02, 2005 11:17 pm    Post subject: Reply with quote

I'm looking for a good initrd for suspend2 too. I'm too lazy to write my own, cause I can live without userui.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum