initramfs support

Alexander E. Patrakov patrakov at ums.usu.ru
Thu Jul 5 18:38:44 PDT 2007


Bryan Kadzban wrote:

> Is there any downside that you know of if they don't get deactivated?
> If not, it's simpler to leave them up.

I don't know the downside.

>> Things become a bit more complicated if there is no /boot partition.
> 
> I'd be happy with requiring a /boot partition, but I'm not sure about
> the users.  For the first version, anyway (or until grub supports LVM,
> if it ever will).

This change belongs to the book, not to the initramfs setup. I guess that 
the existing script will just work if you install LILO.

>> BTW, "LVM on /dev/mapper/hpt*" is also a valid setup - please make
>> sure that it works with your initramfs.
> 
> Yep, that works.  :-)

Congratulations :)

> I assume dmraid-on-LVM won't work

Correct, this setup is not valid.

> I assume I'll need some kind of userspace tools to actually suspend a
> qemu virtual machine, to test it?  And I assume I'll need some kind of
> swap space to suspend to?  LVM swap over dmraid is probably the most
> complicated setup, but I bet the initramfs will handle this already.
> 
> Well, wait, no it won't -- it'll need stat from the host to get the
> major and minor number out of the device file (or symlink).  That's a
> fairly easy change to mkinitramfs.in though.  Let me know how you'd want
> to test it.

Install the "hibernate-script" package, version 1.91 (version 1.93 has a 
bug, and I have not tested any later versions): 
http://at-mirror.suspend2.net/downloads/all/hibernate-script-1.91.tar.gz

You will need this patch: 
http://wiki.linuxfromscratch.org/livecd/browser/trunk/packages/hibernate-script/hibernate-script-1.91-lfs-3.patch?format=txt

The installation procedure is:

rm -rf /etc/hibernate
patch -Np1 -i ../hibernate-script-1.91-lfs-3.patch
yes | PREFIX=/usr MAN_DIR=/usr/share/man ./install.sh

The actual setup is:

1) Add "resume=/dev/myvg/swap" to the kernel arguments in menu.lst
2) Make sure that /dev/myvg/swap is mentioned as swap space in /etc/fstab
3) Run "hibernate" and boot again.

If step 3 fails with "acpi_pm_prepare does not support 4" in dmesg, run 
"echo shutdown >/sys/power/disk" and retry.

-- 
Alexander E. Patrakov



More information about the lfs-dev mailing list