-
Notifications
You must be signed in to change notification settings - Fork 0
Copying and Deploying Images using DD
Create a roomtrol directory and inside it a images directory to store the images. This can be in the home directory or desktop of the local machine. mkdir -p roomtrol/images/
Move into the images directory: cd roomtrol/images/
Create another directory with the date stamp of the day in the following format YYYYMMDD, for example, Aug 31st, 2010, is: 20100831: mkdir $(date +%Y%m%d)
dd is a unix low-level copying tool.
- It can be used to copy a device to a file - create an image of a roomtrol setup.
- It can be used to copy the contents of a file to a device - place an image of a roomtrol setup on a device.
For these two uses of dd, we only need to use the if and of options.
To copy a device, for example /dev/sdb to a file, for example, /home/ims/roomtrol/images/20100831/roomtrol8gb.img: dd if=/dev/sdb of=/home/ims/roomtrol/images/20100831/roomtrol8gb.img```
Then, to copy that image file to a device, say a different flash drive that is also at /dev/sdb: dd if=/home/ims/roomtrol/images/20100831/roomtrol8gb.img of=/dev/sdb```
Create a README.txt file in the same directory as the image file. It should look like this with the appropriate hashes and dates:
20100831 - 31 August 2010
File:
-rw-r--r-- 1 root root 8086618112 2010-08-31 09:49 roomtrol8gb.img
MD5 Hash:
dd24453b1fe6b6961c80aa73a03e332f roomtrol8gb.img
SHA1 Hash:
c18f6111bc7afade38f4c0297108c57a0f23fd13 roomtrol8gb.img
Image of a 8gb pico flash drive running Ubuntu Server 10.04.1 LTS.
Roomtrol and most necessary packages are installed.
To change the hostname of a machine, something you'll have to do after imaging, do the following:
Change the hostname in the following files:
/etc/hostname
and to get the interface to come up automatically.
We want to change eth1 to eth0 so delete the line containing the reference to eth0, and change eth1 to eth0.
sudo vim /etc/udev/rules.d/70-persistent-net.rules