Difference between revisions of "Linux USB"
Jump to navigation
Jump to search
(Created page with "= Format USB stick = sudo fdisk -l #fid out your usb device df umount /dev/'''sdb1''' mkfs.vfat /dev/'''sdb1''' #create fat32 mkfs.ext3 /dev/'''sdb1''' #create ext3...") |
|||
Line 1: | Line 1: | ||
= Set bootable flag on USB drive = | |||
$ sudo fdisk /dev/sdb #/dev device needs to be a hard drive(sdb) not a partition(sdb1) | |||
Command (m for help): <span style="color: red">a</span> | |||
Partition number (1-4): <span style="color: blue">'''1'''</span> | |||
Command (m for help): w | |||
The partition table has been altered! | |||
Calling ioctl() to re-read partition table. | |||
Syncing disks. | |||
$ '''sudo fdisk -l''' | |||
<--- output omitted -----> | |||
Disk /dev/sdb: 2002 MB, 2002747392 bytes | |||
255 heads, 63 sectors/track, 243 cylinders, total 3911616 sectors | |||
Units = sectors of 1 * 512 = 512 bytes | |||
Sector size (logical/physical): 512 bytes / 512 bytes | |||
I/O size (minimum/optimal): 512 bytes / 512 bytes | |||
Disk identifier: 0x00000000 | |||
Device <span style="color: red">Boot</span> Start End Blocks Id System | |||
/dev/sdb<span style="color: blue">'''1'''</span> <span style="color: red">*</span> 63 3911615 1955776+ c W95 FAT32 (LBA) | |||
= Format USB stick = | = Format USB stick = | ||
sudo fdisk -l # | sudo fdisk -l #find out your usb device | ||
df | df | ||
umount /dev/'''sdb1''' | umount /dev/'''sdb1''' |
Revision as of 14:46, 28 June 2014
Set bootable flag on USB drive
$ sudo fdisk /dev/sdb #/dev device needs to be a hard drive(sdb) not a partition(sdb1) Command (m for help): a Partition number (1-4): 1 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. $ sudo fdisk -l <--- output omitted -----> Disk /dev/sdb: 2002 MB, 2002747392 bytes 255 heads, 63 sectors/track, 243 cylinders, total 3911616 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdb1 * 63 3911615 1955776+ c W95 FAT32 (LBA)
Format USB stick
sudo fdisk -l #find out your usb device df umount /dev/sdb1 mkfs.vfat /dev/sdb1 #create fat32 mkfs.ext3 /dev/sdb1 #create ext3 mkdosfs -F 32 -I /dev/sdb1 #format device to fat32
Copy .iso on USB stick
sudo dd if=image.iso of=/dev/sdb1
Mount .iso
sudo mkdir /mnt/isoimage sudo mount -o loop -t iso9660 image.iso /mnt/isoimage/