2008/04/27

Como agregar FreeBSD al GRUB de Mandriva

Bueno ya tenemos instalado FreeBSD, ahora hay que agregarlo al GRUB de Mandriva, cuando instale FreeBSD le dije que no tocara el mbr.

Nos convertimos en root en Mandriva:


[dalfa@desktop ~]$ su
Contraseña:


Ejecutamos grub


[root@desktop dalfa]# grub


Con esto entraremos al shell de GRUB:


GNU GRUB version 0.97 (640K lower / 3072K upper memory)

[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename. ]

grub>



Necesitamos saber en que particion esta el /boot de FreeBSD, GRUB nombra distinto los dispositivos a Linux, escribimos "root (hd" y luego presionamos tab:



GNU GRUB version 0.97 (640K lower / 3072K upper memory)

[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename. ]

grub> root (hd0,
Possible partitions are:
Partition num: 0, Filesystem type unknown, partition type 0x82
Partition num: 2, Filesystem type unknown, partition type 0x7
Partition num: 3, [BSD sub-partitions immediately follow]
BSD Partition num: 'a', Filesystem type is ufs2, partition type 0xa5
BSD Partition num: 'b', Filesystem type unknown, partition type 0xa5
BSD Partition num: 'd', Filesystem type is ufs2, partition type 0xa5
BSD Partition num: 'e', Filesystem type is ufs2, partition type 0xa5
BSD Partition num: 'f', Filesystem type is ufs2, partition type 0xa5
Partition num: 4, Filesystem type is ext2fs, partition type 0x83
Partition num: 5, Filesystem type is ext2fs, partition type 0x83



GRUB te dice el nombre de las particiones en tu disco, /boot esta siempre en la primer particion (por defecto aunque eso depende de las opciones de instalacion), ahora sabemos que esta en (hd0,a).

Nos salimos de GRUB escribiendo quit.

Ahora como root editamos el archivo /boot/grub/menu.lst lo puedes hacer con vim o con tu editor grafico de preferencia. La entrada debe quedar asi:


title FreeBSD
kernel (hd0,a)/boot/loader
root (hd0,a)


Guardas tu archivo editado y listo. Solo reinicias y deberias poder ver FreeBSD en tu GRUB.

No hay comentarios: