Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 28th July 2011, 08:49 AM
Ancurio Offline
Registered User
 
Join Date: Jan 2011
Posts: 23
linuxfirefox
Add btrfs part. to GRUB legacy

Hello everyone!

I'm currently running the XFCE Spin of Fedora 15 (Xedora, as I like to call it (; ) on 64 bit,
so sometimes I need a 32 bit environment to try stuff out.

I recently installed Linux Mint on a partition formatted to btrfs,
and this is where my problems start, as I have no idea how to add this installation to my
existing GRUB configuration.
The grub.cfg on the Mint partition looks like this (GRUB2 btw.):
Code:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by 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
  set have_grubenv=true
  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
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod btrfs
set root='(/dev/sda,msdos6)'
search --no-floppy --fs-uuid --set=root da554af8-f0e4-473e-8885-84c4ea1ea6b3
if loadfont /@/usr/share/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod btrfs
set root='(/dev/sda,msdos6)'
search --no-floppy --fs-uuid --set=root da554af8-f0e4-473e-8885-84c4ea1ea6b3
set locale_dir=($root)/@/boot/grub/locale
set lang=en_US
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 root=''
insmod png
if background_image /@/boot/grub/.background_cache.png; then
  true
else
  set menu_color_normal=white/black
  set menu_color_highlight=black/light-gray
  if background_color 44,0,30; then
    clear
  fi
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/06_mint_theme ###
insmod part_msdos
insmod btrfs
set root='(/dev/sda,msdos6)'
search --no-floppy --fs-uuid --set=root da554af8-f0e4-473e-8885-84c4ea1ea6b3
insmod png
if background_image /@/boot/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 ###
if [ ${recordfail} != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Linux Mint 11, 2.6.38-8-generic-pae (/dev/sda6)' --class linuxmint --class gnu-linux --class gnu --class os {
	recordfail
	set gfxpayload=$linux_gfx_mode
	insmod part_msdos
	insmod btrfs
	set root='(/dev/sda,msdos6)'
	search --no-floppy --fs-uuid --set=root da554af8-f0e4-473e-8885-84c4ea1ea6b3
	linux	/@/boot/vmlinuz-2.6.38-8-generic-pae root=UUID=da554af8-f0e4-473e-8885-84c4ea1ea6b3 ro rootflags=subvol=@   quiet splash vt.handoff=7
	initrd	/@/boot/initrd.img-2.6.38-8-generic-pae
}
menuentry 'Linux Mint 11, 2.6.38-8-generic-pae (/dev/sda6) -- recovery mode' --class linuxmint --class gnu-linux --class gnu --class os {
	recordfail
	set gfxpayload=$linux_gfx_mode
	insmod part_msdos
	insmod btrfs
	set root='(/dev/sda,msdos6)'
	search --no-floppy --fs-uuid --set=root da554af8-f0e4-473e-8885-84c4ea1ea6b3
	echo	'Loading Linux 2.6.38-8-generic-pae ...'
	linux	/@/boot/vmlinuz-2.6.38-8-generic-pae root=UUID=da554af8-f0e4-473e-8885-84c4ea1ea6b3 ro single rootflags=subvol=@ 
	echo	'Loading initial ramdisk ...'
	initrd	/@/boot/initrd.img-2.6.38-8-generic-pae
}
### END /etc/grub.d/10_linux ###

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

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod part_msdos
	insmod btrfs
	set root='(/dev/sda,msdos6)'
	search --no-floppy --fs-uuid --set=root da554af8-f0e4-473e-8885-84c4ea1ea6b3
	linux16	/@/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod btrfs
	set root='(/dev/sda,msdos6)'
	search --no-floppy --fs-uuid --set=root da554af8-f0e4-473e-8885-84c4ea1ea6b3
	linux16	/@/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows Vista (loader) (on /dev/sda1)" --class windows --class os {
	insmod part_msdos
	insmod fat
	set root='(/dev/sda,msdos1)'
	search --no-floppy --fs-uuid --set=root 07d9-0219
	chainloader +1
}
menuentry "Xedora15 (2.6.38.6-27.fc15.x86_64) (on /dev/sda3)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos3)'
	search --no-floppy --fs-uuid --set=root 76660257-5913-4c4e-a341-ed9534fec7ff
	linux /boot/vmlinuz-2.6.38.6-27.fc15.x86_64 ro root=UUID=76660257-5913-4c4e-a341-ed9534fec7ff rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=de rhgb quiet radeon.modeset=0 pcie_aspm=force
	initrd /boot/initramfs-2.6.38.6-27.fc15.x86_64.img
}
### 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 ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
I have absolutely no experience with GRUB2 whatsoever,
as I find it way more cumbersome than legacy.
I tried deducing a legacy entry that looks like this:
Code:
title Mint32
	root (hd0,5)
	kernel /@/boot/vmlinuz-2.6.38-8-generic-pae ro root=UUID=da554af8-f0e4-473e-8885-84c4ea1ea6b3 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=de rhgb verbose pcie_aspm=force
