LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Dual Boot 32 & 64 bit Debian Lenny (https://www.linuxquestions.org/questions/debian-26/dual-boot-32-and-64-bit-debian-lenny-803062/)

mpyusko 04-20-2010 10:27 AM

Dual Boot 32 & 64 bit Debian Lenny
 
Ok, so here is the situation. I have a USB hard drive (2.5" 80GB self powered) that I usually have Linux installed on. I use it as a "fix it" drive for when I need to recover a system, or for other special purposes. I've had Debian/Lenny i386 on it running fine for quite some time. No problems there.

Now I just recently purchased a new computer and I'd like to add Debian/Lenny and64 to it (and keep i386 in place for my legacy systems). I'm not quite sure how to go about this. I tried installing them on completely separate partitions, sharing only swap, but this seems like a waste of space. I'm not sure how compatible the two are, like can I share /home, /boot, /var between them too?

/dev/sda1 = Fat32 12 GB
/dev/sda2 = Linux_swap (shared) 2 GB
/dev/sda5 = /boot (32) 100 MB
/dev/sda6 = / (32) 15 GB
/dev/sda7 = /home (32) 15 GB
/dev/sda8 = /var (32) 2 GB
/dev/sda9 = /boot (64) 100 MB
/dev/sda10 = / (64) 15 GB
/dev/sda11 = /home (64) 15 GB
/dev/sda12 = /var (64) 2 GB

I'm also running into issues with GRUB. After I install i386 (first) it works fine. Then after I install amd64 it gives me various errors (17 & 22). I'll manually edit the lines but even then it won't mount he partitions properly, and also has updating issues. I'm not a novice, but I'm not exactly a GRUB guru either. I know I need to define the kernel, then initrd, and the root partition. but it seem when I load up the system, It keeps moving the USB drive. Example: I edit and boot amd64 to use sda10 as the root partition. The kernel loads, initrd loads, and then it detects the USB drive as sdbx. Nothing mounts and the system hangs. I reboot and switch it to sdb10 as root. The system loads and then hangs when the USB drive is detected as sdcx. Argh!!! Now that amd64 has overwritten the boot sector, I can't seem to load i386 either.:scratch:

I would like to have both the i386 and amd64 kernels in the same /boot partition and listed in GRUB, and share as many other partitions as I can. I'm just not sure how to go about it and still keep it a clean enough system for apt to work with.

I know a few years ago I had my Slackware box dual boot both the 2.4.x kernel and the 2.6.x kernel so I could test hardware compatibilty before I commited to a switch. Both were 32-bit kernels, not one 32 and one 64, I was using Lilo not Grub, and I can't remember how I went about it.:doh:

Has anyone successfully done this? I really need some suggestions. Thanks.

AlucardZero 04-20-2010 12:52 PM

You can't mix 32 and 64 like that. You could potentially share /home and /var, but not /boot or any binaries. I think the easiest is to install 32-bit onto the drive with grub onto the MBR. Then install 64-bit onto a partition with grub onto its partition, and have the first grub chainload the second.

mpyusko 04-20-2010 01:18 PM

Quote:

Originally Posted by AlucardZero (Post 3941652)
You can't mix 32 and 64 like that. You could potentially share /home and /var, but not /boot or any binaries. I think the easiest is to install 32-bit onto the drive with grub onto the MBR. Then install 64-bit onto a partition with grub onto its partition, and have the first grub chainload the second.

"Potentially?"

&

"Chainload?"

AlucardZero 04-20-2010 02:04 PM

Sharing /home and /var looks fine to me at first glance; their purposes being architecture-independent afaik. But not having actually done it I don't know of any gotchas.

Chainload means the first grub passes control to the second which then boots the 64-bit. The first grub will have a stanza something like this:

Code:

title 64-bit
    root (hd0,1)
    chainloader +1


mpyusko 04-21-2010 02:49 PM

Quote:

Originally Posted by AlucardZero (Post 3941731)
Sharing /home and /var looks fine to me at first glance; their purposes being architecture-independent afaik. But not having actually done it I don't know of any gotchas.

Chainload means the first grub passes control to the second which then boots the 64-bit. The first grub will have a stanza something like this:

Code:

title 64-bit
    root (hd0,1)
    chainloader +1


Ok, I installed 32bit first and then placed it's grub in the MBR. Then I installed 64bit and worte it's grub into /dev/sda8. I used the code you wote and placed it in the 32bit grub muenu.lst file edit it to (hd0,7) and everything boots perfectly. I wound up with the following partitions...
/dev/sda1 = Fat32 30GB
/dev/sda2 = Linux_swap (shared) 2GB
/dev/sda3 = /boot 32 0.1GB
/dev/sda5 = / 32 15GB
/dev/sda6 = /home 32, 64 15GB
/dev/sda7 = /var 32, 64 2GB
/dev/sda8 = /boot 64 0.1GB
/dev/sda9 = / 64 15GB

Now the detials. I have to install everything twice, but the configutrations seem to pass OK from 32 - 64 and vice versa. The only issues I'm having are the mixer and kpowersave don't seem to function prpoerly in the 64bit version, and neither are Direct Rendering. It's not critical since this is for rescue purposes, not daily use. I left a 30GB FAT32 partition so windows an Linux have a common place to backup/transfer files.

I'll play with this some more and see how quick I can break it. LOL. Thanks for your help! That grub line seriously was what I was missing. :doh:


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