The officially official Devuan Forum!

You are not logged in.

#1 2018-02-24 16:26:47

alphalpha
Member
Registered: 2018-01-23
Posts: 10  

Bootloader Freedom

~Put on the right pair of shoes before you take your first step~

Hey Guys
this is for people who prefer syslinux bootloader over grub
or for people who like options and having a choice wink

i really like the refractainstaller (and refractasnapshot)
it is like my new favorite toy, really really big thanks to fsmithred and the people involved

but i dont like the fact that it only supports grub bootloader so i fiddled a bit in the refractainstaller script and i came up with the following

########################
### SYSLINUX
########################

install_syslinux () {
	cp /boot/vmlinuz-3.16.0-4-amd64 /target/boot/vmlinuz-3.16.0-4-amd64
	cp -r /usr/lib/syslinux/modules/bios/*.c32 /target/boot/syslinux/
	cp /usr/src/refracta-tools/lib/refractasnapshot/iso/isolinux/splash.png /target/boot/syslinux/splash.png
	cp /usr/src/refracta-tools/lib/refractainstaller/syslinux/syslinux.cfg /target/boot/syslinux/syslinux.cfg
	extlinux -i /target/boot/syslinux
	dd bs=440 count=1 if=/usr/lib/syslinux/mbr/mbr.bin of=/dev/sda
}

while true ; do
echo "Install Syslinux Bootloader now?\n\t Press ENTER for YES.\n\t Press N for no."
		read ans
		case $ans in
			[2Nn]*) break ;;
			*) install_syslinux; break ;;
		esac
	done

echo "Done."
echo "You may want to edit your syslinux.cfg"
nano /target/boot/syslinux/syslinux.cfg
#done

# INSTALLATION FINISHED - BEGIN CONFIGURE USERNAME, HOSTNAME, PASSWORDS, SUDO

obviously it requires extlinux to be installed
also you need your own syslinux.cfg and splash.png and of course /dev/sda needs to be substituted with your drive letter

i though i share this with you maybe someone finds this usefull

have a nice day everyone

Last edited by alphalpha (2018-02-24 16:48:19)

Offline

#2 2018-02-24 19:03:13

fsmithred
Administrator
Registered: 2016-11-25
Posts: 759  

Re: Bootloader Freedom

I've thought about adding extlinux support to refractainstaller, but I didn't think there was much interest. Nice to see that there is. I've also thought about adding support for grub to refracta2usb. Maybe those things will actually happen some time.

So, uh, what is /usr/src/refracta-tools and where did that come from?

Offline

#3 2018-02-24 21:13:06

alphalpha
Member
Registered: 2018-01-23
Posts: 10  

Re: Bootloader Freedom

that is a good question wink

that is where i have all your good stuff
i had to modify it quite a bit since i dont have bash on my system
so i put it in a special place where it dont get confused with updates

where it says
$cp /usr/src/refracta-tools/lib/refractasnapshot/iso/isolinux/splash.png
$cp /usr/src/refracta-tools/lib/refractainstaller/syslinux/syslinux.cfg
one has to have his own syslinux.cfg
the splash is optional i think

Last edited by alphalpha (2018-02-24 22:15:12)

Offline

#4 2018-02-25 13:49:56

fsmithred
Administrator
Registered: 2016-11-25
Posts: 759  

Re: Bootloader Freedom

No bash??  What shell are you using? Did you make the scripts posix compliant?

Yes, splash is optional.

Offline

#5 2018-02-26 09:28:26

alphalpha
Member
Registered: 2018-01-23
Posts: 10  

Re: Bootloader Freedom

i use zsh, dont know if its posix compatible

Offline

Board footer