FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 07-29-2012, 06:28 AM
Adam Carter
 
Default grub2 first installation

I've installed grub2 on a single disk system, using
http://en.gentoo-wiki.com/wiki/Grub2 as a guide. However, when i start
the system it drops straight to the grub2 command prompt. The system
has /boot is ext2 on sda1, and / is ext4 on sda3. The grub.cfg seems
ok to me assuming the --set=root is for a temporary root (since from
grub's perspective, /boot is /) before the OS loads from the real
root.

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class
gnu --class os $menuentry_id_option 'gnulinux-simple-<root's UUID>' {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1
--hint-baremetal=ahci0,msdos1 <boot's UUID>
else
search --no-floppy --fs-uuid --set=root <boot's UUID>
fi
echo 'Loading Linux 3.5.0-gentoo ...'
linux /vmlinuz-3.5.0-gentoo root=/dev/sda3 ro
}

I would have expected it to at least display the menu for a while then
die when i select a menu item rather than drop to the command prompt
straight away.

Have I made some newbie error?
 
Old 07-29-2012, 06:56 AM
Alecks Gates
 
Default grub2 first installation

On Sun, Jul 29, 2012 at 1:28 AM, Adam Carter <adamcarter3@gmail.com> wrote:
> I've installed grub2 on a single disk system, using
> http://en.gentoo-wiki.com/wiki/Grub2 as a guide. However, when i start
> the system it drops straight to the grub2 command prompt. The system
> has /boot is ext2 on sda1, and / is ext4 on sda3. The grub.cfg seems
> ok to me assuming the --set=root is for a temporary root (since from
> grub's perspective, /boot is /) before the OS loads from the real
> root.
>
> ### BEGIN /etc/grub.d/10_linux ###
> menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class
> gnu --class os $menuentry_id_option 'gnulinux-simple-<root's UUID>' {
> load_video
> insmod gzio
> insmod part_msdos
> insmod ext2
> set root='hd0,msdos1'
> if [ x$feature_platform_search_hint = xy ]; then
> search --no-floppy --fs-uuid --set=root
> --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1
> --hint-baremetal=ahci0,msdos1 <boot's UUID>
> else
> search --no-floppy --fs-uuid --set=root <boot's UUID>
> fi
> echo 'Loading Linux 3.5.0-gentoo ...'
> linux /vmlinuz-3.5.0-gentoo root=/dev/sda3 ro
> }
>
> I would have expected it to at least display the menu for a while then
> die when i select a menu item rather than drop to the command prompt
> straight away.
>
> Have I made some newbie error?
>

Does it not display any errors? This menu entry looks good to me
(only difference here is kernel version, UUIDs and root partition).
Sounds like it may not be installed correctly... just to confirm here
are the few things you should have to do:

1. Edit "/etc/default/grub" Perhaps disable quiet stuff and any
graphical settings just for now.
2. Run "grub2-mkconfig -o /boot/grub2/grub.cfg"
3. Run "grub2-install --no-floppy /dev/sda"

If you have another hard drive it's possible the order is different
from when you installed grub, but this would give an error
 
Old 07-29-2012, 07:13 AM
Adam Carter
 
Default grub2 first installation

> Does it not display any errors?

No - no errors, straight to the grub2 command line.

> This menu entry looks good to me
> (only difference here is kernel version, UUIDs and root partition).
> Sounds like it may not be installed correctly... just to confirm here
> are the few things you should have to do:
>
> 1. Edit "/etc/default/grub" Perhaps disable quiet stuff and any
> graphical settings just for now.
> 2. Run "grub2-mkconfig -o /boot/grub2/grub.cfg"
> 3. Run "grub2-install --no-floppy /dev/sda"

Yes that's what i did. No changes to default/grub though.

> If you have another hard drive it's possible the order is different
> from when you installed grub, but this would give an error

Its a single disk system, and grub1 was fine before i installed grub2.

I am assuming that if i don't need an initrd in grub1 i likewise don't
need one in grub2.
 
Old 07-29-2012, 09:19 AM
Hinnerk van Bruinehsen
 
