Articles
Install Linux on U3 USB drive
- Details
- U3 pendrives are made by a CD-like read-only partition + a mass storage device (USB pendrive)
- They appear as 2 different devices (/dev/sr1 and /dev/sdxY)
- The memory is shared between the CD and the memory, so, the bigger is the CD, the smaller is the free Memory
- 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
- 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)
- 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)
- 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.
- Make | take an ISO of your preferred live distro
- Insert your U3 pendrive into your computer
- Backup ALL the data on your pendrive, they will be lost after this process
- # u3-tool -i /dev/sdxY (where sdxY is your u3 pendrive)
- # 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")
- u3-tool -l YOUR_ISO.iso /dev/sdxY
- wait for the process to finish --> your CD is ready, now you have to partition the memory device according to the new size
- # fdisk /dev/sdx
- create a fat32 partition on the device (maximum size)
- save the new partition table
- # mkfs.vfat /dev/sdxY
- enjoy your customized CD+USB pendrive