From owner-freebsd-hackers@freebsd.org Tue Oct 17 07:24:46 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 6981AE3117D for ; Tue, 17 Oct 2017 07:24:46 +0000 (UTC) (envelope-from crb@chrisbowman.com) Received: from mail-pf0-x232.google.com (mail-pf0-x232.google.com [IPv6:2607:f8b0:400e:c00::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 3DD672B88 for ; Tue, 17 Oct 2017 07:24:46 +0000 (UTC) (envelope-from crb@chrisbowman.com) Received: by mail-pf0-x232.google.com with SMTP id b6so719919pfh.7 for ; Tue, 17 Oct 2017 00:24:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisbowman-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=IfZ61Bq9e5tY+bjMxCwTD6rusY3/kxErrm+UqPzE1Pc=; b=io370iD7i2JDtcFDgEs/K9XmhmpqhCgUoF5eO+AGbozKo/76dKHy4GID692b44Idq8 j9xMUoXU7AKzJr9HvJJlwTqJKAEveQ+Wl1QNAYZ9rDocxSIiBnz3oDRmOZdmZfNRvR0I wvmbyFcfEcAp86pJCsfthcpB+tQQmTjxkMPeiuM3Oor1z6EJYhsqYR33YMAbUy0R3Mi7 RtUvS86jg/YVS6O4xQvTWpg5lVPYND9548jG2jDIn2QhMwvmCG/pT3U0kZYu++TKae4c GmkYarazIT/l6iEgzIPdrn5YlEn1anOoswMOxDQMb/Fk67iMWLalOv2wvLRYb46cZZG8 LONg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=IfZ61Bq9e5tY+bjMxCwTD6rusY3/kxErrm+UqPzE1Pc=; b=PT92D+TpmJeCiQnNKzTxVu0XMpQi+Ktkjwmn3GmeGI0vt61MTFAiWQzJFyOJjtctEo XEo87J4IkQc+U5Qsx5qTRlz3hkLLzPUNSmSuQEFi9S4mDJxkqFzIldgvLHW45O703rbN Vy4lSbT4rV9fM51pWZWA8c7m/YNLyaZEOKy4UlcERjw7JYq2so+N5TfFTIV+8aewJNIu YecLa0fXj2OmqXGVik00psL+eQ2HwqLgQg/sGJDEwBPR9hNlzk7Uo31sqo/thPg8/DyL Ph2s/QktUjXSQ0AFNCcYLGA10k2DW81yIdqENt9DjopkMvUdxP5zbP+d0q018fvdSYyI rWqg== X-Gm-Message-State: AMCzsaUaQt+7CFycZGS+qsFGUqFEA7M8SZkR6/a3ofVQVhn4jJnlVI2I MxdA4yQI0AKZMCXW2zhk5m0Dtr//+aGHIA== X-Google-Smtp-Source: AOwi7QAQgNjgGoU3kJfL5/+hJWlDFcvFEnePYLjuCjMEnA6jPhFD3b3UyZ3uaMgB6jK1uieRCBn7fw== X-Received: by 10.159.247.199 with SMTP id v7mr10948501plz.321.1508225085540; Tue, 17 Oct 2017 00:24:45 -0700 (PDT) Received: from ?IPv6:2601:647:4e00:bbb5:5d49:e9e8:ddd7:93cf? ([2601:647:4e00:bbb5:5d49:e9e8:ddd7:93cf]) by smtp.gmail.com with ESMTPSA id g5sm16939817pgo.83.2017.10.17.00.24.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Oct 2017 00:24:44 -0700 (PDT) From: Christopher Bowman Message-Id: <212A072E-D083-4622-BCF0-9C2FD88BE396@chrisbowman.com> Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: apart difficulties Date: Tue, 17 Oct 2017 00:24:43 -0700 In-Reply-To: Cc: freebsd-hackers@freebsd.org To: =?utf-8?Q?Roberto_Fern=C3=A1ndez?= References: X-Mailer: Apple Mail (2.3273) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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:24:46 -0000 Roberto, I=E2=80=99m not sure all my machines can boot a gpt partition so = I wanted the least common denominator. I have a handful of these cheap = small flash sticks that I intend to use for various version and there = isn=E2=80=99t really a benefit to gpt (except that it might actually = work). I would look into the code but I haven=E2=80=99t a clue where = that would be and I figured someone else might be more of an expert in = this area and could find it faster. Thanks for the comments and the gpt suggestion, I may actually = try that. Christopher > On Oct 17, 2017, at 12:02 AM, Roberto Fern=C3=A1ndez = wrote: >=20 > Hi Cristopher, >=20 > 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. >=20 > 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 config files and packages. As a result my machines = stay pretty up to date and 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 down the line and and install on one = machine after the other. My machine can now all boot off USB but = don=E2=80=99t all have DVD drives. >>=20 >> I have the following script below which I was using to try configure = an MBR 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.) >>=20 >> 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 >=20 > 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 >=20 > 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. >=20 >> # newfs da0s1a >> # mount /dev/da0s1a /mnt/usb >> # mdconfig -a -t vnode -f = /u1/ISOs/FreeBSD/11.1/FreeBSD-11.1-RELEASE-amd64-dvd1.iso >> # mount -t cd9660 /dev/md0 /mnt/dvd >> # cp -pr /mnt/dvd/* /mnt/usb >> # umount /mnt/usb >>=20 >> What I=E2=80=99ve found that=E2=80=99s interesting is that the slice = creation doesn=E2=80=99t seem to be persistent. By that I mean that if = I run the 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 remove the stick when I put it back in gpart show doesn=E2=80= =99t seems to show the BSD label, just the MBR slice >>=20 >> 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 >>=20 >> 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? >>=20 >> I appreciate your help. >>=20 >> 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 = "