Page 1 of 1

[HOWTO] U3 pendrives, great for linux live

Posted: 03 Jan 2011, 08:13
by Mithrandil
Yesterday i made some tests with my SandDisk Cruzer 16GB USB pendrive, this is what i discovered (i know, most of you already know that, but for the others that could be interesting):
  1. U3 pendrives are made by a CD-like read-only partition + a mass storage device (USB pendrive)
  2. They appear as 2 different devices (/dev/sr1 and /dev/sdxY)
  3. The memory is shared between the CD and the memory, so, the bigger is the CD, the smaller is the free Memory
  4. You can replace the ISO image on your pendrive with an ISO of your choice (with u3-tool), and it will appear as a real CD device
  5. The CD device can be booted as a normal CD, probably also on devices which don't allow boot from USB, anyway not sure about that (not on APPLE stuff, tested)
  6. The CD part is readonly, (i.e. noobproof, you can borrow it to anyone, and they will not accidentally delete your slax nor boot folder)
  7. The ID (/dev/disk/by-id/*) of the CD device is similar to the ID of the mass storage part (i.e. the pendrive partition can be easily recognized by any script)
How-to (assuming you don't have any encrypted partition on your pendrive):

DISCLAMER: if you don't know what commands mean, don't do it, this could destroy you computer, your fridge, and even your microwave oven. :evil:
  1. Make | take an ISO of your preferred live distro
  2. Insert your U3 pendrive into your computer
  3. Backup ALL the data on your pendrive, they will be lost after this process
  4. # u3-tool -i /dev/sdxY (where sdxY is your u3 pendrive)
  5. # u3-tool -p XXXXXXXXX /dev/sdxY (where XXXXXXXX is the size in bytes of your ISO (may be something more than the size, you can get the size with "ls -l YOUR_ISO.iso")
  6. u3-tool -l YOUR_ISO.iso /dev/sdxY
  7. wait for the process to finish --> your CD is ready, now you have to partition the memory device according to the new size
  8. # fdisk /dev/sdx
  9. create a fat32 partition on the device (maximum size)
  10. save the new partition table
  11. # mkfs.vfat /dev/sdxY
  12. enjoy your customized CD+USB pendrive

Re: [HOWTO] U3 pendrives, great for linux live

Posted: 03 Jan 2011, 09:41
by fanthom
Copied from 'Hardware' section to 'HOW TO's & Resources' as it is a great tutorial as well.

Re: [HOWTO] U3 pendrives, great for linux live

Posted: 03 Jan 2011, 09:48
by X-Factor
:Yahoo!:
now i'll just learn How To on hacking n we rule the world ( id if no one wants it ) :evil:
OMG i'm mutating again............

Re: [HOWTO] U3 pendrives, great for linux live

Posted: 03 Jan 2011, 18:51
by brokenman
Backup ALL the data on your pendrive, they will be lost after this process
Sounds like i should also remove everything from the frisge before proceeding too!. Great tutorial.

Re: [HOWTO] U3 pendrives, great for linux live

Posted: 04 Jan 2011, 06:51
by X-Factor
Did a bit of googling last night (morning/afternoon for the rest of you) while waiting for the poll (yeah still sulking losing by a nose :cry: ) found a site mentioning virtual CD, apparently with one of those usb thingy bob including 32MB storage so there is a chance of ruling the world after all :evil: .

I might add to the disclaimer.
Throw it this way if you =@ the How To, hopefully the phoenix's team can ressurected :D

Re: [HOWTO] U3 pendrives, great for linux live

Posted: 04 Jan 2011, 07:23
by Mithrandil
X-Factor wrote:Did a bit of googling last night (morning/afternoon for the rest of you) while waiting for the poll (yeah still sulking losing by a nose :cry: ) found a site mentioning virtual CD, apparently with one of those usb thingy bob including 32MB storage so there is a chance of ruling the world after all :evil: .
I can't understand what you mean... 32MB? I have a 1GB ISO image on my pendrive (as CD) and more than 14GB of storage...

Re: [HOWTO] U3 pendrives, great for linux live

Posted: 04 Jan 2011, 08:57
by X-Factor
@Mithrandil.
Sorry :oops: i was refering to usb modem that has in built windoze modem driver and MicroSd mass storage option.
maybe my comment should be ported elsewhere ? :o probably tomorrow i'll try your How To still raining here. :(

On the 2 usb that i have average win modem driver is 23 mb, so the reminder could be use for /boot directory n the /slax directory can be put at mass storage option.

just have to figure out the tool now..... :(

FYI 1 is gsm stick the other is wifi stick, haven't tried it (too expensive to subscribe ~ the wi-fi one)
EDIT
Here is another statistic CDMA evdo A with up to 8 GB mass storage same principle ( i think ) will try to hunt this tomorrow.
My main interest is this, over here people love gadget, having a modem, storage n complete OS boggle their mind (god i sound like my uncle). the plus side cost less that 12 euro (15usd) for monthly unlimited surfing the net....... 8)
fanthon/brokenman can deleted this (sound more like sales pitch raher than how to)
my post not mithrandil.