- Timestamp:
- Nov 8, 2016 4:34:21 PM (8 years ago)
- Location:
- trunk/src/VBox/ValidationKit/docs
- Files:
-
- 2 edited
-
TestBoxImaging.html (modified) (7 diffs)
-
TestBoxImaging.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/docs/TestBoxImaging.html
r64523 r64601 397 397 <div class="section" id="how-to-use"> 398 398 <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 405 execute the maintenance action. On success, it will remove the testbox hex-IP 406 config file and reboot again.</p> 400 407 </div> 401 408 </div> … … 451 458 </pre> 452 459 <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-<action></span></tt> to 467 <tt class="docutils literal"><span class="pre">pxeclient.cfg/<HEX-ip-addr></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 461 this document to <tt class="docutils literal"><span class="pre">/mnt/testbox-tftp/pxelinux.cfg/</span></tt>. Edit the copy to correct 462 the IP addresses near the top, as well as any linux, TFTP and PXE details near 463 the bottom of the file. This script will generate the PXE configuration file 464 when performing maintenance on a testbox.</p> 470 465 </div> 471 466 <div class="section" id="images-and-logs-export-testbox-backup"> … … 504 499 <h1>Debian NFS root (/export/testbox-nfsroot)</h1> 505 500 <p>The testbox-nfsroot share should be read-only and must <strong>not</strong> have root 506 squashing enabled.</p> 501 squashing enabled. Also, make sure setting the set-uid-bit is allowed by the 502 server, or <tt class="docutils literal">su` and ``sudo</tt> won't work</p> 507 503 <p>There are several ways of creating a debian nfsroot, but since we've got a 508 504 tool like VirtualBox around we've just installed it in a VM, prepared it, … … 512 508 <blockquote> 513 509 <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> 515 511 and optionally <tt class="docutils literal"><span class="pre">apt-get</span> install smbclient <span class="pre">cifs-utils</span></tt>.</p> 516 512 </li> … … 520 516 grub configuration file by running <tt class="docutils literal"><span class="pre">update-grub</span></tt> afterwards.</p> 521 517 </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 519 requring any password.</p> 520 </li> 522 521 <li><p class="first">Create the directory <tt class="docutils literal">/etc/systemd/system/getty@tty1.service.d</tt> and create 523 522 the file <tt class="docutils literal">noclear.conf</tt> in it with the following content:</p> … … 543 542 <p>An alternative is <tt class="docutils literal">cp <span class="pre">-ax</span> . /mnt/. && cp <span class="pre">-ax</span> dev/. /mnt/dev/.</tt> but this 544 543 is 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 546 in as root later on.</p> 545 547 </li> 546 548 <li><p class="first">chroot into the nfsroot: <tt class="docutils literal">chroot /mnt/</tt></p> … … 557 559 proc /proc proc defaults 0 0 558 560 /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> 561 10.42.1.1:/export/testbox-tftp /mnt/testbox-tftp nfs tcp,nfsvers=3,noauto 2 2 562 10.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, 565 remove if not necessary. The <tt class="docutils literal">noauto</tt> option is to work around mount 566 trouble during early bootup on some of our boxes.</p> 562 567 </li> 563 568 <li><p class="first">Do <tt class="docutils literal">mount <span class="pre">/mnt/testbox-tftp</span> && mount <span class="pre">/mnt/testbox-backup</span></tt> to mount the -
trunk/src/VBox/ValidationKit/docs/TestBoxImaging.txt
r64599 r64601 188 188 done in a VM. After installation the following modifications was done: 189 189 190 - ``apt-get install pxelinux syslinux initramfs-tools zip gddrescue joe``190 - ``apt-get install pxelinux syslinux initramfs-tools zip gddrescue sudo joe`` 191 191 and optionally ``apt-get install smbclient cifs-utils``. 192 193 192 194 193 - ``/etc/default/grub`` was modified to set ``GRUB_CMDLINE_LINUX_DEFAULT`` to … … 196 195 and perhaps spot why something doesn't work on a testbox. Regenerate the 197 196 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. 198 200 199 201 - Create the directory ``/etc/systemd/system/getty@tty1.service.d`` and create
Note:
See TracChangeset
for help on using the changeset viewer.

