The officially official Devuan Forum!

You are not logged in.

#1 2021-12-18 14:29:22

ShorTie
Member
Registered: 2020-05-14
Posts: 21  

Grub's custom.cfg

I am trying to get SmoothWall to run on Devuan.
In which I'm trying to make a /boot/grub/custom.cfg that boots to /dev/harddisk.
Is this possible ??
Haven't had much luck yet .. hmm~

Offline

#2 2021-12-18 14:33:41

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: Grub's custom.cfg

ShorTie wrote:

Is this possible ?

Yes.

ShorTie wrote:

Haven't had much luck yet ..

Share your efforts then. Post exact configuration and commands though, vague descriptions will just lead to confusion and bad advice.

But having said that you should get better support here. Your money should buy you that, at least, right?


Brianna Ghey — Rest In Power

Offline

#3 2021-12-18 14:45:56

ShorTie
Member
Registered: 2020-05-14
Posts: 21  

Re: Grub's custom.cfg

My garbly-gook so far is

#
#
# https://www.gnu.org/software/grub/manual/grub/html_node/Simple-configuration.html
#
# nano -w /boot/grub/custom.cfg
# cp -v /boot/grub/custom.cfg /root/swe/coretree/coretree/boot/grub/custom.cfg
#

menuentry 'SmoothWall Express GNU/Linux' --class smoothwall --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-955e45ca-5142-4cc4-89d1-bbae49bf512c' {
#splashimage=/grub/express_boot_protect.xpm.gz
#foreground=cfcfcf
#background=222222
	load_video
	insmod gzio
	insmod part_msdos
	insmod ext2
	set inittab /etc/inittab-swe
	#set root='hd0,msdos1'
	unset root
	unset device
	#set
	set device 'hd0' /dev/harddisk
	set root 'hd0,0' 
	setup (hd0) 
#quit
##kernel /vmlinuz-${Kernel_Version}${KERNEL_TYPE} root=/dev/harddisk4 ro quiet
#kernel /vmlinuz-${Kernel_Version}${KERNEL_TYPE} root=$(UUID) ro quiet
	search --no-floppy --fs-uuid --set=root 955e45ca-5142-4cc4-89d1-bbae49bf512c
	echo	'Loading/Starting Linux 5.10.0-9-amd64 ...'
	#linux	/boot/vmlinuz-5.10.0-9-amd64 root=UUID=955e45ca-5142-4cc4-89d1-bbae49bf512c ro  quiet
	linux /boot/vmlinuz-5.10.0-9-amd64 root=/dev/harddisk1 ro quiet
	echo	'Loading initial ramdisk smoothwall.initramfs.gz ...'
	initrd	/boot/smoothwall.initramfs.gz
}

Offline

#4 2021-12-18 15:09:41

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: Grub's custom.cfg

Try something like this:

menuentry 'SmoothWall' {
   search --fs-uuid --set=root 955e45ca-5142-4cc4-89d1-bbae49bf512c
   linux /boot/vmlinuz-5.10.0-9-amd64 root=UUID=955e45ca-5142-4cc4-89d1-bbae49bf512c ro quiet
   initrd /boot/smoothwall.initramfs.gz
}

That presumes the SmoothWall system is installed on a partition with the stated UUID, that /boot is on the root partition (ie, it does not have a separate /boot partition) and that the kernel image is at /boot/vmlinuz-5.10.0-9-amd64 with the initramfs at /boot/smoothwall.initramfs.gz.

If SmoothWall is Debian-based then you may find symlinks from the kernel image & initramfs to /vmlinuz & /initrd.img, which can be quoted in the menuentry to avoid having to update the configuration file whenever the kernel version changes.

EDIT: be sure to place the file at /boot/grub/custom.cfg on the system from which GRUB reads it's configuration. Use the set command (with no options or arguments) from the GRUB command line to see the $configfile parameter which dictates this.

Last edited by Head_on_a_Stick (2021-12-18 15:28:06)


Brianna Ghey — Rest In Power

Offline

#5 2021-12-18 15:30:16

hevidevi
Member
Registered: 2021-09-17
Posts: 230  

Re: Grub's custom.cfg

This is how i do it, legacy bios only. I bypass the uuid and use a label.

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry "Artix (loader)" {
    insmod msdos
    insmod ext4
    search --no-floppy --label --set=root ARTIX
    configfile /boot/grub/grub.cfg
}

Last edited by hevidevi (2021-12-18 15:31:22)

Offline

#6 2021-12-19 10:29:04

ShorTie
Member
Registered: 2020-05-14
Posts: 21  

Re: Grub's custom.cfg

It is not on a different partition.
It's just a different startup, as it uses rc.d and /dev/harddrive.

Offline

#7 2021-12-19 11:27:50

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: Grub's custom.cfg

ShorTie wrote:

it uses rc.d and /dev/harddrive.

I wrote:

Post exact configuration and commands though, vague descriptions will just lead to confusion and bad advice.

But it really sounds like you should be taking advantage of the support for which you have paid SmoothWall money.


Brianna Ghey — Rest In Power

Offline

#8 2021-12-19 12:44:19

hevidevi
Member
Registered: 2021-09-17
Posts: 230  

Re: Grub's custom.cfg

what is this smoothwall, how does it coexist alongside the devuan linux os?

Offline

#9 2021-12-19 14:03:06

ShorTie
Member
Registered: 2020-05-14
Posts: 21  

Re: Grub's custom.cfg

It is a free open source Linux Firewall GUI
https://smoothwall.org/
https://community.smoothwall.org/forum/index.php
So there is no "Paid for Support"

Offline

#10 2021-12-19 14:25:18

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: Grub's custom.cfg

ShorTie wrote:

So there is no "Paid for Support"

Ah, my apologies. I thought you were referring to https://www.smoothwall.com/

A shame you didn't provide a link in the OP. That would have prevented us wasting our time, eh? tongue

And as you appear to be reluctant to engage beyond cryptic utterances I'll bow out of this thread now. Good luck!


Brianna Ghey — Rest In Power

Offline

Board footer