Although grub just gives me some kind of "coulldn't find operating system" error.
Please tell me if you need to know the exact error message.
Reply With Quote
  #2  
Old 28th July 2011, 08:56 AM
glennzo's Avatar
glennzo Offline
Un-Retired Administrator
 
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,924
linuxfirefox
Re: Add btrfs part. to GRUB legacy

Not sure if the BTRFS is going to make a difference, but with Debian and Ubuntu installed to EXT4 partitions I boot them from legacy grub thusly:
Code:
title 	Debian 6
        root (hd0,6)
        kernel /boot/grub/core.img
__________________
Glenn
The Bassinator © ®


Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
Reply With Quote
  #3  
Old 28th July 2011, 09:56 AM
Ancurio Offline
Registered User
 
Join Date: Jan 2011
Posts: 23
linuxfirefox
Re: Add btrfs part. to GRUB legacy

Yeah your syntax and mine are pretty much the same (except for the ton of parameters I'm passing),
but as I said, GRUB just keeps complaining with that. Maybe I should ditch all the things after kernel [..] ?
Reply With Quote
  #4  
Old 28th July 2011, 10:12 AM
glennzo's Avatar
glennzo Offline
Un-Retired Administrator
 
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,924
linuxfirefox
Re: Add btrfs part. to GRUB legacy

Change it so that it looks exactly like mine. Get rid of all the parameters.

PHP Code:
title   Mint 32
        root 
(hd0,5)
        
kernel /boot/grub/core.img 

Just remember that I'm not so sure how BTRFS is going to affect things.
__________________
Glenn
The Bassinator © ®


Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
Reply With Quote
  #5  
Old 28th July 2011, 11:03 AM
Ancurio Offline
Registered User
 
Join Date: Jan 2011
Posts: 23
linuxfirefox
Re: Add btrfs part. to GRUB legacy

Hmm, no, tried it with /@/boot/grub/core.img,

but the error is actually "Error 17: Unable to mount partition".
Maybe it's due to btrfs after all
Reply With Quote
  #6  
Old 28th July 2011, 11:08 AM
Gareth Jones Offline
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 30
Posts: 1,689
linuxfirefox
Re: Add btrfs part. to GRUB legacy

Is the Mint kernel stored on the btrfs partition?

I'm pretty sure GRUB legacy doesn't support btrfs, so you either need to copy the kernel and initramfs images onto an ext4 partition (after every update), set up an ext4 /boot partition, or use GRUB2. Or chain-load Mint's GRUB2 from Fedora's GRUB legacy if you don't mind two levels of GRUB.

Gareth
Reply With Quote
  #7  
Old 28th July 2011, 11:42 AM
Ancurio Offline
Registered User
 
Join Date: Jan 2011
Posts: 23
linuxfirefox
Re: Add btrfs part. to GRUB legacy

Quote:
Originally Posted by Gareth Jones View Post
Is the Mint kernel stored on the btrfs partition?

I'm pretty sure GRUB legacy doesn't support btrfs, so you either need to copy the kernel and initramfs images onto an ext4 partition (after every update), set up an ext4 /boot partition, or use GRUB2. Or chain-load Mint's GRUB2 from Fedora's GRUB legacy if you don't mind two levels of GRUB.

Gareth
Yes it is.
Btrfs isn't supported? What a shame..

Well, if everything else fails, I'd go with the kernel on ext4 method.
I actually told Mint to install its bootloader onto the the same partition it was installing itself,
and then simply tried (in legacy)
Code:
rootnoverify (hd0,5)
chainloader +1
just as it is done with windows partitions.
This had failed, however I don't recall the exact error message.
Reply With Quote
Reply

Tags
add, btrfs, grub, legacy

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Replace Grub 2 with Grub Legacy Majara Installation and Live Media 4 6th June 2012 01:48 AM
Using Grub2 (Not using the legacy grub entry) uncholowapo Guides & Solutions (No Questions) 13 6th October 2011 10:21 AM
btrfs - add RAID1 partition to existing encrypted btrfs parition techmum Using Fedora 0 4th July 2011 01:21 AM
Can i use grub without legacy usb support? errorxp Using Fedora 0 20th September 2010 06:55 AM


Current GMT-time: 06:03 (Sunday, 19-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat