You are not logged in.

#1 2011-03-04 10:07:39

chris_debian
Member
From: Wiltshire, UK
Registered: 2009-02-24
Posts: 284

[SOLVED] Test Installation- Dual Boot/ Grub Query.

Hi, all!

My machine recently broke, when using an inferior distro. I had to quickly install something that just worked (Linux Mint), as the machine had to be working before I went away with work. Now that I am back, I'd like to put everyone's favourite distro on my second HDD. It usually takes me a few days to get Arch just the way I want it, so rather than changing the MBR, I'd like to boot perhaps using a boot disk, until things look finished and tested (i.e., printing, etc). Obviously, it would make more sense just to have a new boot menu, but I'm confused by what is required if I ever want to change the distro on my first HDD, i.e, how does grub get updated?

I guess my question is, if I have two distros running on separate drives, how do I get Grub to update if I ever change the distro on my first hard drive, or just delete the distro on the first hard drive?

Really appreciate any guidance as I'd like to get the new Arch install started ASAP.

Many thanks,

Chris.

Last edited by chris_debian (2011-03-05 16:00:45)


Reasons why you may want to try GNU/Linux:

www.whylinuxisbetter.net/

Offline

#2 2011-03-04 20:27:17

chris_debian
Member
From: Wiltshire, UK
Registered: 2009-02-24
Posts: 284

Re: [SOLVED] Test Installation- Dual Boot/ Grub Query.

Before I start the install, can anyone help me figure out what information is important from the existing /boot/grub/grub.cfg? I was unable to find /boot/grub/menu.lst. I'm just trying to minimize the chances of me completely screwing-up access to the working installation that I currently have.

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
  set saved_entry=${prev_saved_entry}
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z ${boot_once} ]; then
    saved_entry=${chosen}
    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod ext2
set root='(hd0,3)'
search --no-floppy --fs-uuid --set 77066849-98a5-4a0a-bc05-30e72a058cd9
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 681a26e3-550b-4630-a075-9ecd1de94a43
set locale_dir=($root)/grub/locale
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/06_mint_theme ###
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 681a26e3-550b-4630-a075-9ecd1de94a43
insmod png
if background_image /grub/linuxmint.png ; then
  set color_normal=white/black
  set color_highlight=white/light-gray
else
  set menu_color_normal=white/black
  set menu_color_highlight=white/light-gray
fi
### END /etc/grub.d/06_mint_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Linux Mint 9 Xfce, 2.6.32-21-generic (/dev/sda1)" --class linuxmint --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd0,1)'
    search --no-floppy --fs-uuid --set 681a26e3-550b-4630-a075-9ecd1de94a43
    linux    /vmlinuz-2.6.32-21-generic root=UUID=77066849-98a5-4a0a-bc05-30e72a058cd9 ro   quiet splash
    initrd    /initrd.img-2.6.32-21-generic
}
menuentry "Linux Mint 9 Xfce, 2.6.32-21-generic (/dev/sda1) -- recovery mode" --class linuxmint --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd0,1)'
    search --no-floppy --fs-uuid --set 681a26e3-550b-4630-a075-9ecd1de94a43
    echo    'Loading Linux 2.6.32-21-generic ...'
    linux    /vmlinuz-2.6.32-21-generic root=UUID=77066849-98a5-4a0a-bc05-30e72a058cd9 ro single 
    echo    'Loading initial ramdisk ...'
    initrd    /initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_lupin ###
### END /etc/grub.d/10_lupin ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
    insmod ext2
    set root='(hd0,1)'
    search --no-floppy --fs-uuid --set 681a26e3-550b-4630-a075-9ecd1de94a43
    linux16    /memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
    insmod ext2
    set root='(hd0,1)'
    search --no-floppy --fs-uuid --set 681a26e3-550b-4630-a075-9ecd1de94a43
    linux16    /memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

My /etc/fstab looks like this:

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda3 during installation
UUID=77066849-98a5-4a0a-bc05-30e72a058cd9 /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
UUID=681a26e3-550b-4630-a075-9ecd1de94a43 /boot           ext2    defaults        0       2
# /home was on /dev/sda4 during installation
UUID=13933401-7749-4728-a906-e9e8b465952b /home           ext4    defaults        0       2
# swap was on /dev/sda2 during installation
UUID=99683ba1-f5f4-4670-93c3-7bdf3c1c9fb9 none            swap    sw              0       0
# swap was on /dev/sdc1 during installation
UUID=a9a04acd-5dfa-4f52-ac4c-aac9bc2dacf4 none            swap    sw              0       0

Cheers,

Chris.


Reasons why you may want to try GNU/Linux:

www.whylinuxisbetter.net/

Offline

#3 2011-03-04 20:32:06

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED] Test Installation- Dual Boot/ Grub Query.

Linux Mint uses grub2 by default since Ubuntu's Karmic release, I think. Arch still uses grub (also known as grub-legacy, although grub2 has still not become main-stream). That's why you couldn't find the /boot/grub/menu.lst

Having said that, Arch does work with Grub2 also, so its not a huge deal. Look at the Grub2 wiki page for more info.

My advice would be to have Arch's grub on the MBR (since you are always going to keep Arch) and the other OS's grub2 on the drive itself or simply don't use the other OS's grub at all. That way, you can always see Arch's grub and then when you select the other OS in Arch's grub, it could then show up the grub of the other OS where you can have more than one OS installed or what have you.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#4 2011-03-05 12:46:37

chris_debian
Member
From: Wiltshire, UK
Registered: 2009-02-24
Posts: 284

Re: [SOLVED] Test Installation- Dual Boot/ Grub Query.

Looks like a sensible plan. I'm just doing the install now and am at the grub stage. Looks like the syntax is:

title OSNAME

root (hd0,0) (? First partition (/boot) on first HDD)

kernel /vmlinuz26 root=/dev/disk/by-uuid/NUMBER HERE- From my post above, it looks like MINT is on 681a26e3-550b-4630-a075-9ecd1de94a43 ro

initrd /kernel26.img (From the post above, it looks like this is relevant:) linux    /vmlinuz-2.6.32-21-generic root=UUID=77066849-98a5-4a0a-bc05-30e72a058cd9 ro   quiet splash

I'd appreciate any help, as the differences between grub-legacy and grub2 are confusing me. I'm very aware that a mistake here could cause big problems.

Many thanks,

Chris.


Reasons why you may want to try GNU/Linux:

www.whylinuxisbetter.net/

Offline

#5 2011-03-05 16:00:20

chris_debian
Member
From: Wiltshire, UK
Registered: 2009-02-24
Posts: 284

Re: [SOLVED] Test Installation- Dual Boot/ Grub Query.

All sorted.

I had to adjust grub so it said (hd0,0)

and used

/vmlinuz-2.6.32-21-generic root=UUID=77066849-98a5-4a0a-bc05-30e72a058cd9

and

/initrd.img-2.6.32-21-generic


Booted into MINT and all seems fine. Now that's sorted, I can fine tune Arch.

Thank you for your help.

Chris.


Reasons why you may want to try GNU/Linux:

www.whylinuxisbetter.net/

Offline

Board footer

Powered by FluxBB