LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 04-09-2011, 03:06 AM   #1
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Rep: Reputation: 32
how do you multiboot with FreeBSD


before debian started using grub2 it was very easy to specify a loader from another partition but since grub2 came out it's a lot more complicated, you can no longer edit a text document menu.list, is there an easy way to edit the grub2 boot-loader to boot FreeBSD operating system since it doesn't recognize it from update-grub
 
Old 04-09-2011, 03:37 AM   #2
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
All you need to do to edit the grub.cfg file is put the entry you want in your /etc/grub.d/40_custom file and run, as root;
Code:
update-grub
if you run, again as root;
Code:
grub-mkconfig
it will print your grub.cfg file out there on your monitor so that you can check it.

I am afraid I know nothing about bsd and so I haven't a clue as to the menu entry to use. It will have to be in this format;
code]
echo "Adding Xubuntu 11.04B1 ISO on sda9" >&2
cat << EOF
menuentry "Xubuntu 11.04B1 ISO on /dev/sda9" {
loopback loop (hd0,9)/etc/aa/natty-desktop-amd64.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/etc/aa/natty-desktop-amd64.iso noprompt
initrd (loop)/casper/initrd.lz
}
EOF
[/code]
That is an entry for an Ubuntu LiveCD ISO. The parts in the "" you can have as anything you want.

The first on the "echo" line is what you see in terminal with "update-grub". The second in the "menuentry" line is what you see on your screen menu.
It is the stuff between the {}s that you need to get right. The only thing that my example can do along that line is to show where the {}s MUST be in relation to the entry.

I am sure a search will bring up and entry. I would run a thread search here;
http://ubuntuforums.org/showthread.php?t=1195275
for FreeBSD.
 
Old 04-10-2011, 11:16 AM   #3
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Original Poster
Rep: Reputation: 32
i just found the solution
Code:
menuentry    "FreeBSD 8.1" {
             insmod ufs2
             set root=(hd0,4)
             chainloader +1
}
keep in mind that the 4 should be changed to the partition number that FreeBSD is on i also think this works for OpenBSD
 
Old 04-10-2011, 12:33 PM   #4
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
This is very good news.

I believe that you are right about the entry working for OpenBSD. They would have to be doing something quite different for it to not work.

The new grub takes a bit of getting used to but it is more flexible and easier to bring up to date as new storage devices, file systems and so forth come on line.

You could start a new document "08_custom", copy your entry from 40_custom to it, delete the entry in 40_custom. This would put it higher up the process list and on top of your menu.

If you had a 07_custom with your Linux installs in it you could change the permissions of all your grub scripts starting with 10_linux up so that they did not execute. This speeds up grub as all those are no longer needed.

I use "symbolic" menu entries for all my Debian based installs. These just call for the newest kernel in the defined partition. They look like this;
Code:
echo "Adding Squeezy on sda9" >&2 
cat << EOF
menuentry "Squeezy on sda9" {
    set root=(hd0,9)
        linux /vmlinuz root=/dev/sda9 ro quiet splash
        initrd /initrd.img
}
EOF

echo "Adding Lounge on sda13" >&2 
cat << EOF
menuentry "Lounge on sda13" {
    set root=(hd0,13)
        linux /vmlinuz root=/dev/sda13 ro quiet
        initrd /initrd.img
}
EOF
Note that I could install any Debian based OS on either of those partitions and not change the menu entry at all. True, the title would be wrong. What ever kernel was on the partition would boot though.

This is what I think the grub folks have in mind for people to do if they want a low or no fuss boot loader.

As a note. The Lounge entry is for Ubuntu 10.04, known here as Lounge Lizard, has no "splash" in the instruction string as plymouth will not allow me to boot if the splash is active. That is why there is that difference.

Without the other scripts executable I have no recovery option. This is not a problem. If you need it simply hit e and your highlighted entry is then editable. Remove the instructions "quiet splash" and replace with "single". Hit Ctrl+x to boot.s

The entries in 07_custom will appear on the screen menu above those in 08_custom. If you want that reversed just rename 07_custom to 09_custom (08 to 06 would work too).

ANY/ALL changes to your grub.d directory must be followed by running "update-grub".
 
