From owner-freebsd-current@freebsd.org Wed Jan 18 09:19:40 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A24B7CB5793; Wed, 18 Jan 2017 09:19:40 +0000 (UTC) (envelope-from o.hartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 20AA91BBC; Wed, 18 Jan 2017 09:19:39 +0000 (UTC) (envelope-from o.hartmann@walstatt.org) Received: from freyja.zeit4.iv.bundesimmobilien.de ([87.138.105.249]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MZPer-1c8ge13kdx-00LH6T; Wed, 18 Jan 2017 10:19:17 +0100 Date: Wed, 18 Jan 2017 10:19:15 +0100 From: "O. Hartmann" To: Daniel Kalchev Cc: "O. Hartmann" , freebsd-current , freebsd-questions Subject: Re: ISO image: where is the CLANG compiler? Message-ID: <20170118101915.523d7d7b@freyja.zeit4.iv.bundesimmobilien.de> In-Reply-To: References: <20170118084502.617bfc94@freyja.zeit4.iv.bundesimmobilien.de> Organization: Walstatt X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.29; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:yAsDvBK1spKeLkcbcD7AcO1hBXr2Uh/abwpkbONIuXlrjcy0vu6 SUoywfB7WDs3F2pFPSUviU+ZAceE4WzhdyPi6XkrfYPEC2H2rwAqxU+WLASGgU25JS1nWjS BsDbWJyS7flfM7gxe3fZEJbMzoe4SDkF9SbsGbCzpWoJ0RhUyKKIlQtRl4Bz/z1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7jSPpn5XnMGjWFZBiQie2En8n+rZ22MgKsZ2rO1k/4REU5CfwO6H6MvlZ6l HMajr3qHUhOYla/Ise0ANW8= X-Mailman-Approved-At: Wed, 18 Jan 2017 12:21:44 +0000 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jan 2017 09:19:40 -0000 On Wed, 18 Jan 2017 10:43:58 +0200 Daniel Kalchev wrote: > I never use the pre-built ISO images for tasks like this. Here is a scrip= t I > use to build my own USB boot drive. The drive contains the full OS to boot > and also a copy used to create a new system. I make these boot drives from > time to time, to stay current. Please note the script is few years old (f= or > 9-stable) and you might want to twiddle with boot partition size if they > grew. You need to have done bouildworld/buildkernel on the host before us= ing > this script. >=20 > $ cat createuboot > #!/bin/sh > # target USB drive to write to > disk=3Dda1 > # use the current date for labels > today=3D`date "+%Y%m%d"` > # wipe out partition data form drive > # do it twice to wipe more stuff (might not be needed anymore) > gpart destroy -F $disk =20 > gpart create -s GPT $disk > gpart destroy -F $disk =20 > # GPT label the drive > gpart create -s GPT $disk =20 > # bootstrap partition=20 > gpart add -b 34 -s 128 -t freebsd-boot $disk =20 > # partition for the OS > gpart add -a 4k -t freebsd-ufs -l boot$today $disk=20 > # write bootstrap code > gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 $disk >=20 > # format file system > newfs /dev/gpt/boot$today >=20 > # mount file system > mount -o async /dev/gpt/boot$today /mnt >=20 > # install FreeBSD > cd /usr/src > make installworld DESTDIR=3D/mnt > make distribution DESTDIR=3D/mnt > make installkernel DESTDIR=3D/mnt > # Create new =E2=80=9Cclean=E2=80=9D copy of FreeBSD for later use > mkdir -p /mnt/root/FreeBSD > make installworld DESTDIR=3D/mnt/root/FreeBSD > make distribution DESTDIR=3D/mnt/root/FreeBSD > make installkernel DESTDIR=3D/mnt/root/FreeBSD >=20 > # copy scripts > cp -r ~/scripts /mnt/root >=20 > echo /dev/gpt/boot$today / ufs rw,noatime 0 1 > /mnt/etc/fstab > umount /mnt >=20 >=20 > You might add more customizations, such as dhclient and starting sshd > in /etc/rc.conf of the boot drive. >=20 > Hope this helps=E2=80=A6 >=20 > Daniel >=20 >=20 > > On 18.01.2017 =D0=B3., at 9:45, O. Hartmann wr= ote: > >=20 > > I ran into a very nasty situation where I need to save/restore/reinstal= l a > > in-installworld-crashed recent current. > >=20 > > While the /usr/obj and /usr/src as well as /etc folders are intact > > (residing on a Samsung 850 pro SSD with UFS and journaling), /boot/kern= el > > vanished and most binaries in /bin and /sbin are of Null size. > >=20 > > I treid to rescue the system by intending to use the most recent CURREN= T ISO > > image found on the snapshot server for USB drives, booted this successf= ully > > and then mounted the failes filesystems into the proper place (/usr/obj > > and /usr/src onto USB devices /usr/obj and /usr/src respectively, the r= est > > goes into /mnt). > >=20 > > I tried then to perform a make installworld with DESTDIR=3D/mnt set. Bu= t I > > fail: the minimalistic USB image does not have any CLANG/LLVM stuff > > required for the rescue! > >=20 > > Where the hell did this stuff go? Has it been ripped off due to the 1 GB > > ancient flash size?=20 > >=20 > > Help is needed. I've already posted to CURRENT a message, but I guess I > > always hit the wrong subject line. It seems that the key to my saviour = is > > to have a flash drive with a recent CURRENT containing a cc compiler - > > otherwise /usr/obj is useless. > >=20 > > Kind reards, > >=20 > > Oliver > > _______________________________________________ > > freebsd-current@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-current > > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.o= rg" =20 >=20 > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" Hello Daniel, thank you very much for responding! I just looked into "makeing release". I have a lot of NanoBSD images and bu= ild environments for our purpose at work, but I always strip off the compiler, too :-( I was realy badly surprised that on the ISOs the compiler is not present - = for the sake of space? If so, then best practice would be to melt everything do= wn to 1,66 MB size - as an ancient floppy would contain. Or better, Null. Sorry ... It is hard these days to purchase 1GB USB flash drives, most of t= hem do have 2 GB at least. As your own approach indicates, the ISOs are useless in such cases and I consider them as a toying thingi, nothing more. it is probably the best to = have a complete emergency ISO at hand - as your script provides. Again, thanks for the script. I need to adjust the kernel and will create t= hen my own USB drive. Kind regards, Oliver