Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Sep 2014 23:30:13 +0000
From:      Twitter <confirm@twitter.com>
To:        Plemmons Gertrudis <questions@freebsd.org>
Subject:   Confirm your Twitter account, gertrudisgc624!
Message-ID:  <63.85.26424.50526145@twitter.com>

next in thread | raw e-mail | index | archive | help
Plemmons Gertrudis,
Please confirm your Twitter account

------------------------
Confirming your account will give you full access to Twitter and all future notifications will be sent to this email address.

Confirm your account now:
https://twitter.com/account/confirm_email/gertrudisgc624/A3CG7-3FHD6-141073

-- 

Forgot your Twitter password? Get instructions on how to reset it:
https://twitter.com/account/resend_password

Need help?
https://support.twitter.com

If you received this message in error and did not sign up for a Twitter account, click on the url below:
https://twitter.com/account/not_my_account/gertrudisgc624/A3CG7-3FHD6-141073
From owner-freebsd-questions@FreeBSD.ORG  Mon Sep 15 05:12:53 2014
Return-Path: <owner-freebsd-questions@FreeBSD.ORG>
Delivered-To: freebsd-questions@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by hub.freebsd.org (Postfix) with ESMTPS id CD21B862
 for <freebsd-questions@freebsd.org>; Mon, 15 Sep 2014 05:12:53 +0000 (UTC)
