Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub2 question and extra storage drives, causing issues
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
jwm224
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2015
Posts: 118
Location: Pennsylvania

PostPosted: Sun May 31, 2015 4:14 am    Post subject: Grub2 question and extra storage drives, causing issues Reply with quote

I'm installing to a 32-bit system.
I ran:
Code:
emerge grub

after that, the command,
Code:
install grub /dev/sdc
and
Code:
install-grub2 /dev/sdc

wouldn't work.

So, I read that because of I32 emulation software, grub won't install (based on my kernel configuration.) So, I run:
Code:
emerge -C grub

,and I install lilo
I reboot. Grub is still on my menu. Telling me, ntdrl is missing... 1990's flash back, right?
I have an extra drive, which worked fine with my Crunchbang Debian-based distro, so I never polished it off with a fresh ext4 file system.

Now the question: How do I either get rid of grub for good or wipe the boot sector of /dev/sda, which would be (hd0)?
If I wipe the bootsector, I should be able to bootloader+1 jump to my lilo configured boot.

thanks ahead of time,
Jay
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Sun May 31, 2015 9:40 am    Post subject: Reply with quote

I usually use a binary distro to install gentoo. 10gb linux mint with seperate 512 mb boot partition generated from linux mint.

Than i make gentoo partitions and add my boot entries by hand to the mint grub.

i barely used the gentoo provided grub bootloader or those scripts as in the end I have to verify the hole correctness of the boot entry myself anyway. I never understood the benefit of those grub scripts.

you need to know

where the kernel is
which kernel parameters are needed
initrd yes/no
read the docs / kernel configurations to get the right choice so it would boot the hardware (read the docs urself)
manually remove old symink for /usr/src/linux and set it to the proper kernel on every new kernel release.
know where the kernel configuration is from the previous kernel to use it again and adapt it

=> and thats why to write the full section by hand is the proper way anyway.

genkernel is awesome to generate an initrd in my opinion.

as long as you do not change the underlying file systems i do not see any point to ever update grub anyway. install it once and just adapt the grub.cfg file
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43175
Location: 56N 3W

PostPosted: Sun May 31, 2015 10:07 am    Post subject: Reply with quote

jwm224,

Grub needs 32 bit kernel support to intstall, thats true but you can't install it with your kernel configuration the first time as your kernel is not running.

Your boot loader is always installed into the MBR, as thats tho only disk block the BIOS can read, so you may have at most, one boot loader per HDD.
Boot loaders loaded from the first boot loader don,t count here.
With multiple boot loaders installed in multiple MBRs, you choose which one to use by selecting the boot disk in the BIOS.
This will soon make your head hurt.
You are going to hate lilo, once you forget to run /sbin/lilo after a kernel upgrade.

I use grub-static, Thats installed once for the life of the HDD ahd you edit its conf by hand.
It still needs 32 bit support to install but that comes from the install media.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jwm224
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2015
Posts: 118
Location: Pennsylvania

PostPosted: Sun May 31, 2015 8:16 pm    Post subject: Reply with quote

Thanks for the help with this issue.
I learned a lot in the process.
I finally solved it.

The issue I believe had to do with mounting proc:
Code:

mount -t proc none /mnt/gentoo/proc   #( instead of  mount -t proc proc /mnt/gentoo/proc )
mount --rbind /sys /mnt/gentoo/sys
mount --make-rslave /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev             
mount --make-rslave /mnt/gentoo/dev


Also after chrooting into the new environment mounting /boot
Code:
mount /dev/sdb2 /root

(while knoppix fdisk shows my partitions under sdb, they actually are under sda, which caused some confusion throughout)
so while, /etc/fstab file had to contain the sda information, all my commands had to be issued in sdb in the chroot environment.
Wow, what a monster!

Also because, its a 32-bit system in /etc/portage/make.conf USE flags, include the line
Code:
GRUB_PLATFORMS="pc"


Then, I could continue:
Code:

emerge -av sys-boot/grub
install-grub2 /dev/sdb


Boots like a champ!
Besides, the wireless configurations... I'll be a little happier once ping google shows activity.
I hope these instructions help the next guy.
Thanks again,
Jay
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43175
Location: 56N 3W

PostPosted: Mon Jun 01, 2015 6:07 pm    Post subject: Reply with quote

jwm224,

Code:
mount -t proc none /mnt/gentoo/proc   #( instead of  mount -t proc proc /mnt/gentoo/proc )
both do the same thing.

One will tell you none busy if you try to unmount it. The other will tell you proc busy.
The filesystem location parameter to mount is not used with proc or sys.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jwm224
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2015
Posts: 118
Location: Pennsylvania

PostPosted: Mon Jun 01, 2015 7:53 pm    Post subject: Reply with quote

I found that as a possible fix somewhere. I just got done looking all over for the source w/ no luck.
It must've been just the conflict between sda and sdb from knoppix to the actual environment.
I was also having issues with my cflags. I found a safe setting from an off site. I may have even had the model n.umber wrong, but I switched back to -march=native -O2 -pipe. This is after I got grub to install successfully, but it was hit or miss on what was actually being compiled successfully through emerge

Thanks, it's always good to know.
Jay
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