Difference between revisions of "Installation/Live Images/USB-Stick for OFW11"
From OpenFOAMWiki
< Installation | Live Images
(Kicked off this page with the list of instructions I already have) |
(Still having rendering problems...) |
||
Line 2: | Line 2: | ||
== Reminders == | == Reminders == | ||
− | + | <ul> | |
− | + | <li>{{tt|sdX}} refers to the device itself for the USB drive. | |
− | + | </li> | |
+ | <li>{{tt|sdX1}} refers to the first partition. | ||
+ | </li> | ||
+ | <li>You can find the actual device identification if you use the auto-mount feature that Linux Distributions provide to explore the drive's contents. Then run: | ||
<bash>mount</bash> | <bash>mount</bash> | ||
and the last entry is likely the one related to the USB drive, assuming it's the latest one mounted in the system. For example, it may show this: | and the last entry is likely the one related to the USB drive, assuming it's the latest one mounted in the system. For example, it may show this: | ||
Line 10: | Line 13: | ||
</bash> | </bash> | ||
which means that: | which means that: | ||
− | + | <ul> | |
− | + | <li>{{tt|/dev/sdf}} is the drive's device identification path; | |
+ | </li> | ||
+ | <li>{{tt|/dev/sdf1}} is the drive's first partition path. | ||
+ | </li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | </ul> | ||
Line 19: | Line 28: | ||
Steps: | Steps: | ||
− | + | <ol> | |
− | + | <li>Switch to root or keep in mind to do the command with {{tt|sudo}}. | |
+ | </li> | ||
+ | <li>First of all, unmount the partition that it probably auto-mounted: | ||
<bash>umount /dev/sdX1</bash> | <bash>umount /dev/sdX1</bash> | ||
− | + | </li> | |
+ | <li>For creating the partition: | ||
<bash>fdisk /dev/sdX | <bash>fdisk /dev/sdX | ||
d #delete | d #delete | ||
Line 46: | Line 58: | ||
w #write partition table | w #write partition table | ||
</bash> | </bash> | ||
− | + | * Note: Make sure you have the units in sectors: | |
<bash>u # use as many times as possible until it shows | <bash>u # use as many times as possible until it shows | ||
#Changing display/entry units to sectors | #Changing display/entry units to sectors | ||
</bash> | </bash> | ||
− | + | </li> | |
+ | <li>'''Optional''' - Full clean up of partition: | ||
<bash>dd if=/dev/zero of=/dev/sdX1 bs=512<bash> | <bash>dd if=/dev/zero of=/dev/sdX1 bs=512<bash> | ||
− | + | # In another terminal (also as root), tun: | |
<bash>while killall -USR1 dd; do sleep 30; done</bash> | <bash>while killall -USR1 dd; do sleep 30; done</bash> | ||
− | + | # Then look at the previous terminal window and every 30 seconds it should update on the current write status. Given how this command works, if you have more than one {{tt|dd}} running, it will update for all running {{tt|dd}} applications. | |
− | + | # It will probably end with the message: | |
<bash>dd: error writing ‘/dev/sdX1’: No space left on device</bash> | <bash>dd: error writing ‘/dev/sdX1’: No space left on device</bash> | ||
because we didn't define the total number of bytes/blocks to write. | because we didn't define the total number of bytes/blocks to write. | ||
− | + | # Once completed, make sure it's fully written by running: | |
<bash>sync</bash> | <bash>sync</bash> | ||
wait until it returns control back to you. | wait until it returns control back to you. | ||
− | + | </li> | |
+ | <li>Once complete, then for formatting the partition properly: | ||
<bash>mkfs -t vfat /dev/sdX1</bash> | <bash>mkfs -t vfat /dev/sdX1</bash> | ||
+ | </li> | ||
+ | </ol> | ||
Line 71: | Line 87: | ||
Need to have {{tt|usb-creator-gtk}} installed and we will be using Lubuntu 64-bit as the basis for our pen drives. In addition, it's advisable to do these steps from a working installation of the desired Lubuntu version, even if it's within a virtual machine. | Need to have {{tt|usb-creator-gtk}} installed and we will be using Lubuntu 64-bit as the basis for our pen drives. In addition, it's advisable to do these steps from a working installation of the desired Lubuntu version, even if it's within a virtual machine. | ||
− | + | Steps: | |
+ | <ol> | ||
+ | <li>As root (or with {{tt|sudo}}), run: | ||
<bash>usb-creator-gtk</bash> | <bash>usb-creator-gtk</bash> | ||
− | + | </li> | |
− | + | <li>Select the ISO for the Lubuntu Live CD/DVD.</li> | |
− | + | <li>Select the pen drive you want as the target for the Live USB. | |
− | + | * '''Note''': Do not use the erase function, otherwise you will loose the correct booting mechanism that was created with {{tt|fdisk}} and {{tt|mkfs}}. | |
− | + | </li> | |
− | + | <li>Select the largest possible "Stored in reserved extra space", at least taking into account how much will be left over for the _read-anywhere_ files, such as presentations and VM installers. | |
− | + | * For example: | |
− | + | ** 690 MiB for the cloned Live CD | |
− | + | ** 1.0 GiB for the _read-anywhere_ data. | |
+ | ** 7.1 GiB - 1.0 GiB - 690 MiB = 5.42 GiB = 5556.4 MiB... which is larger than 4GiB, the file size limit for FAT32 partitions. | ||
+ | </li> | ||
+ | </li>Finally, click on the "Make Startup Disk" button and wait a while for it to run... | ||
+ | </li> | ||
+ | </ol> | ||
Line 90: | Line 113: | ||
Steps: | Steps: | ||
− | + | <ol> | |
− | + | <li>Mount the pen with the interactive mount that Lubuntu has got from the file manager.</li> | |
+ | <li>As root (or with {{tt|sudo}}), run: | ||
<bash>mkdir /mnt/casper | <bash>mkdir /mnt/casper | ||
mount -t auto /media/$USER/*/casper-rw /mnt/casper/ -o loop | mount -t auto /media/$USER/*/casper-rw /mnt/casper/ -o loop | ||
</bash> | </bash> | ||
− | + | </li> | |
+ | <li>The _persistent_ home folder will now be located at {{tt|/mnt/casper/upper/home/lubuntu/}}: | ||
<bash>cd /mnt/casper/upper/home/lubuntu/</bash> | <bash>cd /mnt/casper/upper/home/lubuntu/</bash> | ||
If it doesn't exist, then create it and change owership: | If it doesn't exist, then create it and change owership: | ||
<bash>mkdir -p /mnt/casper/upper/home/lubuntu/ | <bash>mkdir -p /mnt/casper/upper/home/lubuntu/ | ||
chown -R 999:999 /mnt/casper/upper/home/lubuntu/</bash> | chown -R 999:999 /mnt/casper/upper/home/lubuntu/</bash> | ||
− | + | </li> | |
+ | <li>When you're done copying files to the image, make sure the _persistent_ home folder has the correct owner permissions: | ||
<bash>chown -R 999:999 /mnt/casper/upper/home/lubuntu/</bash> | <bash>chown -R 999:999 /mnt/casper/upper/home/lubuntu/</bash> | ||
− | + | </li> | |
+ | <li>Then unmount it: | ||
<bash>umount /mnt/casper</bash> | <bash>umount /mnt/casper</bash> | ||
− | + | </li> | |
+ | <li>Also unmount the pen: | ||
<bash>umount /dev/sdX1</bash> | <bash>umount /dev/sdX1</bash> | ||
+ | </li> | ||
+ | </ol> | ||
Line 111: | Line 141: | ||
Steps: | Steps: | ||
− | + | <ol> | |
+ | <li>Make sure you don't have the pen mounted! Example to umount: | ||
<bash>umount /dev/sdX1</bash> | <bash>umount /dev/sdX1</bash> | ||
− | + | </li> | |
+ | <li>As root (or with {{tt|sudo}}), run: | ||
<bash>dd if=/dev/sdX of=OFW11-2015_v1.img bs=512 count=14950463</bash> | <bash>dd if=/dev/sdX of=OFW11-2015_v1.img bs=512 count=14950463</bash> | ||
− | + | * The value "14950463" is the End sector count 14950462 plus 1. | |
− | + | * 14950463 sector * 512 B/sector = 7654636544 B = 7654636544 ~= 7300 MiB | |
− | + | ||
+ | # In another terminal (also as root), tun: | ||
<bash>while killall -USR1 dd; do sleep 30; done</bash> | <bash>while killall -USR1 dd; do sleep 30; done</bash> | ||
− | + | # Then look at the previous terminal window and every 30 seconds it should update on the current write status. Given how this command works, if you have more than one {{tt|dd}} running, it will update for all running {{tt|dd}} applications. | |
− | + | </li> | |
+ | <li>When it's done cloning, make sure the file system is synced: | ||
<bash>sync</bash> | <bash>sync</bash> | ||
wait until it returns control back to you. | wait until it returns control back to you. | ||
− | + | </li> | |
+ | <li>Now you can mount the pen again, if you want. Or simply eject it.</li> | ||
+ | </ol> | ||
Line 129: | Line 165: | ||
It's almost the reverse of the previous steps: | It's almost the reverse of the previous steps: | ||
− | + | <ol> | |
+ | <li>Make sure you don't have the pen mounted! Example to umount: | ||
<bash>umount /dev/sdX1</bash> | <bash>umount /dev/sdX1</bash> | ||
− | + | </li> | |
+ | <li>As root (or with {{tt|sudo}}), run: | ||
<bash>dd if=OFW11-2015_v1.img of=/dev/sdX bs=512</bash> | <bash>dd if=OFW11-2015_v1.img of=/dev/sdX bs=512</bash> | ||
− | + | # In another terminal (also as root): | |
<bash>ps -a</bash> | <bash>ps -a</bash> | ||
− | + | # In another terminal (also as root), tun: | |
<bash>while killall -USR1 dd; do sleep 30; done</bash> | <bash>while killall -USR1 dd; do sleep 30; done</bash> | ||
− | + | # Then look at the previous terminal window and every 30 seconds it should update on the current write status. Given how this command works, if you have more than one {{tt|dd}} running, it will update for all running {{tt|dd}} applications. | |
− | + | </li> | |
+ | <li>When it's done cloning, make sure the file system is synced: | ||
<bash>sync</bash> | <bash>sync</bash> | ||
wait until it returns control back to you. | wait until it returns control back to you. | ||
− | + | </li> | |
+ | <li>Now you can mount the pen, if you want. Or simply eject it.</li> | ||
+ | </ol> | ||
[[Category:Live OS Images]] | [[Category:Live OS Images]] |