Jump to content











Photo
- - - - -

Can Grub4dos be configured to remember the last item you booted into?


  • Please log in to reply
14 replies to this topic

#1 ndog37

ndog37

    Member

  • Members
  • 88 posts
  •  
    New Zealand

Posted 08 May 2015 - 07:46 PM

Is there any way to configure Grub4dos to remember my last choice, and boot into that?

 

menu.lst

timeout 5
gfxmenu /gfx-grubmenu

title Boot - /dev/sda1
rootnoverify (hd0,0)
makeactive
chainloader --force +1

title Boot - XP-1.vhd (7GB)
find --set-root --ignore-floppies /XP-1.vhd
map /XP-1.vhd (hd0)
map --hook
root (hd0,0)
chainloader /ntldr

title NT6 bootmgr
find --set-root /boot/bootmgr
makeactive
chainloader /boot/bootmgr

title
root

title Recovery Options
lock
find --set-root /recovery.lst
configfile /recovery.lst


#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15108 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 09 May 2015 - 12:49 PM

What do you think "default" and "savedefault" do?  :dubbio:

 

http://diddy.boot-la...enu.htm#default

 

:duff:

Wonko



#3 AnonVendetta

AnonVendetta

    Silver Member

  • Advanced user
  • 741 posts
  • Location:A new beginning.....
  • Interests:Self-development, computing

Posted 09 May 2015 - 06:51 PM

@ Wonko: That's some weird logic you've got going on. I dont know shit about grub4dos, but the last booted entry may or may not be the default. I can set Arch Linux as default, then boot into Windows 8.1 as my last booted entry. But if Arch is default, then by your logic it will still boot Arch after the timeout expires, regardless of what was booted last. Then again, the default may be the closest thing that approximates what the OP wants.

 

Edit: And yes, I did see something in the page you linked about the default being able to temporarily jump to the last booted option on the next (re)boot. But to me, default is default, last booted option should be in another category.


Edited by AnonVendetta, 09 May 2015 - 06:57 PM.


#4 ilko

ilko

    Silver Member

  • Advanced user
  • 500 posts
  •  
    Bulgaria

Posted 09 May 2015 - 09:05 PM

You seem to missed to read properly or understand the linked content, there is no weird logic, just misunderstanding.

 

default /default line means default boot option is to be read from file /default which has to be writeable to grub4dos.

savedefault in each menu entry means to save the current position of the menu entry in the /default file, so upon next boot the same menu entry is highlighted. If there is timeout active, this menu entry will be booted after the specified time.



#5 ndog37

ndog37

    Member

  • Members
  • 88 posts
  •  
    New Zealand

Posted 09 May 2015 - 09:09 PM

HI all, thanks for your replies. I tried following as wonko suggested, but it doesn't work.

 

I tried it without gfx menu, but i hope to get it working with gfx menu

 

Using GRUB4DOS 0.4.5c 2012-06-19

 

Could you spot the mistake for me?

 

Cheers

timeout 5
#gfxmenu /gfx-grubmenu
default /default

title Boot - /dev/sda1
rootnoverify (hd0,0)
makeactive
chainloader --force +1
savedefault

title Boot - XP-1.vhd (7GB)
find --set-root --ignore-floppies /XP-1.vhd
map /XP-1.vhd (hd0)
map --hook
root (hd0,0)
chainloader /ntldr
savedefault

title NT6 bootmgr
find --set-root /boot/bootmgr
makeactive
chainloader /boot/bootmgr
savedefault

title
root

title Recovery Options
lock
find --set-root /recovery.lst
configfile /recovery.lst


#6 ndog37

ndog37

    Member

  • Members
  • 88 posts
  •  
    New Zealand

Posted 09 May 2015 - 09:55 PM

I just installed GRUB4DOS 0.4.6a 2015-05-08 which still doesn't work.

Does anybody have an example menu.lst that works for them?

I think it may be to do with that I am placing the savedefault line in the wrong place... :dubbio:



#7 ilko

ilko

    Silver Member

  • Advanced user
  • 500 posts
  •  
    Bulgaria

Posted 09 May 2015 - 10:04 PM

Did you copy default file from grub4dos archive next to grldr you are booting from?



#8 AnonVendetta

AnonVendetta

    Silver Member

  • Advanced user
  • 741 posts
  • Location:A new beginning.....
  • Interests:Self-development, computing

Posted 09 May 2015 - 10:07 PM

At the risk of sounding like an asshole, "could you spot the mistake for me?" is a bad way to ask for help. You are, in essense, asking others to do the legwork for you. It would be more appropriate to ask for a hint on where you've gone wrong. Hopefully that's what you'll get, instead of simply having the answer dumped into your lap.



#9 AnonVendetta

AnonVendetta

    Silver Member

  • Advanced user
  • 741 posts
  • Location:A new beginning.....
  • Interests:Self-development, computing

Posted 09 May 2015 - 10:08 PM

At the risk of sounding like an asshole, "could you spot the mistake for me?" is a bad way to ask for help. You are, in essense, asking others to do the legwork for you. It would be more appropriate to ask for a hint on where you've gone wrong. Hopefully that's what you'll get, instead of simply having the answer dumped into your lap.

 

Edit: Another accidental double post. Damn it Opera! My browser seens to have a long delay when submitting a post, but oftentimes gives no indication that it was submitted/posted successfully. I do wish the mods/admins would provide a way for a posting user to delete his dupe post, so long as no one has reponded yet. Is it really so hard or unreasonable to allow that? Or perhaps it's just a downside of the chosen forum/BBS software.


Edited by AnonVendetta, 09 May 2015 - 10:13 PM.


#10 ndog37

ndog37

    Member

  • Members
  • 88 posts
  •  
    New Zealand

Posted 10 May 2015 - 09:22 AM

Hey ilko, i have the default file sitting in the same directory but nothing happens. The file date stamp has not changed, it is a 2KB file.

 

default - 2.00 KB (2,048 bytes)

grldr - 289 KB (296,089 bytes)

menu.lst - 1.19 KB (1,228 bytes)

 

Appreciate your help



#11 ndog37

ndog37

    Member

  • Members
  • 88 posts
  •  
    New Zealand

Posted 10 May 2015 - 09:47 AM

I figured it out, and it works with gfx menu too which is good - the order is important.

Thanks for your help wonko - for pointing me in the right direction and ilko - did not know about the default file till today :good:

 

Cheers

 

my working menu.lst

timeout 5
default /default
gfxmenu /gfx-grubmenu

title Boot - /dev/sda1
savedefault
rootnoverify (hd0,0)
makeactive
chainloader --force +1

title Boot - XP-1.vhd (7GB)
savedefault
find --set-root --ignore-floppies /XP-1.vhd
map /XP-1.vhd (hd0)
map --hook
root (hd0,0)
chainloader /ntldr

title NT6 bootmgr
savedefault
find --set-root /boot/bootmgr
makeactive
chainloader /boot/bootmgr

title
root

title Recovery Options
lock
find --set-root /recovery.lst
configfile /recovery.lst


#12 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15108 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 10 May 2015 - 09:58 AM

Most probably (just a guess, mind you, I don't use the default/savedefault) your previous menu worked only partially, i.e. it worked for some entries and not for some other ones, possibly because the entries invoiving a re-mapping of disks "confused" grub4dos on where to look for the "default" file. :unsure:

 

:duff:

Wonko



#13 tinybit

tinybit

    Gold Member

  • Developer
  • 1158 posts
  •  
    China

Posted 10 May 2015 - 02:22 PM

gfxmenu is not recommended to use with recent grub4dos versions.

 

You may want to switch to the builtin VBE graphics by using the graphicsmode command.



#14 memoarfaa

memoarfaa

    Member

  • Members
  • 81 posts
  •  
    Egypt

Posted 10 May 2015 - 10:21 PM

 

gfxmenu is not recommended to use with recent grub4dos versions.
 
You may want to switch to the builtin VBE graphics by using the graphicsmode command.

 

why gfxmenu is not recommended to use with recent grub4dos versions tinybit
I'm always use latest version of grub4dos
I use boss of gfxmenu and builtin VBE graphics without any bugs
this is my menu.lst

timeout 30
terminal console
gfxmenu /ISO/grub.gfx
graphicsmode -1 800
splashimage /ISO/Background.bmp.gz
font /ISO/unifont.hex.gz
set wdspace=0
set lnspace=0
set topstart=2
set rstart=3
set noitems=18
set menuw=64
set bdwidth=1
set tophelp=20
/ISO/menusetting.gz %wdspace% %lnspace% %bdwidth% %tophelp% %noitems% %topstart% %menuw% %rstart% && clear

title Boot from 1st Hard Disk\nBoot from MBR of first hard disk and remove the USB drive
map (hd0) (hd1)
map (hd1) (hd0)
map --hook
chainloader (hd0)+1
rootnoverify (hd0)

title return to gfxmenu in case grub error
configfile /menu.lst

i can end gfxmenu to VBE graphics by esc key then return to gfxmenu by configfile /menu.lst then go to VBE graphics by esc key etc...

but only i must use terminal console command
if i didn't use terminal console command
i show cursor with black screen in case get grub4dos error command and i can't show what the error is

I test that at most of hardware manufacture like (Acer - Toshiba - Gigabyte - Asus - Dell - hp )

Edited by memoarfaa, 10 May 2015 - 10:35 PM.


#15 tinybit

tinybit

    Gold Member

  • Developer
  • 1158 posts
  •  
    China

Posted 11 May 2015 - 09:08 AM

Some reports indicated that gfxmenu (with some message files) encountered failure or would not work with grub4dos 0.4.5 and later versions. And the developers can‘t figure out why.

If you use gfxmenu flawlessly, you may continue to use it.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users