Wednesday, November 9, 2011

Create Bootable Fedora USB stick from ISO image on any Linux distro

usb-stick (/dev/sdb1) 8GB having label SATELLITE (1GB is enough),
and syslinux command.

Following are the steps:
# mkdir /mnt/{iso,usb}
# mount -t iso9660 /home/user/Fedora-15-x86_64-Live-KDE.iso /mnt/iso
# mount /dev/sdb1 /mnt/usb
NOTE: /dev/sdb1 is my usb-stick
# cp -rv /mnt/iso/* /mnt/usb/
# syslinux --install -d EFI/boot/ /dev/sdb1
used '-d EFI/boot/' because vmlinuz and initrd image file exist in this folder wrt to root of usb ie /mnt/usb
otherwise need to edit their paths accordingly in syslinux.cfg.
# cd /mnt/usb/EFI/boot
# cp isolinux.cfg syslinux.cfg
edit syslinux.cfg and edit 'root' parameter of kernel
label linux0
   menu label Boot
   kernel vmlinuz0
   append initrd=initrd0.img root=LABEL=SATELLITE rootfstype=auto ro liveimg rd.luks=0

Can Test it with qemu or qemu-system-x86_64:
# qemu-system-x86_64 -hda /dev/sdb1 -m256 -vga std

If boot successfully, just reboot the system and boot it from usb.

NOTE: label can be set using command: e2label /dev/sdb1 SATELLITE

No comments:

Post a Comment