From owner-freebsd-hackers@freebsd.org Tue Oct 17 07:02:22 2017 Return-Path: Delivered-To: freebsd-hackers@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 4D5C9E2F979 for ; Tue, 17 Oct 2017 07:02:22 +0000 (UTC) (envelope-from roberfern@gmail.com) Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D71FA204B for ; Tue, 17 Oct 2017 07:02:21 +0000 (UTC) (envelope-from roberfern@gmail.com) Received: by mail-wm0-x232.google.com with SMTP id t69so1675956wmt.2 for ; Tue, 17 Oct 2017 00:02:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=OA/XGXmOEMtj1FA9u09OZtpnQ8FkaPB4CAdkSQEJylI=; b=G6/eK4yiKnxQX4wQDsfkPLqHKHsZZw7HQGUW1d1tsgGnuLEmWyZgxfb9R52XM6yKjE GHwnr5il+Ky4wihjPVshREPyYFc4JoNbitulfcaR+sSmiVD8cfzrqDprzLMS53oGZE96 X3z9pB1yebwX91yxgmGegp98KFdxJK3jE8b214zkyMnqikMnl1D8+0dNI/bSWoYRJMrc 0Fu4G6dYlZFJskosdRbmT9jCRlQudr7+vHX/o/UBHihuakATSU4Wck+jHpf8oLLl6id/ leLpilHjIXIe3VQAHaL/L5q4b62t/sqsQrA0aHM8H3eNbsscGNCt+aaLQuhJL22QfVH4 uX3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=OA/XGXmOEMtj1FA9u09OZtpnQ8FkaPB4CAdkSQEJylI=; b=f+yDPm+nhnpPDsYOarDd7o/43eS8bgNJNdSOELyrmOmR+jEvzCpSinlQ/7PigjJiDL Z1LCGCzBdKWt5pzR70nm9RyGttZur+uzvESuEi2fU3pWlqRhw8ApMZkpc2tD2dCBnWK0 U9tN8n+an+wUUF2q2V5A0f2RCK23KXW+495MEjfb8z+iMrxaccp8MwLu6rmS4eSSSMa8 WwJVuj+SwkY4LqHelgrwEXUuyL3KNRn+a7q0XjEPKfUJSVY3kB2WxGBURGJ3DZOQ7JAs ovUvgDUcE9PEYaPlVC5D6n33c88Kk8Bp4mhUMw3znM/uHYxSiu0/8ONyfVPZmO5Ts8aL Kc4A== X-Gm-Message-State: AMCzsaUp1T51bTE3SdmEJF68oWY/ZHTrLs/RXu/145adrdDLtpyS9VL+ h2rpS/oYtzVKpmkjU3/U252JK0OX+0/q1KFxVBUq4Q== X-Google-Smtp-Source: AOwi7QCV8mcTR4PXVpWfGpgUYbiM1KoaRnWJjLq6bDAbeoSU5aQTYjaXxlcVKTeTIH2ZfIUQVDbWrZccCuXOi6DFO3s= X-Received: by 10.80.204.72 with SMTP id n8mr15859874edi.122.1508223740155; Tue, 17 Oct 2017 00:02:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.214.12 with HTTP; Tue, 17 Oct 2017 00:02:19 -0700 (PDT) In-Reply-To: References: From: =?UTF-8?Q?Roberto_Fern=C3=A1ndez?= Date: Tue, 17 Oct 2017 09:02:19 +0200 Message-ID: Subject: Re: apart difficulties To: Christopher Bowman Cc: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Oct 2017 07:02:22 -0000 Hi Cristopher, before starting I was wandering why have you chose a MBR partitioning scheme instead of a GPT one, but never the less, I will try to help you with that. 2017-10-17 6:13 GMT+02:00 Christopher Bowman : > I have a home server with a fairly large amount of zfs disk space where I= keep all of my persistent data. As a result when new releases of FreeBSD = come out I tend backup the root images of my machines to the zfs pool and, = starting with the least important box, I blow away all the local partitions= and reinstall from scratch. Then I mount the server zfspool and restore c= onfig files and packages. As a result my machines stay pretty up to date a= nd clean. Lately rather than burning DVDs I=E2=80=99ve decided that I will= create a usb boot disks containing the entire DVD contents and simply go d= own the line and and install on one machine after the other. My machine ca= n now all boot off USB but don=E2=80=99t all have DVD drives. > > I have the following script below which I was using to try configure an M= BR bootable memory stick. The commented out lines are a reminder to myself= of how to copy over the ISO contents to the slice I create (I only do this= when there is a new release so I forget.) > > gpart create -s MBR da0 > gpart add -i 1 -t freebsd da0 > gpart set -a active -i 1 da0 > gpart bootcode -b /boot/mbr da0 > gpart create -s BSD -n 8 da0s1 > gpart add -t freebsd-ufs -i 1 da0s1 > gpart bootcode -p /boot/boot -i 1 da0s1 If you do here the following (instead of what you did above) should work just fine: gpart create -s GPT da0 gpart add -i1 -s 256k -t freebsd-boot -b 40 da0 gpart add -i2 -t freebsd-ufs da0 gpart bootcode -b /boot/pmbr -p /boot/gptboot -i1 da0 If you insist in having a BSD partitioning inside a MBR one, I should took a deeper look into the code and analyze why it is not working as it should. > # newfs da0s1a > # mount /dev/da0s1a /mnt/usb > # mdconfig -a -t vnode -f /u1/ISOs/FreeBSD/11.1/FreeBSD-11.1-RELEASE-amd6= 4-dvd1.iso > # mount -t cd9660 /dev/md0 /mnt/dvd > # cp -pr /mnt/dvd/* /mnt/usb > # umount /mnt/usb > > What I=E2=80=99ve found that=E2=80=99s interesting is that the slice crea= tion doesn=E2=80=99t seem to be persistent. By that I mean that if I run t= he above script (included the commented stuff.) I can clearly see the /mnt= /usb contents are the same as the DVD. If I then unmount /mnt/usb and remo= ve the stick when I put it back in gpart show doesn=E2=80=99t seems to show= the BSD label, just the MBR slice > > If I reinsert and do the following: > gpart create -s BSD -n 8 da0s1 > gpart add -t freebsd-ufs -i 1 da0s1 > gpart bootcode -p /boot/boot -i 1 da0s1 > fsck /dev/da0s1a > mount /dev/da0s1a /mnt/usb > > Then the file system is there just as before. The slice creation doesn= =E2=80=99t seem persistent. Am I missing something? Is there something I = have to do to commit the slice? Is this a bug? > > I appreciate your help. > > Christopher > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= "