Kaos's Multi-Boot Recovery Question


Last Updated:

  1. UNCbassbone

    UNCbassbone Member This Topic's Starter

    Joined:
    May 14, 2010
    Messages:
    12
    Likes Received:
    1
    Hey guys, so I am trying to take a stab at Punk.Kaos's Multi-boot recovery image, and I have a few questions.

    I am dual booting Ubuntu 10.10 and Windows 7. I used my Ubuntu installation to create system.img using the following command:
    dd if=/dev/zero of=/(blah blah blah)/system.img bs=1M count=180

    Then I format the system.img to ext.3 using the following command:
    mkfs.ext3 system.img
    and I get this message:
    "system.img is not a block special device. Proceed anyway(y/n)?"

    I hit yes, and it formats it to .ext3. Then, as per a post that Kaos made, I try to copy the contents of a .zip into system.img. My problem is that I have no idea how to copy the .zip contents into system.img (I copy the contents, but when I right-click on system.img there is no "paste" option). Is there some other command that I can use?
     

    Advertisement
  2. erisuser1

    erisuser1 Well-Known Member

    Joined:
    Nov 11, 2009
    Messages:
    1,644
    Likes Received:
    759
    assuming that the "mkfs.ext3" command worked correctly on a plain file, the next thing you do (with a variety of *nix OS'es) is to perform a "loopback mount".

    This allows the kernel to treat a character file as if it were a block device.

    e.g.

    Code (Text):
    1.  
    2. losetup /dev/loop0 /(blah blah blah)/system.img
    3. mkdir /tmp/mymountpoint
    4.  
    5. mount -o rw -t ext3 /dev/loop0 /tmp/mymountpoint
    6.  
    then, copy your files to /tmp/mymountpoint

    when finished, make sure you don't have any processes sitting on top of your mountpoint (e.g. a terminal/shell window where you CD'ed into a folder under /tmp/mymountpoint), and then

    Code (Text):
    1.  
    2. sync
    3. umount /dev/loop0
    4. losetup -d /dev/loop0
    5.  

    That's how you would build an "ext3" formatted file. (Note that in the case of Android for cell phones, the "system.img" files and "data.img" files are in the yaffs2 file format, not extN.) I don't know if the multiboot hack expects images to be ext3, but I suppose it does, because that is what you are attempting.


    cheers

    eu1
     
  3. UNCbassbone

    UNCbassbone Member This Topic's Starter

    Joined:
    May 14, 2010
    Messages:
    12
    Likes Received:
    1

Share This Page

Loading...