From owner-freebsd-questions@FreeBSD.ORG Sun Sep 14 23:30:25 2014 Return-Path: Delivered-To: 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 944A818A for ; Sun, 14 Sep 2014 23:30:25 +0000 (UTC) Received: from spring-chicken-am.twitter.com (spring-chicken-am.twitter.com [199.16.156.152]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B9C56B2 for ; Sun, 14 Sep 2014 23:30:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=twitter.com; s=dkim-201406; t=1410737413; bh=+w1xdTe93V23sE6/ZwLokfCHRHYBXFsJ2oczhAaqEBI=; h=Date:From:To:Subject:MIME-Version:Content-Type:Feedback-ID: Message-ID; b=HYhsjda5EROVGIdMnnAdAQ4gcQiILKZMAYND92d6X14++UNkc7GoCZmsRz/mvqbJv 2vzJ18r2bTM+RoYYNtpuhMwqa247bByy2a+LyoUyYtxt8LtrAYL5csB54FK6kkD/tn 3vPbBwZM1yzo+0b9YnjyvVD9s6Y61ipRZDIyhlg/WFRjfkKJTvkmUwmeo4E1Ulv5n2 GDQFBusnTS7KCV3MHk0vqvctCOGTDgOSDYrN9lMNtGfCj6cbykFUM52TFIW9Ib6tcd PKUQNbTwjVH6SDO4wIe3jHcUASFCDPiQFZiJ1cXPvM8/wyTavbm9MxWRv7d9VpZ7TS LZ0rejGC+uvfA== X-MSFBL: cXVlc3Rpb25zQGZyZWVic2Qub3JnQGF0bGEtYXFsLTM3LXNyMS1FdmVyeXRoaW5n LjE3MkBFdmVyeXRoaW5nQHF1ZXN0aW9uc1xAZnJlZWJzZC5vcmdcQDE4XEAyNzcw NTczOTYxXEAwXEBhZDY1MTAwNWJjZDBkMjI2MDc0OTcwZWQ3Y2I2ODJkYjcyNGFl MDQ0 Date: Sun, 14 Sep 2014 23:30:13 +0000 From: Twitter To: Plemmons Gertrudis Subject: Confirm your Twitter account, gertrudisgc624! MIME-Version: 1.0 Feedback-ID: 16481b2a2bd9895cc9f3f73eb2:1d4a1426:none:twitterESP Message-ID: <63.85.26424.50526145@twitter.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Sep 2014 23:30:25 -0000 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: 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 ; 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 ; 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 ) id 1XTOam-0005Gs-SR; Mon, 15 Sep 2014 07:12:49 +0200 Date: Mon, 15 Sep 2014 07:12:42 +0200 From: Matthias Apitz To: Mehmet Erol Sanliturk Subject: Re: Using the ISO releases on USB sticks. Message-ID: <20140915051242.GA1175@tiny-r269739> Reply-To: Matthias Apitz Mail-Followup-To: Matthias Apitz , Mehmet Erol Sanliturk , FreeBSD Questions Mailing List References: <4D32ABC9-D0D0-48D2-98D3-FF1D72A4261E@gmail.com> <6.0.0.22.2.20140910111010.052bfb38@mail.computinginnovations.com> <20140914192419.GA1559@tiny-r269739> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 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 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 < /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 < /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