Some help is needed in extracting ramdisk_size=xxxxx from either isolinux.cfg (on CD) or syslinux.cfg (on USB flash drive).
The tools I have at hand are AWK & sed for DOS.
Here are extracts showing the relevant lines in the files:
(From puppy-1.0.5-mozilla-128Mb-Murga's isolinux.cfg)
Code: Select all
default 1
DISPLAY BOOT.MSG
prompt 1
label 1
kernel vmlinuz
append root=/dev/ram0 initrd=image.gz ramdisk_size=63488 PFILE=pup001-none-262144
<--snip-->
Code: Select all
default vmlinuz root=/dev/ram0 initrd=image.gz
append ramdisk_size=63488 PSLEEP=25 PHOME=sda1 PFILE=pup100-none-262144 PKEYS=uk
Code: Select all
M:\awk "/ramdisk_size/{print \"set rdsize=\" $2;exit;}" %pupdrv%\syslinux.cfg >M:\tmp_.bat
call M:\tmp_.bat
del M:\tmp_.bat >NUL
So here's the question: can anyone with a better knowledge of AWK syntax than me (that's just about anyone ) show me how to extract 'ramdisk_size=XXXXX' regardless of which field it is in?
Thanks in advance for any help
Paul