Default grub2 first installation

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 29.07.2012 09:13, Adam Carter wrote:
>> Does it not display any errors?
>
> No - no errors, straight to the grub2 command line.
>
>> This menu entry looks good to me (only difference here is kernel
>> version, UUIDs and root partition). Sounds like it may not be
>> installed correctly... just to confirm here are the few things
>> you should have to do:
>>
>> 1. Edit "/etc/default/grub" Perhaps disable quiet stuff and any
>> graphical settings just for now. 2. Run "grub2-mkconfig -o
>> /boot/grub2/grub.cfg" 3. Run "grub2-install --no-floppy
>> /dev/sda"
>
> Yes that's what i did. No changes to default/grub though.
>
>> If you have another hard drive it's possible the order is
>> different from when you installed grub, but this would give an
>> error
>
> Its a single disk system, and grub1 was fine before i installed
> grub2.
>
> I am assuming that if i don't need an initrd in grub1 i likewise
> don't need one in grub2.
>

It hasn't got anything to do with initrd or stuff like that. The grub
menu comes way before that.

To show the menu there are 2 things that really matter:

- - there must exist a file /boot/grub2/grub.cfg . The important thing
here is the "2": Since Gentoo supports slotted installs of both grub2
and grub legacy it has a different path for grub2. Afaik that's a
fairly uncommon way of doing it (ubuntu and the like use
/boot/grub/grub.cfg).
If you installed grub 2 via portage you should make sure that the path
contains the 2 - if not you could try ist without it.

- - the file has to be "sane" - the one you posted earlier looks fine,
though. You could try to generate a new one via "grub2-mkconfig -o
/boot/grub2/grub.cfg" nonetheless.

WKR
Hinnerk

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJQFQAXAAoJEJwwOFaNFkYcuvcH/iIE9vY4v78Is75dCqfD4iAq
EsTersiQvujv9u4Bfjwad/pzoRrgoxgEM74iusNp8VNWKFMPoBNQetG8twoxtnNk
zVgl5jmkkFgRNcscA5DmaFdv+0q3sVBU2EwDuPV5NODemkH9aW 4NQEG5V5bUnsfx
OzQ4tS2Ei17WYm6QOBJWMJmO1v7g2l9FnxjIm3c94C1hdOEceR G0yVaJ/rfrYBJE
xr66sbEBsD5VdgY2EM+iVeXn18czO6tSdhhk72voWFGN2CLoAA Kj1nMNKB5qfI5b
nFblgqfan1ye9RK6ojS5AJBqbLtP944A3Y3ysEx27KUDZ6TmFj R6b1cx/5f4RZw=
=JjEt
-----END PGP SIGNATURE-----
 
Old 07-29-2012, 08:09 PM
Alecks Gates
 
Default grub2 first installation

On Sun, Jul 29, 2012 at 2:13 AM, Adam Carter <adamcarter3@gmail.com> wrote:
>> Does it not display any errors?
>
> No - no errors, straight to the grub2 command line.
>
>> This menu entry looks good to me
>> (only difference here is kernel version, UUIDs and root partition).
>> Sounds like it may not be installed correctly... just to confirm here
>> are the few things you should have to do:
>>
>> 1. Edit "/etc/default/grub" Perhaps disable quiet stuff and any
>> graphical settings just for now.
>> 2. Run "grub2-mkconfig -o /boot/grub2/grub.cfg"
>> 3. Run "grub2-install --no-floppy /dev/sda"
>
> Yes that's what i did. No changes to default/grub though.
>
>> If you have another hard drive it's possible the order is different
>> from when you installed grub, but this would give an error
>
> Its a single disk system, and grub1 was fine before i installed grub2.
>
> I am assuming that if i don't need an initrd in grub1 i likewise don't
> need one in grub2.
>

I just tested to see if I could reproduce your problem. The only way
I could reproduce it is to not have a grub.cfg file. So either you
forgot to do the step or you put it in the wrong place.
 

Thread Tools




All times are GMT. The time now is 09:31 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org