On Wed, Aug 25, 2010 at 9:39 AM, Jasper Hartline
<[email protected]> wrote:
> On Wed, Aug 25, 2010 at 6:28 AM, Richard Shaw <[email protected]> wrote:
>> I think I found the problem after I sent the email. It looks like my
>> download stalled at nearly 100% in Chrome. The script didn't complain
>> though and I think it was still able to mount the ISO but there may
>> have been a few bytes missing.
>
> live.py in python-imgcreate has a implantisomd5 function which
> is supposed to implant a checksum into the ISO9660 filesystem
> if it is available at build time.

Redownloading did not help, it actually boots into the installer for
the i686 image even though that's the one I suspected was wrong.

Here's the command I used:
# ../Projects/mkbiarch/mkbiarch.py
./Fedora-13-i686-Live/Fedora-13-i686-Live.iso
Fedora-13-x86_64-Live.iso Fedora-13-biarch-Live.iso

Also, after figuring out I have to add the offset=512 option to mount
in order to mount the volume I see all the files seem to be there for
both arch's. Is it possible that isolinux.cfg is being used instead of
extlinux.cfg? It's still there and could be removed I think.

Also, I've started documenting the functions, (well one anyway so far!
:) ) and added some more status info when the script is running. I've
attached the patch.

Richard
--- mkbiarch.orig.py	2010-08-25 22:14:24.929807761 -0500
+++ mkbiarch.py	2010-08-25 22:01:40.627808436 -0500
@@ -20,13 +20,14 @@
 
     def mount(src, dst, options=None):
         if os.path.exists(src):
-            if not os.path.exists(dst):
+            if not os.path.exists(dst): # Do we need this? If so, shouldn't we use the internal mkdir function?
                 os.makedir(dst)
             if options is None:
                 args = ("/bin/mount", src, dst)
             else:
                 args = ("/bin/mount", options, src, dst)
             rc = subprocess.call(args)
+            if rc is 0: print '%s mounted to %s.' % (src, dst)
             return rc
         return
 
@@ -35,6 +36,7 @@
         if os.path.exists(src):
                 args = ("/bin/umount", src)
                 rc = subprocess.call(args)
+                if rc is 0: print '%s unmounted.' % src
                 return rc
         return
 
@@ -52,12 +54,11 @@
             shutil.move(src, dst)
 
     def mkdir(dir=None):
+        """Creates directories recursively. If no directory is specified a temporary file object is returned."""
         if dir is None:
-            tmp = tempfile.mkdtemp()
-            return tmp
+            return tempfile.mkdtemp()
         else:
-            args = ("/bin/mkdir", "-p", dir)
-            rc = subprocess.call(args)
+            return os.makedirs(dir)
 
 
     def losetup(src, dst, offset=None):
@@ -68,11 +69,13 @@
                 else:
                     args = ("/sbin/losetup", "-o", str(offset), src, dst)
                 rc = subprocess.call(args)
+                if rc is 0: print 'Loop device %s created.' % src 
         return rc
 
     def lounset(device):
         args = ("/sbin/losetup", "-d", device)
-        rc = subprocess.call(args) 
+        rc = subprocess.call(args)
+        if rc is 0: print 'Loop device, %s, deleted.' % device
 
     def null():
         fd = open(os.devnull, 'w')
@@ -214,12 +217,9 @@
         mount(lodev(x64), x64tmp)
 
 
-        dirs = ("/extlinux/", "/x86/", "/x64/")
+        dirs = ("/extlinux/", "/x86/LiveOS", "/x64/LiveOS")
         for dir in dirs:
             mkdir(multitmp + dir)
-        dirs = ("/x86/", "/x64/")
-        for dir in dirs:
-            mkdir(multitmp + dir + "/LiveOS/")
 
         intermediate = tempfile.mkdtemp() # loopdev performance is slow
                                           # copy to here first then back
@@ -238,8 +238,6 @@
 
         copy(x64tmp + "/isolinux/vmlinuz0", multitmp + "/extlinux/vmlinuz1")
         copy(x64tmp + "/isolinux/initrd0.img", multitmp + "/extlinux/initrd1.img")
-            
-
        
         uuid = getuuid(lodev(multi))
 
@@ -282,19 +280,11 @@
         setup(x86, x64, multi)
 
 
-
-
-
     try: 
         parse(sys.argv[1], sys.argv[2], sys.argv[3])
     except:
         usage()
-
-
-
-        
-        
-
-
+      
+      
 if __name__ == "__main__":
-    sys.exit(main())
+    sys.exit(main())
\ No newline at end of file
--
livecd mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/livecd

Reply via email to