You are not logged in.

#1 2011-11-27 04:15:08

sagarchalise
Member
Registered: 2011-11-27
Posts: 6

Dual booting Arch with Ubuntu on LVM over LUKS, and GRUB2

I installed arch along with Ubuntu with ubuntu's grub on MBR on LVM over LUKS. Now I cannot boot to arch from menu entry originated by os-prober of ubuntu. Can anyone tell me what I should do ? Or is it that this can't be achieved and I need to have /boot in separate partition?  By the way I installed grub2 during arch installation but didnot put it in MBR.

Here is my harddrive partitions:
    /boot /dev/sda1 100MB [Ubuntu's Boot Partition]
   /dev/sda5 encypted partition with the following logical volumes:
    General-Home [Home partition of both]
    Ubuntu-Root [Ubuntu / partition]
    General-Swap [Swap Partition]
    Arch-Root [Arch / partion which contains /boot as well]


So my question is what is the content of custom entry in my ubuntu grub to boot to Arch OS ? Or am I doing it the wrong way ?

Offline

#2 2011-11-27 09:12:44

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

Re: Dual booting Arch with Ubuntu on LVM over LUKS, and GRUB2

sagarchalise wrote:

Now I cannot boot to arch

Have you ever been able to boot Arch if /boot is on of an encrypted partition?

Otherwise, perhaps on sda1 your Ubuntu /boot has overwritten your previous Arch /boot.

Offline

#3 2011-11-27 12:23:13

sagarchalise
Member
Registered: 2011-11-27
Posts: 6

Re: Dual booting Arch with Ubuntu on LVM over LUKS, and GRUB2

I didnot separate /boot during my arch installation. I thought ubuntu bootloader would handle that. Should I have had different /boot for arch as well outside the encrypted partion ?

Offline

#4 2011-11-27 13:53:58

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

Re: Dual booting Arch with Ubuntu on LVM over LUKS, and GRUB2

It sounds like Ubuntu is your main distro so do NOT choose to specify /dev/sda1 as /boot  and format it during Arch installation.

You can use the same /dev/sda1 for /boot within Ubuntu and Arch.

1) From Ubuntu, mount /Arch and copy initramfs-linux.img and vmlinuz-linux from your /Arch /boot directory to Ubuntu's /dev/sda1 /boot
2) Make sure the Arch entry in the Ubuntu grub menu is pointing to these two files.
3) Boot Arch
4) Uninstall grub from Arch
5) Empty the /boot DIRECTORY on your Arch partition
6) Put an entry in Arch's /etc/fstab to mount /boot on /dev/sda1, that way when a new kernel comes along the new initramfs-linux.img and vmlinuz-linux will get installed to the right place

Last edited by vacant (2011-11-27 13:55:03)

Offline

#5 2011-11-29 07:33:49

sagarchalise
Member
Registered: 2011-11-27
Posts: 6

Re: Dual booting Arch with Ubuntu on LVM over LUKS, and GRUB2

vacant wrote:

It sounds like Ubuntu is your main distro so do NOT choose to specify /dev/sda1 as /boot  and format it during Arch installation.

You can use the same /dev/sda1 for /boot within Ubuntu and Arch.

1) From Ubuntu, mount /Arch and copy initramfs-linux.img and vmlinuz-linux from your /Arch /boot directory to Ubuntu's /dev/sda1 /boot
2) Make sure the Arch entry in the Ubuntu grub menu is pointing to these two files.
3) Boot Arch
4) Uninstall grub from Arch
5) Empty the /boot DIRECTORY on your Arch partition
6) Put an entry in Arch's /etc/fstab to mount /boot on /dev/sda1, that way when a new kernel comes along the new initramfs-linux.img and vmlinuz-linux will get installed to the right place

Thanks exactly what I was looking for. On a different note Can I store arch img on a folder inside boot? like something "/boot/Arch/vmlinuz-linux" My update grub of ubuntu gives weird grub menu entry and I have to edit it every time. Basically it points the arch linux image as Ubuntu.

Last edited by sagarchalise (2011-11-29 07:34:15)

Offline

#6 2011-11-29 08:35:09

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

Re: Dual booting Arch with Ubuntu on LVM over LUKS, and GRUB2

The Arch img and kernel can be put in a "/Arch" directory on the boot partition. The grub menu entry just has to reflect that ( ... /Arch/vmlinuz-linux ... and  ... /Arch/initramfs-linux.img ...).

There must be a way to tell Ubuntu to put a sane Arch entry into the grub menu, so ask in the Ubuntu forums.

e.g. My only distro is Arch now. I have to correct Arch's grub building to get it to look sensible in grub2's grub.cfg. I have LVM partitions on top of a single encrypted /dev/sda2 with /dev/sda1 as a small unencrypted /boot, so in /etc/default/grub I include:

GRUB_CMDLINE_LINUX_DEFAULT="cryptdevice=/dev/disk/by-uuid/e0a0b194-d695-401c-bdbb-adf5b5ee03ad:secret quiet"

Offline

#7 2011-11-29 12:05:22

sagarchalise
Member
Registered: 2011-11-27
Posts: 6

Re: Dual booting Arch with Ubuntu on LVM over LUKS, and GRUB2

vacant wrote:

The Arch img and kernel can be put in a "/Arch" directory on the boot partition. The grub menu entry just has to reflect that ( ... /Arch/vmlinuz-linux ... and  ... /Arch/initramfs-linux.img ...).

There must be a way to tell Ubuntu to put a sane Arch entry into the grub menu, so ask in the Ubuntu forums.

e.g. My only distro is Arch now. I have to correct Arch's grub building to get it to look sensible in grub2's grub.cfg. I have LVM partitions on top of a single encrypted /dev/sda2 with /dev/sda1 as a small unencrypted /boot, so in /etc/default/grub I include:

GRUB_CMDLINE_LINUX_DEFAULT="cryptdevice=/dev/disk/by-uuid/e0a0b194-d695-401c-bdbb-adf5b5ee03ad:secret quiet"

What I was trying to say was would it be possible to customize `preset` for `mkinitcpio` so that img would be created at `/boot/Arch/` instead of `/boot/`.  For the grub thing I will certainly ask on ubuntu. Thanks

Offline

#8 2011-11-29 12:51:13

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

Re: Dual booting Arch with Ubuntu on LVM over LUKS, and GRUB2

Have a look at the mkinitcpio wiki page. But I don't think you need to worry about using a /arch directory as the Ubuntu names are different.

Offline

Board footer

Powered by FluxBB