aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2021-02-04 04:28:37 +0100
committerSven Gothel <[email protected]>2021-02-04 04:28:37 +0100
commit468f4322f17467f0d373fe78e944f394153f8170 (patch)
treece5bd1a51e4db1a3825849a999cdb174383ae1c3
parent6740c3582adaf3c382f639efa5e6ec155bed9acb (diff)
parentbc5a1c11e6cafaf56aa2d0b78d46b3c0f2d02fed (diff)
Merge branch 'master' into zfs-linux-2.0.2zfs-linux-2.0.2
-rw-r--r--scripts/deblive01-redo.sh26
-rw-r--r--scripts/deblive03.sh4
-rw-r--r--scripts/debootstrap01.sh2
-rw-r--r--scripts/debootstrap03.sh7
4 files changed, 33 insertions, 6 deletions
diff --git a/scripts/deblive01-redo.sh b/scripts/deblive01-redo.sh
new file mode 100644
index 0000000..1174c7e
--- /dev/null
+++ b/scripts/deblive01-redo.sh
@@ -0,0 +1,26 @@
+#! /bin/sh
+
+. ./settings00.sh
+
+mount --rbind /dev $LIVECHROOT/dev
+mount --rbind /proc $LIVECHROOT/proc
+mount --rbind /sys $LIVECHROOT/sys
+mount --make-rslave $LIVECHROOT/dev
+mount --make-rslave $LIVECHROOT/proc
+mount --make-rslave $LIVECHROOT/sys
+echo "Later we will unmount this via"
+echo umount -R $LIVECHROOT/dev
+echo umount -R $LIVECHROOT/proc
+echo umount -R $LIVECHROOT/sys
+echo "cat /proc/mounts | awk '{print \$2}' | grep "^$LIVECHROOT" | sort -r | xargs umount"
+
+mkdir -p $LIVECHROOT/root/debian-zfs-live
+cp -a ../* $LIVECHROOT/root/debian-zfs-live
+
+mkdir -p $LIVECHROOT/root/debian
+if [ -e ../../debian/packages ] ; then
+ cp -a ../../debian/packages $LIVECHROOT/root/debian/
+fi
+
+echo "YOU MAY POPULATE FS WITH SOME ADDITIONAL DATA NOW"
+echo to continue the process with deblive03.sh
diff --git a/scripts/deblive03.sh b/scripts/deblive03.sh
index 95df72f..285a800 100644
--- a/scripts/deblive03.sh
+++ b/scripts/deblive03.sh
@@ -3,8 +3,8 @@
. ./settings00.sh
# Update ownership if populated with data
-/usr/sbin/chroot $LIVECHROOT /bin/chown -R root:root /root
-/usr/sbin/chroot $LIVECHROOT /bin/chown -R $MYUSERNAME:$MYUSERNAME /home/$LOCALUSERNAME
+/usr/sbin/chroot $LIVECHROOT /bin/chown -R root:root /root
+/usr/sbin/chroot $LIVECHROOT /bin/chown -R $LOCALUSERNAME:$LOCALUSERNAME /home/$LOCALUSERNAME
#umount -R $LIVECHROOT/dev
#umount -R $LIVECHROOT/proc
diff --git a/scripts/debootstrap01.sh b/scripts/debootstrap01.sh
index fd01277..9c33ebe 100644
--- a/scripts/debootstrap01.sh
+++ b/scripts/debootstrap01.sh
@@ -75,8 +75,6 @@ cp -a /home/$IMPORTUSERNAME/.ssh/authorized_keys $STRAPROOT/root/.ssh/
cp -a /home/$IMPORTUSERNAME/.vimrc $STRAPROOT/root/
cp -a /home/$IMPORTUSERNAME/.exrc $STRAPROOT/root/
-cp -a /home/$IMPORTUSERNAME $STRAPROOT/home/$LOCALUSERNAME
-
echo RUN: chroot $STRAPROOT /bin/bash --login
echo then: cd /root/debian-zfs-live/scripts
echo to continue the process with debootstrap02.sh etc
diff --git a/scripts/debootstrap03.sh b/scripts/debootstrap03.sh
index 689580c..de5922f 100644
--- a/scripts/debootstrap03.sh
+++ b/scripts/debootstrap03.sh
@@ -2,9 +2,12 @@
. ./settings00.sh
+cp -a /home/$IMPORTUSERNAME/.[a-zA-Z0-9]* $STRAPROOT/home/$LOCALUSERNAME/
+cp -a /home/$IMPORTUSERNAME/* $STRAPROOT/home/$LOCALUSERNAME/
+
# Update ownership if populated with data
-/usr/sbin/chroot $STRAPROOT /bin/chown -R root:root /root
-/usr/sbin/chroot $STRAPROOT /bin/chown -R $MYUSERNAME:$MYUSERNAME /home/$LOCALUSERNAME
+/usr/sbin/chroot $STRAPROOT /bin/chown -R root:root /root
+/usr/sbin/chroot $STRAPROOT /bin/chown -R $LOCALUSERNAME:$LOCALUSERNAME /home/$LOCALUSERNAME
#umount -R $STRAPROOT/dev
#umount -R $STRAPROOT/proc