Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
setting boot partition
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
imbrognolouis
n00b
n00b


Joined: 16 Jan 2011
Posts: 7
Location: KY

PostPosted: Mon Jan 17, 2011 2:50 pm    Post subject: setting boot partition Reply with quote

I just fully installed gentoo and i'm having some issues i'm getting a grub recovery console. before installing gentoo i had windows 7 and ubuntu installed. Once ubuntu was installed i was getting a grub recovery instead of booting into ubuntu. so what i did was put the win 7 cd back in and do a repair. doing this i got the pc to boot into win 7 just fine. after that i installed easybcd to let me add ubuntu into the bootup. Oddly enough though it would boot the grub menu first if i chose ubuntu it would log in from there. if i chose win 7 it would move to the win 7 bootloader and once i chose win 7 it would boot into it.

I have some ideas of what i'm doing wrong my grub.conf needs some adjusting but the other concern i have though is when i deleted the ubuntu partitions and created the gentoo partitions (as listed below) i get the following setting 3 as my boot partition: When i moved the * from windows boot partition to the 3 /boot i get an Error 18: Selected cylinder exceeds maximum supported by BIOS.

what do i need to do to fix this problem?

1 windows boot 100m
2 windows main OS
3 /boot
4 extended
5 /swap
6 /

I am running fakeraid so i load gentoo from cd with gentoo dodmraid if this makes a difference and it maps to /dev/mapper/pdc_gjahhadcy as my drive.

Thank you in advance!
Back to top
View user's profile Send private message
imbrognolouis
n00b
n00b


Joined: 16 Jan 2011
Posts: 7
Location: KY

PostPosted: Mon Jan 17, 2011 4:56 pm    Post subject: Reply with quote

not sure but by doing some reading i see some say you need your active boot within the first 1024? is this correct? I just spent 3k on my computer in the last few months so i would think my bios could use LBA ok as well as i've read grub supports LBA out of the box. Am i missing something? i believe it was in fdisk for my drive fdisk /dev/mapper/pdc_gjahhacy that i took off the /dev/mapper/pdc_gjahhacy1 from active boot to /dev/mapper/pdc_gjahhacy3 my current /boot for gentoo. When i did this is where i get the error 18.

my grub.conf in /boot/grub/grub.conf (off the top of my head i believe this is the location) is as follows:

default 0
timeout 30
#spalshimage=(hd0,0)/boot/grub/slash.xpm.gz
title gentoo Linux 2.6.24-r5
root (hd0,6)
kernel /boot/kernel-genkernel-x86-2.6.24-gentoo-r5 root=/dev/ram0 real_root=/dev/mapper/pdc_gjahhadcy
#initrd/boot/initramfs-genkernel-x86-2.6.24-gentoo-r5
title Windows 7
rootnoverify(hd0,2)
MAKEACTIVE
CHAINLOADER +1
#vim:ft-conf:

not sure if (hd0,6) etc... needs to change since i'm using fakeraid is hd correct for prefix?
if anyone can explain what root=dev/ram0 means it would be appreciated
as well as what initrd is
assuming rootnoverify is the root of my windows OS partition which is hd0,2
unsure what the vim:ft-conf: is as well. i know the init and vim:ft dont matter since # is infront of it just curious what this means.


I have attempted win7 recovery cd and tried a repair. it gives me an error message and cannot fix the mbr. I'm stuck, does anyone have a clue on what i can do to get up and running in at least one OS while i get this figured out?
Back to top
View user's profile Send private message
imbrognolouis
n00b
n00b


Joined: 16 Jan 2011
Posts: 7
Location: KY

PostPosted: Mon Jan 17, 2011 6:14 pm    Post subject: Reply with quote

doing some more research this is what i've found and will attempt when i get home. May help someone in the future. I will post if it works:

http://en.gentoo-wiki.com/wiki/RAID/NVRAID_with_dmraid

from what i gather this is maybe what i missed:

Installing dmraid
Emerge dmraid (this may be masked or hard-masked, so be sure to unmask it).

If hard-masked:

echo "sys-fs/dmraid" >> /etc/portage/package.unmask
If masked (change ~x86 to your arch, ~amd64 for example):

echo "sys-fs/dmraid ~x86" >> /etc/portage/package.keywords

Installing Grub

Boot-partition-not-first Method
When your /boot partition is not the first partition, try following the steps. In some cases, you will have to specify "drive" geometry. Run fdisk on the raid drive, and note C/H/S informations for later usage in grub.

fdisk /dev/mapper/your_raid_set
We have to set the devices for grub manually, grub can't do this for us. We use the --device-map option and input nothing:

grub --device-map=/dev/null
Now we are in Grub shell mode, we tell grub which "linux device" becomes which "bios device" on boot. If your boot partition is /dev/mapper/your_raid_set1 then it becomes (hd0,0) on boot the last bios nr is the Linux partition nr -1.

First tell grub where your partitions are:

grub> device (hd0) /dev/mapper/your_raid_setNote: Partitions are identified in the order in which they are numbered on the partition table. In other words, if your boot partition is not labeled your_raid_set1, it will not be (hd0,0).
If you have problems with your partitions in grub, tell grub what your drive geometry is now. But don't forget to set the devices first or grub doesn't know what you are talking about. Replace C H S with cylinders, heads, and sectors.

