How to use SmartPhone as Ubuntu liveUSB?


Last Updated:

  1. LittleReinhart

    LittleReinhart Member This Topic's Starter

    Joined:
    May 11, 2012
    Messages:
    6
    Likes Received:
    2
    Dear all,

    I dunno if this is the right forum or section to post my question.

    You all know the story... you are at friends... they have a pc-prob, accidentally you have your ubuntu liveCD/liveUSB with you... and you help them.
    My problem is: my brain is a mess, and I always forget my usb.

    My smartphone on the other hand, I'll never forget. So that brings me to the question:
    Can I use my smartphone as Ubuntu liveUSB?

    Yesterday evening I tried to create a bootable USB stick on my smartphone (both SD-card and internal memory). Rebooted PC, activated USB-connection on my smartphone, hit F12 to select "boot from USB", and nothing happened. It didn't recognise the usb.
    I've put the SD-card into my girlfriends smartphone, with the same result :-S
    With a normal usb-key it works.

    So, I'm wandering... does anyone know if this is possible? And if yes, how?
    I don't think this is a "ubuntu-problem", I guess I somehow have to tell my phone to act as a normal usb-key, but I've no Idea how.

    Background information:
    Ubuntu version I wanna use as LiveUSB : Ubuntu 12.04 LTS 32 bit
    my smartphone : LG optimus 2x (p990) (CyanogenMode-7.2.0-RC1-p990)
    gf smartphone : Samsung Galaxy SII (original Samsung android version 2.3.5)

    Thanks!

    Warm regards,
    Reinhart

    P.S. I posted the same question on http://ubuntuforums.org/showthread.php?t=1978208
     

    Advertisement
  2. RichSz

    RichSz Not Entitled VIP Member

    Joined:
    Jul 9, 2010
    Messages:
    2,087
    Likes Received:
    1,174
    Welcome to Android Forums!


    I'm going to slide this thread over to the Android Lounge.
     
  3. LittleReinhart

    LittleReinhart Member This Topic's Starter

    Joined:
    May 11, 2012
    Messages:
    6
    Likes Received:
    2
    Thanks RichSz!
     
  4. mikedt

    mikedt 你好 Guide

    Joined:
    Sep 22, 2010
    Messages:
    18,677
    Likes Received:
    9,189
    It might be possible to do. Have you tried enabling "USB debugging" in Settings > Application settings > Development? I've used a cheap Chinese MP4 player as a live Linux bootable USB drive, when I didn't have a regular USB stick to hand. Only thing I found was that the MP4 player wouldn't actually function until it was re-formatted back to FAT, rather than bootable Linux format.

    I would guess though that the phone's SD-card wouldn't be accessible to the phone if it was formatted as a live Linux boot drive rather than FAT.

    EDIT:

    I just tested it and my PC did try to boot from a Samsung Galaxy S, of course it went "No bootable media found" as it wasn't formatted as a live Ubuntu drive. The phone's SD card must be visible and available to the PC BIOS boot options at the time of booting, like when booting from a USB stick.
     
  5. LittleReinhart

    LittleReinhart Member This Topic's Starter

    Joined:
    May 11, 2012
    Messages:
    6
    Likes Received:
    2
    Thanks mikedt,

    I had a few hours yesterday, to test it. Unfortunately it didn't work.

    Is "USB debugging" the only thing you enabled? or are there more settings I have to check?

    I'll continue trying whenever I have spare time this week, and keep you updated.

    Warm regards,
    Reinhart
     
  6. LittleReinhart

    LittleReinhart Member This Topic's Starter

    Joined:
    May 11, 2012
    Messages:
    6
    Likes Received:
    2
    Ok, I got to the point where I could select "boot from USB" on the PC, but when I continued, it said "no bootable medum found" or something like that.
    This was done by using USB-creator (in Ubuntu).

    The problem is, that USB-creator can only install the liveUSB after formatting the SD-card (or internal card (I tried both)). But when formatted, android won't recognise the fat32 filesystem. And when I try to connect (mount in english?) the SD-card or the internal memory, android won't let me. I expect that's the reason why the pc indicates "no bootable medum found".

    When I format the SD-card (or internal card) by android and put the LiveUSB on it whithout formatting (not possible in Ubuntu, possible in windows (I used "Universal-USB-Installer-1.8.9.7.exe")), then I am not able to select "boot from USB".

    So, I think there are two possible solutions:
    1) or I have to, somehow, make the computer be able to boot from the android file system (A2SD+?)
    2) or I have to install the drivers for filesystems like Fat32, EXT2/3/4, ... to my android phone.

    Since 1) isn't a good solution for when I wanna boot different computers, I hope someone knows a way to use the second solution.... I don't seem to find it in the "play store"

    Warm regards,
    Reinhart
     
    mikedt likes this.
  7. LittleReinhart

    LittleReinhart Member This Topic's Starter

    Joined:
    May 11, 2012
    Messages:
    6
    Likes Received:
    2
    Finally I got it working!

    - put Ubuntu as liveUSB on the SD-card (using format)
    - reboot android in ClockworkMod Recovery
    select : mounts and storage -> mount USB storage
    - Reboot PC, booting from USB
    Now Ubuntu LiveUSB boots.

    Finally! :-D

    However... now the SD-card isn't usable within Android. So next step is to figure out how to make 2 partitions on the SD-card.

    To be continued...

    Warm regards,
    Reinhart
     
    mikedt likes this.
  8. mikedt

    mikedt 你好 Guide

    Joined:
    Sep 22, 2010
    Messages:
    18,677
    Likes Received:
    9,189
    I'm sure recognising EXT2/3/4 is at the Linux kernel level. Normally the Android Linux kernel has no reason to include EXT2/3/4. AFAIK Android itself uses YAFFS/YAFFS2 and can recognise FAT and FAT32 storage media. You'd probably have to build a custom kernel to get Android to recognise EXT2/3/4

    EDIT:

    Reinhart just I saw your "Finally I got it working!" post ... keep us posted and good luck. :)
     
  9. LittleReinhart

    LittleReinhart Member This Topic's Starter

    Joined:
    May 11, 2012
    Messages:
    6
    Likes Received:
    2
    Ow, I dunno anything about writing code :-S, so I'm not going there ;-)

    When I format the SD-card using android, windows recognizes it at FAT32, but cannot edit the partition. In Linux I can use the partition, but gparted doesn't recognize it (no partitions).
    When I format the SD-card using windows/linux, android sais the sd-card is damaged, and the only way to connect the sd-card is by formatting it again.

    So, I just have to look for a partition manager that can both work with YAFFS/YAFFS2 and fat32. Thanks for the tip mikedt.

    Thanks!

    Yes, I will definitely post a small howto here when I'm completely finished.

    Warm regards,
    Reinhart
     

Share This Page

Loading...