Blank and Burn ISO Freebsd


  • administrators

    Locate the drive:

    camcontrol devlist
    

    Output:

    <ST3500418AS CC35>                 at scbus3 target 0 lun 0 (pass0,ada0)
    <ATAPI iHAS324   A BL1A>           at scbus4 target 0 lun 0 (pass3,cd0)
    <ST500DM002-1BD142 KC45>           at scbus5 target 0 lun 0 (pass1,ada1)
    <AHCI SGPIO Enclosure 1.00 0001>   at scbus9 target 0 lun 0 (ses0,pass2)
    

    Where “<ATAPI iHAS324 A BL1A> at scbus4 target 0 lun 0 (pass3,cd0)” = our DVD drive


    Blank the DVD+RW medium:

    growisofs -Z /dev/cd0=/dev/zero
    

    Output: Notice this disk contains a previously written .ISO

    WARNING: /dev/cd0 already carries isofs!
    About to execute 'builtin_dd if=/dev/zero of=/dev/pass3 obs=32k seek=0'
    /dev/pass3: restarting DVD+RW format...
    /dev/pass3: "Current Write Speed" is 4.1x1352KBps.
    3964928/4700372992 ( 0.1%) @0.9x, remaining 59:13 RBU  99.9% UBU   3.8%
    22544384/4700372992 ( 0.5%) @4.0x, remaining 24:12 RBU 100.0% UBU  99.8%
    [................]
    3048865792/4700372992 (64.9%) @4.0x, remaining 5:04 RBU  99.9% UBU  99.8%
    3067445248/4700372992 (65.3%) @4.0x, remaining 5:01 RBU 100.0% UBU  99.8%
    [................]
    3784048640/4700372992 (80.5%) @4.0x, remaining 2:48 RBU  99.9% UBU  99.8%
    3802726400/4700372992 (80.9%) @4.0x, remaining 2:45 RBU 100.0% UBU  99.8%
    [................]
    4370333696/4700372992 (93.0%) @4.0x, remaining 1:00 RBU  99.9% UBU  99.8%
    4388945920/4700372992 (93.4%) @4.0x, remaining 0:57 RBU  99.9% UBU  99.8%
    [................]
    
    

    Write the ISO:

    growisofs -Z /dev/cd0 -J -R /home/rick/Downloads/ISO/FreeBSD/FreeBSD-11.1-RELEASE-amd64-dvd1.iso
    

    Output

    Executing 'mkisofs -J -R /home/rick/Downloads/ISO/FreeBSD/FreeBSD-11.1-RELEASE-amd64-dvd1.iso | builtin_dd of=/dev/pass3 obs=32k seek=0'
      0.31% done, estimate finish Sun Feb 18 10:46:09 2018
      0.61% done, estimate finish Sun Feb 18 10:46:09 2018
    /dev/pass3: "Current Write Speed" is 4.1x1352KBps.
      1.23% done, estimate finish Sun Feb 18 10:48:52 2018
      1.53% done, estimate finish Sun Feb 18 10:50:30 2018
    [.............]
     37.92% done, estimate finish Sun Feb 18 10:56:15 2018
     38.22% done, estimate finish Sun Feb 18 10:56:15 2018
    [.............]
     53.51% done, estimate finish Sun Feb 18 10:56:16 2018
     53.82% done, estimate finish Sun Feb 18 10:56:16 2018
    [.............]
     74.61% done, estimate finish Sun Feb 18 10:56:17 2018
     74.92% done, estimate finish Sun Feb 18 10:56:17 2018
    [.............]
     89.59% done, estimate finish Sun Feb 18 10:56:18 2018
     89.90% done, estimate finish Sun Feb 18 10:56:18 2018
    [.............]
    99.99% done, estimate finish Sun Feb 18 10:56:19 2018
    Total translation table size: 0
    Total rockridge attributes bytes: 300
    Total directory bytes: 0
    Path table size(bytes): 10
    Max brk space used 0
    1635174 extents written (3193 MB)
    builtin_dd: 1635184*2KB out @ average 3.9x1352KBps
    /dev/pass3: flushing cache
    /dev/pass3: stopping de-icing
    /dev/pass3: writing lead-out
    
    

    Fin!





  • Make ISO from DVD

    In this case I had an OS install disk which was required to be on a virtual node with no optical drive, so I needed to transfer an image to the server to create a VM

    Find out which device the DVD is:

    lsblk

    Output:

    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 465.8G 0 disk ├─sda1 8:1 0 1G 0 part /boot └─sda2 8:2 0 464.8G 0 part ├─centos-root 253:0 0 50G 0 lvm / ├─centos-swap 253:1 0 11.8G 0 lvm [SWAP] └─centos-home 253:2 0 403G 0 lvm /home sdb 8:16 1 14.5G 0 disk /mnt sr0 11:0 1 4.1G 0 rom /run/media/rick/CCSA_X64FRE_EN-US_DV5

    Therefore /dev/sr0 is the location , or disk to be made into an ISO

    I prefer simplicity, and sometimes deal with the fallout after the fact, however Ive repeated this countless times with success.

    dd if=/dev/sr0 of=win10.iso

    Where if=Input file and of=output file

    I chill out and do something else while the image is being copied/created, and the final output:

    8555456+0 records in 8555456+0 records out 4380393472 bytes (4.4 GB) copied, 331.937 s, 13.2 MB/s

    Fin!

    read more
  • Recreate postrgresql database template encode to ASCII

    UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1';

    Now we can drop it:

    DROP DATABASE template1;

    Create database from template0, with a new default encoding:

    CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = 'UNICODE'; UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1'; \c template1 VACUUM FREEZE;

    read more
});