Old 04-10-2011, 12:39 PM   #5
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Original Poster
Rep: Reputation: 32
debian based distros (which is most installs fedora/redhat and bsd based installs aren't very commonly used) can automatically be loaded with the
Code:
#update-grub
command same goes for windows, it will detect and find the os, on one condition that grub needs to be installed on that particular linux partition before you install it to the mbr again to run the update command with the os you choose to be your main os (mostly the distro you installed first)

Last edited by baronobeefdip; 04-10-2011 at 12:40 PM.
 
Old 04-10-2011, 02:34 PM   #6
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
Quote:
Originally Posted by baronobeefdip View Post
debian based distros (which is most installs fedora/redhat and bsd based installs aren't very commonly used) can automatically be loaded with the
Code:
#update-grub
command same goes for windows, it will detect and find the os, on one condition that grub needs to be installed on that particular linux partition before you install it to the mbr again to run the update command with the os you choose to be your main os (mostly the distro you installed first)
Yes they will and usually the RH ones too (getting better anyway). That is great on a first boot. After that it is kind of slow coming up because the /boot/grub/grub.cfg file is just too big. Update grub also takes too long every time it needs run (grub_pc, grub-common or kernel updates). Every script in /etc/grub.d gets run at that time.

You can see this easily if you look at the grub.cfg file in full. Easiest done by as root;
Code:
grub-mkconfig
That is 7 (or 8 if you got an update that you did not allow to over write a previous version of one of them) scripts that have to be run each time you run update grub and a much larger grub.cfg file that must be read to load your screen menu. If you put all your entries in one custom file and disable the scripts above it (the higher the number the later it gets run) then you only have 3 scrips that need run at update-grub and a much shorter grub.cfg file that must be read.

I use 3 custom files because I change things around quite a bit. One for my main drive, one for sdb and one for ISO entries. That way if I am not fooling around with Ubuntu (nice play OS) or looking at the ISO booted OS' but just using the 3 installs on my main I can shorten the grub time by disabling 2 scripts. Most folks only need one but how ever you go it is snappier.

When Ubuntu 9.10 testing was going on they sprang grub2 on us at Alpha2 with no documentation to speak of anywhere. The next two weeks were really interesting. That version of grub would not reliable boot from installs on / and /home, just off installs on /. Made figuring out what was wrong even more fun. We also spent a lot of time editing the grub.cfg file directly which is fine until the nest time update-grub is run (we were getting 3-4 kernel updates a week, sometimes more than 1 a day). FUN times.
 
Old 04-11-2011, 10:55 AM   #7
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Original Poster
Rep: Reputation: 32
how do i disable or extend the grub countdown
 
Old 04-11-2011, 11:30 AM   #8
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
In your /etc/default/grub file you will find;
Code:
GRUB_DEFAULT=0
GRUB_TIMEOUT=100
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="
As you can see I have a very long time out. I like to have the option of reading what is, at times, a very long menu.

Setting the time out at 0 will leave you with no time out. I really do like to be able to see the menu so I would, personally, leave it at 3 or less so you have the option of hitting a key and stopping the time out. If you are fast even 1 will leave you that option.

As with ALL changes to grub, update-grub must be run to set the change in place.

Last edited by widget; 04-11-2011 at 11:31 AM.
 
Old 04-11-2011, 12:49 PM   #9
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
@widget
GRub_TIMEOUT=-1 makes indefinate
 
Old 04-11-2011, 12:55 PM   #10
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
Quote:
Originally Posted by EDDY1 View Post
@widget
GRub_TIMEOUT=-1 makes indefinate
When on earth did that happen? It is easy to fall behind the times.
 
Old 04-11-2011, 04:26 PM   #11
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Original Poster
Rep: Reputation: 32
when you say no time out do you mean the menu will show until i choose an os
 
Old 04-11-2011, 06:26 PM   #12
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
Quote:
Originally Posted by baronobeefdip View Post
when you say no time out do you mean the menu will show until i choose an os
No. The time out lasts until booting the default menu entry (also set in that file - counting starts with 0). If you set it to 0 you will not see the menu.
 
Old 04-11-2011, 09:27 PM   #13
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
http://www.dedoimedo.com/computers/g...mozTocId624480
 
Old 04-13-2011, 01:09 PM   #14
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Original Poster
Rep: Reputation: 32
i want it to set to where this is no timer just display a menu without doing anything until i choose something
 
Old 04-13-2011, 03:08 PM   #15
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
See post #9 that's the answer.
 
  


Reply



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
Filesystem Read/Write Support in FreeBSD? / Share files Linux btw FreeBSD pseudonomous *BSD 3 01-29-2009 04:59 AM
LXer: Desktop FreeBSD Part 9: FreeBSD and Broadband LXer Syndicated Linux News 0 10-31-2007 09:00 AM
updating FreeBSD 6.0 to FreeBSD 6.2 without Console (single user access) kur1j *BSD 2 08-17-2007 07:12 AM
Win2k, GNU/Linux, FreeBSD Multiboot Situation cparker15 Linux - Newbie 1 06-13-2003 04:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 11:43 AM.

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