LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-24-2013, 10:37 AM   #1
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,637

Rep: Reputation: Disabled
GRUB2 can't boot FreeBSD, neither directly nor via the loader


Only chainloading works. Here is part of my grub.cfg, first entry (chainloader) works, second (BSD loader) and third (BSD kernel) don't work:

Code:
### BEGIN /etc/grub.d/54_FreeBSD-9.1-chainloader+1 ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry 'FreeBSD 9.1 per Chainloader von /dev/sda3' --class freebsd --class bsd --class os {
# 'osprober-gnulinux-simple-66c11328-0deb-4ccf-a076-289178d8c1a5' 
# /dev/sda3 ist /dev/disk/by-uuid/50d5e52c10f44cae ... geht aber so nicht.
     insmod part_msdos
     insmod ext2
     if [ x$feature_platform_search_hint = xy ]; then
             search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos2 --hint='hd0,msdos3'  50d5e52c10f44cae
           else
             search --no-floppy --fs-uuid --set=root 50d5e52c10f44cae
           fi
     set root='hd0,msdos3'
     set gfxpayload=vga=normal
     chainloader +1
}
### END /etc/grub.d/54_FreeBSD-9.1-chainloader+1 ###

### BEGIN /etc/grub.d/55_FreeBSD-9.1-GRUB2 ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry 'FreeBSD 9.1 via /boot/loader' --class freebsd --class bsd --class os {
     insmod part_msdos
     insmod ufs2
     search --no-floppy --fs-uuid --set=root 50d5e52c10f44cae
     set gfxpayload=vga=normal
     set root=(hd0,msdos3)
     kfreebsd /boot/loader
}
### END /etc/grub.d/55_FreeBSD-9.1-GRUB2 ###

### BEGIN /etc/grub.d/56_FreeBSD-9.1-GRUB2-direkt ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

# nach http://forums.freebsd.org/showpost.php?p=56726&postcount=10

menuentry 'FreeBSD 9.1 per kFreeBSD direkt' --class freebsd --class bsd --class os {
     insmod part_msdos
     insmod ufs2
     set gfxpayload=vga=normal
     set root=(hd0,msdos3)
     search --no-floppy --fs-uuid --set=root 50d5e52c10f44cae
     kfreebsd        /boot/kernel/kernel
     kfreebsd_loadenv /boot/device.hints
     set kFreeBSD.vfs.root.mountfrom=ufs:/dev/ad0s3a
     set kFreeBSD.vfs.root.mountfrom.options=rw
}
### END /etc/grub.d/56_FreeBSD-9.1-GRUB2-direkt ###
The second entry produces a "can't load kernel" when selected and stays at the BSD-loader prompt. Trying "load /boot/kernel/kernel" shows no error but issueing a "boot" command just produces a new "can't load kernel"

Selecting the third entry shows some colorful spots on the screen and then reboots after 5 seconds or so. What could be wrong?

Last edited by JZL240I-U; 01-24-2013 at 10:43 AM.
 
Old 01-24-2013, 10:56 AM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
try insmod bsd

But grub2 is supposed to auto-detect freebsd.
Is grub2 properly installed with all parts?

do it manually to check.
 
Old 01-25-2013, 02:40 AM   #3
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,637

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by amani View Post
try insmod bsd.
Did that and no joy. I also added "insmod part_bsd", again no change.

Quote:
Originally Posted by amani View Post
But grub2 is supposed to auto-detect freebsd. Is grub2 properly installed with all parts?
Yes, it is supposed to auto-detect FreeBSD. But there is a bug, look here https://bugzilla.novell.com/show_bug.cgi?id=759635 and here http://forums.opensuse.org/english/g...ml#post2486361. I installed the supposed bugfix but it did not work either.

So I created the necessary files in /etc/grub.d/ by hand to get the grub.cfg from which I showed a snippet in my first post. Which fails ignominiously.

I suppose GRUB2 is properly installed, it boots uncomplainingly openSuSE 12.2, Ubuntu 12.04, Fedora 17, Mint 14 and chainloads the FreeBSD-loader. Exactly how would I check whether it is properly installed?

Last edited by JZL240I-U; 01-25-2013 at 02:43 AM.
 
Old 01-25-2013, 11:38 AM   #4
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
You can try compiling grub2 first from source
Check grub-mkconfig
remove existing grub
Install
 
Old 01-28-2013, 02:26 AM   #5
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,637

Original Poster
Rep: Reputation: Disabled
Well, no, this would be just fishing in muddy waters. As stated in my second post GRUB2 boots 4 Linux distributions and successfully chainloads the FreeBSD-loader. Just direct loading is botched. I suspect a wrong syntax (or parameterizatiion) in the grub.cfg but I have no clue where to set it straight.
 
Old 01-30-2013, 05:26 AM   #6
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,637

Original Poster
Rep: Reputation: Disabled
Okay, I found out why it won't work. First, though, I have to amdend this:

Quote:
Originally Posted by JZL240I-U View Post
...Yes, it is supposed to auto-detect FreeBSD...
No, it is not GRUB2 which doing the detection, but the "os-prober". It works now correctly after applying the methods from the links I posted earlier. "os-prober" is usually launched during a call to "grub2-mkconfig (-o /boot/grub2/grub.cfg)" (if not disabled).

Launching "grub2-mkconfig" and scanning the output revealed:
Code:
Found FreeBSD on /dev/sda3
      FreeBSD is not yet supported by grub-mkconfig.
So that's why GRUB2 fails to start FreeBSD.

Thanks for your support, amani .
 
Old 03-02-2013, 10:38 PM   #7
wu78754
LQ Newbie
 
Registered: Mar 2013
Posts: 1

Rep: Reputation: Disabled
Forensic disk recovery

Hi JZL240I-U,

Sorry off topic here.
I read you mentioned about "one had to change the values of the bits five to seven times to make it forensically impossible to reconstruct the contents of the disk."
Where did you read that?
 
Old 03-04-2013, 03:43 AM   #8
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,637

Original Poster
Rep: Reputation: Disabled
That is not from this thread. When you have questions like these I'd suggest you open your own new thread or mail the member in question (currently me ). Anyhow, I don't exactly remember where I read that, but I can offer some links, where you might find more information:

http://www.tolvanen.com/eraser/
http://freshmeat.net/projects/securedelete/
https://ata.wiki.kernel.org/index.php/ATA_Secure_Erase
http://www.linuxquestions.org/questi...4/#post3183940
http://dban.sourceforge.net/
http://freshmeat.net/projects/securedelete/
http://www.linux.com/learn/tutorials...urely-on-linux

HTH.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to keep a tidy boot loader (GRUB2)? Seviath Linux - General 0 12-15-2011 03:52 AM
How do I change the GRUB2 Boot Loader Background Image? theif519 Linux - Newbie 3 05-01-2011 10:37 PM
I can't get grub2 to boot FreeBSD j1alu *BSD 12 02-11-2011 07:50 PM
LXer: Transitioning to the new GRUB2 boot loader LXer Syndicated Linux News 1 04-22-2010 08:37 AM
how can i install a grub loader if my system directly boot windows akhil_jadhav Linux - General 11 08-26-2007 03:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration