Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LVM: dual booting 32 and 64 bit systems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
appetitus
Apprentice
Apprentice


Joined: 28 Sep 2003
Posts: 210

PostPosted: Sun May 10, 2009 7:32 am    Post subject: LVM: dual booting 32 and 64 bit systems Reply with quote

I have an Lenovo X61 mini-laptop (alsa not working, after endless trials). Naturally, it has all the Microsoft install software on a separate partition, and then XP Pro on another. So two disk partitions are already taken, and I cannot overwrite the disk MBR. That's a pita when trying various Linux installs (but not Gentoo of course).

For several months I've been dual booting two Gentoo setups, one i686 that runs everything and a Core2 setup that needs 32bit libs for everything I really need to do. I can partition boot with the NT boot manager fine. While not perfect, with this setup I can see how 64bit versions of SBCL, etc work while still being able to churn out development in 32bit land. The problem is that disk space is never right between the 32bit partition and the 64bit partition. I shuffle stuff around and symlink it, but that bandaid only lasts so long.

It seems like LVM would be a great answer, but I am wondering about booting. Can I use just one boot partition for dual boot? Even in 64bit land, isn't the GRUB partition loader a 32bit application? Do I need separate 32bit and 64bit boot parititions, with an extended partition for the rest of the disk as LVM? Any problems with multiple OSs mounting a shared LVM volume? Any problems with a 32bit LVM sharing a physical volume with a 64bit LVM ?

TIA.
_________________
Being a Gentoo user means living in a house inhabited by a family of crazed carpenters. When you wake up, the house is different. Maybe there is a new turret, or some walls have moved, or perhaps someone has removed the floor under your bed.
Back to top
View user's profile Send private message
x22
Apprentice
Apprentice


Joined: 24 Apr 2006
Posts: 208

PostPosted: Mon May 11, 2009 12:21 pm    Post subject: Reply with quote

One shared boot partition and another shared partition for LVM is enough for 32-bit Gentoo + 64-bit Gentoo.

I use it this way:
sda1 - Vista
sda2 - Vista Recovery
sda3 - /boot (shared for 32-bit and 64-bit Gentoo)
sda5 - LVM physical volume (shared for 32-bit and 64-bit Gentoo)
(32-bit is mostly unused.)


Same Grub can load both kernels.
Back to top
View user's profile Send private message
appetitus
Apprentice
Apprentice


Joined: 28 Sep 2003
Posts: 210

PostPosted: Wed May 13, 2009 4:42 am    Post subject: Reply with quote

x22 wrote:
Same Grub can load both kernels.


Fantastic!! thanks again.
_________________
Being a Gentoo user means living in a house inhabited by a family of crazed carpenters. When you wake up, the house is different. Maybe there is a new turret, or some walls have moved, or perhaps someone has removed the floor under your bed.
Back to top
View user's profile Send private message
appetitus
Apprentice
Apprentice


Joined: 28 Sep 2003
Posts: 210

PostPosted: Fri May 29, 2009 4:35 am    Post subject: Reply with quote

A followup, I borrowed another hard disk to experiment upon, so I had MBR booting available. Partition boots would be similar to the following:

I created boot (sda1) and swap (sda2) partitions, making the remainder of the disk LVM (sda3).

I installed a 64 bit system on a logical volume with that boot partition, so that the MBR and the sda1-boot partition were setup.

I installed a 32 bit system solely on a logical volume, no references to sda1.

On sda1, I created additional directories named "foo64" and "foo32". I moved all the kernel, ramdisk and map files from the 64 bit install into foo64 and moved over the files in the 32install's /boot into foo32. I then removed sda1 from /etc/fstab in the 64bit system.

Remember that having a symlink in your boot partition that loops "boot" to "." is rather important, gentoo gives you one, but lesser distros such as ublunt2 use ugly symlinks in /

in grub.conf, make sure to include the disk in all lines for kernel, etc.

so a sample kernel line is

(hd0,0)/boot/foo64/vmlinuz-blah

this way, identical names for kernel files in different OSs are fine, they exist in their own directory

thus the real boot partition, sda1 works independently of all installed OSs, as they have their /boot in their logical volume. GRUB is pretty old software nowdays, so this one time install will be fine for a long time to come. The individual OSs can modify their boot as needed, and you can copy and adjust into the real boot. I've got 4 OS installs now and about a dozen logical volumes, so testing out something new is swift.
_________________
Being a Gentoo user means living in a house inhabited by a family of crazed carpenters. When you wake up, the house is different. Maybe there is a new turret, or some walls have moved, or perhaps someone has removed the floor under your bed.
Back to top
View user's profile Send private message
appetitus
Apprentice
Apprentice


Joined: 28 Sep 2003
Posts: 210

PostPosted: Tue Mar 30, 2010 1:50 pm    Post subject: Reply with quote

Another way to solve multi-boots is to use

configfile

so that a grub install on some other partition can be chained to, via

configfile (hd0,3)/boot/grub/grub.conf

that keeps variable details localized
_________________
Being a Gentoo user means living in a house inhabited by a family of crazed carpenters. When you wake up, the house is different. Maybe there is a new turret, or some walls have moved, or perhaps someone has removed the floor under your bed.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum