[augeas-devel] cross-device symlinks and grub.conf

Chad Huneycutt chad.huneycutt at gmail.com
Tue Jul 28 02:19:32 UTC 2009


If I am not mistaken, augtool is complaining when trying to save
grub.conf, because it is a symlink to another filesystem
(/boot/grub/grub.conf). What is the appropriate way to deal with this?

This is on RHEL5:

[root at warp3 etc]# ls -l /etc/grub.conf
lrwxrwxrwx 1 root root 22 Jul 27 22:16 /etc/grub.conf -> ../boot/grub/grub.conf
[root at warp3 etc]# ls -l /boot/grub/grub.conf
-rw------- 1 root root 888 Jul 27 21:48 /boot/grub/grub.conf
[root at warp3 etc]# augtool
augtool> print /files/etc/grub.conf/
/files/etc/grub.conf
/files/etc/grub.conf/#comment[1] = "grub.conf generated by anaconda"
/files/etc/grub.conf/#comment[2] = "Note that you do not have to rerun
grub after making changes to this file"
/files/etc/grub.conf/#comment[3] = "NOTICE:  You have a /boot
partition.  This means that"
/files/etc/grub.conf/#comment[4] = "all kernel and initrd paths are
relative to /boot/, eg."
/files/etc/grub.conf/#comment[5] = "root (hd0,0)"
/files/etc/grub.conf/#comment[6] = "kernel /vmlinuz-version ro
root=/dev/vg1/root"
/files/etc/grub.conf/#comment[7] = "initrd /initrd-version.img"
/files/etc/grub.conf/#comment[8] = "boot=/dev/sda"
/files/etc/grub.conf/default = "0"
/files/etc/grub.conf/timeout = "5"
/files/etc/grub.conf/splashimage = "(hd0,0)/grub/splash.xpm.gz"
/files/etc/grub.conf/hiddenmenu
/files/etc/grub.conf/title[1] = "Red Hat Enterprise Linux Server
(2.6.18-128.2.1.el5xen)"
/files/etc/grub.conf/title[1]/root = "(hd0,0)"
/files/etc/grub.conf/title[1]/kernel = "/xen.gz-2.6.18-128.2.1.el5"
/files/etc/grub.conf/title[1]/module[1] = "/vmlinuz-2.6.18-128.2.1.el5xen"
/files/etc/grub.conf/title[1]/module[1]/ro
/files/etc/grub.conf/title[1]/module[1]/root = "/dev/vg1/root"
/files/etc/grub.conf/title[1]/module[1]/rhgb
/files/etc/grub.conf/title[1]/module[1]/quiet
/files/etc/grub.conf/title[1]/module[2] = "/initrd-2.6.18-128.2.1.el5xen.img"
/files/etc/grub.conf/title[2] = "Red Hat Enterprise Linux Server
(2.6.18-128.el5xen)"
/files/etc/grub.conf/title[2]/root = "(hd0,0)"
/files/etc/grub.conf/title[2]/kernel = "/xen.gz-2.6.18-128.el5"
/files/etc/grub.conf/title[2]/kernel/dom0_mem = "1024M"
/files/etc/grub.conf/title[2]/module[1] = "/vmlinuz-2.6.18-128.el5xen"
/files/etc/grub.conf/title[2]/module[1]/ro
/files/etc/grub.conf/title[2]/module[1]/root = "/dev/vg1/root"
/files/etc/grub.conf/title[2]/module[1]/rhgb
/files/etc/grub.conf/title[2]/module[1]/quiet
/files/etc/grub.conf/title[2]/module[2] = "/initrd-2.6.18-128.el5xen.img"
augtool> set /files/etc/grub.conf/title[1]/kernel/dom0_mem 1024M
augtool> save
Saving failed
augtool> print /augeas/files/etc/grub.conf/error/
/augeas/files/etc/grub.conf/error = "rename_augnew"
/augeas/files/etc/grub.conf/error/message = "Invalid cross-device link"

-- 
Chad M. Huneycutt




More information about the augeas-devel mailing list