grub> geometry (hd0) C H S
Now Grub knows where the boot partition is, and where to write the MBR. Next step is Grub install, type root (hd0, and press Tab. If you did nothing wrong grub should show you a list of possible partitions, if not you did something wrong.

grub> root (hd0,0)
grub> setup (hd0)
grub> quit



Creating the Initial RAM Disk (listed to be done before installing grub but will try installing grub first as this is a bit confusing(i'm a bit unclear whats going on here any additional explaintion would be helpful))



Note: This is really the hard way... the versions of all the following components are changing over and over, download paths are broken, moved or temporarly down.
Gerte Hoogewerf created a script to create an image that will allow you to boot correctly. To start the process of creating the image, download the following files and mark the dmraidinitrd script as executable.

wget http://www.homelinux.nl/gen2dmraid/dmraidinitrd
wget http://www.homelinux.nl/gen2dmraid/linuxrc
chmod +x dmraidinitrdNote: Patched version of dmraidinitrd also available. MichaelDubner 19:40, 2 September 2006 (UTC) This has not been tested to work on kernel >=2.6.18-r3.
Before running the script, you will have to make some changes to it. These changes will update the script as some of the download links are borked. It will also force a download of the correct version of these utilities, as there are compatibility issues with certain versions. In the segment

File: dmraidinitrd
#changing this values might involve editing make_busybox()
BUSYBOX_URI_PREFIX="http://www.busybox.net/downloads/"
BUSYBOX_TARBALL="busybox-0.60.5.tar.bz2"
BUSYBOX_DIR="busybox-0.60.5"Change the values to the following:

File: dmraidinitrd
BUSYBOX_URI_PREFIX="http://www.busybox.net/downloads/legacy/"
Note that using later versions of busybox will force you to use the patched script. They will also likely give you shell errors upon your first reboot.

In the segment

File: dmraidinitrd
#changing this values might involve editing make_devicemapper()
DEVICEMAPPER_URI_PREFIX="ftp://sources.redhat.com/pub/dm/"
DEVICEMAPPER_TARBALL="device-mapper.1.02.08.tgz"
DEVICEMAPPER_DIR="device-mapper.1.02.08"
Change the values to the following:

File: dmraidinitrd
DEVICEMAPPER_URI_PREFIX="ftp://sources.redhat.com/pub/dm/old/"
DEVICEMAPPER_TARBALL="device-mapper.1.02.10.tgz"
DEVICEMAPPER_DIR="device-mapper.1.02.10"
In the segment

File: dmraidinitrd
#changing this values might involve editing make_dmraid()
#please, don't use older versions of dmraid with this version of dmraidinitrd
DMRAID_URI_PREFIX="http://people.redhat.com/~heinzm/sw/dmraid/src/"
DMRAID_TARBALL="dmraid-1.0.0.rc8.tar.bz2"
DMRAID_DIR="dmraid/1.0.0.rc8"
Change the values to the following:

File: dmraidinitrd
DMRAID_URI_PREFIX="http://people.redhat.com/~heinzm/sw/dmraid/src/"
DMRAID_TARBALL="dmraid-1.0.0.rc13.tar.bz2"
DMRAID_DIR="dmraid/1.0.0.rc13"
Once you have the locations for the files done, go ahead and run the script. (Be sure that it has executable rights)

./dmraidinitrd linuxrc initrd
If the script fails for any reason, make sure the links are still active in the script. Sometimes the sites are rearranged (most notably: a file is moved into the /old/ folder). If you are building a SELinux box, make sure the correct libraries are installed:

emerge -a libselinux
If the script fails while complaining about dmraid compilation error then try adding "make \" after the line "./configure ..." in the "make_dmraid() { ... }" segment.

This script will create a new ram drive image (initrd). Copy the initrd file and the linuxrc file to your /boot directory (or wherever the kernel images and grub reside)

cp linuxrc /boot
cp initrd /boot
Back to top
View user's profile Send private message
Vikerness
n00b
n00b


Joined: 20 Jan 2011
Posts: 13

PostPosted: Thu Jan 20, 2011 12:55 pm    Post subject: Reply with quote

imbrognolouis wrote:

default 0
timeout 30
#spalshimage=(hd0,0)/boot/grub/slash.xpm.gz
title gentoo Linux 2.6.24-r5
root (hd0,6)
kernel /boot/kernel-genkernel-x86-2.6.24-gentoo-r5 root=/dev/ram0 real_root=/dev/mapper/pdc_gjahhadcy
#initrd/boot/initramfs-genkernel-x86-2.6.24-gentoo-r5
title Windows 7
rootnoverify(hd0,2)
MAKEACTIVE
CHAINLOADER +1
#vim:ft-conf:


Afaik, as long as you have a boot loader installed in the MBR it doesnt matter what partition has the boot * flag.
There's no point in trying to fix the mbr using the windows 7 disk because you want grub in the mbr, why not use the gentoo boot cd ? Or ubuntu live cd, or any other linux live cd. Assuming that your grub.conf wasnt edited properly, boot in ubuntu live cd, mount the boot and root partition + chroot in gentoo (just like in the handbook), remodify your grub.conf and your fstab accordingly

grub.conf should be

root (hd0,2) - you point this at your boot partition, 0 = windows boot, 1 = windows os, 2 = linux boot, so 2 !
kernel /boot/kernel-genkernel-x86_64-2.6.36-gentoo-r5 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda6
initrd /boot/initramfs-genkernel-x86_64-2.6.36-gentoo-r5
or, if you're using x86
kernel /boot/kernel-genkernel-x86-2.6.36-gentoo-r5 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda6
initrd /boot/initramfs-genkernel-x86-2.6.36-gentoo-r5

and rerun grub --no-floppy, root (0,2), setup (hd0)

Maybe that's why you get the grub recovery menu?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum