[mythtv-users] Quick-boot linux?

Yan Seiner yan at seiner.com
Tue Feb 19 13:58:24 UTC 2008


Ronald Frazier wrote:
>> Set up a tmpfs, populate it with sg_reset and libc6, and invoke it from
>> ususpend-ram.conf
>>
>> OnResume 99 LD_LIBRARY_PATH=/mnt/tmpfs /mnt/tmpfs/sg_reset -b /dev/sda
>>
>> Works like a charm.  Full start in ~15 seconds, of which 5 or so is SCSI
>> related.
>>     
>
> I'm glad you got it working.  I was wondering about doing that a few
> weeks ago, but never took the effort to try it. Now I wonder if I
> could do the same for my network card (to avoid having to use the PCI
> one). I'd have to "modprobe - r" the forcedeth driver and then
> "modprobe" it after wakeup.



You might want to move it into some part of the tree in 
/lib/modules/kernel# .  You can make up a directory name and stick it in 
there.

Then you can depmod -a to build the dependency list.

And then in your hibernate script, you can use UnloadModules.

This is my whole script for suspending the machine:

USuspendRamForce yes
OnSuspend 01 /etc/init.d/gdm stop
OnSuspend 01 /usr/local/bin/poptmpfs  <- populates tmpfs with sg_reset 
and libc6
OnSuspend 02 sleep 4 <- give enough time for gdm+X to shut down
UnloadModules nvidia
LoadModules auto <- load whatever modules we removed on hibernate
OnResume 99 LD_LIBRARY_PATH=/mnt/tmpfs /mnt/tmpfs/sg_reset -b /dev/sda
OnResume 02 /etc/init.d/acpid restart <- for some reason acpid won't 
restart by itself
OnResume 01 /etc/init.d/gdm restart <- and restart myth


>  How do you find out what libraries
> something depends on. 
man ldd

> Also, any idea how you modprobe a driver from an
> arbitrary path? I thought I tried that once and it wouldn't work
> unless it was under /lib/modules.
>   

insmod /path/to/module.ko

I'm not sure if modprobe allows an absolute path.

--Yan


More information about the mythtv-users mailing list