Date: Tue, 29 Jan 2013 09:51:58 +0700 From: Erich Dollansky <erichsfreebsdlist@alogt.com> To: Erich Dollansky <erichsfreebsdlist@alogt.com> Cc: freebsd-questions@freebsd.org Subject: Re: creating bootable disk with gpart Message-ID: <20130129095158.2832ead7@X220.ovitrap.com> In-Reply-To: <20130129080819.6607da61@X220.ovitrap.com> References: <20130128184407.70a03e5a@X220.ovitrap.com> <alpine.BSF.2.00.1301280840230.16420@wonkity.com> <20130129080819.6607da61@X220.ovitrap.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, On Tue, 29 Jan 2013 08:08:19 +0700 Erich Dollansky <erichsfreebsdlist@alogt.com> wrote: > Hi Warren, > > On Mon, 28 Jan 2013 08:41:10 -0700 (MST) > Warren Block <wblock@wonkity.com> wrote: > > > On Mon, 28 Jan 2013, Erich Dollansky wrote: > > > > > Hi, > > > > > > I followed http://www.wonkity.com/~wblock/docs/html/disksetup.html > > > to create bootable disks with GPT. > > > > > > As you know from my former post, I tried to boot via USB from a > > > GPT disk and failed. I inserted the disk into the notebook and > > > bootin also failed. > > > > > > Irony is that inserting the MBR disk into the USB case results > > > also in a failure but much later. > > > > What failure? > > it is all getting really confusing for me. When I try now your > example, it also fails: > > [X220]/home/erich (root) > gpart destroy -F da0 > da0 destroyed > [X220]/home/erich (root) > gpart show da0 > gpart: No such geom: da0. > [X220]/home/erich (root) > gpart create -s mbr da0 > da0 created > [X220]/home/erich (root) > gpart show da0 > => 63 312581745 da0 MBR (149G) > 63 312581745 - free - (149G) > > [X220]/home/erich (root) > gpart bootcode -b /boot/mbr da0 > bootcode written to da0 > [X220]/home/erich (root) > gpart show da0 > => 63 312581745 da0 MBR (149G) > 63 312581745 - free - (149G) > > [X220]/home/erich (root) > gpart add -t freebsd da0 > da0s1 added > [X220]/home/erich (root) > gpart show da0 > => 63 312581745 da0 MBR (149G) > 63 312581745 1 freebsd (149G) > > [X220]/home/erich (root) > gpart set -a active -i 1 da0 > active set on da0s1 > [X220]/home/erich (root) > gpart show da0 > => 63 312581745 da0 MBR (149G) > 63 312581745 1 freebsd [active] (149G) > > [X220]/home/erich (root) > gpart create -s bsd da0s1 > gpart: geom 'da0s1': File exists > [X220]/home/erich (root) > gpart show da0 > => 63 312581745 da0 MBR (149G) > 63 312581745 1 freebsd [active] (149G) > > Of course, there was a da0s1 before on the disk. Shouldn't gpart > destroy -F da0 have destroyed it all? > even using the image to install FreeBSD 9.0 from a thumbdrive gives the same result. It seems that old partitions re-appear after a deleted slice is created again. I then installed FreeBSD 9.0 from that thumbdrive onto that USB disk using a MBR schema. Of course, this booted after editing /etc/fstab. My problem are still the re-appearin partitions. I would like to have a script which flattens a media and creates new partitions and puts a new file system on each partition. There are now two options I have. Looking at the source (would be the ideal one) or do a hack deleting partitions which might not exist. The original problem of a GPT device not booting would still be there. I will go back to my normal work now. Erich
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130129095158.2832ead7>