Gentoo Archives: gentoo-doc-cvs

From: Xavier Neys <neysx@××××××××××××.org>
To: gentoo-doc-cvs@l.g.o
Subject: [gentoo-doc-cvs] cvs commit: liveusb.xml
Date: Thu, 10 May 2007 15:51:36
Message-Id: E1HmAv7-0002JS-JV@stork.gentoo.org
1 neysx 07/05/10 15:51:09
2
3 Modified: liveusb.xml
4 Log:
5 #173117 update to 2007.0
6
7 Revision Changes Path
8 1.13 xml/htdocs/doc/en/liveusb.xml
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/liveusb.xml?rev=1.13&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/liveusb.xml?rev=1.13&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/liveusb.xml?r1=1.12&r2=1.13
13
14 Index: liveusb.xml
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/liveusb.xml,v
17 retrieving revision 1.12
18 retrieving revision 1.13
19 diff -u -r1.12 -r1.13
20 --- liveusb.xml 22 Dec 2006 07:33:38 -0000 1.12
21 +++ liveusb.xml 10 May 2007 15:51:09 -0000 1.13
22 @@ -1,6 +1,6 @@
23 <?xml version='1.0' encoding="UTF-8"?>
24 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
25 -<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/liveusb.xml,v 1.12 2006/12/22 07:33:38 nightmorph Exp $ -->
26 +<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/liveusb.xml,v 1.13 2007/05/10 15:51:09 neysx Exp $ -->
27
28 <guide link="/doc/en/liveusb.xml">
29 <title>Gentoo Linux LiveUSB HOWTO</title>
30 @@ -8,18 +8,21 @@
31 <author title="Author">
32 <mail link="henrik@××××××××××××.dk">Henrik Brix Andersen</mail>
33 </author>
34 +<author title="Editor">
35 + <mail link="neysx@g.o">Xavier Neys</mail>
36 +</author>
37
38 <abstract>
39 This HOWTO explains how to create a Gentoo Linux LiveUSB or, in other words,
40 -how to emulate a Gentoo Linux Installation CD using an USB flash drive.
41 +how to emulate an x86 or AMD64 Gentoo Linux LiveCD using a USB flash drive.
42 </abstract>
43
44 <!-- The content of this document is licensed under the CC-BY-SA license -->
45 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
46 <license/>
47
48 -<version>1.7</version>
49 -<date>2006-12-21</date>
50 +<version>2</version>
51 +<date>2007-05-10</date>
52
53 <chapter>
54 <title>Introduction</title>
55 @@ -29,15 +32,15 @@
56
57 <p>
58 This HOWTO explains how to create a <e>Gentoo Linux LiveUSB</e> or, in other
59 -words, how to emulate a Gentoo Linux Installation CD using an USB flash drive.
60 -This is particularly useful for installing Gentoo Linux on a modern laptop with
61 -no CD-ROM drive.
62 +words, how to emulate an x86 or AMD64 Gentoo Linux LiveCD using a USB flash
63 +drive. This is particularly useful for installing Gentoo Linux on a modern
64 +laptop with no CD-ROM drive.
65 </p>
66
67 <p>
68 Although the instructions found in this document aim at emulating a Gentoo
69 -Linux Installation CD using an USB flash drive, they should work for any
70 -arbitrary block device as long as you adjust the device names accordingly.
71 +Linux LiveCD using a USB flash drive, they should work for any arbitrary block
72 +device as long as you adjust the device names accordingly.
73 </p>
74
75 </body>
76 @@ -51,10 +54,8 @@
77 </p>
78
79 <ul>
80 - <li>Bootable USB flash drive (at least 64MB)</li>
81 - <li>
82 - x86 computer with support for booting from USB
83 - </li>
84 + <li>Bootable USB flash drive with at least 1GB</li>
85 + <li>i686 or x86_64 computer with support for booting from USB</li>
86 </ul>
87
88 <p>
89 @@ -68,6 +69,14 @@
90 </li>
91 </ul>
92
93 +<note>
94 +If you want to use the minimal CD on a smaller key or boot a &lt;i686 system,
95 +you need to follow the procedure described in this document with a
96 +<b>2006.0</b> minimal CD image because of a <uri
97 +link="http://bugs.gentoo.org/show_bug.cgi?id=173117">bug</uri> in more recent
98 +releases.
99 +</note>
100 +
101 </body>
102 </section>
103 </chapter>
104 @@ -83,25 +92,29 @@
105 </warn>
106
107 <impo>
108 -This HOWTO assumes that the <path>/dev/sda</path> device node corresponds to
109 +This HOWTO assumes that the <path>/dev/sdc</path> device node corresponds to
110 your USB flash drive. If you have other SCSI-like devices make sure to use the
111 correct device node.
112 </impo>
113
114 <p>
115 -Create a FAT32 partition on your USB flash drive and mark it bootable using
116 +Create a FAT16 partition on your USB flash drive and mark it bootable using
117 <c>fdisk</c>. An example partitioning scheme can be seen below:
118 </p>
119
120 +<note>
121 +If your key is 4GB or larger, use partition type <c>b</c> (W95 FAT32).
122 +</note>
123 +
124 <pre caption="Example partitioning scheme">
125 -# <i>fdisk -l /dev/sda</i>
126 +# <i>fdisk -l /dev/sdc</i>
127
128 -Disk /dev/sda: 1048 MB, 1048313856 bytes
129 -33 heads, 61 sectors/track, 1017 cylinders
130 -Units = cylinders of 2013 * 512 = 1030656 bytes
131 +Disk /dev/sdc: 2063 MB, 2063597056 bytes
132 +255 heads, 63 sectors/track, 250 cylinders
133 +Units = cylinders of 16065 * 512 = 8225280 bytes
134
135 Device Boot Start End Blocks Id System
136 -/dev/sda1 * 1 1017 1023580 b W95 FAT32
137 +/dev/sdc1 * 1 250 2008124+ 6 FAT16
138 </pre>
139
140 </body>
141 @@ -111,13 +124,17 @@
142 <body>
143
144 <p>
145 -Create a FAT32 filesystem on the USB flash drive using <c>mkdosfs</c>:
146 +Create a FAT16 filesystem on the USB flash drive using <c>mkdosfs</c>:
147 </p>
148
149 +<note>
150 +If your key is 4GB or larger, use <c>-F 32</c> to create a FAT32 filesystem.
151 +</note>
152 +
153 <pre caption="Running mkdosfs">
154 <comment>(Make sure you have sys-fs/dosfstools installed)</comment>
155 # <i>emerge -av sys-fs/dosfstools</i>
156 -# <i>mkdosfs -F 32 /dev/sda1</i>
157 +# <i>mkdosfs -F 16 /dev/sdc1</i>
158 mkdosfs 2.11 (12 Mar 2005)
159 </pre>
160
161 @@ -135,35 +152,33 @@
162 <pre caption="Installing a master boot record">
163 <comment>(Make sure you have sys-boot/syslinux-3.00 or later installed)</comment>
164 # <i>emerge -av '>sys-boot/syslinux-3'</i>
165 -# <i>dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda</i>
166 +# <i>dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdc</i>
167 0+1 records in
168 0+1 records out
169 +304 bytes (304 B) copied, 0.0162317 s, 18.7 kB/s
170 </pre>
171
172 </body>
173 </section>
174 </chapter>
175 +
176 <chapter>
177 -<title>Copying the files</title>
178 +<title>Copying the files to your key</title>
179 <section>
180 <title>Mounting the Gentoo Linux Installation CD</title>
181 <body>
182
183 -<warn>
184 -This guide is designed only to be used with Gentoo 2006.0. Do not attempt to
185 -use a 2006.1 CD or newer; you will end up with an unbootable USB disk.
186 -</warn>
187 -
188 <p>
189 -Download the <path>install-x86-minimal-2006.0.iso</path> file from your
190 -local Gentoo Linux <uri link="/main/en/where.xml">mirror</uri> site and mount
191 -the ISO image on <path>/mnt/cdrom/</path> as shown below:
192 +Download either <path>livecd-i686-installer-2007.0.iso</path> or
193 +<path>livecd-amd64-installer-2007.0.iso</path> from your local Gentoo Linux
194 +<uri link="/main/en/where.xml">mirror</uri> site and mount the ISO image on
195 +<path>/mnt/cdrom</path> as shown below:
196 </p>
197
198 <pre caption="Mounting the Gentoo Linux Installation CD ISO image">
199 -<comment>(Create the /mnt/cdrom/ mount point if needed)</comment>
200 +<comment>(Create the /mnt/cdrom mount point if needed)</comment>
201 # <i>mkdir -p /mnt/cdrom</i>
202 -# <i>mount -o loop,ro -t iso9660 install-x86-minimal-2006.0.iso /mnt/cdrom/</i>
203 +# <i>mount -o loop,ro -t iso9660 livecd-i686-installer-2007.0.iso /mnt/cdrom</i>
204 </pre>
205
206 <note>
207 @@ -179,14 +194,14 @@
208 <body>
209
210 <p>
211 -Mount the newly formatted USB flash drive on <path>/mnt/usb/</path> as shown
212 +Mount the newly formatted USB flash drive on <path>/mnt/usb</path> as shown
213 below:
214 </p>
215
216 <pre caption="Mounting the USB flash drive">
217 -<comment>(Create the /mnt/usb/ mount point if needed)</comment>
218 +<comment>(Create the /mnt/usb mount point if needed)</comment>
219 # <i>mkdir -p /mnt/usb</i>
220 -# <i>mount -t vfat /dev/sda1 /mnt/usb/</i>
221 +# <i>mount -t vfat /dev/sdc1 /mnt/usb</i>
222 </pre>
223
224 </body>
225 @@ -202,8 +217,8 @@
226 </p>
227
228 <pre caption="Copying the files">
229 -# <i>cp -r /mnt/cdrom/* /mnt/usb/</i>
230 -# <i>mv /mnt/usb/isolinux/* /mnt/usb/</i>
231 +# <i>cp -r /mnt/cdrom/* /mnt/usb</i>
232 +# <i>mv /mnt/usb/isolinux/* /mnt/usb</i>
233 # <i>mv /mnt/usb/isolinux.cfg /mnt/usb/syslinux.cfg</i>
234 # <i>rm -rf /mnt/usb/isolinux*</i>
235
236 @@ -216,7 +231,7 @@
237 </p>
238
239 <pre caption="Unmounting the ISO image">
240 -# <i>umount /mnt/cdrom/</i>
241 +# <i>umount /mnt/cdrom</i>
242 </pre>
243
244 </body>
245 @@ -227,68 +242,22 @@
246
247 <p>
248 Adjust the syslinux configuration file using <c>sed</c> as shown below. The
249 -<c>dobladecenter</c> parameter will introduce some extra delays before
250 -attempting to mount the filesystem. This is needed to allow the USB
251 -flash drive to settle upon detection.
252 +<c>slowusb</c> parameter will introduce some extra delays before attempting to
253 +mount the filesystem. This is needed to allow the USB flash drive to settle
254 +upon detection.
255 </p>
256
257 <pre caption="Adjusting the boot parameters">
258 # <i>sed -i \
259 - -e "s:cdroot:cdroot dobladecenter:" \
260 + -e "s:cdroot:cdroot slowusb:" \
261 -e "s:kernel memtest86:kernel memtest:" \
262 /mnt/usb/syslinux.cfg</i>
263 </pre>
264
265 -<note>
266 -Consider adding <c>docache</c> to the boot parameters. This will allow running
267 -<c>umount /mnt/cdrom/</c> after booting so that you can unplug the USB flash
268 -drive. Do not enable this unless the target computer has at least 128MB RAM.
269 -</note>
270 -
271 -<!--
272 -(2006.1 workaround) posted by nightmorph
273 -
274 -Background:
275 -After some lengthy discussion with Robin Johnson (robbat2) on IRC, it turns out
276 -that the reason why 2006.1 fails to work with this guide is because inside the
277 -initramfs, it specifies -t iso9660..but usb flash isn't this filetype, it's
278 -vfat. 2006.0 was much better and just specified mount -t auto. so the thing is
279 -to install an ~arch version of genkernel (3.4.4, still ~arch as of 2006-11-04)
280 -and reconfigure syslinux.config to point at the renamed files.
281 -
282 -Obviously, unmasking an ~arch version is never desirable in documentation, so we
283 -need some more alternatives...since 3.4.4 was only created at the end of
284 -october; not likely to go stable all that soon.
285 -
286 -Procedure:
287 -After adjusting the parameters, and before the disk is unmounted/bootloader
288 -installed, the following must be done for ~arch genkernel. Please replace (dash)
289 -with an actual - , since the damned xmllint throws a "comment not terminated"
290 -error.
291 -
292 -# echo "sys-kernel/genkernel" &gt;&gt; /etc/portage/package.keywords
293 -# genkernel (dash)(dash)bootdir=/mnt/usb (dash)(dash)install all
294 -(not sure if syslinux has been installed previously yet)
295 -# nano -w syslinux.cfg
296 -(Edit it to point at the new filenames installed by genkernel)
297 -(might be worth renaming to the ones normally used by syslinux, as
298 -if the kernel name is too long, "vfat might bite")
299 -
300 -(might need to re-run syslinux as specified below to pick up the new names,
301 -though maybe this renaming step should be in the section below?)
302 -# syslinux /dev/sda1
303 -
304 -TODO:
305 -- if/when this document changes, brix requested some time ago that he be renamed
306 -"Original Author" and be moved to the bottom of the credits list.
307 -- if/when this fix goes in, robbat2 deserves credit: this is his solution after
308 - all, and it works.
309 -
310 --->
311 -
312 </body>
313 </section>
314 </chapter>
315 +
316 <chapter>
317 <title>Installing a bootloader</title>
318 <section>
319 @@ -300,7 +269,7 @@
320 </p>
321
322 <pre caption="Unmounting the USB flash drive">
323 -# <i>umount /mnt/usb/</i>
324 +# <i>umount /mnt/usb</i>
325 </pre>
326
327 </body>
328 @@ -314,11 +283,11 @@
329 </p>
330
331 <pre caption="Running syslinux">
332 -# <i>syslinux /dev/sda1</i>
333 +# <i>syslinux /dev/sdc1</i>
334 </pre>
335
336 <impo>
337 -You will need to rerun <c>syslinux /dev/sda1</c> each time you modify the
338 +You will need to rerun <c>syslinux /dev/sdc1</c> each time you modify the
339 <path>syslinux.cfg</path> file for the configuration changes to take affect.
340 </impo>
341
342
343
344
345 --
346 gentoo-doc-cvs@g.o mailing list