Loading FreeBSD from grub2
Apr 19, 2010
Never edit /boot/grub/grub.cfg directly! You have to make changes in a special file under /etc/grub.d so that your changes will not get overwritten every time you update kernels, etc.
I am using my disk device name here. Make sure you use the one that fits your system.
- hd0 hard drive number
- 3 partition of FreeBSD partition (indexed from 1)
- a slice of /boot partition
- # vi /etc/grub.d/40_custom
- #!/bin/sh
- exec tail -n +3 $0
- menuentry "FreeBSD 8.0-RELEASE" {
- insmod ufs2
- set root=(hd0,3,a)
- chainloader +1
- }
Run update-grub2 to merge the changes in /etc/grub.d/40_custom. You should also be able to verify that the new entry will be seen next time grub2 is loaded.
- # update-grub2
- # cat /boot/grub/grub.cfg | grep FreeBSD
Reboot and give it a try!
Post a New Comment
- Tags
- AI (1)
- ALIX (1)
- digitalfoo.net (2)
- embedded (6)
- FreeBSD (30)
- Java (1)
- Linux (26)
- misc (7)
- my projects (1)
- MySQL (2)
- NanoBSD (3)
- opensource (7)
- perl (1)
- PHP (3)
- programming (11)
- Python (1)
- security (4)
- Archives
- 2011
- February (1)
- March (1)
- June (1)
- July (1)
- August (1)
- 2010
- June (5)
- July (2)
- December (4)
- April (6)
- March (2)
- May (1)
- August (2)
- October (1)
- November (1)
- 2009
- August (7)
- July (8)
- April (4)
- May (4)
- December (2)
- June (1)
- September (1)
- November (4)
- October (1)
- Web Tools
- Index
- dig-shovel Live
- SQL Injection Encoder
- Links
-

