Live OS CD to USB Script
Live OS CD to USB Writer Tool or Script enables you to write your Live Linux Operating System CD to a USB drive.
I. Download Script
[root@nglinux ]# mkdir /usr/nglinux; cd $_; \ wget --auth-no-challenge http://ngelinux.com/scripts/ngelinux_usb_install.sh; \ wget --auth-no-challenge http://ngelinux.com/scripts/livecd-iso-to-disk; \ chmod +x ./livecd-iso-to-disk ./ngelinux_usb_install.sh;
II. Writing LiveCD to a USB drive
a. Successful attempt
[root@nglinux ]# ./ngelinux_usb_install.sh This Script will copy the NGE Linux CD/DVD to a USB Disk and make it bootable.. Select the disk for installation 1. Disk /dev/sda: 8589 MB, 8589934592 bytes 2. Disk /dev/sdb: 8589 MB, 8589934592 bytes 3. Other 2 You have selected Disk Disk /dev/sdb: 8589 MB, 8589934592 bytes The disk is going to be formatted. WARNING !! All data on Disk /dev/sdb: 8589 MB, 8589934592 bytes will be erased. Are you sure(y/n) ? y Formatting Disk Disk /dev/sdb: 8589 MB, 8589934592 bytes in ext4 format.... mke2fs 1.41.12 (17-May-2010) /dev/sdb is entire device, not just one partition! Proceed anyway? (y,n) y Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 524288 inodes, 2097152 blocks 104857 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=2147483648 64 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632 Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 21 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. FORMAT Complete... Now transferring the image file to /dev/sdb device... Verifying image... The media check is complete, the result is: NA. No checksum information available, unable to verify media. Are you SURE you want to continue? Press Enter to continue or ctrl-c to abort Copying live image to USB stick progress 65536/1722208256 (64.0 KB/s) progress 131072/1722208256 (128.0 KB/s) progress 196608/1722208256 (192.0 KB/s) progress 262144/1722208256 (256.0 KB/s) progress 327680/1722208256 (320.0 KB/s) progress 393216/1722208256 (384.0 KB/s) progress 458752/1722208256 (448.0 KB/s) progress 524288/1722208256 (512.0 KB/s) progress 589824/1722208256 (576.0 KB/s) progress 655360/1722208256 (640.0 KB/s) ...... ...... progress 1721630720/1722208256 (17.1 MB/s) progress 1721696256/1722208256 (17.1 MB/s) progress 1721761792/1722208256 (17.1 MB/s) progress 1721827328/1722208256 (17.1 MB/s) progress 1721892864/1722208256 (17.1 MB/s) progress 1721958400/1722208256 (17.1 MB/s) progress 1722023936/1722208256 (17.1 MB/s) progress 1722089472/1722208256 (17.1 MB/s) progress 1722155008/1722208256 (17.1 MB/s) progress 1722208256/1722208256 (17.1 MB/s) progress 1722208256/1722208256 (17.1 MB/s) Updating boot config file Initializing persistent overlay file 0+0 records in 0+0 records out 0 bytes (0 B) copied, 3.2193e-05 s, 0.0 kB/s Initializing persistent /home 0+0 records in 0+0 records out 0 bytes (0 B) copied, 4.9793e-05 s, 0.0 kB/s Formatting unencrypted /home mke2fs 1.41.12 (17-May-2010) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) Stride=0 blocks, Stripe width=0 blocks 51200 inodes, 204800 blocks 10240 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=67371008 25 block groups 8192 blocks per group, 8192 fragments per group 2048 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 21 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. tune2fs 1.41.12 (17-May-2010) Setting maximal mount count to -1 Setting interval between checks to 0 seconds Installing boot loader /media/usbdev.Z3xSqZ/syslinux is device /dev/sdb USB stick set up as live image! The NG Linux 1.0 is now installed on device /dev/sdb. Just reboot the system and check the live OS installation your USB/disk. Press any key to exit .... [root@nglinux ]#
b. Unsuccessful Attempt
In case device is used.
[root@nglinux nglinux]# ./ngelinux_usb_install.sh This Script will copy the NGE Linux CD/DVD to a USB Disk and make it bootable.. Select the disk for installation 1. Disk /dev/sdb: 8589 MB, 8589934592 bytes 2. Disk /dev/sda: 34.4 GB, 34359738368 bytes 3. Other 2 You have selected Disk Disk /dev/sda: 34.4 GB, 34359738368 bytes The disk is going to be formatted. WARNING !! All data on Disk /dev/sda: 34.4 GB, 34359738368 bytes will be erased. Are you sure(y/n) ? y Formatting Disk Disk /dev/sda: 34.4 GB, 34359738368 bytes in ext4 format.... mke2fs 1.41.12 (17-May-2010) /dev/sda is entire device, not just one partition! Proceed anyway? (y,n) y /dev/sda is apparently in use by the system; will not make a filesystem here! Error encountered in formatting the disk Please review if filesystem is not used and rerun this script to install CD image on USB. If required please report above error to NGELINUX.com for support with current screen session log Press any key to exit now... [root@nglinux nglinux]#