VirtualBox

Changeset 64601 in vbox for trunk


Ignore:
Timestamp:
Nov 8, 2016 4:34:21 PM (8 years ago)
Author:
vboxsync
Message:

updates

Location:
trunk/src/VBox/ValidationKit/docs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/docs/TestBoxImaging.html

    r64523 r64601  
    397397<div class="section" id="how-to-use">
    398398<h2>How to use</h2>
    399 <p>To perform one of the above maintenance actions on a testbox copy the</p>
     399<p>To perform one of the above maintenance actions on a testbox, run the
     400<tt class="docutils literal"><span class="pre">testbox-pxe-conf.sh</span></tt> script:</p>
     401<pre class="literal-block">
     402/mnt/testbox-tftp/pxeclient.cfg/testbox-pxe-conf.sh 10.165.98.220 rescue
     403</pre>
     404<p>Then trigger a reboot.  The box will then boot the NFS rooted debian image and
     405execute the maintenance action.  On success, it will remove the testbox hex-IP
     406config file and reboot again.</p>
    400407</div>
    401408</div>
     
    451458</pre>
    452459<p>This will make the default behavior to boot the local disk system.</p>
    453 <p>Create <tt class="docutils literal"><span class="pre">pxelinux.cfg/do-backup</span></tt>, <tt class="docutils literal"><span class="pre">pxelinux.cfg/do-backup-again</span></tt>,
    454 <tt class="docutils literal"><span class="pre">pxelinux.cfg/do-restore</span></tt>, <tt class="docutils literal"><span class="pre">pxelinux.cfg/do-refresh-info</span></tt>, and
    455 <tt class="docutils literal"><span class="pre">pxelinux.cfg/do-rescue</span></tt> configuration files on the form:</p>
    456 <pre class="literal-block">
    457 PATH bios
    458 DEFAULT maintenance
    459 LABEL maintenance
    460   MENU LABEL Maintenance (NFS)
    461   KERNEL maintenance-boot/vmlinuz-3.16.0-4-amd64
    462   APPEND initrd=maintenance-boot/initrd.img-3.16.0-4-amd64 testbox-action-backup ro ip=dhcp aufs=tmpfs boot=nfs root=/dev/nfs nfsroot=10.42.1.1:/export/testbox-nfsroot,ro nfsvers=3 nfsrootdebug
    463 LABEL local-boot
    464 LOCALBOOT
    465 </pre>
    466 <p>When you want to preform an action on a testbox, copy the <tt class="docutils literal"><span class="pre">do-&lt;action&gt;</span></tt> to
    467 <tt class="docutils literal"><span class="pre">pxeclient.cfg/&lt;HEX-ip-addr&gt;</span></tt> and trigger a boot of the testbox.  The machine
    468 config will be removed automatically once the action has been successfully
    469 completed.</p>
     460<p>Copy the <tt class="docutils literal"><span class="pre">testbox-pxe-conf.sh</span></tt> script file found in the same directory as
     461this document to <tt class="docutils literal"><span class="pre">/mnt/testbox-tftp/pxelinux.cfg/</span></tt>.  Edit the copy to correct
     462the IP addresses near the top, as well as any linux, TFTP and PXE details near
     463the bottom of the file.   This script will generate the PXE configuration file
     464when performing maintenance on a testbox.</p>
    470465</div>
    471466<div class="section" id="images-and-logs-export-testbox-backup">
     
    504499<h1>Debian NFS root (/export/testbox-nfsroot)</h1>
    505500<p>The testbox-nfsroot share should be read-only and must <strong>not</strong> have root
    506 squashing enabled.</p>
     501squashing enabled.  Also, make sure setting the set-uid-bit is allowed by the
     502server, or <tt class="docutils literal">su` and ``sudo</tt> won't work</p>
    507503<p>There are several ways of creating a debian nfsroot, but since we've got a
    508504tool like VirtualBox around we've just installed it in a VM, prepared it,
     
    512508<blockquote>
    513509<ul>
    514 <li><p class="first"><tt class="docutils literal"><span class="pre">apt-get</span> install pxelinux syslinux <span class="pre">initramfs-tools</span> zip gddrescue joe</tt>
     510<li><p class="first"><tt class="docutils literal"><span class="pre">apt-get</span> install pxelinux syslinux <span class="pre">initramfs-tools</span> zip gddrescue sudo joe</tt>
    515511and optionally <tt class="docutils literal"><span class="pre">apt-get</span> install smbclient <span class="pre">cifs-utils</span></tt>.</p>
    516512</li>
     
    520516grub configuration file by running <tt class="docutils literal"><span class="pre">update-grub</span></tt> afterwards.</p>
    521517</li>
     518<li><p class="first"><tt class="docutils literal">/etc/sudoers</tt> was modified to allow the <tt class="docutils literal">vbox</tt> user use sudo without
     519requring any password.</p>
     520</li>
    522521<li><p class="first">Create the directory <tt class="docutils literal">/etc/systemd/system/getty&#64;tty1.service.d</tt> and create
    523522the file <tt class="docutils literal">noclear.conf</tt> in it with the following content:</p>
     
    543542<p>An alternative is <tt class="docutils literal">cp <span class="pre">-ax</span> . /mnt/. &amp;&amp;&nbsp; cp <span class="pre">-ax</span> dev/. /mnt/dev/.</tt> but this
    544543is quite a bit slower, obviously.</p>
     544</li>
     545<li><p class="first">Edit <tt class="docutils literal">/etc/ssh/sshd_config</tt> setting <tt class="docutils literal">PermitRootLogin</tt> to <tt class="docutils literal">yes</tt> so we can ssh
     546in as root later on.</p>
    545547</li>
    546548<li><p class="first">chroot into the nfsroot: <tt class="docutils literal">chroot /mnt/</tt></p>
     
    557559proc                             /proc               proc  defaults   0 0
    558560/dev/nfs                         /                   nfs   defaults   1 1
    559 10.42.1.1:/export/testbox-tftp   /mnt/testbox-tftp   nfs   nfsvers=3  2 2
    560 10.42.1.1:/export/testbox-backup /mnt/testbox-backup nfs   nfsvers=3  3 3
    561 </pre>
     56110.42.1.1:/export/testbox-tftp   /mnt/testbox-tftp   nfs   tcp,nfsvers=3,noauto  2 2
     56210.42.1.1:/export/testbox-backup /mnt/testbox-backup nfs   tcp,nfsvers=3,noauto  3 3
     563</pre>
     564<p>We use NFS version 3 as that works better for our NFS server and client,
     565remove if not necessary.  The <tt class="docutils literal">noauto</tt> option is to work around mount
     566trouble during early bootup on some of our boxes.</p>
    562567</li>
    563568<li><p class="first">Do <tt class="docutils literal">mount <span class="pre">/mnt/testbox-tftp</span> &amp;&amp; mount <span class="pre">/mnt/testbox-backup</span></tt> to mount the
  • trunk/src/VBox/ValidationKit/docs/TestBoxImaging.txt

    r64599 r64601  
    188188done in a VM.  After installation the following modifications was done:
    189189
    190  - ``apt-get install pxelinux syslinux initramfs-tools zip gddrescue joe``
     190 - ``apt-get install pxelinux syslinux initramfs-tools zip gddrescue sudo joe``
    191191   and optionally ``apt-get install smbclient cifs-utils``.
    192 
    193192
    194193 - ``/etc/default/grub`` was modified to set ``GRUB_CMDLINE_LINUX_DEFAULT`` to
     
    196195   and perhaps spot why something doesn't work on a testbox.  Regenerate the
    197196   grub configuration file by running ``update-grub`` afterwards.
     197
     198 - ``/etc/sudoers`` was modified to allow the ``vbox`` user use sudo without
     199   requring any password.
    198200
    199201 - Create the directory ``/etc/systemd/system/getty@tty1.service.d`` and create
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette