You are not logged in.

#1 2009-10-31 13:11:24

Tg
Member
Registered: 2008-04-23
Posts: 35

[Solved] How to installing multi distro using same boot partition ?

Hi everyone !

I have ubuntu/ windows 7 working for awhile now, I want to install arch with it and share the boot partition with separate folder for each distro and mount it to /boot for each distro.  I have read someone mentioned make it work but I have no idea how to do it.

My partition scheme now

/dev/sda1   windows 7
/dev/sda5   /boot  <- have ubuntu  want to install /boot/arch in it
/dev/sda6   /   for ubuntu
/dev/sda7   /   for arch
/dev/sda8   / share home partition

Now I have install arch on sda7 but no idea how to do next...

thanks

Last edited by Tg (2009-11-01 10:04:47)

Offline

#2 2009-10-31 13:16:35

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: [Solved] How to installing multi distro using same boot partition ?

Tg wrote:

I have ubuntu/ windows 7 working for awhile now, I want to install arch with it and share the boot partition with separate folder for each distro and mount it to /boot for each distro.

Simply edit your menu.lst on /dev/sda5 adding an entry for Arch.  Or can can add two entries, one for arch, one chainloading arch's native grub screen via a +chainloader line.  See this wiki page for more.
http://wiki.archlinux.org/index.php/Grub

My system is setup this way; my menu.lst

timeout   5
default   0
color light-blue/black light-cyan/blue
splashimage /grub/arch.xpm.gz

title           Arch Linux
root            (hd0,2)
kernel          /boot/vmlinuz26 root=/dev/sda3 ro quiet acpi_enforce_resources=lax vga=773
initrd          /boot/kernel26.img

title           Arch Linux (testing)
root            (hd0,1)
kernel          /boot/vmlinuz26 root=/dev/sda2 ro quiet acpi_enforce_resources=lax vga=773
initrd          /boot/kernel26.img

title           Windows XP Professional x64 Edition
root            (hd0,0)
makeactive
chainloader     +1

title   GParted live 0.4.6-1 (07-Aug-2009)
root    (hd0,6)
kernel  /live/vmlinuz1 toram boot=live union=aufs noswap noprompt vga=788 ip=frommedia
initrd  /live/initrd1.img
boot

title   Memtest86+ v4.00 (22-Sep-2009)
root            (hd0,6)
kernel          /memtest86.bin

title   Arch Linux Native GRUB screen
root    (hd0,1)
chainloader +1

Last edited by graysky (2009-10-31 13:19:05)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2009-10-31 14:48:37

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Re: [Solved] How to installing multi distro using same boot partition ?

Kubuntu and Arch have been sharing a 150MB /boot nicely here

grub2:

menuentry " arch" {
set root=(hd0,2)
linux /vmlinuz26 root=/dev/mapper/vg-arch cryptdevice=/dev/sda3:vg ro quiet
initrd /kernel26.img
}

menuentry " kubuntu" {
set root=(hd0,2)
linux   /vmlinuz root=/dev/mapper/vg-kubuntu ro quiet splash
initrd  /initrd.img-2.6.31-14-generic
}

They use different kernel and initrd names

Last edited by vacant (2009-10-31 14:50:16)

Offline

#4 2009-10-31 14:55:47

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: [Solved] How to installing multi distro using same boot partition ?

@vacant - might not wanna confuse him.  I'm assuming that he isn't using grub2


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2009-10-31 15:11:43

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [Solved] How to installing multi distro using same boot partition ?

On Ubuntu keep /dev/sda5 mounted on /boot.

On Arch mount /dev/sda5 on /realboot. Then use mount --bind to mount /realboot/arch as /boot. (See man mount for fstab entries.) In menu.lst set root to the same partition as Ubuntu and use something like kernel /arch/vmlinuz26. Similarly for the initrd entry.

Edit: I just noticed you also intend on sharing /home. Be careful as this can lead to unexpected errors. I suggest keeping a separate data partition for shared data symlinked to from the real homes on the distros' partitions.

Last edited by fsckd (2009-10-31 15:16:44)


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#6 2009-10-31 19:27:54

Tg
Member
Registered: 2008-04-23
Posts: 35

Re: [Solved] How to installing multi distro using same boot partition ?

Thanks guys. I'll try that out tomorrow.

To fsckd: I think it shouldn't be a problem if I keep UID from two distro the same.

Last edited by Tg (2009-10-31 19:30:18)

Offline

#7 2009-10-31 19:35:16

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [Solved] How to installing multi distro using same boot partition ?

You could also use seperate folders on the boot partion for each distro. That way you are more or less sure that <insertautomatictoolhere> won't mess up your other distroes.

Edit: too late, stupid 500 error tongue

Last edited by Mr.Elendig (2009-10-31 19:39:22)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#8 2009-10-31 20:59:35

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [Solved] How to installing multi distro using same boot partition ?

Tg wrote:

To fsckd: I think it shouldn't be a problem if I keep UID from two distro the same.

That should work. cool


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#9 2009-11-01 05:51:18

Tg
Member
Registered: 2008-04-23
Posts: 35

Re: [Solved] How to installing multi distro using same boot partition ?

I'm back..

It still doesn't work..  I used grub to and tried

menuentry "Archlinux (chainloader, not working now)" {
    insmod ext2
    set root=(hd0,6)
    search --no-floppy --fs-uuid --set 696bf0a5-0161-461c-9c9f-929c2f73bf55 
    chainloader +1
}

menuentry "Archlinux (not chainloader)" {
    insmod ext2
    set root=(hd0,6)
    linux    /archlinux/vmlinuz26 root=UUID=696bf0a5-0161-461c-9c9f-929c2f73bf55 ro single 
    initrd    /archlinux/kernel26.img
}

both didn't work. First one give me "Error: Invalid Signature", second give me "Error: You need to load kernel first"

I copy /boot in arch to /boot/arch. Am I doing something wrong here ?

EDIT: I change both entry set root=(hd0,5). The first entry still not working but second got a little bit running but stop and said can't find device UUID=696bf0a5-0161-461c-9c9f-929c2f73bf55

Last edited by Tg (2009-11-01 06:03:41)

Offline

#10 2009-11-01 05:53:25

sHyLoCk
Member
From: /dev/null
Registered: 2009-06-19
Posts: 1,197

Re: [Solved] How to installing multi distro using same boot partition ?

graysky wrote:

@vacant - might not wanna confuse him.  I'm assuming that he isn't using grub2

I guess you were right.

Tg that code is not for grub but for grub2. You should take a look at graysky's code and implement it accordingly.

Last edited by sHyLoCk (2009-11-01 05:53:44)


~ Regards,
sHy
ArchBang: Yet another Distro for Allan to break.
Blog | GIT | Forum (。◕‿◕。)

Offline

#11 2009-11-01 06:04:46

Tg
Member
Registered: 2008-04-23
Posts: 35

Re: [Solved] How to installing multi distro using same boot partition ?

sHyLoCk wrote:
graysky wrote:

@vacant - might not wanna confuse him.  I'm assuming that he isn't using grub2

I guess you were right.

Tg that code is not for grub but for grub2. You should take a look at graysky's code and implement it accordingly.

But I use grub2. Sorry but I forgot to add that. Also I'm confuse on where I have to set root to in grub.cfg ?  /boot partition or / partition of distro.

Last edited by Tg (2009-11-01 06:07:42)

Offline

#12 2009-11-01 06:13:00

sHyLoCk
Member
From: /dev/null
Registered: 2009-06-19
Posts: 1,197

Re: [Solved] How to installing multi distro using same boot partition ?

/boot partition


~ Regards,
sHy
ArchBang: Yet another Distro for Allan to break.
Blog | GIT | Forum (。◕‿◕。)

Offline

#13 2009-11-01 06:17:01

Tg
Member
Registered: 2008-04-23
Posts: 35

Re: [Solved] How to installing multi distro using same boot partition ?

Hmm Edit didn't work for some reason, sorry for double post


thanks everyone for example config, I got one that work now. Not come out as I imagine ( I prefer using uuid ) but it's work now.

menuentry "Archlinux (not chainloader)" {
    insmod ext2
    set root=(hd0,5)
    linux    /archlinux/vmlinuz26 root=/dev/sda7 ro single 
    initrd    /archlinux/kernel26.img
}

Last question
which partition hd0,5 point to ? Also, it's possible to do chainloader ?

EDIT: thanks for answer. I felt stupid now because it said "root" so I tried to point at /.

Last edited by Tg (2009-11-01 06:18:43)

Offline

#14 2009-11-01 06:29:09

sHyLoCk
Member
From: /dev/null
Registered: 2009-06-19
Posts: 1,197

Re: [Solved] How to installing multi distro using same boot partition ?

Mark your thread as solved smile


~ Regards,
sHy
ArchBang: Yet another Distro for Allan to break.
Blog | GIT | Forum (。◕‿◕。)

Offline

#15 2009-11-01 10:20:01

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Re: [Solved] How to installing multi distro using same boot partition ?

sHyLoCk wrote:
graysky wrote:

@vacant - might not wanna confuse him.  I'm assuming that he isn't using grub2

I guess you were right.

Tg that code is not for grub but for grub2. You should take a look at graysky's code and implement it accordingly.

"grub2" is grub. Just as "grub legacy" is grub. The shorthand "grub" refers to the software but no longer implies a version. I made no assumption and clearly stated "grub2" even though this is the default for both Arch and Ubuntu. If you want to post grub legacy code you should make that clear,

This is recommended terminology: http://www.gnu.org/software/grub/

"GRUB 2 and GRUB Legacy

"Currently under development, GRUB 2, has replaced what was formerly known as GRUB (i.e. version 0.9x), which has, in turn, become GRUB Legacy.

Offline

#16 2009-11-01 10:56:42

sHyLoCk
Member
From: /dev/null
Registered: 2009-06-19
Posts: 1,197

Re: [Solved] How to installing multi distro using same boot partition ?

Arch linux till now ships off with grub legacy.  Even with the latest 2009.08 ISO.  I could care less about what ubuntu does.So you shouldn't just assume people are using GRUB2. That's all I wanted to point out.


~ Regards,
sHy
ArchBang: Yet another Distro for Allan to break.
Blog | GIT | Forum (。◕‿◕。)

Offline

#17 2009-11-01 11:13:12

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Re: [Solved] How to installing multi distro using same boot partition ?

sHyLoCk wrote:

Arch linux till now ships off with grub legacy.  Even with the latest 2009.08 ISO.  I could care less about what ubuntu does.So you shouldn't just assume people are using GRUB2. That's all I wanted to point out.

Good to see you using the correct terminology now. I did not "assume people are using grub2". I stated I was.

Offline

Board footer

Powered by FluxBB