Date: Fri, 22 Jan 2010 07:02:53 +0200 From: Dan Naumov <dan.naumov@gmail.com> To: "Thomas K." <fwd@gothschlampen.com> Cc: FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org>, freebsd-questions@freebsd.org Subject: Re: Loader, MBR and the boot process Message-ID: <cf9b1ee01001212102r70b88806m21b167a2aa833362@mail.gmail.com> In-Reply-To: <cf9b1ee01001212049u6cffd8abo9efa380a8efa9609@mail.gmail.com> References: <cf9b1ee01001211957j43a9d6a9j3d1e29d19aebf418@mail.gmail.com> <20100122041237.GA22312@gothschlampen.com> <cf9b1ee01001212049u6cffd8abo9efa380a8efa9609@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jan 22, 2010 at 6:49 AM, Dan Naumov <dan.naumov@gmail.com> wrote: > On Fri, Jan 22, 2010 at 6:12 AM, Thomas K. <fwd@gothschlampen.com> wrote: >> On Fri, Jan 22, 2010 at 05:57:23AM +0200, Dan Naumov wrote: >> >> Hi, >> >>> I recently found a nifty "FreeBSD ZFS root installation script" and >>> been reworking it a bit to suit my needs better, including changing it >>> from GPT to MBR partitioning. However, I was stumped, even though I >>> had done everything right (or so I thought), the system would get >>> stuck at Loader and refuse to go anywhere. After trying over a dozen >> >> probably this line is the cause: >> >> dd if=/mnt2/boot/zfsboot of=/dev/"${TARGETDISK}"s1a skip=1 seek=1024 >> >> Unless by "swap first" you meant the on-disk location, and not the >> partition letter. If swap is partition "a", you're writing the loader >> into swapspace. >> >> >> Regards, >> Thomas > > At first you made me feel silly, but then I decided to double-check, I > uncommented the swap line in the partitioning part again, ensured I > was writing the bootloader to "${TARGETDISK}"s1b and ran the script. > Same problem, hangs at loader. Again, if I comment out the swap, > giving the entire slice to ZFS and then write the bootloader to > "${TARGETDISK}"s1a, run the script, everything works. I have also just tested creating 2 slices, like this: gpart create -s mbr "${TARGETDISK}" gpart add -s 3G -t freebsd "${TARGETDISK}" gpart create -s BSD "${TARGETDISK}"s1 gpart add -t freebsd-swap "${TARGETDISK}"s1 gpart add -t freebsd "${TARGETDISK}" gpart create -s BSD "${TARGETDISK}"s2 gpart add -t freebsd-zfs "${TARGETDISK}"s2 gpart set -a active -i 2 "${TARGETDISK}" gpart bootcode -b /mnt2/boot/boot0 "${TARGETDISK}" and later: dd if=/mnt2/boot/zfsboot of=/dev/"${TARGETDISK}"s2 count=1 dd if=/mnt2/boot/zfsboot of=/dev/"${TARGETDISK}"s2a skip=1 seek=1024 Putting the swap into it's own slice and then putting FreeBSD into it's own slice worked fine. So why the hell can't they both coexist in 1 slice if the swap comes first? - Dan Naumov
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?cf9b1ee01001212102r70b88806m21b167a2aa833362>