Differences between current version and predecessor to the previous major change of KnowledgeBase/FreeBSD/BootPart.

Other diffs: Previous Revision, Previous Author

Newer page: version 5 Last edited on Sunday, 21 March 2010 3:25:44 by CyberLeo
Older page: version 3 Last edited on Sunday, 24 January 2010 5:35:37 by CyberLeo Revert
@@ -12,11 +12,13 @@
  
 In /boot, move boot out of the way, and replace with a symlink to ., so that the loader can find everything automatically when it looks in /boot. 
 <verbatim> 
 # cd /boot 
-# mv boot boot.block  
+# mv boot boot.blk  
 # ln -svf . boot 
 </verbatim> 
+  
+*Big Note:* /sbin/bsdlabel assumes its stage1 and stage2 bootcode is in /boot/boot and will happily write whatever happens to be here into the first track of the slice! This includes whatever the symlink points to, such as the list of directory structures itself! Remedy this by supplying '-b /boot/boot.blk' to tell bsdlabel where to find its bootcode.  
  
 Tell the first boot stage where the stage 3 loader can be found, as it can't understand symlinks: 
 <verbatim> 
 # echo "/loader" > /boot/boot.config 
@@ -25,7 +27,11 @@
 Tell the kernel where to find the proper root device, via a dummy fstab: 
 <verbatim> 
 # mkdir -p /boot/etc 
 # echo "/dev/ad0d / ufs rw 1 1" > /boot/etc/fstab 
+</verbatim>  
+...or via a setting in loader.conf:  
+<verbatim>  
+echo "vfs.root.mountfrom="ufs:/dev/ad0d" >> /boot/loader.conf  
 </verbatim> 
  
 Handle any unexpected problems. >~~.^< 

current version

The Nimble V5 doesn't seem to properly boot FreeBSD when it lies on a partition larger than roughly 200GB. The error manifests as either a 'Cannot find /boot/loader' or a forever-spinning pinwheel when it tries actually booting the kernel.

To get around this when you want a single large partition, place /boot on a separate partition! This requires some dinking around, because the kernel assumes that the partition it's loaded from is the root partition.

Sysinstall cannot properly create this, as it assumes root is always the 'a' partition. Unfortunately, the boot stuff assumes /boot will be on the 'a' partition, and that's much more difficult to change. So, after installation, switch the partition names:

a:   1048576       16  4.2BSD
b:   4194304  1048592    swap
c: 976562500        0  unused
d: 971319604  5242896  4.2BSD

In /boot, move boot out of the way, and replace with a symlink to ., so that the loader can find everything automatically when it looks in /boot.

# cd /boot
# mv boot boot.blk
# ln -svf . boot

Big Note: /sbin/bsdlabel assumes its stage1 and stage2 bootcode is in /boot/boot and will happily write whatever happens to be here into the first track of the slice! This includes whatever the symlink points to, such as the list of directory structures itself! Remedy this by supplying '-b /boot/boot.blk' to tell bsdlabel where to find its bootcode.

Tell the first boot stage where the stage 3 loader can be found, as it can't understand symlinks:

# echo "/loader" > /boot/boot.config

Tell the kernel where to find the proper root device, via a dummy fstab:

# mkdir -p /boot/etc
# echo "/dev/ad0d  /  ufs  rw  1  1" > /boot/etc/fstab

...or via a setting in loader.conf:

echo "vfs.root.mountfrom="ufs:/dev/ad0d" >> /boot/loader.conf

Handle any unexpected problems. >~.^<