DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD Installation and Upgrading

FreeBSD Installation and Upgrading Installing and upgrading FreeBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 22nd January 2010
Jago Jago is offline
New User
 
Join Date: Jan 2010
Posts: 7
Thanked 0 Times in 0 Posts
Default Loader, MBR and the boot process

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 different things, it downed on me to change the partition order inside the slice, I had 1) swap 2) freebsd-zfs and for the test, I got rid of swap altogether and gave the entire slice to the freebsd-zfs partition. Suddenly, my problem went away and the system booted just fine. So it seems that Loader requires that the partition containing the files vital to the boot is the first partition on the slice and that "swap first, then the rest" doesn't work.

The thing is, I am absolutely positive that in the past, I've had sysinstall created installs using MBR partitioning and that I had swap as my first partition inside the slice and that it all worked dandy. Has this changed at some point? Oh, and for the curious the installation script is here: http://jago.pp.fi/zfsmbrv1-works.sh
Reply With Quote
  #2   (View Single Post)  
Old 22nd January 2010
Jago Jago is offline
New User
 
Join Date: Jan 2010
Posts: 7
Thanked 0 Times in 0 Posts
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
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to boot from a CD with the FreeBSD BTX Loader? Turquoise88 FreeBSD General 6 25th August 2009 04:16 PM
How to disable FreeBSD boot loader? Turquoise88 FreeBSD General 2 17th July 2009 03:11 PM
Daemon Process not starting on boot map7 FreeBSD General 4 11th September 2008 04:24 PM
Deleted my /boot/loader enpey FreeBSD General 16 10th June 2008 10:02 PM
How to modify the boot loader? Sunsawe FreeBSD General 5 29th May 2008 05:13 AM


All times are GMT. The time now is 09:44 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick