bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #32931] LVM write support, patch included


From: Valentin Hilbig
Subject: [bug #32931] LVM write support, patch included
Date: Sun, 27 Mar 2011 22:16:45 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16

URL:
  <http://savannah.gnu.org/bugs/?32931>

                 Summary: LVM write support, patch included
                 Project: GNU GRUB
            Submitted by: tino
            Submitted on: So 27 Mär 2011 22:16:44 GMT
                Category: Disk &amp; Partition
                Severity: Major
                Priority: 5 - Normal
              Item Group: Feature Request
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 
                 Release: 1.98
         Reproducibility: Every Time
         Planned Release: None

    _______________________________________________________

Details:

Here is a patch for grub_lvm_write() based on grub_lvm_read() to add write
support on LVM.  This makes save_env and GRUB_DEFAULT=saved work as expected
for LVM volumes on GNU/Linux, too.

This also should fix
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/625234

Hope I did not mess too much with your coding standards.
Note that the diff is against Debian Squeeze i386 version of GRUB
(1.98.something).
lvm.mod increases by 332 bytes, it was tested to work with Squeeze, as
follows:

apt-get source grub2
cd grub2-*/
patch -p1 <../lvm-write.patch
mkdir OBJ
cd OBJ
../configure
make -kj2
# ignore the zfs.c error note, hence the -k
sudo cp --backup=t lvm.mod /usr/lib/grub/i386-pc/lvm.mod
sudo grub-install --no-floppy /dev/sdYOURDRIVE

The patch applies (with offset -1) against the current trunk as well, but I
did not test the result:

bzr branch bzr://bzr.savannah.gnu.org/grub/trunk/grub
cd grub/grub-core
patch -p1 <../../lvm-write.patch
cd ..
./autogen.sh
mkdir OBJ
cd OBJ
../configure
make -j2
ls -al grub-core/lvm.mod /usr/lib/grub/i386-pc/lvm.mod

Example use (GRUB 1.98):

Boot into GRUB
c
# next 2 lines are redundant if you already use lvm in core.img
insmod lvm
set prefix=(VGNAME-boot)/grub
set debug=lvm
list_env
load_env
set saved_entry=2
save_env saved_entry
set debug=
list_env
reboot




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: So 27 Mär 2011 22:16:44 GMT  Name: lvm-write.patch  Size: 3kB   By:
tino

<http://savannah.gnu.org/bugs/download.php?file_id=23031>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?32931>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]