[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ath9k module?



On Sun, Jul 18, 2010 at 6:44 PM, Daniel Baumann <daniel@debian.org> wrote:
> On 07/18/2010 10:46 PM, James Van Scoy wrote:
>> So, the procedure is to make two partitions on the stick, the first a
>> FAT partition and the second an ext2 partition named "live-rw".
>> Then copy the files inside the iso file to the FAT partition.
>
> yes.
>
>> Then install syslinux to the FAT partition to make the stick boot?
>
> and rename /isolinux to /syslinux, and /isolinux/isolinux.cfg to
> /syslinux/syslinux.cfg.

Also, change any reference to /isolinux in the config files to /syslinux.
I've written a little Python script for that that is by no means
polished (you have to hard code the target partition in the script and
it uses too many OS calls), but works for me and makes sure that I
don't forget any of the renames/edits. Please feel free to use and/or
expand if you like it.

 ~Juergen
#!/usr/bin/python

from subprocess import Popen,PIPE
import os
import shutil
import tempfile

DEV = "/dev/disk/by-label/LIVE"
MNT = tempfile.mkdtemp()

def dircopy(src, dst):
    srclist = os.listdir(src)
    for name in srclist:
        srcfile = os.path.join(src, name)
        dstfile = os.path.join(dst, name)
        print("cp "+srcfile)
        shutil.copy(srcfile, dstfile)

os.system("mount %s %s" % (DEV,MNT))

if not (os.path.isdir(MNT+"/live")):
    os.mkdir(MNT+"/live")
if not (os.path.isdir(MNT+"/syslinux")):
    os.mkdir(MNT+"/syslinux")

dircopy("/live/image/live", MNT+"/live")
dircopy("/live/image/isolinux", MNT+"/syslinux")
shutil.move(MNT+"/syslinux/isolinux.cfg", MNT+"/syslinux/syslinux.cfg")

os.system("sed -i -e 's/isolinux/syslinux/' %s/syslinux/*.cfg" % (MNT))

os.system("umount  " + MNT)
os.rmdir(MNT)
os.system("syslinux -d /syslinux/ " + DEV)


Reply to: