Page 1 of 1

USB boot and subdir

Posted: 05 Nov 2013, 07:26
by alienglow
Hi everyone,

I use sysrcd from my usb drive and I have it under a subfolder sysrcd so I have to give the subdir=sysrcd option. I rename isolinux.cfg to syslinux.cfg and chainload syslinux via grub4dos. Everything works fine, its just that when a new version comes up I overwrite the files from the ISO on the USB drive. Now my problem is I have to change the syslinux.cfg and add the subdir=sysrcd to each entry which is rather painful. Can't there be some auto detection possible for the subdir=sysrcd or maybe a global varaible which I can set in just one place rather than all of the menu entries.

Kind regards,


Re: USB boot and subdir

Posted: 05 Nov 2013, 07:57
by lem
Instead of using a subfolder for SystemRescueCD, why not partitionning the hard drive ?
One first partition for SRCD, another partition for anything else ?

Re: USB boot and subdir

Posted: 05 Nov 2013, 08:02
by alienglow
Partitioning is definitely one option, but this is a multi boot USB and I would prefer all stuff remains on a single partition.



Re: USB boot and subdir

Posted: 05 Nov 2013, 09:36
by gernot
I use a similar system and wrote a script to install new sysrcd Images.
I use extlinux because my system is on a ext3 Filesystem.
To use this script on your system you have to use syslinux.cfg. Also change mountpoints keybord layout and directory like you need.

Code: Select all

umount /cdrom 2>/dev/null
mount $1 /cdrom -o loop -t iso9660

cd /tmpd/sysrcd
cp -r /cdrom/* .
    # move isolinux files to extlinux files
    [ -d extlinux ] && rm -rf extlinux 2>/dev/null
    mv isolinux/isolinux.cfg isolinux/extlinux.conf
    cp -r isolinux/* extlinux
    # add subdir and keymap
cd extlinux
    awk '
/LINUX rescue/{lc=0;}
/LINUX altker/{lc=0;}
         if(lc<3)gsub(/APPEND/,"APPEND setkmap=de subdir=sysrcd")
         gsub(/rescue32/,"rescue32 setkmap=de subdir=sysrcd")
         gsub(/rescue64/,"rescue64 setkmap=de subdir=sysrcd")
         gsub(/altker32/,"altker32 setkmap=de subdir=sysrcd")
         gsub(/altker64/,"altker64 setkmap=de subdir=sysrcd")
{        gsub("/bootdisk","/sysrcd/bootdisk")
         print $0;lc++
' extlinux.conf >

    mv -f extlinux.conf
umount /cdrom   

Re: USB boot and subdir

Posted: 05 Nov 2013, 11:40
by alienglow
Thanks Gernot for sharing the script.



Re: USB boot and subdir

Posted: 05 Nov 2013, 12:21
by gernot
just cleaned the script a bit. Removed the 2 sed calls.