Received: from ms-10.1blu.de (ms-10.1blu.de [178.254.4.101])
 (using TLSv1 with cipher AES256-SHA (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 899C99E4
 for <freebsd-questions@freebsd.org>; Mon, 15 Sep 2014 05:12:53 +0000 (UTC)
Received: from [93.104.19.80] (helo=tiny-r269739)
 by ms-10.1blu.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.76) (envelope-from <guru@unixarea.de>)
 id 1XTOam-0005Gs-SR; Mon, 15 Sep 2014 07:12:49 +0200
Date: Mon, 15 Sep 2014 07:12:42 +0200
From: Matthias Apitz <guru@unixarea.de>
To: Mehmet Erol Sanliturk <m.e.sanliturk@gmail.com>
Subject: Re: Using the ISO releases on USB sticks.
Message-ID: <20140915051242.GA1175@tiny-r269739>
Reply-To: Matthias Apitz <guru@unixarea.de>
Mail-Followup-To: Matthias Apitz <guru@unixarea.de>,
 Mehmet Erol Sanliturk <m.e.sanliturk@gmail.com>,
 FreeBSD Questions Mailing List <freebsd-questions@freebsd.org>
References: <4D32ABC9-D0D0-48D2-98D3-FF1D72A4261E@gmail.com>
 <6.0.0.22.2.20140910111010.052bfb38@mail.computinginnovations.com>
 <A9FD5744-C05D-43C3-815D-F253F9B76FB0@gmail.com>
 <B7FAE207-78AC-431F-9D33-B8C8C76BD4E1@gmail.com>
 <alpine.BSF.2.11.1409141113370.27884@wonkity.com>
 <lv4oa8$md4$1@ger.gmane.org> <20140914192419.GA1559@tiny-r269739>
 <CAOgwaMvzGzzR9RwcCiSM4viHbc=kTuEaM5zy+wULROBFE7jmiw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CAOgwaMvzGzzR9RwcCiSM4viHbc=kTuEaM5zy+wULROBFE7jmiw@mail.gmail.com>
X-Operating-System: FreeBSD 11.0-CURRENT r269739 (i386)
User-Agent: Mutt/1.5.23 (2014-03-12)
X-Con-Id: 51246
X-Con-U: 0-guru
X-Originating-IP: 93.104.19.80
Cc: FreeBSD Questions Mailing List <freebsd-questions@freebsd.org>
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.18-1
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/>;
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 15 Sep 2014 05:12:53 -0000

El día Sunday, September 14, 2014 a las 01:55:44PM -0700, Mehmet Erol Sanliturk escribió:

> On Sun, Sep 14, 2014 at 12:24 PM, Matthias Apitz <guru@unixarea.de> wrote:
> 
> > I always test new versions of FreeBSD on USB keys, right now while
> > typing I run a 11-CURRENT with KDE ... and mutt as MUA booted from an USB
> > key, while the disk in the laptop has still an older FreeBSD.
> >
> > The procedure to creat a boot-able USB key is simple:
> >
> > - make a file system on it
> > - mount it to /mnt
> > - do 'make installkernel' and 'make installworld' with DESTDIR=/mnt
> > - enrich the file system in /mnt with some stuff (for example install
> >   packages into it with 'chroot /mnt pkg install ...')
> > - unmount and reboot
> >
> > even better, if you do not use an USB key directly, but do all the above
> > to a mdconfig file system (a file system in a normal plain file) and
> > copy later the result with dd(1) to the real USB key;
> >
> > let me know if you need a detailed procedure of it.
> >
> 
> Dear Matthias ,
> 
> 
> If you supply such an algorithm , me and other people may use it to
> generate boot-able USB sticks with some installed packages .
> 
> Thank you very much .
> 
> 
> Mehmet Erol Sanliturk

here it comes; comments are always welcome;

	matthias


$Id: buildingImage.txt,v 1.15 2014/08/15 17:39:21 guru Exp $

       Building bootable FreeBSD/i386 USB keys 
             <guru@unixarea.de>

This small howto file describes how to build and enrich bootable USB keys.
Some ideas are stolen from:
http://bsdimp.blogspot.com/2007/10/building-bootable-freebsdi386-images.html

File operations, esp. of a large amount of small files, are very SLOW
on USB keys. That's why we use in general the following procedure:

1. dd(1) the complete /dev/da0 to a plain file, an image of the USB key;
2. use mdconfig(8) to make a memory disk of this file and mount(8) it;
3. do everything of the formatting and installation in this virtual disk;
4. unmount(8) it and dd(1) it back to the USB key;

here we go (use for /dev/da0 what your key is in /var/log/messages):

check the size of your USB key with:

# dd if=/dev/da0 of=/dev/null bs=8m
1878+1 records in
1878+1 records out
15758000128 bytes transferred in 783.312179 secs (20117139 bytes/sec)

note: this step is essential to define an image which later fits again to the
real USB key; my "16 Gbyte" keys vary between 1868 and 1914 blocks of 8m
(which is ofc lesse than 16 GByte); that's why I decided to use always the
number 1860 for my keys of this "16 marketing GBytes".

now we create an empty large disk file of this size 1860 blocks of 8m:

# dd if=/dev/zero of=da0.r269739 bs=8m count=1860

attach the file da0.r269739 as a memory disk:

# mdconfig -a -t vnode -f da0.r269739
md0

now we use the normal procedure to create a bootable UFS on /dev/md0:

# fdisk -I md0
# fdisk -B md0
# bsdlabel -w md0s1 auto
# bsdlabel -B md0s1
# bsdlabel -e md0s1  # edit the disk label and change partition "a" from "unused" to "4.2BSD"

build the file system:

# newfs /dev/md0s1a
# mount /dev/md0s1a /mnt

note: if your running host system is older than 20121201 (see src/UPDATING) you
must add some new user if you try to install 'head':

# pw useradd -n auditdistd -g audit -c "Auditdistd unprivileged user" -d /var/empty -s /usr/sbin/nologin

install the system from your host which must have been compiled
in /usr/src; if you compiled it in another place check for MAKEOBJDIRPREFIX
below;

# cd /usr/src
# make installworld  DESTDIR=/mnt
# make installkernel DESTDIR=/mnt KERNCONF=GENERIC INSTALL_NODEBUG=t
# make distrib-dirs  DESTDIR=/mnt
# make distribution  DESTDIR=/mnt

the new system in /mnt needs some files to start:

# echo /dev/da0s1a / ufs rw,noatime 1 1 > /mnt/etc/fstab
# cp /etc/wpa_supplicant.conf /mnt/etc

# cat <<EOF > /mnt/etc/rc.conf
tmpmfs="YES"
tmpsize="128m"
wlans_ath0="wlan0"
ifconfig_wlan0="WPA DHCP"
ifconfig_bge0="DHCP"
hostname=tiny-r269739
sshd_enable="YES"
moused_enable="YES"
dbus_enable="YES"
hald_enable="YES"
vboxguest_enable="YES"
vboxservice_enable="YES"
keymap="german.iso"
# powerd
powerd_enable="YES"
powerd_flags="-a max -b adp"
performance_cx_lowest_cx_lowest="Cmax"
economy_cx_lowest="Cmax"
EOF

# cat <<EOF > /mnt/boot/loader.conf
kern.cam.boot_delay="10000"
kern.cam.scsi_delay="3000"
hint.p4tcc.0.disabled=1
hint.acpi_throttle.0.disabled=1
EOF

to use the above created USB key to install another system (the EeePC for
example, or the Acer) we need 'src' and 'obj' as well on the key:

# cd /usr
# cp -Rp src /mnt/usr
# cp -Rp obj /mnt/usr

but remove the SVN control files from the copied soure tree:

# rm -rf /mnt/usr/src/.svn

enrich the USB key with the prepared packages:

# cd /usr/local/poudriere/data/packages/freebsd-head-ports-head/All
# cp -p * /mnt/PKGDIR

o run later

# cd /usr/local/poudriere/data/packages/freebsd-head-ports-head/All
# rsync -avz . /mnt/PKGDIR

as well we need in 11-CURRENT now the new pkg(8) command; we compile
the old way ports-mgmt/pkg-devel and install only 'pkg-static' into
the /mnt system:

# cd /usr/ports/ports-mgmt/pkg-devel
# make install
# chroot /mnt mkdir -p /usr/local/sbin
# cp -p /usr/local/sbin/pkg-static /mnt/usr/local/sbin

let's see if this works:

# chroot /mnt /usr/local/sbin/pkg-static help

first we have to build the 'repo' from the directory of all
packages; we run:

# chroot /mnt pkg-static repo /PKGDIR
Creating repository in /PKGDIR: 83%
...
Packing files for repository: 100%

the recent version of pkg(8) needs in any case the definition
of the respository; we create the myrepo.conf file as:

# chroot /mnt mkdir -p /usr/local/etc/pkg/repos
# vim /mnt/usr/local/etc/pkg/repos/myrepo.conf
# cat /mnt/usr/local/etc/pkg/repos/myrepo.conf

           FreeBSD: {
               url: "file:/PKGDIR",
               enabled: true,
           }

now we are able to install any stuff (and its dependencies), here
as an example 'autoconf-2.69' and its dependencies:

# chroot /mnt pkg-static -R /usr/local/etc/pkg/repos/  install autoconf-2.69
Updating repository catalogue
FreeBSD repository is up-to-date
All repositories are up-to-date
The following 5 packages will be affected (of 0 checked):

New packages to be INSTALLED:
        autoconf: 2.69
        indexinfo: 0.2
        perl5: 5.16.3_11
        m4: 1.4.17_1,1
        autoconf-wrapper: 20131203

The process will require 45 MB more space
13 MB to be downloaded

Proceed with this action [y/N]: y
Fetching autoconf-2.69.txz: 100% of 529 KB                                   
Fetching indexinfo-0.2.txz: 100% of 6 KB                                       
Fetching perl5-5.16.3_11.txz: 100% of 12 MB                                   
Fetching m4-1.4.17_1,1.txz: 100% of 183 KB                                   
Fetching autoconf-wrapper-20131203.txz: 100% of 4 KB                           
Checking integrity... done (0 conflicting)
[1/5] Installing indexinfo-0.2: 100%
[2/5] Installing perl5-5.16.3_11: 100%
[3/5] Installing m4-1.4.17_1,1: 100%
[4/5] Installing autoconf-wrapper-20131203: 100%
[5/5] Installing autoconf-2.69: 100%

are they really there?:

# chroot /mnt pkg-static info                          
autoconf-2.69                  Automatically configure source code on many Un*x platforms
autoconf-wrapper-20131203      Wrapper script for GNU autoconf
indexinfo-0.2                  Utility to regenerate the GNU info page index
m4-1.4.17_1,1                  GNU m4
perl5-5.16.3_11                Practical Extraction and Report Language

later, when the system we building in /mnt is booted, we can use
pkg-static directly with the same repo, we do:

# pkg-static -R /usr/local/etc/pkg/repos/  install foo-x.x

copy some initial xorg.conf files to see what we can make use
of them later:

# cp /etc/X11/xorg.* /mnt/etc/X11

add an unpriv user 'guru' (for beeing able to SSH-in):

# chroot /mnt /usr/sbin/adduser

and enrich its HOME with files to bringup KDE:

# cp -p ~guru/.xinitrc   /mnt/home/guru
# cp -p ~guru/.xserverrc /mnt/home/guru

umount the key, detach the memory disk and copy the image back
with dd(1) to the USB device:

# umount /mnt
# mdconfig -d -u md0
# dd if=da0.r269739 of=/dev/da0 bs=8m


soem more hints for special cases:

If we have the real USB device locally, but the image on a laptop
without USB ports, one may use:

# ssh -C root@10.49.8.36 dd of=/dev/da1 bs=8m < da0-r269739
0+823717 records in
1868+0 records out
15669919744 bytes transferred in 12135.626342 secs (1291233 bytes/sec)
#
(i.e. around 3h 17min)

To write the image from the VM to Ubuntu's USB port:

$ ssh -C 192.168.2.102
$ sudo chmod 0666 /dev/sdb
$ ssh -C 192.168.2.102 dd of=/dev/sdb bs=8M < da0-r269739

MAKEOBJDIRPREFIX hints to compile in and install from some other places:

If you want to build world and kernel out of SVN in 'src' and into 'obj', but in
some other place as /usr/[src|obj], for example in /home/guru/head/[src|obj]
use this procedure:

# mkdir -p /home/guru/head/obj
# MAKEOBJDIRPREFIX=/home/guru/head/obj ; export MAKEOBJDIRPREFIX
# cd /home/guru/head
# svn checkout svn://svn.freebsd.org/base/head src

# cd /home/guru/head/src
# make buildworld
# make buildkernel KERNCONF=GENERIC
...

if you have built the kernel and world in some other place as /usr/src:

# MAKEOBJDIRPREFIX=/home/guru/head/obj ; export MAKEOBJDIRPREFIX
# cd /home/guru/head/src
# make installworld  DESTDIR=/mnt
# make installkernel DESTDIR=/mnt KERNCONF=GENERIC INSTALL_NODEBUG=t
# make distrib-dirs  DESTDIR=/mnt
# make distribution  DESTDIR=/mnt
...

to use the key to install other system, you must have 'src' and 'obj'
again in the correct places; do:

# mkdir -p /mnt/usr/home/guru/head/
# cd /mnt
# ln -s usr/home home

# cd /home/guru/head/
# cp -Rp src /mnt/home/guru/head/    # 40 mins
# cp -Rp obj /mnt/home/guru/head/    # 20 mins


-- 
Matthias Apitz               |  /"\   ASCII Ribbon Campaign:
E-mail: guru@unixarea.de     |  \ /   - No HTML/RTF in E-mail
WWW: http://www.unixarea.de/ |   X    - No proprietary attachments
phone: +49-170-4527211       |  / \   - Respect for open standards
                             | en.wikipedia.org/wiki/ASCII_Ribbon_Campaign



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?63.85.26424.50526145>