USB boot and subdir

Discussions about what to change in future versions (except software request).
alienglow
Posts: 3
Joined: 05 Nov 2013, 07:23

USB boot and subdir

Postby alienglow » 05 Nov 2013, 07:26

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,

Alienglow

lem
Posts: 11
Joined: 10 Apr 2013, 08:20
Location: France

Re: USB boot and subdir

Postby lem » 05 Nov 2013, 07:57

Instead of using a subfolder for SystemRescueCD, why not partitionning the hard drive ?
One first partition for SRCD, another partition for anything else ?

alienglow
Posts: 3
Joined: 05 Nov 2013, 07:23

Re: USB boot and subdir

Postby alienglow » 05 Nov 2013, 08:02

Partitioning is definitely one option, but this is a multi boot USB and I would prefer all stuff remains on a single partition.

Thanks,

Alienglow.

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: USB boot and subdir

Postby gernot » 05 Nov 2013, 09:36

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;}
/APPEND/{
         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")
         gsub("/ntpasswd","/sysrcd/ntpasswd")
         print $0;lc++
}
' extlinux.conf > extlinux.conf.new

    mv -f extlinux.conf.new extlinux.conf
cd
umount /cdrom   


Gernot

alienglow
Posts: 3
Joined: 05 Nov 2013, 07:23

Re: USB boot and subdir

Postby alienglow » 05 Nov 2013, 11:40

Thanks Gernot for sharing the script.

regards,

alienglow

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: USB boot and subdir

Postby gernot » 05 Nov 2013, 12:21

just cleaned the script a bit. Removed the 2 sed calls.

Gernot


Return to “Future”

Who is online

Users browsing this forum: Google [Bot] and 2 guests