src/share/examples/rconfig/hammer.sh does not create a usable system

Rumko rumcic at gmail.com
Sun Dec 7 15:44:39 PST 2008


Rumko wrote:

> With hammer.sh the way it is, when you boot the system of the hdd, it will
> boot, but you wont be able to login or do anything else useful. The problem
> is that /mnt/usr is another mount point and another cpdup has to be run.
> 
> Attached is the patch for this + added some cleanup (deletes /mnt/autorun* &
> co.)

new version ... added kern.bootfile to sysctl.conf ... its hardcoded
to /boot/kernel for now ... maybe something like "/boot`sysctl kern.bootfile |
cut -d ':' -f 2`" would work? ...

without this, savecore cant create a memory dump in case of a panic
-- 
Regards,
Rumko
diff --git a/share/examples/rconfig/hammer.sh b/share/examples/rconfig/hammer.sh
index 39e7187..5eb581c 100644
--- a/share/examples/rconfig/hammer.sh
+++ b/share/examples/rconfig/hammer.sh
@@ -119,6 +119,7 @@ chflags nohistory /mnt/usr/obj
 #
 cpdup -o / /mnt
 cpdup -o /var /mnt/var
+cpdup -o /usr /mnt/usr
 cpdup -o /dev /mnt/dev
 cpdup -i0 /etc.hdd /mnt/etc
 
@@ -178,6 +179,8 @@ EOF
 #
 cat >> /mnt/etc/sysctl.conf << EOF
 #net.inet.ip.portrange.first=4000
+
+kern.bootfile=/boot/kernel
 EOF
 
 # adjust work directory for pkgsrc in case we want
@@ -213,5 +216,9 @@ if ( ! -f /mnt/etc/ssh/ssh_host_dsa_key ) then
     ssh-keygen -t dsa -f ssh_host_dsa_key -N ""
 endif
 
+# Misc cleanups
+rm -R /mnt/README* /mnt/autorun* /mnt/index.html /mnt/dflybsd.ico
+rm /mnt/boot.catalog
+
 # take CD out and reboot
 # 





More information about the Bugs mailing list