Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LiveUSB in Linux, step by step
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
prnull
n00b
n00b


Joined: 16 Oct 2008
Posts: 1

PostPosted: Mon Oct 20, 2008 7:14 am    Post subject: LiveUSB in Linux, step by step Reply with quote

So after getting really frustrated last night over not getting the LiveUSB HowTo to work I started researching this step only to find a flaw in the Gentoo-documentation (bug reported). So to ease everyones discomfort here comes the LiveUSB step-by-step no fuss solution. NOTE: This guide is a CLI no GUI commands walkthrough. This can be done from any Linux distribution, including LiveCD versions. This s-b-s assumes you have basic knowlage of fdisk+vim+bash+dd. If you don't know these issue 'man <command>' to learn more.

:!: You need to download SYSLINUX (pre-compiled) from http://www.kernel.org/pub/linux/utils/boot/syslinux/ if you'r distribution does not contain it.

Comments are defined ':comment'

Step-by-step commands:
    # fdisk -l :List disk devices, find you'r key, ex sda/sdb/sdc
    # fdisk /dev/sdx :Use fdisk to partition you'r USB-key (learn more, 'man fdisk')
    # mkdosfs -F 16 /dev/sdx1 :Format first partition of USB-key to Fat16 (use '-F 32' if drive >1GB Drive)
    # dd if=/syslinux/mbr.bin of=/dev/sdx :Make USB-key bootable (NOT PARTITION!) through syslinux.
    # mkdir -p /mnt/gentooiso :Create ISO mountpoint
    # mount -o loop,ro -t iso9660 livecd-i686-installer-2007.0.iso /mnt/gentooiso :Mount ISO
    # mkdir -p /mnt/usb :Create USB mountpoint
    # mount -t vfat /dev/sdx1 /mnt/usb :Mount USB-key partition 1
    # cp -r /mnt/gentooiso/* /mnt/usb :Copy all files from ISO to USB
    # mv /mnt/usb/isolinux/* /mnt/usb :Move all files from isolinux to root of USB-key.
    # mv /mnt/usb/isolinux.cfg /mnt/usb/syslinux.cfg :Rename file
    # mv /mnt/usb/isolinux.bin /mnt/usb/syslinux.bin :Rename file
    # rm -rf /mnt/usb/isolinux* :Remove empty directory
    # mv /mnt/usb/memtest86 /mnt/usb/memtest :Rename file
    # umount /mnt/gentooiso :Unmount ISO
    # vim /mnt/sdx1/syslinux.cfg :Edit file to make all parts usable on key
    - Edit 'memtest86' to 'memtest'
    - Type 'ESC' + ':wq' to save file
    :!: # umount /mnt/usb :Unmount USB-key. VERY IMPORTANT!
    # syslinux -sf /dev/sdx1 :Install bootloader on USB-key partition 1


Thats all folks. Hope this gives som ease to people struggling to get this working. Please report any errors in this thread and I will update it. Tips are also welcome!

Best of luck
PrNull
_________________
PrNull a division by 0
Back to top
View user's profile Send private message
bendagr8
Tux's lil' helper
Tux's lil' helper


Joined: 04 Sep 2003
Posts: 135
Location: OR

PostPosted: Tue Oct 21, 2008 3:54 pm    Post subject: Reply with quote

This was all documented here already.

http://www.gentoo.org/doc/en/liveusb.xml

The one thing that I had to do differently is to edit the mtools.conf file before that last step.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum