16563 Need to install FreeBSD on a Linux LVM2 partition - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Base System > Installing & Upgrading

Installing & Upgrading Installing and upgrading FreeBSD.

Reply
 
Thread Tools Display Modes
  #1  
Old March 23rd, 2010, 12:21
SIG_IGN SIG_IGN is offline
Junior Member
 
Join Date: Mar 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Need to install FreeBSD on a Linux LVM2 partition

Firstly, let me confess I have never used FreeBSd before. and I have Linux LVM setup on my laptop. Currently there are two distros opensuse and Debian (Lenny) installed and they are booting fine with GRUB. I have a two primary partition one for (/boot) and the other is swap. Rest 140 GB is Linux LVM. I have a logical volume of about 25GB free say for example (/dev/lenovo/bsd) . How can I install FreeBSD on this particular partition and configure grub accordingly to boot FreeBSD ? Waiting for some quick comments ,,,,
Reply With Quote
  #2  
Old March 23rd, 2010, 12:28
SirDice's Avatar
SirDice SirDice is offline
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,852
Thanks: 48
Thanked 2,061 Times in 1,890 Posts
Default

Quote:
Originally Posted by SIG_IGN View Post
How can I install FreeBSD on this particular partition and configure grub accordingly to boot FreeBSD ?
Quick and simple answer: you can't.
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
  #3  
Old March 23rd, 2010, 22:12
phoenix's Avatar
phoenix phoenix is offline
Moderator
 
Join Date: Nov 2008
Location: Kamloops, BC, Canada
Posts: 3,179
Thanks: 43
Thanked 715 Times in 587 Posts
Default

Delete the logical volume. Shrink the volume group by 10GB or so. Shrink the physical volume by the same. And then create a normal, primary partition using the free space. After that, install FreeBSD as per normal into that primary partition.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
  #4  
Old March 28th, 2010, 03:41
diablito diablito is offline
Junior Member
 
Join Date: Mar 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb lvm, fbsd and multiboot system

this thread prompts further questions. i'd like to set up a fedora, debian, fbsd multiboot system. after wrestling with geom_linux_lvm i finally read this thread (again) and realized that (at my level) using it on pre-existing lvm config is a wee bit more than i can chew. so my fdisk config would be this roughly:

/dev/sda1 200M (to make available as /boot on fedora)
/dev/sda2 200M (" " " " " " debian)
/dev/sda3 ~100G separate primary partition for entire fbsd system
/dev/sda4 205G lvm volume group hosting fedora & debian 100G each and 5G shared swap
unused 100+G room to grow

thoughts & questions:
1. unfortunately no separate /boot partition for fbsd. any drawbacks putting entire system on a single slice, particularly in this instance? purpose of this install is purely educational.

2. unused space on drive (100+G) would be available for expansion if needed. it seems this would be available via lvm or (g)vinum for fedora/debian *and* fbsd respectively. is this correct?

3. ???

TIA for your thoughts �e
Reply With Quote
  #5  
Old March 30th, 2010, 23:15
diablito diablito is offline
Junior Member
 
Join Date: Mar 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Grub & *bsd

Quote:
Originally Posted by SirDice View Post
Quick and simple answer: you can't.
really? with some simple modifications (system id set to 166) of the partition layout i mentioned previously i am booting openbsd from grub just fine. is freebsd so different? entering the following lines in my grub.conf do the trick:

Code:
title *BSD                   #this is the menu selection that appears in grub  
     rootnoverify (hd0,2)    #hd0=1st hard drive, 2=3rd partition which is my OpenBSD slice
     makeactive              #additional commands for grub so that it processes through
     chainloader +1          #its necessary steps.
simpler than i thought.

is freebsd an exception?

Last edited by DutchDaemon; March 31st, 2010 at 00:38. Reason: use [code] tags!
Reply With Quote
  #6  
Old March 30th, 2010, 23:23
diablito diablito is offline
Junior Member
 
Join Date: Mar 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default lvm and GRUB

apologies. my setup is not booting an lvm partition. i followed phoenix's advice and obtained a successful result.

i am wondering whether loading geom_linux_lvm at boot might not make it possible though...?
Reply With Quote
  #7  
Old March 31st, 2010, 07:59
vermaden's Avatar
vermaden vermaden is offline
Giant Locked
 
Join Date: Nov 2008
Location: pl_PL.lodz
Posts: 2,210
Thanks: 60
Thanked 637 Times in 352 Posts
Default

@diablito

It provides read only access to LVM metadata currently:

Quote:
Originally Posted by man geom_linux_lvm
The parser is able to read LVM2 Text Format metadata,
the logical volumes will be assembled and made available
under /dev/linux_lvm/. The metadata is read‐only,
logical volumes cannot be allocated or resized.
@SIG_IGN

You need to give FreeBSD one primary partition, no other options are possible.
__________________
Religions, worst damnation of mankind.
"FreeBSD has always been the operating system that GNU/Linux should have been." Frank Pohlmann, IBM
http://vermaden.blogspot.com
Reply With Quote
  #8  
Old March 31st, 2010, 16:10
dav dav is offline
Junior Member
 
Join Date: Mar 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by diablito View Post

Code:
title *BSD                   #this is the menu selection that appears in grub  
     rootnoverify (hd0,2)    #hd0=1st hard drive, 2=3rd partition which is my OpenBSD slice
     makeactive              #additional commands for grub so that it processes through
     chainloader +1          #its necessary steps.
I'm curious, why are you using chainloader+1?
Reply With Quote
  #9  
Old March 31st, 2010, 17:31
phoenix's Avatar
phoenix phoenix is offline
Moderator
 
Join Date: Nov 2008
Location: Kamloops, BC, Canada
Posts: 3,179
Thanks: 43
Thanked 715 Times in 587 Posts
Default

Quote:
Originally Posted by diablito View Post
thoughts & questions:
1. unfortunately no separate /boot partition for fbsd. any drawbacks putting entire system on a single slice, particularly in this instance? purpose of this install is purely educational.
FreeBSD doesn't need or use a separate /boot except in some very specific circumstances. Just leave /boot as a directory under the / filesystem.

Using a single slice (fdisk partition) is recommended. Just create your FreeBSD partitions inside of that slice.

Quote:
2. unused space on drive (100+G) would be available for expansion if needed. it seems this would be available via lvm or (g)vinum for fedora/debian *and* fbsd respectively. is this correct?
FreeBSD can use diskspace that is part of a DOS Extended Partition/Logical Partition just fine. It just can't be installed to a logical partition.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
  #10  
Old March 31st, 2010, 20:55
diablito diablito is offline
Junior Member
 
Join Date: Mar 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default grub

@ dav: mistake. i did a copy paste and clearly wasnt paying attn. apologies. it works just fine without the chainloader.
Reply With Quote
  #11  
Old March 31st, 2010, 22:26
diablito diablito is offline
Junior Member
 
Join Date: Mar 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default more on grub

apologies for excessive posts, wish i could edit them instead (though stating things clearly and correctly the 1st time would also be nice).

@dav: i need to rethink that. the chainloader +1 entry is needed to hand the boot process over to the bsd boot loader. there may be other incantations on grub that would work, but this is the one that worked for me.
Reply With Quote
  #12  
Old March 31st, 2010, 23:45
phoenix's Avatar
phoenix phoenix is offline
Moderator
 
Join Date: Nov 2008
Location: Kamloops, BC, Canada
Posts: 3,179
Thanks: 43
Thanked 715 Times in 587 Posts
Default

chainloader is the poor-man's way to do it, as there is no intelligence involved. GRUB just loads the first sector of whatever disk/partition it's pointed at, and then passes control over to it. Really only useful for filesystems and kernels that GRUB doesn't understand natively.

For proper support, where GRUB knows what's happening, you specify a proper "root (hd0,3,a)" entry (that points at the a partition inside of the 3 slice inside of the 0 disk, modify as needed for your own disk setup) and a proper kernel entry (pointed at /boot/loader).
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
  #13  
Old April 1st, 2010, 00:03
dav dav is offline
Junior Member
 
Join Date: Mar 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks - I thought chainloader was a windows kludge but I wasn't sure.

[ I btw, hve freebsd installed w/ no errors! Once I figure out how to launch it from grub, I'll see if it will boot]
Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Install FreeBSD along witht the existing Windows partition. elBoo Installing & Upgrading 18 March 23rd, 2010 23:02
Free BSD 4.X install Partition Error " / rdbrock Installing & Upgrading 16 January 17th, 2010 23:59
[Solved] Install freebsd over linux MrJake Installing & Upgrading 36 October 30th, 2009 20:34
mount linux ext3 partition ccc General 12 September 19th, 2009 08:56
How to install linux-f10-flashplugin10? register88 Multimedia 4 August 5th, 2009 00:19


All times are GMT +1. The time now is 02:04.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0