View Single Post
  #2   (View Single Post)  
Old 22nd January 2010
Jago Jago is offline
New User
 
Join Date: Jan 2010
Posts: 7
Default

And before someone suggests that my script might be writing the bootloader into swap space, that was already pointed out to me on the mailing lists - I double-checked: 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 tested creating 2 slices, like this:

Code:
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:
Code:
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 works. So WTF, why can't they both coexist in 1 slice if the swap comes first?

Last edited by Jago; 22nd January 2010 at 04:58 AM.
Reply With Quote