我在 %pre 部分设置了如下变量:
%pre
VOLGROUP=$(lvdisplay |grep VG | awk '{print $3}' |head -1)
vgchange -a y $VOLGROUP
ROOTVOL=$(lvdisplay |grep root | grep Path | awk '{print $3}')
HOMEVOL=$(lvdisplay |grep home | grep Path | awk '{print $3}')
SWAPVOL=$(lvdisplay |grep swap | grep Path | awk '{print $3}')
%end
Anaconda 可以访问这些变量吗?到目前为止,它们似乎被忽略了。下面是我使用它们的方法。
logvol /home --fstype="ext4" --noformat --useexisting --name="$LVHOME" --vgname="$VGNAME"
答案1
预安装环境中仅提供最常用的命令:
arping, awk, basename, bash, bunzip2, bzcat, cat, chattr, chgrp, chmod, chown, chroot, chvt, clear, cp, cpio, cut, date, dd, df, dirname, dmesg, du, e2fsck, e2label, echo, egrep, eject, env, expr, false, fdisk, fgrep, find, fsck, fsck.ext2, fsck.ext3, ftp, grep, gunzip, gzip, hdparm, head, hostname, hwclock, ifconfig, insmod, ip, ipcalc, kill, killall, less, ln, load_policy, login, losetup, ls, lsattr, lsmod, lvm, md5sum, mkdir, mke2fs, mkfs.ext2, mkfs.ext3, mknod, mkswap, mktemp, modprobe, more, mount, mt, mv, nslookup, openvt, pidof, ping, ps, pwd, readlink, rm, rmdir, rmmod, route, rpm, sed, sh, sha1sum, sleep, sort, swapoff, swapon, sync, tail, tar, tee, telnet, top, touch, true, tune2fs, umount, uniq, vconfig, vi, wc, wget, wipefs, xargs, zcat