Sponsored Content
Operating Systems BSD An installation script on freeBSD Post 302932778 by drl on Saturday 24th of January 2015 11:44:58 AM
Old 01-24-2015
Hi.

I most often use env to find the program:
Code:
#!/usr/bin/env bash

or
Code:
#!/usr/bin/env perl

or
Code:
#!/usr/bin/env awk

etc.

I don't think it has ever failed on any of the systems I use: Solaris, Slackware, Fedora, Debian, {Free,Open,Net}BSD, etc.

See https://www.unix.com/302366990-post7.html for more details.

Best wishes ... cheers, drl
This User Gave Thanks to drl For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how do u remove a messed up freebsd boot installation?

i messed up while installing freebsd into a dual os wannabe system. Now, how do i del it( so i wouldn't get prompted to choose freebsd during boot?)so that i could try installing a different flavour of linux? cheers:eek: (1 Reply)
Discussion started by: coffeecoolers
1 Replies

2. UNIX for Advanced & Expert Users

snort installation on freebsd issues

i'm following the, "How to setup and secure Snort, MySQL and Acid on FreeBSD 4.6 Release" off of the snort.org website. in the documentation it says snort should be installed through the following: ----- make -DWITH_MYSQL -DWITH_FLEXRESP ; make install ----- later it says to do the... (13 Replies)
Discussion started by: xyyz
13 Replies

3. UNIX for Dummies Questions & Answers

Wi0 d-link DWL-510 installation on freebsd

hello, i have a problem installing a d-link dwl-510 wireless network card on freebsd 4.8 first, i already successfully installed a dwl- 500 (which is a pcmcia card in a pci card) by adding just a few simple lines to my /etc/rc.conf pccard_enable="YES" pccard_mem="DEFAULT"... (0 Replies)
Discussion started by: termiEEE
0 Replies

4. BSD

FreeBSD / KDE installation woes...

Forgive the newbie question. I've been trying to install FreeBSD 5.4 on a new AMD64 based box at work today, and I started running into problems. Maybe some background is appropriate? Here goes... I've finished the first stage of development of a model in C++ which simulates airflow through a... (1 Reply)
Discussion started by: ForestryJim
1 Replies

5. Linux

freeBSD installation

why is my new freeBSD hanging at setting up hostname each time I plug in the network cable i use host name like X.ng I intend to configure it as a gateway (2 Replies)
Discussion started by: AkinOkin
2 Replies

6. BSD

FreeBSD Installation problems

Hi all, I'm new to the world of Unix/Linux (though not to computing in general) and I'm having a few issues installing FreeBSD (v6.2). Firstly, I realise that it's not the most user-friendly of distros, especially for newbies, but it's what I'm required to install so unfortunately I have to... (2 Replies)
Discussion started by: Techmonkey
2 Replies

7. Programming

Application crashes in FreeBSD 7.1 while working ok in FreeBSD 6.3

Hello there, My mulithreaded application (which is too large to represent the source code here) is crashing after installing FreeBSD 7.1-RELEASE/amd64. It worked properly on others machines (Dual Cores with 4GB of RAM - FreeBSD 6.2-RELEASE/i386). The current machine has 2x Core 2 Duo... (1 Reply)
Discussion started by: Seenquev
1 Replies

8. Shell Programming and Scripting

FreeBSD rc.subr wireless script

Hi, This is my first thread on Unix forums, so be gentle.:o I'm trying to write a simple start/stop script for my wireless networking adapter, under FreeBSD, using the rc.subr framework. #!/bin/sh # PROVIDE Wireless # KEYWORDS shutdown . /etc/rc.subr name="wireless"... (1 Reply)
Discussion started by: regexp
1 Replies

9. Programming

Changing script to work with freeBSD

hi all, i have made my machine a freeBSD machine instead of a centos machine and my script doesnt work anymore and i was wondering if anyone can help me into why, i thought the commands are the same, here it is - #!/bin/bash source=/vol/cha-work/_ARCHIVE/to_be_archived/audio... (9 Replies)
Discussion started by: robertkwild
9 Replies

10. UNIX for Advanced & Expert Users

Can't boot FreeBSD after successful installation.

This is a cross post as I haven't got any solution and I'm badly in need of one. I've installed Slackware 14.2 in /dev/sda1 and x86Solaris 10 U6 in /dev/sda3 (sda2 is Linux swap)and boot menu was Solaris grub but, later deleted Solaris partition and installed FreeBSD12 (for i386) on the same... (3 Replies)
Discussion started by: vectrum
3 Replies
MKIMG(1)						    BSD General Commands Manual 						  MKIMG(1)

NAME
mkimg -- utility to make disk images SYNOPSIS
mkimg [-H heads] [-P blksz] [-S secsz] [-T tracksz] [-b bootcode] [-f format] [-o outfile] [-v] [-y] -s scheme -p partition [-p partition ...] mkimg --formats | --schemes | --version DESCRIPTION
The mkimg utility creates a disk image from the raw partition contents specified with the partition argument(s) and using the partitioning scheme specified with the scheme argument. The disk image is written to stdout by default or the file specified with the outfile argument. The image file is a raw disk image by default, but the format of the image file can be specified with the format argument. The disk image can be made bootable by specifying the scheme-specific boot block contents with the bootcode argument and, depending on the scheme, with a boot partition. The contents of such a boot partition is provided like any other partition and the mkimg utility does not treat it any differently from other partitions. Some partitioning schemes need a disk geometry and for those the mkimg utility accepts the tracksz and heads arguments, specifying the number of sectors per track and the number of heads per cylinder (resp.) Both the logical and physical sector size can be specified and for that the mkimg utility accepts the secsz and blksz arguments. The secsz argument is used to specify the logical sector size. This is the sector size reported by a disk when queried for its capacity. Modern disks use a larger sector size internally, referred to as block size by the mkimg utility and this can be specified by the blksz argument. The mkimg utility will use the (physical) block size to determine the start of partitions and to round the size of the disk image. The [-v] option increases the level of output that the mkimg utility prints. The [-y] option is used for testing purposes only and is not to be used in production. When present, the mkimg utility will generate pre- dictable values for Universally Unique Identifiers (UUIDs) and time stamps so that consecutive runs of the mkimg utility will create images that are identical. A set of long options exist to query about the mkimg utilty itself. Options in this set should be given by themselves because the mkimg utility exits immediately after providing the requested information. The version of the mkimg utility is printed when the --version option is given. The list of supported output formats is printed when the --formats option is given and the list of supported partitioning schemes is printed when the --schemes option is given. Both the format and scheme lists a space-separated lists for easy handling in scripts. For a more descriptive list of supported partitioning schemes or supported output format, or for a detailed description of how to specify partitions, run the mkimg utility without any arguments. This will print a usage message with all the necessary details. ENVIRONMENT
TMPDIR Directory to put temporary files in; default is /tmp. EXAMPLES
To create a bootable disk image that is partitioned using the GPT scheme and containing a root file system that was previously created using makefs and also containing a swap partition, run the mkimg utility as follows: % mkimg -s gpt -b /boot/pmbr -p freebsd-boot:=/boot/gptboot -p freebsd-ufs:=root-file-system.ufs -p freebsd-swap::1G -o gpt.img The command line given above results in a raw image file. This is because no output format was given. To create a VMDK image for example, add the -f vmdk argument to the mkimg utility and name the output file accordingly. A nested partitioning scheme is created by running the mkimg utility twice. The output of the first will be fed as the contents of a parti- tion to the second. This can be done using a temporary file, like so: % mkimg -s bsd -b /boot/boot -p freebsd-ufs:=root-file-system.ufs -p freebsd-swap::1G -o /tmp/bsd.img % mkimg -s mbr -b /boot/mbr -p freebsd:=/tmp/bsd.img -o mbr-bsd.img Alternatively, the mkimg utility can be run in a cascaded fashion, whereby the output of the first is fed directly into the second. To do this, run the mkimg utility as follows: % mkimg -s mbr -b /boot/mbr -p freebsd:-'mkimg -s bsd -b /boot/boot -p freebsd-ufs:=root-file-system.ufs -p freebsd-swap::1G' -o mbr-bsd.img To accomodate the need to have partitions named or numbered in a certain way, the mkimg utility allows for the specification of empty parti- tions. For example, to create an image that is compatible with partition layouts found in /etc/disktab, the 'd' partition often needs to be skipped. This is accomplished by inserting an unused partition after the first 2 partition specifications. It is worth noting at this time that the BSD scheme will automatically skip the 'c' partition by virtue of it referring to the entire disk. To create an image that is com- patible with the qp120at disk, use the mkimg utility as follows: % mkimg -s bsd -b /boot/boot -p freebsd-ufs:=root-file-system.ufs -p freebsd-swap::20M -p- -p- -p- -p- -p freebsd-ufs:=usr-file-system.ufs -o bsd.img For partitioning schemes that feature partition labels, the mkimg utility supports assigning labels to the partitions specified. In the fol- lowing example the file system partition is labeled as 'backup': % mkimg -s gpt -p freebsd-ufs/backup:=file-system.ufs -o gpt.img SEE ALSO
gpart(8), makefs(8), mdconfig(8), newfs(8) HISTORY
The mkimg utility first appeared in FreeBSD 10.1. AUTHORS
The mkimg utility and manpage were written by Marcel Moolenaar <marcelm@juniper.net> BSD
September 27, 2014 BSD
All times are GMT -4. The time now is 09:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy