View previous topic :: View next topic |
Author |
Message |
certem Tux's lil' helper
Joined: 14 Feb 2013 Posts: 145
|
Posted: Thu Oct 10, 2013 9:15 pm Post subject: [Solved] Who counts the hard disk drives? Bios, gentoo...etc |
|
|
Code: | # Which listing to boot as default. 0 is the first, 1 the second etc.
default 0
# How many seconds to wait before the default listing is booted.
timeout 30
# Nice, fat splash-image to spice things up :)
# Comment out if you don't have a graphics card installed
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Gentoo Linux 3.3.8
# Partition where the kernel image (or operating system) is located
root (hd0,0)
kernel /boot/kernel-3.3.8-gentoo root=/dev/sda3
title Gentoo Linux 3.3.8 (rescue)
# Partition where the kernel image (or operating system) is located
[size=18]root (hd0,0)[/size][b]
kernel /boot/kernel-3.3.8-gentoo root=/dev/sda3 init=/bin/bb
# The next four lines are only if you dualboot with a Windows system.
# In this case, Windows is hosted on /dev/sda6.
title Windows XP
rootnoverify (hd0,5)
makeactive
chainloader +1 |
On my system it's When I remove theI can't boot gentoo
Note: This problem is the same as the https://forums.gentoo.org/viewtopic-t-972146-highlight-.html with the title [/b]editing grub2. I opened this thread because I realized that editing grub2 won't solve my problem.
Last edited by certem on Fri Oct 11, 2013 6:17 am; edited 1 time in total |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Thu Oct 10, 2013 10:27 pm Post subject: |
|
|
the information you present is for legacy grub not for grub2.
root (hd0,0) tells grub to look in the first partition of the first hard drive which bios enumerates as 0,0 for the grub files.
kernel /boot/kernel-3.3.8-gentoo root=/dev/sda3 actually means kernel (hd0,0)/boot/kernel-3.3.8-gentoo root=/dev/sda3
boot the cd, mount the gentoo partitions, enter the chroot, nominally: (assuming you have more than 1 hard drive, gentoo is installed on the second drive, some other operating system is on the first drive, that you will use bios to select a boot drive, that you do not wish to overwrite the MBR of the first hard drive, that your bios will enumerate the primary boot drive as (hd0,0) Code: | mount /dev/sdb3 /mnt/gentoo
mount /dev/sdb1 /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"
grub
find /boot/grub/stage1 | The answer returned will be in the format (hdx,y) substitute the numbers returned below
should return the file system type of the /boot partition
will overwrite the MBR of the hard drive with grub installed, should return sectors embedded and succeeded
will return the name(s) of the kernel and initramfs if used), the name(s) must be used exactly as spelled in grub.conf
Code: | nano /boot/grub/grub.conf | edit to Quote: | default 0
timeout 30
#splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Gentoo Linux
root (hd0,0)
kernel /boot/your-kernel-name root=/dev/sdb3 |
graceful exit: Code: | exit
cd
umount -l /mnt/gentoo/dev{/shm,/pts,}
umount -l /mnt/gentoo{/boot,/proc,}
reboot | when the reboot starts enter the bios and select the gentoo hard drive as first to boot. _________________ Defund the FCC. |
|
Back to top |
|
|
certem Tux's lil' helper
Joined: 14 Feb 2013 Posts: 145
|
Posted: Fri Oct 11, 2013 4:13 am Post subject: |
|
|
DONAHUE thank you for the reply.
Quote: | (assuming you have more than 1 hard drive, gentoo is installed on the second drive, some other operating system is on the first drive,
| yes
Quote: | that you will use bios to select a boot drive, |
yes. Bios has the capability to boot from the first drive when it's attached and it boots from the second drive when the first is deattached.
Quote: | that you do not wish to overwrite the MBR of the first hard drive, |
yes
Quote: | that your bios will enumerate the primary boot drive as (hd0,0) |
I don't have any idea about how bios enumarates the hdd's
I unmerged grub2 Code: | emerge -C sys-boot/grub:2 | and applied your input. I have 2 hdd's. Everything is fine when both hdd's are plugged. When I unplug the other hdd and try to boot gentoo I can't. It was the same issue with grub2.
May there be some leftovers? Should I make a reinstallation with the other hdd unplugged?
I took a picture:
http://tinypic.com/r/11ch18z/5 |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Fri Oct 11, 2013 5:25 am Post subject: |
|
|
Quote: | When I unplug the other hdd and try to boot gentoo I can't. It was the same issue with grub2. |
It should not be necessary to unplug the non gentoo drive for booting gentoo.
Merely selecting the gentoo drive as first to boot should cause BIOS to enumerate the gentoo drive as (hd0,0). Unplugging the non gentoo drive should cause BIOS to enumerate the gentoo drive as (hd0,0). If both drives are plugged in and I understand your setup correctly the non gentoo drive will be seen by the kernel as /dev/sda and the gentoo drive as /dev/sdb. if only the gentoo drive is plugged in, it will be seen as /dev/sda.
Quote: | default 0
timeout 30
#splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Gentoo Linux on the second of two drives where the bios boots the gentoo drive first
root (hd0,0)
kernel /boot/your-kernel-name root=/dev/sdb3
title Gentoo Linux on the only drive
root (hd0,0)
kernel /boot/your-kernel-name root=/dev/sda3 | Changing the number of drives plugged in or where they are plugged in can and frequently does change BIOS names and kernel names. Changing boot order in almost every modern BIOS will change BIOS names.
If this has not clarified the problem please post commands issued and (error?) messages returned. _________________ Defund the FCC. |
|
Back to top |
|
|
certem Tux's lil' helper
Joined: 14 Feb 2013 Posts: 145
|
Posted: Fri Oct 11, 2013 6:16 am Post subject: |
|
|
DONAHUE Thank you very much.
One more time you helped me getting a Gentoo to work |
|
Back to top |
|
|
korilius n00b
Joined: 30 Oct 2013 Posts: 20
|
Posted: Mon Nov 04, 2013 2:00 pm Post subject: |
|
|
This was helpful as well. I'm experimenting with Gentoo on a second USB HDD as well. Am having some GRUB issues too. _________________ -Thanks!- |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54096 Location: 56N 3W
|
Posted: Mon Nov 04, 2013 8:47 pm Post subject: |
|
|
korilius,
Are you sure you have grub issues ?
What error message do you get ? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
korilius n00b
Joined: 30 Oct 2013 Posts: 20
|
Posted: Tue Nov 05, 2013 2:45 pm Post subject: |
|
|
Thanks, NeddySeagoon. I'll do some more troubleshooting when I get home and post back.
Well.. now that I think about it - it is a Grub issue, but I believe (I'll verify today) it's a user config caused problem _________________ -Thanks!- |
|
Back to top |
|
|
korilius n00b
Joined: 30 Oct 2013 Posts: 20
|
Posted: Thu Nov 07, 2013 3:20 am Post subject: |
|
|
I tried this on Debian's Grub and Gentoo's Grub (that is, either booting from the first hdd or the second hdd) with the same results. As far as I can tell, everything is configured correctly.
I would get a "file not found", the screen would go blank and then the system locks up. Have to do a cold boot.
Here is Gentoo's grub.conf
Code: |
default 0
timeout 30
title Gentoo Linux Custom Kernel 3.10.17
root (hd1,0)
kernel /boot/vmlinuz root=/dev/ram0 real_root=/dev/sdb2
initrd /boot/initramfsvmlinuz
|
and now Debian's
Code: |
menuentry "Gentoo Linux Custom Kernel 3.10.17 (on /dev/sdb2)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(/dev/sdb,msdos1)'
search --no-floppy --fs-uuid --set=root 8d133057-9b09-4659-85da-1189afd30b87
linux /boot/vmlinuz root=/dev/ram0 real_root=/dev/sdb2
|
I am 100% certain that if I had only one hdd on a fresh install, Gentoo would have went beautifully. I just wanted to try it out on a second hdd. I may wind up doing it through virtualbox, but it wouldn't be the same? Maybe I'm weird.
Thanks! _________________ -Thanks!- |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54096 Location: 56N 3W
|
Posted: Thu Nov 07, 2013 10:08 pm Post subject: |
|
|
korilius,
From your post, Gentoo is using grub-legacy and Debian is using Grub2
You should not mix them on the same HDD _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
korilius n00b
Joined: 30 Oct 2013 Posts: 20
|
Posted: Fri Nov 08, 2013 12:22 pm Post subject: |
|
|
Sorry it wasn't clear. I am using Debian on one hdd and testing Gentoo on another.
It's working now. I blew all data on my hdd2 /sdb partitions, reinstalled, (chose genkernel, did the "no multi profile, static-grub. Finished the install, booted into Debian, mounted the sdb partitions and it sniffed out Gentoo and added it to its grub menu. Rebooted, chose Gentoo and it fired right up.
Previously I did my own kernel, chose the default profile, emerged genkernel so I could get initramfs, did the grub1 install, finished the install and it went kaput.
I think something went screwy with initramfs setting in Grub when I tried to include with my custom kernel. Grabbing the generic seemed to have cured the problem. Only way to know for sure is compile a new kernel, add it to the options and see what happens. (Entirely possible I flubbed the custom kernel because I spent maybe 5 minutes on it, turning off stuff I didn't "think" I needed )
At any rate, I've completed my first Gentoo installation! _________________ -Thanks!- |
|
Back to top |
|
|
|
|
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
|
|