You are not logged in.

#1 2008-05-27 13:48:27

atc
Member
From: Denmark
Registered: 2008-05-27
Posts: 17
Website

Grub and partitioning

Hey,

I have with great satisfaction for a year or so used Arch on my laptop. What I want to do now is install Arch on my desktop PC which currently runs Ubuntu and XP. This means that I in my transition will have three OS's. My concerns about this setup revolve around grub and my partioning.

My current setup:
- sda1 - 50gb - XP
- sda2 - 400gb - /home
- sda3 - swap
- sda4 - 50gb - /
- sdb1 - 500gb - various stuff

What I want is Arch Linux on a seperate partition and make it share /home and swap with Ubuntu

What's the best way of doing this? And how will grub react to a third?

Finally, is this project simply too stupid? I guess in this forum it wouldn't make sense to ask if I should just get rid of Ubuntu and replace it with Arch : ).

Offline

#2 2008-05-27 14:31:43

tigrmesh
IRC Op
From: Florida, US
Registered: 2007-12-11
Posts: 794

Re: Grub and partitioning

atc wrote:

*snip*

What I want is Arch Linux on a seperate partition and make it share /home and swap with Ubuntu

What's the best way of doing this? And how will grub react to a third?

Finally, is this project simply too stupid? I guess in this forum it wouldn't make sense to ask if I should just get rid of Ubuntu and replace it with Arch : ).

This is totally doable.  I triple boot XP, ubuntu and Arch.  And I have another partition available to add a 4th distro, should I so desire.

You can add all your Arch grub entries to your ubuntu grub, or you can chainload.  I left the ubuntu grub installed to the MBR because I assume (perhaps incorrectly) that ubuntu will overwrite the MBR whenever I install a new kernel.  Have a look here:  http://bbs.archlinux.org/viewtopic.php?pid=344598 and here http://www.justlinux.com/forum/showthre … did=143973.

Offline

#3 2008-05-28 08:10:29

atc
Member
From: Denmark
Registered: 2008-05-27
Posts: 17
Website

Re: Grub and partitioning

Hey,

Thanks tigrmesh. Nice to know and useful links.
For anyone interested I finished the installation last night - succesfully. Here's what I did:

- Using gparted I shrunk sdb1 by 40gb and created a new sdb2 partition (for Arch), I had no data loss
- Rebooted and installed Arch without bootloader, mounted / to sdb2, /home to sda2 and swap to sda3, so that Ubuntu and Arch share home and swap
- Rebooted and started Ubuntu, added the following to /boot/grub/menu.lst, above the Ubuntu and XP entries of course.

title  Arch Linux
root   (hd1,1)
kernel /boot/vmlinuz26 root=/dev/sdb2 ro vga=773
initrd /boot/kernel26.img

title  Arch Linux Fallback
root   (hd1,1)
kernel /boot/vmlinuz26thinkpad root=/dev/sdb2 ro video=vesafb:off acpi_sleep=s3_bios
resume=swap:/dev/sda3
initrd /boot/kernel26thinkpad.img

- To get these entries right, study the "resume=swap:/dev/sda3" line, the "root (hd1,1)" lines and the "root=/dev/sdb2" parts
- Rebooted and the tripleboot worked..

Perfectly! And without any data loss.

Good luck to equal minded out there.

Last edited by atc (2008-05-28 08:14:08)

Offline

#4 2008-05-28 12:35:21

arkay
Member
Registered: 2008-05-23
Posts: 79

Re: Grub and partitioning

Hi,

Fist post on the arch forums so I hope it's useful.  Am loving arch BTW, great idea and I'm wrapped that I found a distro that I think I will be calling home for a long time wink

Just wanted to mention how I partition my drives and why.  I use WinXP for gaming and I have OSX on my machine as well.  They both require primary partitions.  You could also have XP and Vista with this setup.

Here's what I do (assuming sata device sda).

sda1 (small as possible parition) -> Holds grub and nothing else.
sda2 (20GB) Windows (XP)
sda3 (30GB) Windows Vista or OSX
sda4 Extended partition (size of remaining drive)
sda5 2GB swap
sda6 10gb
sda7 10gb
sda8->sda(n) 10GB each (for the remainder of the drive).

I then use lvm to create a volume group from sda6->sda(n) giving me full use of the space.  I put /home in there as a general rule.

The beauty of this is that if you want to install and test another distro you can use lvm to free up one of the 10GB partitions (say sda5), then install a new distro on there.  The distro can share both the swap and lvm partitions from the other distro (if you feel safe to do so).

In this way you can have 2 primary OS's plus as many OS's (assuming 10GB per OS), that your drive can hold.

The catch is that you need to manually configure your menu.lst and grub config in /dev/sda1 to boot all the other partitions.

The other great thing is that you never need to re-partition the drive.  Even if you blow windows away you can just format that partition as lvm and use it to extend your /home or data logical volumes.

Hope the idea is explained well enough and is useful!

Cheers,

Arkay.

Last edited by arkay (2008-05-28 12:36:47)

Offline

Board footer

Powered by FluxBB