Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub To Grub Chainloading
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
creaker
l33t
l33t


Joined: 14 Jul 2012
Posts: 651

PostPosted: Thu Oct 16, 2014 12:43 pm    Post subject: Grub To Grub Chainloading Reply with quote

Have to boot hdd system from live media. In other words have to add "Boot from HDD" option to live media menu. Both hdd and live media has their own Grub2 installation.
This is a live media's menuetry:
Code:
menuentry 'Boot From HDD' {
  drivemap '(hd0)' '(hd1)'
  drivemap '(hd1)' '(hd0)'
  set root='(hd0)'; set legacy_hdbias='0'
  chainloader  '(hd0)+1'
}

this entry generated by grub2-menulst2cfg command using some old grub-legasy menu.lst
In general it works, but a bit weird: on first chainloading from live media I'm getting redirected to the same live media menu. When it appears again I'm waiting for timeout expiring and at the second redirection I'm getting redirected to hdd boot menu.
How do I chainload directly to hdd menu without this intermediate live menu?
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2034
Location: United Kingdom

PostPosted: Thu Oct 16, 2014 6:04 pm    Post subject: Reply with quote

Could you chainload GRUB 2 on the HDD from GRUB 2 on the live media by using the multiboot command?

Code:
menuentry "Boot HDD sda1" {
        set root=(hd0,1)
        multiboot /boot/grub/core.img
}

_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
creaker
l33t
l33t


Joined: 14 Jul 2012
Posts: 651

PostPosted: Thu Oct 16, 2014 7:27 pm    Post subject: Reply with quote

Nope, it doesn't work because I have no such a file: /boot/grub/core.img
Where can I get this core.img? Is it grub-generated?
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2034
Location: United Kingdom

PostPosted: Thu Oct 16, 2014 8:22 pm    Post subject: Reply with quote

Sorry, I forgot about the sub-directory: try /boot/grub/i386-pc/core.img (core.img is installed when you install GRUB 2).
_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
creaker
l33t
l33t


Joined: 14 Jul 2012
Posts: 651

PostPosted: Fri Oct 17, 2014 7:32 am    Post subject: Reply with quote

No it doesn't help. Moreover with core.img live media Grub repeatedly redirects boot to themself and doesn't go to hdd grub menu.
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2034
Location: United Kingdom

PostPosted: Fri Oct 17, 2014 10:07 am    Post subject: Reply with quote

Hmm... Perhaps you need to use the drivemap command to point GRUB 2 on the live media to GRUB 2 on the HDD so that the multiboot command picks the desired drive and core.img.

On another tack, I've just done some googling and found the following http://superuser.com/questions/366099/boot-grub2-to-grub-or-grub2-on-another-disk which may also be of help.
_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


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

PostPosted: Fri Oct 17, 2014 10:28 am    Post subject: Re: Grub To Grub Chainloading Reply with quote

creaker wrote:
Have to boot hdd system from live media. In other words have to add "Boot from HDD" option to live media menu. Both hdd and live media has their own Grub2 installation.
This is a live media's menuetry:
Code:
menuentry 'Boot From HDD' {
  drivemap '(hd0)' '(hd1)'
  drivemap '(hd1)' '(hd0)'
  set root='(hd0)'; set legacy_hdbias='0'
  chainloader  '(hd0)+1'
}

this entry generated by grub2-menulst2cfg command using some old grub-legasy menu.lst
In general it works, but a bit weird: on first chainloading from live media I'm getting redirected to the same live media menu. When it appears again I'm waiting for timeout expiring and at the second redirection I'm getting redirected to hdd boot menu.
How do I chainload directly to hdd menu without this intermediate live menu?


this is the usual behaviour to swap the drives virtually and i doubt you can change the timeout, the only way would be to change the timeout parameter of the internal hdd grub config which seems to be not a good choice at all.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things 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