You are not logged in.

#1 2010-03-20 04:18:01

655321
Member
From: Costa Rica
Registered: 2009-12-08
Posts: 412
Website

Arch entry in GRUB

Hi all, a little help here.

I just installed archlinux on a system I plan to triple boot (Ubuntu, Windows7, ARCH), but im getting problems with the ARCH entry on my menu.lst.

I formated the hard drive with a root partition for arch of 48Gb and ubuntu can see it perfeclty.

When I was installing arch I didnt install grub because I already have it on the ubuntu partition, but when I finished installing I rebooted and now GRUB doesnt load, So I used Super Grub Disk and I see grub is still there with all my custom partitions and I can boot all of them, but I dont know how to get THAT grub back in my MBR.

Also, I want to add the ARCHLINUX entry to Grub and dont know how. I have added the entries for ARCH and moved the initrd and vmlinuz files to the /boot directory on ubuntu, but it doesnt work. I did a similar thing with Acronis True Image rescue cds(to avoid having to insert the cd in order to use it) and it worked like a charm, but I am lost in this one.

sdb5 is where ARCH is, so it would be (hd1,4):

Here is my menu.lst, ARCH entries are at the bottom:

# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default        4

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout        10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
color cyan/black light-blue/light-gray

#A splash image for the menu
splashimage=/boot/grub/splashimages/splash.xpm.gz

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
## password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title        Windows 95/98/NT/2000
# root        (hd0,0)
# makeactive
# chainloader    +1
#
# title        Linux
# root        (hd0,1)
# kernel    /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=712ef7a1-d997-4bda-8992-e968c39ddcac ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=712ef7a1-d997-4bda-8992-e968c39ddcac

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
##      indomU=true
##      indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title        Ubuntu 9.10, kernel 2.6.31-20-generic
uuid        712ef7a1-d997-4bda-8992-e968c39ddcac
kernel        /boot/vmlinuz-2.6.31-20-generic root=UUID=712ef7a1-d997-4bda-8992-e968c39ddcac ro quiet splash
initrd        /boot/initrd.img-2.6.31-20-generic
quiet

title        Ubuntu 9.10, kernel 2.6.31-20-generic (recovery mode)
uuid        712ef7a1-d997-4bda-8992-e968c39ddcac
kernel        /boot/vmlinuz-2.6.31-20-generic root=UUID=712ef7a1-d997-4bda-8992-e968c39ddcac ro  single
initrd        /boot/initrd.img-2.6.31-20-generic

title        Ubuntu 9.10, memtest86+
uuid        712ef7a1-d997-4bda-8992-e968c39ddcac
kernel        /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title        Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title        Windows NT/2000/XP (loader)
root        (hd0,0)
savedefault
makeactive
chainloader    +1

#Acronis TrueImage Grub menu.lst entry
title    Acronis TrueImage Home v10.0
uuid    712ef7a1-d997-4bda-8992-e968c39ddcac
kernel /boot/acronis/kernel.dat quiet vga=788 ramdisk_size=40000
initrd /boot/acronis/initrd

#Acronis Grub menu.lst entry kernel.dat & ramdisk.dat from /media/WinXP/Program Files/Acronis/Disk Director
title Acronis Disk Director v10.0
uuid    712ef7a1-d997-4bda-8992-e968c39ddcac
kernel /boot/acronisDD/kernel.dat quiet vga=788 ramdisk_size=40000
initrd /boot/acronisDD/ramdisk.dat

# (0) Arch Linux
title  Arch Linux
root   (hd1,4)
kernel /boot/vmlinuz26 root=/dev/sdb5 ro
initrd /boot/kernel26.img

# (1) Arch Linux
title  Arch Linux Fallback
root   (hd1,4)
kernel /boot/vmlinuz26 root=/dev/sdb5 ro
initrd /boot/kernel26-fallback.img

So bottom line:
1- How to make super grub disk restore my grub with all my entries? im thinking maybe

grub-install sdb

2-How Do I get the ARCH entries in menu.lst so It will boot?

