You are not logged in.

#1 2006-03-01 20:31:11

nogoma
Member
From: Cranston, RI
Registered: 2006-03-01
Posts: 217

Small mkinitramfs patch

I'm not really sure where the right place to post this sort of stuff is, but here's a small patch that fixes two issues I had with mkinitramfs (1.2-2). First, there was a simple punctuation error that caused the generated mkinitramfs to fail with LVM root; the other is a reordering of the "do_resume" line, so suspend2 can work with swap-on-lvm.

--- mkinitramfs.orig    2006-03-01 15:20:06.000000000 -0500
+++ /sbin/mkinitramfs   2006-02-28 21:15:29.000000000 -0500
@@ -728,8 +728,6 @@
                echo "insmod /lib/$module.$EXTENSION > /dev/null 2>&1" >> $LINUXRC
        }
 done
-echo "echo > /proc/suspend2/do_resume" >> $LINUXRC
-
 if ! [ "$REMOVE_USB" == "1" ]; then
        echo 'echo "Loading USB Subsystem..."' >> $LINUXRC
        echo "echo "    (waiting $USB_TIMEOUT seconds for devices to settle)"" >>$LINUXRC
@@ -766,7 +764,7 @@
 if [ "$LVM_ROOT" -a "$HAVE_LVM" = "1" ]; then
     echo 'echo "Scanning logical volumes..."' >>$LINUXRC
     echo "lvm vgscan --ignorelockingfailure" >>$LINUXRC
-    echo 'echo Activating logical volumes..."' >>$LINUXRC
+    echo 'echo "Activating logical volumes..."' >>$LINUXRC
     echo "lvm vgchange --ignorelockingfailure -ay" >>$LINUXRC
     echo "ROOT_DEV=$ROOT_DEVICE" >>$LINUXRC
 else
@@ -775,6 +773,8 @@
     echo "mkrootdev /dev/root" >>$LINUXRC
 fi

+echo "echo > /proc/suspend2/do_resume" >> $LINUXRC
+
 echo "echo 0x0100 > /proc/sys/kernel/real-root-dev" >>$LINUXRC
 if [ "$HAVE_FSCK" = "1" ]; then
        echo "mount -t `/bin/fsck -NT $ROOT_DEV | awk -Ffsck. '{print $2}' | awk '{print $1}'` -n -o ro $ROOT_DEV /new_root" >>$LINUXRC

-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/

Offline

#2 2006-03-01 21:18:19

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Small mkinitramfs patch

Nice work. mkinitramfs is maintained by iphitus in the [community] repo, so it would be best to put this in a comment there - although he probably will see this anyway.

Offline

#3 2006-03-01 22:53:46

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Small mkinitramfs patch

thanks, ill include the patch for the update im releasing on friday when i move mkinitramfs to extra.

iphitus

Offline

#4 2006-03-04 04:47:06

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Small mkinitramfs patch

errr, forgot to add it. will add a bit later when I get home smile

Offline

Board footer

Powered by FluxBB