Upgrades to syslinux.cfg/isolinux.cfg/extlinux.conf

A home for all kinds of Puppy related projects
Post Reply
Message
Author
User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

Upgrades to syslinux.cfg/isolinux.cfg/extlinux.conf

#1 Post by Pizzasgood »

prettysyslinux_0.2.tar.gz

This contains modified scripts for Puppies 3.01, 3.02, 2.14, and 2.14R 1.01.

Note: this is mainly of note for people looking to create custom versions of Puppy. For the general Puppy user who wants a menu for USB, see the section at the very bottom.

Also note: The modified install script these include also adds the dialog for "optional boot options" that I posted about a couple weeks ago. Basically, it gives you a chance to add extra things like acpi=force and whatnot, without having to manually track down and edit the config file. It doesn't add that feature to grubconfig though, only USB installs (as Grub is outside the scope of this package).


Explanation:
When booting from the LiveCD, Puppy displays a list of boot parameters and gives you five seconds to start adding them. Otherwise it boots normally. However, it does not do this for USB installs. The reason isn't because it' can't, but because the scripts just weren't set up for it. So I set them up.

This package contains four directories, one for each version. Inside, they each have two directories and two files. The directories ###_nopeb/ and files isolinux.cfg are for standard Puppy setups. The directories ###_peb/ and files isolinux_peb.cfg are for Puppies that use Pebble. Note: This package does not contain Pebble! It just has Pebble compatible scripts.

How to use it:
Inside the ###/###_xxx/ directory (example: 301/301_nopeb/) are modified versions of the install script, the remaster script, and a script or two relating to multi-session. There are also some files in ###/###_xxx/usr/lib/syslinux/files/.
syslinux.cfg: this is a template. It contains everything except the final "append" line, which the install script will append. This same file gets used for both syslinux and extlinux (it just gets renamed in the latter).
boot.msg: this is the file that configures the initial image/text on the screen. It displays the image boot.16 and will show that for the entire 5 second timeout unless the user presses <f2>
boot.16: this is the image
f2.msg: this is the text that gets displayed if the user presses <f2>, and lists the boot options.

I won't bother giving detailed instructions to use this with the generic remaster script. Just copy in the files so that they mesh with your filesystem, and replace isolinux.cfg with the correct one.

To use this with Unleashed, you would put the ###/###_xxx/usr/lib/syslinux/files/ stuff in the relevant place in the syslinux package. The rest goes into the rootfs_skeleton package, overwriting the originals (probably you should back those up first). Next, you need to copy all the files except syslinux.cfg from ###/###_xxx/usr/lib/syslinux/files/ into the isolinux-builds/ directory of the unleashed tree. Replace isolinux.cfg with the on from the ###/ directory (if you use Pebble, use the isolinux_peb.cfg file instead, but rename it to isolinux.cfg). Now you will need to modify the ./createpuppy script to make it stop altering the isolinux.cfg file by commenting out these lines:

Code: Select all

#v2.15 now create the isolinux.cfg file... v2.16rc modified...
echo "Creating isolinux-builds/isolinux.cfg..."
CFGBASE='default puppy
display boot.msg
prompt 1
label puppy
kernel vmlinuz'
echo "$CFGBASE" > isolinux-builds/isolinux.cfg
if [ "$INITTYPE" = "initrd" ];then
 INITRDSIZEK="`cat /tmp/initrdsize.txt`"
 if [ "$HUMONGOUS" = "" ];then
  #normal situation....
  echo "append root=/dev/ram0 initrd=initrd.gz pmedia=cd vga=785" >> isolinux-builds/isolinux.cfg
 else
  echo "append root=/dev/ram0 initrd=initrd.gz pmedia=cd vga=785 ramdisk_size=$INITRDSIZEK" >> isolinux-builds/isolinux.cfg
 fi
else
 #cpio archive, initramfs.
 echo "append initrd=initrd.gz pmedia=cd vga=785" >> isolinux-builds/isolinux.cfg
fi
echo 'timeout 50' >> isolinux-builds/isolinux.cfg
That's it.


In case you want to alter the image, I included the SVG and PNG files. The important specs are that it be under 640x480 and only 16 colors. Save it as a .png image. Then use the included mk16 script to transform it into a .16 file, like so:

Code: Select all

./mk16 puppy_301_img.png boot.16
Now just replace the boot.16 files in the syslinux package and the isolinux-builds/ directory.

To use the SVG images, edit them with an SVG editor (such as inkscape). When finished, open the file with Gimp. It will ask about the dimensions. Change it to 640 px wide and hit "okay". Now go to "Image" -> "Mode" -> "Indexed". Change the colors to 16. Change the dithering to "none" (not necissary, but yields better results for the images I provided. More complex images might look best with dithering). Now go to "File" -> "Save As" and save it as a .png image. Then folow the above steps to make it a .16 image.


You can also edit the text. Just open the f2.msg and boot.msg files as text, and don't mess up the special characters. Make sure you do the same changes to the files in isolinux-builds/ as you do to the ones in the syslinux package.

If you want more screens (for <f3>, <f4>, etc.) copy the f2.msg file and then edit the syslinux.cfg and isolinux.cfg files appropriately (pretty obvious how).

See http://syslinux.zytor.com/ for more info about customizing syslinux.


How to enable this functionality in an already set up USB install:
Extract the package and go into the correct directories (301/301_nopeb/ for a 3.01 Puppy that doesn't have Pebble). Now go to the usr/lib/syslinux/files/ directory.

In a separate window, mount and navigate into your USB drive. Rename your syslinux.cfg file to syslinux.cfg_ORIG.

Back in the first window, copy all the files into the second (onto the USB drive). Now go ahead and close that first window.

Open the syslinux.cfg_ORIG file and the new syslinux.cfg file in a text editor. In the syslinux.cfg_ORIG file there will be a line like this:

Code: Select all

default vmlinuz initrd=initrd.gz ide=nodma pmedia=usbflash
It will look a little different based on what version of Puppy you have. Copy it into the final empty line in syslinux.cfg, and add a new empty line after it (for convention's sake). Now, in the syslinux.cfg file, remove the "default vmlinuz" part from the line you pasted and put an "append" there instead, like this:

Code: Select all

append initrd=initrd.gz ide=nodma pmedia=usbflash
Now just save the file and you should be good to go. When you boot, you'll see an image. You have 5 seconds to start typing a boot option, then it will boot normally. If you press <f2> it will show you a bunch of the availble boot options.


updated 2008.02.14 to fix small bugs
Last edited by Pizzasgood on Sat 10 Jan 2009, 23:38, edited 2 times in total.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

NathanO
Posts: 210
Joined: Fri 23 Feb 2007, 00:03
Location: San Antonio, TX

#2 Post by NathanO »

Pizzagood,

Do you plan to put this in the final release of pcPuppyOs?

NathanO

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#3 Post by Pizzasgood »

I'm thinking about it. I was thinking that RC4 would be the final, but then Mozilla went and released a new Firefox just days after I uploaded it :roll: So as long as I'll need to rebuild it again soon anyways, I'll probably add this.

Looks like a new Wine came out today too.

I won't be worrying about pcPuppyOS until Monday at the earliest though. I'm devoting this weekend to Pebble and homework.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#4 Post by ecomoney »

Hi Pizzasgood, thanks for this. Have you notified Dougal/Pakt/Tempestious who do 2.14r about this as yet? They are planning a new release soon.
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#5 Post by Pizzasgood »

I just updated the package (and renamed it and added a version number). I fixed a couple bugs here and there.

Yes, I let them know.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

Post Reply