|
FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
How to modify the boot loader?
Hi,
I have a multi FreeBSD boot on my box. I noticed that the boot loader can "remember" the last system that has been started. I would like to know how i could, within the system, modify this. How to select which system would be started by default at next reboot? Thanks |
|
|||
maybe i was not clear, i don't want to modify any slice thing.
I just want to modify the boot loader to choose which system would be started. I could as well have a linux or a windows system on and I would like to be able to choose them as well. |
|
||||
boot0cfg(8)
To boot slice 2 on the next boot: boot0cfg -s 2 ad0 Since "-o update" is default the change should be written to MBR until you change it again. But I didn't test it so I don't know if it's just for the next boot. |
|
||||
The FreeBSD Boot manager (the bootloader is a different beast that ocours just before the kernel is loaded) is very simple, and is this way by design. FreeBSD's boot Manager is contained within the MBR (Master Boot Record of "Boot Sector"- most others use a boot sector to simply locate and call another executable stored elsewhere.
While this makes FreeBSD's more robust - You can wipe and replace all partitions on a drive without killing it - it does mean that the space for the boot manager is very limited - 446 Bytes to be precise - So it cannot be very intelligent. I hope you will now understand why this step seems so primitive. However, you can configure it, using the boot0cfg program. From my reading of man boot0cfg(8), it is limited. You can usethis command to set the default boot slice for the next boot: Code:
boot0cfg -s3 If that fails, your options are to let well enough alone, or install some other, more complex boot loader, like grub or lilo, which are all-singing and dancing boot loaders. There are even fully graphical boot loaders for true WIMPs. edit: thanks tuck! try Code:
boot0cfg -s 4 -o noupdate Code:
boot0cfg -o update
__________________
The only dumb question is a question not asked. The only dumb answer is an answer not given. Last edited by robbak; 28th May 2008 at 11:41 PM. |
|
|
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 |
How to modify the ls command? | bsdnewbie999 | OpenBSD General | 9 | 16th May 2009 08:20 AM |
FreeBSD boot loader menu is missing | PeterSteele | FreeBSD Installation and Upgrading | 0 | 26th November 2008 06:08 PM |
Deleted my /boot/loader | enpey | FreeBSD General | 16 | 10th June 2008 10:02 PM |