Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub 2 problem. Not tainting kernel
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
mreff555
Apprentice
Apprentice


Joined: 10 Mar 2011
Posts: 231
Location: Philadelphia

PostPosted: Sat Feb 15, 2014 4:58 pm    Post subject: Grub 2 problem. Not tainting kernel Reply with quote

Short question:
Can grub2 operate with the boot loader installed on a different physical disk than the boot directory.
I remember reading somewhere a while back that this was a problem even though it seems as if it would be able to do it.

Longer question:
Let me start by saying that I hate grub. but im installing this for someone else and lilo doesn't work in this case anyway.

The system has 2 physical drives. The first being windows 7. The second is gentoo.
there is no ramfs and the kernel config was taken from a very similar working system. I do not believe there is any problem with the kernel.
/dev/sdb1 = boot
/dev/sdb2 = swap
/dev/sdb3 = root

Basiclly I am having trouble booting but I'm really not sure why. I know it's looking in the right spot but it still won't boot. I have tried manually loading the kernel in grub with the commands

linux (hd1,msdos1)/vmlinuz-3.10.25-gentoo root=/dev/sdb3
boot

however I get the same result

btw I also tried this.

linux (hd1,msdos1)/vmlinuz-3.10.25-gentoo root=(hd1,msdos3)
boot

I'm not sure which syntax you are supposted to use. I ahve always used the former in the past but regardless that both produce the same error.
It's been a long time since I set up as system with windwos on it. I forget if haveing it on the first physical drive will pose a problem.
Back to top
View user's profile Send private message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 420

PostPosted: Sat Feb 15, 2014 5:37 pm    Post subject: Reply with quote

Why don't you let grub2-mkconfig make the config?
It can detect the windows boot too and supply it as a menu option.
Back to top
View user's profile Send private message
mreff555
Apprentice
Apprentice


Joined: 10 Mar 2011
Posts: 231
Location: Philadelphia

PostPosted: Sat Feb 15, 2014 6:05 pm    Post subject: Reply with quote

i did.
and it appears to have generated corectly
windows boots but linux does not.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1746

PostPosted: Sun Feb 16, 2014 1:38 am    Post subject: Reply with quote

When you provide device name to a kernel you use names recognized by kernel, so the first one is correct.
Bootloader doesn't care where you have your system as long as you provide this location to bootloader - so yes, it can boot system from another phisical device.

It would be easier if you posted the error message, they are sometimes usefull.
Also, if grub2 is porblematic, you might also try grub1. I'm pretty sure it's still in portage (please, dont remove it please, please, please, grub2 is an overcomplicated overkill)
Back to top
View user's profile Send private message
mreff555
Apprentice
Apprentice


Joined: 10 Mar 2011
Posts: 231
Location: Philadelphia

PostPosted: Sun Feb 16, 2014 12:47 pm    Post subject: Reply with quote

Here is the error message
https://www.dropbox.com/s/5fw4x8r7rfasxeu/2014-02-16%2007.37.06.jpg

This is the content of the grub script in the grub editor so you can see it appears to be doing what it should be
https://www.dropbox.com/s/uwpj10xx7b38lms/2014-02-16%2007.36.17.jpg

As for the over complicated grub 2, I couldn't agree more. I'm a fan of lilo and syslinux myself. However, this time it's not my choice.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7550
Location: Goose Creek SC

PostPosted: Sun Feb 16, 2014 5:35 pm    Post subject: Reply with quote

the error message tells you that grub has done its job. A kernel has been found, loaded, and run to the point of trying to load the root file system and start the init process. The kernel needs to be told to look in the correct place for the root file system, needs to have the correct drivers built in for the hard drive motherboard adapter and the hard drive controller as well as correct built in file system support for the root partition. At least one of these elements is missing.
Suggest: boot the livecd/usb, mount the gentoo partitions, enter the chroot, nominally:
Code:
mount /dev/sda3 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot
cp -L /etc/resolv.conf /mnt/gentoo/etc/
mount -t proc none /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
source /etc/profile
export PS1="(chroot) $PS1"
Then
Code:
emerge pciutils usbutils wgetpaste parted
lspci -nnk | wgetpaste
lsusb | wgetpaste
mount | wgetpaste
parted -l | wgetpaste
wgetpaste /etc/fstab
wgetpaste /usr/src/linux/.config
wgetpaste /boot/grub/grub.cfg
Post the url's returned; then make graceful exit:
Code:
exit
cd
umount -l /mnt/gentoo/dev{/shm,/pts,}
umount -l /mnt/gentoo{/boot,/proc,}
reboot

_________________
Defund the FCC.


Last edited by DONAHUE on Sun Feb 16, 2014 5:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1746

PostPosted: Sun Feb 16, 2014 5:44 pm    Post subject: Reply with quote

first line of your screenshot :lol: (no, really, it did the trick)
kernel panic // unable to mount root on unknown block (0,0). Your problem is you're trying to boot into nothing.

Try changing kernel boot options from `root=/dev/sdb3` to `root=/dev/ram0 real_root=/dev/sdb3` (i mean, YOU do know where your root filesystem is, right?)

ramdisk=8192 might also be usefull (in addition to above change), but honestly I doubt you need this one
Back to top
View user's profile Send private message
mreff555
Apprentice
Apprentice


Joined: 10 Mar 2011
Posts: 231
Location: Philadelphia

PostPosted: Tue Feb 18, 2014 9:02 pm    Post subject: Reply with quote

szatox wrote:
first line of your screenshot :lol: (no, really, it did the trick)
kernel panic // unable to mount root on unknown block (0,0). Your problem is you're trying to boot into nothing.

Try changing kernel boot options from `root=/dev/sdb3` to `root=/dev/ram0 real_root=/dev/sdb3` (i mean, YOU do know where your root filesystem is, right?)

ramdisk=8192 might also be usefull (in addition to above change), but honestly I doubt you need this one


Well, yes I saw this. I am trying to figure out why. Block(0,0) doesn't change regardless what I set the root partition to. What exactly does pointing root to /dev/ram0, and defining a real_root do? Just curious. I am not using a ramfs. Anyway. I don't have access to the machine right now, but when I get a chance I will post the info Donahue asked for.
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