How to Edit Bootup Configuration Files?

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
JusGellin
Posts: 295
Joined: Fri Jan 19, 2024 11:12 pm
Has thanked: 37 times
Been thanked: 26 times

How to Edit Bootup Configuration Files?

Post by JusGellin »

When editing the bootup files grub.cfg or menu.lst, what is the proper way to do this? I think I read that you shouldn't directly edit those files. If that is true, how should you edit them?
Thanks

geo_c
Posts: 2609
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1877 times
Been thanked: 745 times

Re: How to Edit Bootup Configuration Files

Post by geo_c »

JusGellin wrote: Fri May 24, 2024 11:34 am

When editing the bootup files grub.cfg or menu.lst, what is the proper way to do this? I think I read that you shouldn't directly edit those files. If that is true, how should you edit them?
Thanks

I'm not sure where you heard not to edit menu.lst, but I think you'll find that a good majority of experienced puppy and linux users edit their boot stanzas manually most of the time.

I only use the bootloader tools to install the initial bootloader parition, but whenever adding OSs from that point on I edit the menu.lst file in a text editor. I start with a preconfigured stanza and make changes to suit my setup. Of course you have to know what should be there, and that takes a little experience.

geo_c
Old School Hipster, and Such

User avatar
bigpup
Moderator
Posts: 6474
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 778 times
Been thanked: 1337 times

Re: How to Edit Bootup Configuration Files

Post by bigpup »

If it is a boot loader that was installed by Puppy Linux program for installing a boot loader.

menu.lst and grub.cfg can be directly edited.

If you are duel booting Puppy Linux and some other Linux OS, using that Linux OS's boot loader.
Some grub2 boot loaders that other Linux Os's install.
Have special config files that are for editing the boot loader config they use.
So you edit these files and they change the grub.cfg the boot loader uses.
So they do not use direct edit of the grub.cfg to change entries in it.
They usually have a special GUI program you can run to do the edit.

Really depends on the other Linux OS as to exactly what it uses to edit the boot loader config.

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

JusGellin
Posts: 295
Joined: Fri Jan 19, 2024 11:12 pm
Has thanked: 37 times
Been thanked: 26 times

Re: How to Edit Bootup Configuration Files

Post by JusGellin »

Thanks guys. I really appreciate all your experience.
It looks like this is just another thing that makes puppy so good and easier to use. The many other Linux seem to get too complicated at times.

User avatar
mikewalsh
Moderator
Posts: 5702
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 616 times
Been thanked: 1762 times

Re: How to Edit Bootup Configuration Files

Post by mikewalsh »

@geo_c :-

SO true, mate....so true. Frankly, it's quicker - AND easier - than messing around with running the boot config tools every time.

@JusGellin :-

If you run multiple Pups, each in their own sub-directory, then editing the bootloader just consists of copying any stanza, then merely editing the title - what you want to show in the boot menu - along with which named Puppy sub-directory AND the locations for vmlinuz (the kernel) and initrd.gz (the init scripts). That's all there is to it.

If you scan through mine, you'll see that much of each stanza is the same. Here, it's Grub4DOS's menu.lst:-

Code: Select all

# menu.lst produced by grub4dosconfig-v1.9.3
color white/blue black/cyan white/black cyan/black
splashimage=/puppy2D.xpm
timeout 20
default 0

# Frugal installed Puppy

title Xenialpup 64
  find --set-root uuid () b142cd08-ce81-413e-b963-12b393d8eaa3
  kernel /Xenialpup64/vmlinuz  pdrv=b142cd08-ce81-413e-b963-12b393d8eaa3  psubdir=/Xenialpup64 pmedia=satahd pfix=fsckp edd=off
  initrd /Xenialpup64/initrd.gz

title Bionicpup 64
  find --set-root uuid () b142cd08-ce81-413e-b963-12b393d8eaa3
  kernel /Bionicpup64/vmlinuz  pdrv=b142cd08-ce81-413e-b963-12b393d8eaa3  psubdir=/Bionicpup64 pmedia=satahd pfix=fsckp
  initrd /Bionicpup64/initrd.gz
  
title Fossapup 64
  find --set-root uuid () b142cd08-ce81-413e-b963-12b393d8eaa3
  kernel /Fossapup64/vmlinuz  pdrv=b142cd08-ce81-413e-b963-12b393d8eaa3  psubdir=/Fossapup64 pmedia=satahd pfix=fsckp edd=off
  initrd /Fossapup64/initrd.gz
  
title Quirky 64
  find --set-root uuid () b142cd08-ce81-413e-b963-12b393d8eaa3
  kernel /Quirky64/vmlinuz  pdrv=b142cd08-ce81-413e-b963-12b393d8eaa3  psubdir=/Quirky64 pmedia=satahd pfix=fsckp
  initrd /Quirky64/initrd.gz    
  
title Studio 1337
  find --set-root uuid () b142cd08-ce81-413e-b963-12b393d8eaa3
  kernel /Studio1337/vmlinuz  pdrv=b142cd08-ce81-413e-b963-12b393d8eaa3  psubdir=/Studio1337 pmedia=satahd pfix=fsckp
  initrd /Studio1337/initrd.gz
  
title Tahrpup 64
  find --set-root uuid () b142cd08-ce81-413e-b963-12b393d8eaa3
  kernel /Tahr64/vmlinuz  pdrv=b142cd08-ce81-413e-b963-12b393d8eaa3  psubdir=/Tahr64 pmedia=satahd pfix=fsckp
  initrd /Tahr64/initrd.gz
  
title
  root

title ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  root
  
title Xenialpup 32 (+64)
  find --set-root uuid () b142cd08-ce81-413e-b963-12b393d8eaa3
  kernel /Xenial32_64/vmlinuz  pdrv=b142cd08-ce81-413e-b963-12b393d8eaa3  psubdir=/Xenial32_64 pmedia=satahd pfix=fsckp
  initrd /Xenial32_64/initrd.gz
  
title Tahrpup 32 (+64)
  find --set-root uuid () b142cd08-ce81-413e-b963-12b393d8eaa3
  kernel /Tahr32_64/vmlinuz  pdrv=b142cd08-ce81-413e-b963-12b393d8eaa3  psubdir=/Tahr32_64 pmedia=satahd pfix=fsckp
  initrd /Tahr32_64/initrd.gz  
  
title
  root

title ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  root
  
title Racy 5.5.1
  find --set-root uuid () b142cd08-ce81-413e-b963-12b393d8eaa3
  kernel /Racy_551/vmlinuz  pdrv=b142cd08-ce81-413e-b963-12b393d8eaa3 psubdir=/Racy_551 pmedia=satahd pfix=fsckp nouveau.modeset=0
  initrd /Racy_551/initrd.gz

title Slacko 560
  find --set-root uuid () b142cd08-ce81-413e-b963-12b393d8eaa3
  kernel /Slacko560/vmlinuz  pdrv=b142cd08-ce81-413e-b963-12b393d8eaa3 psubdir=/Slacko560 pmedia=satahd pfix=fsckp
  initrd /Slacko560/initrd.gz

title Tahrpup 32
  find --set-root uuid () b142cd08-ce81-413e-b963-12b393d8eaa3
  kernel /Tahr32/vmlinuz  pdrv=b142cd08-ce81-413e-b963-12b393d8eaa3  psubdir=/Tahr32 pmedia=satahd pfix=fsckp
  initrd /Tahr32/initrd.gz
  
title Xenialpup 32
  find --set-root uuid () b142cd08-ce81-413e-b963-12b393d8eaa3
  kernel /Xenial32/vmlinuz  pdrv=b142cd08-ce81-413e-b963-12b393d8eaa3  psubdir=/Xenial32 pmedia=satahd pfix=fsckp
  initrd /Xenial32/initrd.gz
  
title
  root

title ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  root
  
# 'Portable' Linux

title Porteus 5.0 KDE (sdc1/boot)
  rootnoverify (hd2,0)
  chainloader +1  
  
title
  root

title ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  root

#Full installed Linux

title Haiku OS
  rootnoverify (hd2,0)
  chainloader +1
  
title ChromeOS Flex
  rootnoverify (hd2,0)
  chainloader +1
  
title
  root

title ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  root
  
# Advanced Menu
title Advanced menu
  configfile /menu-advanced.lst
  commandline

I've used this exact same menu.lst file since I got the HP Pavilion desktop rig back in Jan '20. It's been modified several times, but it's still the same file. It works flawlessly, so I just stick with it. "If it ain't broken.....don't 'fix' it".

And this is my bootloader 'background' image. Originally supplied by amethyst, mine's been modified.....from the original blue to red:-

Image

It's an .xpm image, with limited colours.....'cos that's all Grub4DOS will support.

(What you've probably heard is, at least, partially true. It's GRUB2 that doesn't like having grub.cfg directly modified, because in most mainstream distros there's another script - I forget the name - that automatically re-configures it every time there's a kernel update (so that it points TO that new kernel). If you make any direct changes to grub.cfg, then on every kernel update you'll have to re-do them, because they'll be gone. I believe this is where the 'custom' grub.cfg files come into their own, since they're read before the main grub.cfg file is (which is then modified accordingly)).

However, I don't know if this applies to Puppy's implementation with Grub2Config....

(*shrug...*)

Mike. ;)

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

JusGellin
Posts: 295
Joined: Fri Jan 19, 2024 11:12 pm
Has thanked: 37 times
Been thanked: 26 times

Re: How to Edit Bootup Configuration Files

Post by JusGellin »

Thanks @mikewalsh
That's also great information. I'm looking to do that as well.

Just before this, I thought that for a frugal install of BookwormPup on a laptop that I would rename the save folder on it to see what it would take.
I knew I would need to edit the grub.cfg file on the efi partition (that's why I asked this topic's question), but didn't do enough because it erred on boot up. So I went back and changed all the
other places I missed to replace the new save file name. Then it booted up now with a new name for the saved folder. It worked.
Ahh! that's how that works!

I'm almost having too much fun doing this! :thumbup:

williwaw
Posts: 1692
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 151 times
Been thanked: 309 times

Re: How to Edit Bootup Configuration Files

Post by williwaw »

I would rename the save folder on it to see what it would take.
I knew I would need to edit the grub.cfg file on the efi partition

you are aware of the ability of puppy to offer you a selection of various named saves in a menu you can select from?

this menu should appear if you have more than one save present.
it appears after the bootloader does its job and passes of the booting process to the initrd.

you can boot into ram (without using a save) to let you create a second save.

alternately, you can create a dummy save to trigger the feature.
create a new folder alongside your exisiting savefolder and name it the same as your existing save with somethingappendedto the original foldername to differienate the folder name from the original.

the feature also lets you choose to boot with no save, thus allowing you to create additional real savefiles for different configurations you may wish to keep

JusGellin
Posts: 295
Joined: Fri Jan 19, 2024 11:12 pm
Has thanked: 37 times
Been thanked: 26 times

Re: How to Edit Bootup Configuration Files

Post by JusGellin »

I tried using BookwormPup
<menu><Utilities><Pupsave Backup>
This made a backup copy of the save.
Then when I booted it gave 1. for normal save and 2. and greater for backups with a 0 selection for none.

Is that the same that you mentioned?
Thanks

geo_c
Posts: 2609
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1877 times
Been thanked: 745 times

Re: How to Edit Bootup Configuration Files

Post by geo_c »

JusGellin wrote: Fri May 24, 2024 9:06 pm

I tried using BookwormPup
<menu><Utilities><Pupsave Backup>
This made a backup copy of the save.
Then when I booted it gave 1. for normal save and 2. and greater for backups with a 0 selection for none.

Is that the same that you mentioned?
Thanks

Yes, 0 will be a pristine boot, just like the first run. You can make completely different changes in that boot and make another save. Kind of like having different 'user accounts,' but better, the new save will ONLY contain what you install while booted into it, and not anything else from the other saves except the original pristine OS plus your new changes.

You can do all kinds of development of your personal puppy this way.

geo_c
Old School Hipster, and Such

geo_c
Posts: 2609
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1877 times
Been thanked: 745 times

Re: How to Edit Bootup Configuration Files

Post by geo_c »

geo_c wrote: Fri May 24, 2024 9:11 pm

You can do all kinds of development of your personal puppy this way.

And what I mean by that, is you can make a backup, shutdown and boot into the backup and experminent, break the system intentionally if you want, then reboot into your good copy, repeat and repeat until you get it right.

geo_c
Old School Hipster, and Such

williwaw
Posts: 1692
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 151 times
Been thanked: 309 times

Re: How to Edit Bootup Configuration Files

Post by williwaw »

and 2. and greater for backups

the menu is turquoise? yes the same

2 and greater is not limited to backups.

if you choose 0 and boot into ram and create a new save, it can be as big or small as you like and does not have to have any previous save stuff or be a backup. It can be a completely different save for a different purpose

I have one save for with all the nav apps and charts for using when I take the laptop on a boat

I have another save with the references and links I need for accounting and taxes at the office

etc

JusGellin
Posts: 295
Joined: Fri Jan 19, 2024 11:12 pm
Has thanked: 37 times
Been thanked: 26 times

Re: How to Edit Bootup Configuration Files?

Post by JusGellin »

Then do you rename them according to their purpose?
Do you think that in order to keep track of what you have, it would be good to just give the save folder a meaningful name.
But I would think it should be pretty general if you did a lot to it and somewhere keep track of it in more detail.

Thanks

Post Reply

Return to “Beginners Help”