1 |
sng |
28 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
2 |
|
|
<html> |
3 |
|
|
<head> |
4 |
|
|
<link rel="alternate" type="application/rss+xml" title="RSS" href="http://clonezilla-sysresccd.hellug.gr/clonezilla-sysresccd.rss"> |
5 |
|
|
<link rel="shortcut icon" href="favicon.ico"> |
6 |
|
|
<title>Clonezilla-SysRescCD - Documentation: Restoring to a different location</title> |
7 |
|
|
<style type="text/css"> |
8 |
|
|
body { font-family: Arial, 'sans serif'; color: black; font-size: 12pt; background : url(null) fixed no-repeat; background-color: #333333; padding: 0; margin: 0; margin-top: 5px; margin-bottom: 5px; } |
9 |
|
|
|
10 |
|
|
|
11 |
|
|
|
12 |
|
|
#header {position:relative; display: block; width: 980px; height: 121px;margin: auto; padding: auto; background-color: #D37624; background-image: url('images/header.png');clear:both;} |
13 |
|
|
#header h2{ color: #FFE6BC; font-weight: bold; font-size: 2.2em; margin:0; padding:0; padding-left: 10px; padding-top: 7px; text-shadow: #333333 2px 2px 4px;} |
14 |
|
|
#header h3{ color: #FFE6BC; font-weight: bold; font-size: 1.8em; margin:0; padding: 0; padding-left: 10px; text-shadow: #333333 2px 2px 4px;} |
15 |
|
|
#header h4{ color: #FFE6BC; font-weight: bold; font-size: 1.2em; margin:0; padding: 0; padding-left: 10px; padding-right: 10px; text-shadow: #333333 2px 2px 4px;} |
16 |
|
|
#header a {text-decoration:none;} |
17 |
|
|
|
18 |
|
|
#contarea {display: block; width: 980px; margin: auto; padding: auto; background-color: #FFF2DD; clear:both;} |
19 |
|
|
|
20 |
|
|
#linkline { width: 980px; height: 29px;margin: auto; padding: auto; background-color: #D37624; background-image: url('images/linkline.png');clear:both; } |
21 |
|
|
#linkline a{float: left; color: #FFE6BC; font-weight: bold; font-size: 0.8em; text-decoration: none; text-shadow: #333333 2px 2px 4px; padding-left: 10px; padding-right: 10px; padding-top: 5px;} |
22 |
|
|
#linkline a:visited{color: #FFE6BC;} |
23 |
|
|
#linkline a:hover{color: #333333;} |
24 |
|
|
#linkline a.here {color: #333333; text-decoration: none;} |
25 |
|
|
|
26 |
|
|
#lastupdate {float: right; display: block; text-align: right; margin: 0; margin-top: -1.2em; padding: 0; padding-right: 15px;} |
27 |
|
|
|
28 |
|
|
#rss { float: right; text-align: right; padding-top: 3px;} |
29 |
|
|
|
30 |
|
|
#docline-top { float: right; padding-right: 40px; text-align: right; } |
31 |
|
|
#docline-bottom { float: right; padding-right: 40px; text-align: right; font-size: 0.8em; padding-top: 15px; } |
32 |
|
|
#docline-bottom a{ padding-left: 10px; padding-right: 10px; } |
33 |
|
|
|
34 |
|
|
#menu { float: right; display: block; width: 170px; margin: auto; padding: 15px; font-size: 0.8em; font-weight: bold; background-color: #FFE6BC;} |
35 |
|
|
#menu h1 {color: #990000; font-size: 1.8em;text-shadow: gray 2px 2px 4px;} |
36 |
|
|
#menu a,a:visited{ color: black; text-decoration: none; font-weight: normal;} |
37 |
|
|
#menu a:hover{ text-decoration: underline;} |
38 |
|
|
#menu p{ margin-bottom: 10px;} |
39 |
|
|
|
40 |
|
|
#content { float: left; display: block; width: 950px; margin: auto; padding: 15px;} |
41 |
|
|
|
42 |
|
|
|
43 |
|
|
#footer {display: block; width: 980px; height: 100px;margin: auto; padding: auto; background-color: #D37624; background-image: url('images/footer.png');clear:both;text-shadow: #333333 2px 2px 4px;} |
44 |
|
|
#footer p{color: #FFE6BC; font-weight: bold; padding:15px; padding-left: 10px;} |
45 |
|
|
#footer a,a:visited{color: #FFE6BC; font-weight: bold; text-decoration:none;} |
46 |
|
|
#footer a:hover{ color: #333333; text-decoration: none;} |
47 |
|
|
|
48 |
|
|
|
49 |
|
|
#content H1,H2,H3,H4{color: #990000; text-align: left;} |
50 |
|
|
#content H2{margin-top: 2em;} |
51 |
|
|
#content H3{margin-top: 1.5em} |
52 |
|
|
#content H4{margin-top: 1em} |
53 |
|
|
#content li { margin-top: 1em;} |
54 |
|
|
#content a,a:active,a:visited{text-decoration: none; color: #4075CA; font-weight: normal;} |
55 |
|
|
#content a:hover{text-decoration: underline; font-weight: normal;} |
56 |
|
|
#content .hidden{ display:none; } |
57 |
|
|
#content p,td,table,tr,li { font-family: Arial, 'sans serif'; } |
58 |
|
|
#content .nav{margin-left: 0pt;} |
59 |
|
|
#content .newcode{font-family : "Courier New", Courier, monospace; font-weight: bold; background-color: #F2F2F2; border: solid 1px #DEDEDE;padding: 20pt;} |
60 |
|
|
#content .note{margin-top: 30pt; margin-bottom: 30pt; text-align: left; background-color: #FFEFEF; border: double 3px; border-color: #FFD5D5;} |
61 |
|
|
#content hr{color: Black; background-color: Black; height: 1px; border: none;} |
62 |
|
|
#content .header-news{margin-top: 2em; margin-left: 25pt; font-weight: bold; color: #990000;} |
63 |
|
|
#content .item-news{margin-left: 45pt; margin-right: 45pt;} |
64 |
|
|
#content .otherpage{border: solid 1px darkgoldenrod; padding: 20pt; background-color: lemonchiffon;} |
65 |
|
|
#content IMG {display: block; margin-left: auto; margin-right: auto; } |
66 |
|
|
#content .red{color: white; background-color: Red; font-weight: bold;} |
67 |
|
|
#lphp{text-align: right; padding-left: 10px; padding-right: 10px; padding-top: 50px; float: right;} |
68 |
|
|
#lphp a{padding-left: 5px;} |
69 |
|
|
</style> |
70 |
|
|
<META NAME="Keywords" CONTENT="multiboot Multi Boot bootable cd rescue clonezilla sysresccd backup restore samba"> |
71 |
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
72 |
|
|
|
73 |
|
|
</head> |
74 |
|
|
|
75 |
|
|
<body> |
76 |
|
|
<div id="header"> |
77 |
sng |
37 |
<div id="lphp" style=""><a target="_blank" href="onepage.html"><img src="images/chain.png" border="0" /></a><a target="_blank" href="printable.php"><img src="images/print_it.png" border="0" /></a></div> |
78 |
sng |
28 |
<H2>Clonezilla-SysRescCD</H2> |
79 |
|
|
<H3>Documentation: Restoring to a different location</H3> |
80 |
|
|
<div style="margin:0; padding: 3px; width: 980; position relative;"> |
81 |
|
|
<div style="position: absolute; left: 0px;"><H4>25/02/2010 - v 3.1.0</H4></div> |
82 |
sng |
37 |
<div style="position: absolute; right: 0px;"><H4>Last update: 23/03/2010</H4></div> |
83 |
sng |
28 |
</div> |
84 |
|
|
</div> |
85 |
|
|
<div id="linkline"> |
86 |
|
|
<a href="index.html">Home</a> |
87 |
|
|
<a href="news.php">News</a> |
88 |
|
|
<!-- <a href="features.html">Features</a>--> |
89 |
|
|
<a class="here" href="doc.html">Documentation</a> |
90 |
|
|
<a href="index.html#download">Download</a> |
91 |
|
|
<a href="screenshots.html">Screenshots</a> |
92 |
|
|
<a href="index.html#credits">Credits</a> |
93 |
|
|
<a href="help.html">Help</a> |
94 |
|
|
|
95 |
|
|
<div id="rss"> |
96 |
|
|
<a href="clonezilla-sysresccd.rss"><img src="images/rss-orange-11.png" width="30" height="14" border="0"/></a> |
97 |
|
|
</div> |
98 |
|
|
<!-- docline-top--> |
99 |
|
|
<div id="docline-top"> <a href="restore-burn.html">< PREV</a> <a href="doc.html">UP</a> <a href="supergrubdisk.html">NEXT ></a> </div> |
100 |
|
|
</div> |
101 |
|
|
<div id="contarea"> |
102 |
|
|
<div id="content"> |
103 |
|
|
<a name="reloc-img-top"></a> |
104 |
|
|
|
105 |
|
|
<!-- On the CD --> |
106 |
|
|
|
107 |
|
|
<H2 style="margin-top: 0;"><a name="reloc-img-intro"></a>Intro <span class="hideprint">[<a href="#reloc-img-top" title="go to top of the page">^</a>]</span></H2> |
108 |
|
|
|
109 |
|
|
<p>In the past restoring to a different location was not supported by <b>Clonezilla Live</b> at all. Because of that, a script called <b>reloc-img</b> was added to <b>Clonezilla-SysRescCD</b>, which would help the user perform this task.</p> |
110 |
|
|
|
111 |
|
|
<p>Recent versions of <b>Clonezilla Live</b> partly support restoring to a different location, so the <b>reloc-img</b> script is obsolete, and has been removed. <b>Clonezilla Live</b> now supports:</p> |
112 |
|
|
|
113 |
|
|
<ul> |
114 |
|
|
<li>Relocation of a disk image (restoring a whole disk)</li> |
115 |
|
|
<li>Relocation of a partition image (restoring a partition)</li> |
116 |
|
|
</ul> |
117 |
|
|
|
118 |
|
|
<p><b>Clonezilla Live</b> does not support:</p> |
119 |
|
|
<ul> |
120 |
|
|
<li>Relocation of a single partition contained into a disk image.<br> |
121 |
|
|
<br> |
122 |
|
|
Imagine you have a disk backup image named <b>hda-2009-02-02</b>. The image contains three partitions, <span style="color: Red; font-weight: bold;">hda1</span> (operating system), <span style="color: Red; font-weight: bold;">hda2</span> (user data) and <span style="color: Red; font-weight: bold;">hda3</span> (other data).<br> |
123 |
|
|
<br> |
124 |
|
|
You want to restore your <b>other data</b> partition (<span style="color: Red; font-weight: bold;">hda3</span>), to a different system (partition <span style="color: Green; font-weight: bold;">sdb2</span>) but there is no way to restore (extract) a single partition from a disk image - you can only restore the whole disk. |
125 |
|
|
</li> |
126 |
|
|
</ul> |
127 |
|
|
|
128 |
|
|
<p>In order to address this situation, two new scripts have been written for <b>Clonezilla-SysRescCD</b>: <b>imginfo</b> and <b>imgconvert</b> |
129 |
|
|
|
130 |
|
|
<H2><a name="imginfo-script"></a>Script imginfo <span class="hideprint">[<a href="#reloc-img-top" title="go to top of the page">^</a>]</span></H2> |
131 |
|
|
|
132 |
|
|
<p>The script will be used to print info about existing image files.</p> |
133 |
|
|
|
134 |
|
|
<p>Its help screen is:</p> |
135 |
|
|
|
136 |
|
|
<p class="newcode"> |
137 |
|
|
# <font color="Red">imginfo -h</font><br> |
138 |
|
|
Clonezilla Live Image Information<br> |
139 |
|
|
imginfo v. 0.1 - (C) 2009 S. Georgaras <sng@hellug.gr><br> |
140 |
|
|
<br> |
141 |
|
|
Usage: imginfo <options> <directory><br> |
142 |
|
|
<br> |
143 |
|
|
Available options:<br> |
144 |
|
|
s Search in sub-directories too<br> |
145 |
|
|
i [name] Pring info for image [name]<br> |
146 |
|
|
v Print version info and exit<br> |
147 |
|
|
h Print this screen and exit |
148 |
|
|
</p> |
149 |
|
|
|
150 |
|
|
<H2><a name="imgconvert-script"></a>Script imgconvert <span class="hideprint">[<a href="#reloc-img-top" title="go to top of the page">^</a>]</span></H2> |
151 |
|
|
|
152 |
|
|
<p>The script will be used to convert an existing <b>disk</b> image file to a new <b>partition</b> image file.</p> |
153 |
|
|
|
154 |
|
|
<p><b>imgconvert</b> can create two type of images:</p> |
155 |
|
|
|
156 |
|
|
<ol> |
157 |
|
|
<li><b>Temporary image</b><br> |
158 |
|
|
This type of image is created by linking the data files of the existing disk image to the new partition image. This means that the original image <b>must</b> be present for the new image to be used. This is the default image type created by <b>imgconvert</b>. |
159 |
|
|
</li> |
160 |
|
|
<li><b>Permanent image</b><br> |
161 |
|
|
This type of image is created by copying the data files from the existing disk image to the new partition image. This means that the original image is not needed in order to use the new one. Permenant image files are created using the command line parameter <b>-p</b>.</li> |
162 |
|
|
</ol> |
163 |
|
|
|
164 |
|
|
<p>Its help screen is:</p> |
165 |
|
|
|
166 |
|
|
<p class="newcode"># <font color="Red">imgconvert -h</font><br> |
167 |
|
|
Clonezilla Live Image Conversion<br> |
168 |
|
|
imgconvert v. 0.1 - (C) 2009 S. Georgaras <sng@hellug.gr><br> |
169 |
|
|
<br> |
170 |
|
|
Usage: imgconvert <options> [image] [partition] <new partition><br> |
171 |
|
|
<br> |
172 |
|
|
Parameters are:<br> |
173 |
|
|
[image] Disk image to be converted to partition image<br> |
174 |
|
|
[partition] Partition name to convert. It must be a valid device name<br> |
175 |
|
|
<br> |
176 |
|
|
Available options:<br> |
177 |
|
|
o [image] Save new imag as [image]<br> |
178 |
|
|
p Save new partition instead of making a link to the old one<br> |
179 |
|
|
v Print version info and exit<br> |
180 |
|
|
h Print this screen and exit</p> |
181 |
|
|
|
182 |
|
|
|
183 |
|
|
|
184 |
|
|
<H2><a name="scripts-using"></a>Using the scripts <span class="hideprint">[<a href="#reloc-img-top" title="go to top of the page">^</a>]</span></H2> |
185 |
|
|
|
186 |
|
|
<H3><a name="restore_part"></a>Restoring to a partition <span class="hideprint">[<a href="#reloc-img-top" title="go to top of the page">^</a>]</span></H3> |
187 |
|
|
|
188 |
|
|
<p>After booting into <b>Clonezilla Live</b>, I select<br> |
189 |
|
|
<br> |
190 |
|
|
<span style="color: Red; font-weight: bold;"> Enter_shell Enter command line prompt</span><br> |
191 |
|
|
<br> |
192 |
|
|
when the menu is displayed and then I press <span style="color: Red; font-weight: bold;">2</span> to exit to the shell.<br> |
193 |
|
|
<br> |
194 |
|
|
At this point I will mount my images partition (in this example <span style="color: Green; font-weight: bold">/dev/sdc4</span>), and use script <b>imginfo</b> to get info about my image files.</p> |
195 |
|
|
|
196 |
|
|
|
197 |
|
|
<p class="newcode">$ sudo su -<br> |
198 |
|
|
# mount <span style="color: Green; font-weight: bold">/dev/sdc4</span> /home/partimag<br> |
199 |
|
|
# cd /home/partimag<br> |
200 |
|
|
# <span style="color: Red;">imginfo</span><br> |
201 |
|
|
Image files found in: <span style="color: Green;">/home/partimag</span><br> |
202 |
|
|
Image: usb250-img, disk: sda, size: 259MB, parts: 1<br> |
203 |
|
|
part: sda4, size: 247.00MB, type: FAT16<br> |
204 |
|
|
Image: sys-bck, disk: hda, size: 320.0GB, parts: 3<br> |
205 |
|
|
part: hda1, size: 22.36GB, type: Linux<br> |
206 |
|
|
part: hda2, size: 39.06GB, type: Linux<br> |
207 |
|
|
part: <span style="color: Green;">hda3</span>, size: 233.87GB, type: Linux |
208 |
|
|
</p> |
209 |
|
|
|
210 |
|
|
<p>As you can see there are two disk images under /home/partimag: <b>usb250-img</b> and <b>sys-bck</b>. </p> |
211 |
|
|
|
212 |
|
|
<p><b>sys-bck</b> is a backup of my old system, which had three partitions. What I need to do now is "copy" the <span style="color: Green; font-weight: bold">hda3</span> partition to my current system, by transfering its data to partition <span style="color: Green; font-weight: bold">sdb2</span>.<br> |
213 |
|
|
<br> |
214 |
|
|
The way to proceed is: |
215 |
|
|
</p> |
216 |
|
|
|
217 |
|
|
<ol> |
218 |
|
|
<li>Create a new partition image (containing <span style="color: Green; font-weight: bold">hda3</span>'s data) based on the existing disk image file, by executing the command: |
219 |
|
|
|
220 |
|
|
<p class="newcode"># <span style="color: Red;">imgconvert sys-bck hda3 sdb2</span><br> |
221 |
|
|
Clonezilla Live Image Conversion<br> |
222 |
|
|
imgconvert v. 0.1 - (C) 2009 S. Georgaras <sng@hellug.gr><br> |
223 |
|
|
<br> |
224 |
|
|
Determining input image<br> |
225 |
|
|
Input image: "/home/partimag/sys-bck"<br> |
226 |
|
|
Validating image... ok<br> |
227 |
|
|
Determining input partition<br> |
228 |
|
|
Input partition: "hda3"<br> |
229 |
|
|
Validating input partition... ok<br> |
230 |
|
|
Determining output image<br> |
231 |
|
|
Output image: "<span style="color: Green;">/home/partimag/sys-bck-cnv</span>"<br> |
232 |
|
|
Validating output image... ok<br> |
233 |
|
|
Checking permissions... ok<br> |
234 |
|
|
Determining output partition<br> |
235 |
|
|
Output partition: "sda2"<br> |
236 |
|
|
Validating output partition... ok<br> |
237 |
|
|
Creating output image: /home/partimag/sys-bck-cnv<br> |
238 |
|
|
<span style="color: #990000;">Linking files...</span> done<br> |
239 |
|
|
Fixing info files... done |
240 |
|
|
</p> |
241 |
|
|
This command will create a <b>temporary</b> partition image file (automatically named <span style="color: Green; font-weight: bold">sys-bck-cnv</span>), which contains <span style="color: Green; font-weight: bold">sdb2</span> only, as you can see by executing: |
242 |
|
|
|
243 |
|
|
|
244 |
|
|
<p class="newcode"># <span style="color: Red;">imginfo -i</span> <span style="color: Green;">sys-bck-cnv</span><br> |
245 |
|
|
Image: sys-bck-cnv, part: <span style="color: Green;">sdb2</span>, size: 233.87GB, type: Linux |
246 |
|
|
</p> |
247 |
|
|
</li> |
248 |
|
|
|
249 |
|
|
<li>Restart <b>Clonezilla Live</b> by pressing <b>Control-D</b> twice.</li> |
250 |
|
|
|
251 |
|
|
<li>Restore the new image file into <span style="color: Green; font-weight: bold">sdb2</span>, by selecting<br> |
252 |
|
|
<br> |
253 |
|
|
Screen 1: <span style="color: Red; font-weight: bold;"> Start_Clonezilla Start Clonezilla</span><br> |
254 |
|
|
<br> |
255 |
|
|
Screen 2: <span style="color: Red; font-weight: bold;"> device-image disk/partition to/from image</span><br> |
256 |
|
|
<br> |
257 |
|
|
Screen 3: <span style="color: Red; font-weight: bold;"> skip use existing /home/partimag</span><br> |
258 |
|
|
<br> |
259 |
|
|
Screen 4: <span style="color: Red; font-weight: bold;"> Beginer / Expert</span><br> |
260 |
|
|
<br> |
261 |
|
|
Screen 5: <span style="color: Red; font-weight: bold;"> restoreparts Restore_an_image_to_local_partition</span><br> |
262 |
|
|
<br> |
263 |
|
|
and continue as usual to restore the partition.</li> |
264 |
|
|
</ol> |
265 |
|
|
|
266 |
|
|
|
267 |
|
|
<H3><a name="converting_img"></a>Converting image files <span class="hideprint">[<a href="#reloc-img-top" title="go to top of the page">^</a>]</span></H3> |
268 |
|
|
|
269 |
|
|
|
270 |
|
|
|
271 |
|
|
|
272 |
|
|
<p class="newcode"># <span style="color: Red;">imgconvert <span style="color: #990000;">-p -o other_data</span> sys-bck hda3 sdb2</span><br> |
273 |
|
|
Clonezilla Live Image Conversion<br> |
274 |
|
|
imgconvert v. 0.1 - (C) 2009 S. Georgaras <sng@hellug.gr><br> |
275 |
|
|
<br> |
276 |
|
|
Determining input image<br> |
277 |
|
|
Input image: "/home/partimag/sys-bck"<br> |
278 |
|
|
Validating image... ok<br> |
279 |
|
|
Determining input partition<br> |
280 |
|
|
Input partition: "hda3"<br> |
281 |
|
|
Validating input partition... ok<br> |
282 |
|
|
Determining output image<br> |
283 |
|
|
Output image: "<span style="color: Green;">/home/partimag/other_data</span>"<br> |
284 |
|
|
Validating output image... ok<br> |
285 |
|
|
Checking permissions... ok<br> |
286 |
|
|
Determining output partition<br> |
287 |
|
|
Output partition: "sda2"<br> |
288 |
|
|
Validating output partition... ok<br> |
289 |
|
|
Creating output image: /home/partimag/other_data<br> |
290 |
|
|
<span style="color: #990000;">Copying files...</span> done<br> |
291 |
|
|
Fixing info files... done |
292 |
|
|
</p> |
293 |
|
|
|
294 |
|
|
|
295 |
|
|
<p class="newcode"># <span style="color: Red;">imginfo -i</span> <span style="color: Green;">other_data</span><br> |
296 |
|
|
Image: other_data, part: <span style="color: Green;">sdb2</span>, size: 233.87GB, type: Linux</p> |
297 |
|
|
|
298 |
|
|
|
299 |
|
|
<p class="newcode"># <span style="color: Red;">ls -la <span style="color: Green;">sys-bck</span></span><br> |
300 |
|
|
total 1111972<br> |
301 |
|
|
drwxr-xr-x 2 root root 4096 2007-11-22 03:21 .<br> |
302 |
|
|
drwxr-xr-x. 34 root root 4096 2009-04-06 21:28 ..<br> |
303 |
|
|
-rw-r--r-- 1 root root 4 2007-11-20 20:33 disk<br> |
304 |
|
|
-rw-r--r-- 1 root root 1081716736 2007-11-20 20:32 hda1.aa<br> |
305 |
|
|
-rw-r--r-- 1 root root 45453312 2007-11-20 20:33 hda2.aa<br> |
306 |
|
|
-rw-r--r-- 1 root root <span style="color: Green;">10317824</span> 2007-11-20 20:33 <span style="color: Green;">hda3.aa</span><br> |
307 |
|
|
-rw-r--r-- 1 root root 37 2007-11-21 18:56 hda-chs.sf<br> |
308 |
|
|
-rw-r--r-- 1 root root 37 2007-11-21 18:50 hda-chs.sf.orig<br> |
309 |
|
|
-rw-r--r-- 1 root root 512 2007-11-20 20:31 hda-mbr<br> |
310 |
|
|
-rw-r--r-- 1 root root 259 2007-11-21 18:59 hda-pt.sf<br> |
311 |
|
|
-rw-r--r-- 1 root root 259 2007-11-21 18:50 hda-pt.sf.orig<br> |
312 |
|
|
-rw-r--r-- 1 root root 15 2007-11-20 20:33 parts<br> |
313 |
|
|
-rw-r--r-- 1 root root 17 2007-11-20 20:33 swappt-hda4.info<br> |
314 |
|
|
#<br> |
315 |
|
|
#<br> |
316 |
|
|
# <span style="color: Red;">ls -la <span style="color: Green;">other_data</span></span><br> |
317 |
|
|
total 24<br> |
318 |
|
|
drwxr-xr-x 2 root root 4096 2009-04-06 21:27 .<br> |
319 |
|
|
drwxr-xr-x. 35 root root 4096 2009-04-06 21:27 ..<br> |
320 |
|
|
-rw-r--r-- 1 root root 5 2009-04-06 21:27 parts<br> |
321 |
|
|
-rw-r--r-- 1 root root <span style="color: Green;">10317824</span> 2009-04-06 21:27 <span style="color: Green;">sdb2.aa</span><br> |
322 |
|
|
-rw-r--r-- 1 root root 37 2009-04-06 21:27 sdb-chs.sf<br> |
323 |
|
|
-rw-r--r-- 1 root root 106 2009-04-06 21:27 sdb-pt.sf |
324 |
|
|
</p> |
325 |
|
|
|
326 |
|
|
|
327 |
|
|
|
328 |
|
|
|
329 |
|
|
|
330 |
|
|
|
331 |
|
|
|
332 |
|
|
|
333 |
|
|
|
334 |
|
|
|
335 |
|
|
|
336 |
|
|
|
337 |
|
|
|
338 |
|
|
|
339 |
|
|
|
340 |
|
|
<H2><a name="reloc-img-boot"></a>Booting a restored Linux system <span class="hideprint">[<a href="#reloc-img-top" title="go to top of the page">^</a>]</span></H2> |
341 |
|
|
|
342 |
|
|
<p>A Linux system that has been restored to a new disk/partition, is usually not ready to be booted right after the restoration procedure is finished.</p> |
343 |
|
|
|
344 |
|
|
<p>There are two more steps that you may have to take:</p> |
345 |
|
|
|
346 |
|
|
<ul> |
347 |
|
|
<li>Fix <b>/etc/fstab</b></li> |
348 |
|
|
<li>Reinstall <b>GRUB</b>.<br> |
349 |
|
|
I will assume GRUB is your boot manager, as it is the usual case nowadays.</li> |
350 |
|
|
</ul> |
351 |
|
|
|
352 |
|
|
<p>For this example I will assume that you have restored a Linux system (that used to be in <font color="Red"><b>sdb</b></font>), to a new disk (<font color="Green"><b>hda</b></font>), and that it contains three partitions, <b>/</b> (the root partition), <b>/home</b> (user's partition) and a <b>swap</b> partition. You must be really careful here, as the name of the new disk depends on the system to be booted. If it uses one of the newest Linux kernels (using the libata disk driver), ALL your disks will be recognised as SCSI. More info: "<a href="annex-a-devices.html#annex-a-scsi-ata">Identifying devices in Linux</a>" section "<a href="annex-a-devices.html#annex-a-scsi-ata">SCSI disks when there are none!!!</a>".</p> |
353 |
|
|
|
354 |
|
|
<p>This is what we have:</p> |
355 |
|
|
|
356 |
|
|
<p class="newcode"> root partition home partition swap partition<br> |
357 |
|
|
Old system <font color="Red">/dev/sdb1</font> <font color="Red">/dev/sdb2</font> <font color="Red">/dev/sdb3</font><br> |
358 |
|
|
New system <font color="Green">/dev/hda1</font> <font color="Green">/dev/hda2</font> <font color="Green">/dev/hda3</font></p> |
359 |
|
|
|
360 |
|
|
|
361 |
|
|
<H3><a name="reloc-img-boot-fstab"></a>Fixing /etc/fstab <span class="hideprint">[<a href="#reloc-img-top" title="go to top of the page">^</a>]</span></H3> |
362 |
|
|
|
363 |
|
|
<p>Since we are still in <b>Clonezilla Live</b>, right after the restore procedure has finished, we will use it to mount our restored root partition, and edit its <b>/etc/fstab</b>. We issue the commands:</p> |
364 |
|
|
|
365 |
|
|
<p class="newcode">mkdir /new-root<br> |
366 |
|
|
mount /dev/hda1 /new-root<br> |
367 |
|
|
vi /new-root/etc/fstab</p> |
368 |
|
|
|
369 |
|
|
<p>The contents of <b>/etc/fstab</b> could be something like</p> |
370 |
|
|
|
371 |
|
|
<p class="newcode"><font color="Red">/dev/sdb1</font> / reiserfs acl,user_xattr 1 1<br> |
372 |
|
|
<font color="Red">/dev/sdb2</font> /home reiserfs defaults 1 2<br> |
373 |
|
|
<font color="Red">/dev/sdb3</font> swap swap defaults 0 0</p> |
374 |
|
|
|
375 |
|
|
<p>and we have to change ti to</p> |
376 |
|
|
|
377 |
|
|
<p class="newcode"><font color="Green">/dev/hda1</font> / reiserfs acl,user_xattr 1 1<br> |
378 |
|
|
<font color="Green">/dev/hda2</font> /home reiserfs defaults 1 2<br> |
379 |
|
|
<font color="Green">/dev/hda3</font> swap swap defaults 0 0</p> |
380 |
|
|
|
381 |
|
|
<p>Finally, we unmount the partition, and we are ready to reboot</p> |
382 |
|
|
|
383 |
|
|
<p class="newcode">umount /new-root<br> |
384 |
|
|
reboot</p> |
385 |
|
|
|
386 |
|
|
<H3><a name="reloc-img-boot-grub"></a>Reinstalling GRUB <span class="hideprint">[<a href="#reloc-img-top" title="go to top of the page">^</a>]</span></H3> |
387 |
|
|
|
388 |
|
|
<p>When <b>Clonezilla-SysRescCD</b> menu appears, we select <i><b>Tools > Super Grub Disk</b></i></p> |
389 |
|
|
|
390 |
|
|
<p>Then we select <i><b>Super Grub Disk > Super Grub Disk (WITH HELP) > English Super Grub Disk > Gnu/Linux > Fix Boot of Gnu/Linux (GRUB)</b></i>. From this entry we will be able to reinstall GRUB to our hard disk.</p> |
391 |
|
|
|
392 |
|
|
<p>You may also want to have a look at <b>Super Grub Disk</b> "<a href="http://www.supergrubdisk.org/wiki/SuperGrubDiskDocumentation" target="_blank">documentation</a>".</p> |
393 |
|
|
|
394 |
|
|
|
395 |
|
|
</div> |
396 |
|
|
|
397 |
|
|
|
398 |
|
|
|
399 |
|
|
<!--<a name="template-top"></a>--> |
400 |
|
|
|
401 |
|
|
<div id="footer"> |
402 |
|
|
<div id="docline-bottom"> <a href="restore-burn.html">< PREV</a> <a href="doc.html">UP</a> <a href="supergrubdisk.html">NEXT ></a> </div> |
403 |
|
|
<p>Copyright: © <a href="mailto:sng@hellug.gr?subject=About Clonezilla-SysRescCD v 3.1.0">Spiros Georgaras</a>, 2007-2010<br /><br/> |
404 |
|
|
Hosted by <a href="http://www.hellug.gr" target="_blank" title="Hellenic Linux User Group">HEL.L.U.G.</a></p> |
405 |
|
|
</div> |
406 |
|
|
</div> |
407 |
|
|
</body> |
408 |
|
|
</html> |