aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFernando Reyes (likewhoa) <design@missionaccomplish.com>2014-05-29 10:15:13 +0200
committerRick Farina (Zero_Chaos) <zerochaos@gentoo.org>2015-04-29 13:31:45 -0400
commitf29d304e5d71f65778ea7bff7e9628851bb17ed5 (patch)
tree19e90cb80e9341d944355bd31b0ece7a4b3d315f
parentThis fixes /etc/fstab from not working while in setup_aufs function and instead (diff)
downloadgenkernel-f29d304e.tar.gz
genkernel-f29d304e.tar.bz2
genkernel-f29d304e.zip
Removing --bind on some directories to prevent ${NEW_ROOT} path
from existing in favor of --move. Got rid of the no longer required subshell call for aufs ${NEW_ROOT} overlay.
-rw-r--r--defaults/initrd.scripts11
-rw-r--r--defaults/linuxrc7
2 files changed, 6 insertions, 12 deletions
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index c76abb5..2fe540b 100644
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -1363,10 +1363,9 @@ getdvhoff() {
}
setup_squashfs_aufs() {
- (
# Setup aufs directories and vars
- local overlay=/mnt/overlay
- local static=/mnt/livecd
+ overlay=/mnt/overlay
+ static=/mnt/livecd
for i in "${overlay}" "${static}"; do
[ ! -d "${i}" ] && mkdir -p "${i}"
@@ -1381,12 +1380,6 @@ setup_squashfs_aufs() {
[ ! -d "${NEW_ROOT}${overlay}" ] && mkdir -p "${NEW_ROOT}${overlay}"
[ ! -d "${NEW_ROOT}${static}" ] && mkdir -p "${NEW_ROOT}${static}"
for i in "${overlay}" "${static}"; do mount --move "${i}" "${NEW_ROOT}${i}"; done
-
- # have handy /mnt/cdrom (CDROOT_PATH) as well
- local new_cdroot="${NEW_ROOT}${CDROOT_PATH}"
- [ ! -d "${new_cdroot}" ] && mkdir -p "${new_cdroot}"
- mount --bind "${CDROOT_PATH}" "${new_cdroot}"
- )
}
setup_unionfs() {
diff --git a/defaults/linuxrc b/defaults/linuxrc
index d5b424c..0a91c58 100644
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -995,7 +995,7 @@ then
mkdir -p /${CHROOT}/.unions/memory
mount -o move /memory /${CHROOT}/.unions/memory
test_success "Failed to move aufs /memory into the system root"
- for i in mnt/gentoo mnt/livecd ${CDROOT_PATH}
+ for i in mnt/gentoo mnt/livecd /mnt/overlay ${CDROOT_PATH}
do
mkdir -p ${CHROOT}/$i
chmod 755 ${CHROOT}/$i
@@ -1012,8 +1012,9 @@ then
warn_msg "${str}are mounted in ram"
warn_msg "consider saving important files elsewhere..."
read -t 3 UNUSEDVAL
- mount --bind ${NEW_ROOT}${CDROOT_PATH} ${CHROOT}${CDROOT_PATH}
- mount --bind ${NEW_ROOT}/mnt/livecd ${CHROOT}/mnt/livecd
+ for i in ${CDROOT_PATH} ${overlay} ${static}; do
+ mount --move ${NEW_ROOT}${i} ${CHROOT}${i}
+ done
fi
good_msg "Booting (initramfs)"