Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 12 Dec 2018, 08:04
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
convert grub4dos/lickmenu entry to grub2
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
trister

Joined: 01 Mar 2015
Posts: 110

PostPosted: Wed 19 Sep 2018, 12:11    Post subject:  convert grub4dos/lickmenu entry to grub2  

Hello,
I have a very "simple" question.

I have this entry:

Code:
title Porteus /stretchdog64/  EXIT:changes
[b]find --set-root --ignore-floppies /stretchdog64/live/initrd1.xz[/b]
kernel /stretchdog64/live/vmlinuz1 from=/stretchdog64 changes=EXIT:/stretchdog64/changes.dat
initrd /stretchdog64/live/initrd1.xz


and I want to convert it to Grub2 entry (my problem is in the find --set-root ... entry)

This searches all my hard disks and partitions and sets as root the one with the spesfic frugal install.

How can I do it in grub2 without loosing the ability to search all disks?

Note: I can boot puppies and dogs in grub2 with UUID , I just want to implement this with the search feature.
Back to top
View user's profile Send private message 
foxpup


Joined: 29 Jul 2016
Posts: 613
Location: europa near northsea

PostPosted: Thu 20 Sep 2018, 06:26    Post subject:  

Look in the manual for grub2:
https://www.gnu.org/software/grub/manual/grub/grub.html#search
Quote:
Command: search [--file|--label|--fs-uuid] [--set [var]] [--no-floppy] name
Search devices by file (-f, --file), filesystem label (-l, --label), or filesystem UUID (-u, --fs-uuid).

If the --set option is used, the first device found is set as the value of environment variable var. The default variable is ‘root’.

The --no-floppy option prevents searching floppy devices, which can be slow.

The ‘search.file’, ‘search.fs_label’, and ‘search.fs_uuid’ commands are aliases for ‘search --file’, ‘search --label’, and ‘search --fs-uuid’ respectively.

I would think this:
Code:
search --file --set root --no-floppy /stretchdog64/live/initrd1.xz
I haven't tried it myself though.
Back to top
View user's profile Send private message 
trister

Joined: 01 Mar 2015
Posts: 110

PostPosted: Fri 21 Sep 2018, 08:40    Post subject:  

foxpup wrote:
Look in the manual for grub2:
https://www.gnu.org/software/grub/manual/grub/grub.html#search
Quote:
Command: search [--file|--label|--fs-uuid] [--set [var]] [--no-floppy] name
Search devices by file (-f, --file), filesystem label (-l, --label), or filesystem UUID (-u, --fs-uuid).

If the --set option is used, the first device found is set as the value of environment variable var. The default variable is ‘root’.

The --no-floppy option prevents searching floppy devices, which can be slow.

The ‘search.file’, ‘search.fs_label’, and ‘search.fs_uuid’ commands are aliases for ‘search --file’, ‘search --label’, and ‘search --fs-uuid’ respectively.

I would think this:
Code:
search --file --set root --no-floppy /stretchdog64/live/initrd1.xz
I haven't tried it myself though.


It seems too easy...
I think I've tried something similar in the past but it didn't work (maybe I had missed something ).
Thanks .
I'll try that Smile
Back to top
View user's profile Send private message 
foxpup


Joined: 29 Jul 2016
Posts: 613
Location: europa near northsea

PostPosted: Fri 21 Sep 2018, 14:18    Post subject:  

trister wrote:
It seems too easy...
It's simple to you because you know grub4dos. Grub2 and grub4dos are really very close; I don't know if grub2 evolved from grub4dos or if they are more like brothers.

I've tried it myself and it works fine. I used to do it with uuid also.
This is code for DpupStretch I use in grub.cfg now:
Code:
menuentry 'Dpup Stretch 7.5 [radky] k4.9.71 32bit xorg1.19.2 palemoon <R>' --class linux --unrestricted --id='dPupStretch' --hotkey='R'{
  search --file --set root --no-floppy /dpupStretch/initrd.gz
  linux /dpupStretch/vmlinuz pmedia=usbflash pfix=fsck psubdir=/dpupStretch/ pkeys=be-latin1
  initrd /dpupStretch/initrd.gz
}
I have the impression this boots quicker than with uuid.
Someone in this forum (IIRC one of the friendly Mikes) explained, once upon a time, that finding a file on a disc is very fast, while finding a partition is slower.

Some other trouble you can encounter with grub2:
Depending on the grub2 binary you use, the keywords for the kernel and init lines can be linux/initrd and/or linuxefi/initrdefi.
And some grub2 binaries cannot boot 32bit builds.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0677s ][ Queries: 11 (0.0299s) ][ GZIP on ]