3-WHY if I DIDN'T installed grub when installing arch (Ihad it already on ubuntu and working fine), after installation grub doesnt load?

Regards and thanks in advance for the help.


Linux user #498977
With microsoft you get windows and gates, with linux you get the whole house!
My Blog about ArchLinux and other stuff

Offline

#2 2010-03-20 11:39:45

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

Re: Arch entry in GRUB


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

Offline

#3 2010-03-20 17:33:20

demian
Member
From: Frankfurt, Germany
Registered: 2009-05-06
Posts: 709

Re: Arch entry in GRUB

Your Ubuntu is using GRUB 2. You'll want to read this.

Boot into the Ubuntu Live CD environment using the Install CD.
Mount your Ubuntu root-partition (/) and, if you have it, the boot-partition (/boot) to /mnt and /mnt/boot.
Install Grub 2 into the MBR of the appropriate partition by using:
sudo grub-install --root-directory=/mnt /dev/sda
where /dev/sda should be replaced with the harddrive your Ubuntu is using.

Next create a backup of you grub.cfg and run this command to automatically configure your bootloader.
sudo grub-mkconfig -o /mnt/boot/grub/grub.cfg

Greets.

Last edited by demian (2010-03-20 17:48:04)


no place like /home
github

Offline

#4 2010-03-20 18:45:05

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Arch entry in GRUB

I'm not quite sure I can _answer_ your question - but I can tell you how _I_ do it ...
* sda1 ('mutliboot grub' partition - 50 megs - ext2 so everyone can mount it!!)
I install grub (not grub2) on this partition - ie all the grub files are in /dev/sda1/grub
Also - use a live cd (eg. grml, use the 2009-05 edition - it uses grub, the 2009-10 uses grub2) to install this initial grub.
* whenever I install another linux - I let it install its bootloader in the appropriate root filesystem - in your particular case, it would mean installing arch's grub on sdb5

In /dev/sda1 (which never gets mounted - unless I need to update its menu.lst), I just chainload to the appropriate entry:

title archlinux
   root (hd1,4)
  chainloader +1

It's never failed me, I have never had problems - and it lets each distro maintain its own boot environment. That being said - I hate the intrusiveness of grub2 where it attempts to find and set up a boot entry for everything I might and might not have. Usually - it gets everything else wrong anyway!!

Just my 2c's worth ...

Last edited by perbh (2010-03-20 18:48:36)

Offline

#5 2010-03-20 22:26:42

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Arch entry in GRUB

perbh wrote:

That being said - I hate the intrusiveness of grub2 where it attempts to find and set up a boot entry for everything I might and might not have. Usually - it gets everything else wrong anyway!!

Agreed. If you are stuck with Grub2, make sure you disable os probing: it is supposed to automatically detect and configure other OS'es, but it seems to just automagically fsck things up:

GRUB_DISABLE_OS_PROBER="true"

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2010-03-20 22:28:45

655321
Member
From: Costa Rica
Registered: 2009-12-08
Posts: 412
Website

Re: Arch entry in GRUB

Thank you all for your replies!

graysky:

Yeah I read the wiki article but I made the entry like that and get a "no such partition" error.

Demian:

No im NOT using grub2 because I upgraded from jaunty and on upgrades the legacy grub doesnt get overwritten big_smile forgot to mention that sorry. Nevertheless, Im going to try your approach and come back with results.

Perbh:

Never tought of it like that(Great Idea!), but everytime you install a new distro you need to get grub again in the MBR, right? Im guessing you use Super Grub Disk for that?

That way every OS will boot even if the kernel was upgraded and you dont need to specify again the commands big_smile

Going to try this also and come back with results big_smile

IMPORTANT: If I use super grub disk I can mount my ubuntu partition(where grub is installed) and boot arch from there, but I dont understand why if I reinstall THAT grub in the mbr again, the archlinux partitions doesnt boot, its pretty weird.

Last edited by 655321 (2010-03-20 22:33:51)


Linux user #498977
With microsoft you get windows and gates, with linux you get the whole house!
My Blog about ArchLinux and other stuff

Offline

Board footer

Powered by FluxBB