/[gentoo]/xml/htdocs/doc/en/altinstall.xml
Gentoo

Contents of /xml/htdocs/doc/en/altinstall.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.33 - (show annotations) (download) (as text)
Mon Jul 12 12:56:58 2004 UTC (10 years ago) by neysx
Branch: MAIN
Changes since 1.32: +4 -4 lines
File MIME type: application/xml
#56783: wrong file name in wget instructions

1 <?xml version='1.0' encoding="UTF-8"?>
2 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/altinstall.xml,v 1.32 2004/06/30 23:04:41 neysx Exp $ -->
3 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4
5 <guide link="/doc/en/altinstall.xml">
6
7 <title>The Gentoo Linux alternative installation method HOWTO</title>
8
9 <author title="Contributor">
10 <mail link="gerrynjr@gentoo.org">Gerald Normandin Jr.</mail>
11 </author>
12 <author title="Contributor">
13 <mail link="lordviram@rebelpacket.net">Travis Tilley</mail>
14 </author>
15 <author title="Contributor">
16 <mail link="volontir@yahoo.com">Oleg Raisky</mail>
17 </author>
18 <author title="Contributor">
19 <mail link="luminousit@hotmail.com">Alex Garbutt</mail>
20 </author>
21 <author title="Contributor">
22 <mail link="alex@openvs.com">Alexandre Georges</mail>
23 </author>
24 <author title="Contributor">
25 <mail link="vargen@b0d.org">Magnus Backanda</mail>
26 </author>
27 <author title="Contributor">
28 <mail link="davoid@gentoo.org">Faust A. Tanasescu</mail>
29 </author>
30 <author title="Contributor">
31 <mail link="aliz@gentoo.org">Daniel Ahlberg</mail>
32 </author>
33 <author title="Editor">
34 <mail link="swift@gentoo.org">Sven Vermeulen</mail>
35 </author>
36 <author title="Reviewer">
37 <mail link="antifa@gentoo.org">Ken Nowack</mail>
38 </author>
39 <author title="Editor">
40 <mail link="blubber@gentoo.org">Tiemo Kieft</mail>
41 </author>
42
43 <abstract>
44 This HOWTO is meant to be a repository of alternative Gentoo installation
45 methods, for those with special installation needs such as lack of a cdrom
46 or a computer that can't boot cds.
47 </abstract>
48
49 <license/>
50
51 <version>0.43</version>
52 <date>July 12, 2004</date>
53
54 <chapter>
55 <title>About this document</title>
56 <section>
57 <body>
58
59 <p>
60 If the standard boot-from-CD install method doesn't work for you (or you just
61 don't like it), help is now here. This document serves to provide a repository
62 of alternative Gentoo Linux installation techniques to those who need them.
63 Or, if you prefer, it serves as a place to put your wacky installation methods.
64 If you have an installation method that you yourself find useful, or you have
65 devised an amusing way of installing Gentoo, please don't hesitate to write
66 something up and <mail link="antifa@gentoo.org">send it to me.</mail>
67 </p>
68
69 </body>
70 </section>
71 </chapter>
72
73 <chapter>
74 <title>Booting the LiveCD with Smart BootManager</title>
75 <section>
76 <body>
77
78 <p>
79 Download Smart BootManager <uri
80 link="http://btmgr.sourceforge.net/index.php3?body=download.html">http://btmgr.sourceforge.net/index.php3?body=download.html</uri>.
81 Linux source or binary format and windows .exe versions are available as well
82 as many language packs. However, at this time, the preferred method would be to
83 use the binary format, as the source will not compile with newer versions of
84 NASM.
85 </p>
86
87 <p>
88 Either compile the package from source or just grab the binary. There are
89 several options that can be utilized while creating your boot floppy, as seen
90 below.
91 </p>
92
93 <pre caption="Smart BootManager Options">
94 <i>sbminst [-t theme] [-d drv] [-b backup_file] [-u backup_file]
95
96 -t theme select the theme to be used, in which the theme could be:
97 us = English theme de = German theme
98 hu = Hungarian theme zh = Chinese theme
99 ru = Russian theme cz = Czech theme
100 es = Spanish theme fr = French theme
101 pt = Portuguese theme
102
103
104 -d drv set the drive that you want to install Smart BootManager on;
105 for Linux:
106 /dev/fd0 is the first floppy driver,
107 /dev/hda is the first IDE harddisk driver.
108 /dev/sda is the first SCSI harddisk driver.
109 for DOS:
110 0 is the first floppy drive
111 128 is the first hard drive;
112
113 -c disable CD-ROM booting feature;
114
115 -b backup_file backup the data that will be overwritten for
116 future uninstallation;
117
118 -u backup_file uninstall Smart BootManager, should be used alone;
119
120 -y do not ask any question or warning.</i>
121 </pre>
122
123 <pre caption="Using sbminst to build the boot floppy">
124 # <i>sbminst -t us -d /dev/fd0</i>
125 </pre>
126
127 <note>
128 Replace fd0 with your respective floppy device name if yours is different.
129 </note>
130
131 <p>
132 Now simply place the floppy in the floppy drive of the computer you'd like to
133 boot the LiveCD on, as well as placing the LiveCD in the CD-ROM and boot the
134 computer.
135 </p>
136
137 <p>
138 You'll be greeted with the Smart BootManager dialog. Select your CD-ROM and
139 press ENTER to boot the LiveCD. Once booted proceed with the standard
140 installation instructions.
141 </p>
142
143 <p>
144 Further information on Smart BootManager may be found at
145 <uri>http://btmgr.sourceforge.net/</uri>
146 </p>
147
148 </body>
149 </section>
150 </chapter>
151
152 <chapter>
153 <title>Knoppix Installation</title>
154 <section>
155 <body>
156
157 <p>
158 Booting from the <uri link="http://www.knoppix.org/">Knoppix</uri> LiveCD is a
159 way to have a fully functional linux system while you're compiling Gentoo. Tux
160 Racer will help you pass the time while you wait for bootstrap.
161 </p>
162
163 <p>
164 Boot from the Knoppix CD. It generally does a really good job of hardware
165 detection. Although, you may have to add some boot options.
166 </p>
167
168 <p>
169 By default Knoppix boots into a KDE 3.0 desktop. The first thing I did was open
170 a konsole and typed <c>sudo passwd root</c>. This lets you set the root
171 password for Knoppix.
172 </p>
173
174 <p>
175 Next, I su to root and typed <c>usermod -d /root -m root</c>. This sets user
176 roots home directory to /root (the Gentoo way) from /home/root (the Knoppix
177 way). If you do not do this, then you will receive errors when emerging about
178 "/home/root: not found" or something to that effect.
179 </p>
180
181 <p>
182 I then typed <c>exit</c> and then <c>su</c> back into root. This loads the
183 change that was made with the usermod command. Now create the
184 <path>/mnt/gentoo</path> mountpoint using <c>mkdir</c>:
185 </p>
186
187 <pre caption="Creating the /mnt/gentoo mountpoint">
188 # <i>mkdir /mnt/gentoo</i>
189 </pre>
190
191 <p>
192 At this point, you can pick up with the standard install documentation at <uri
193 link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=4">part 4</uri>.
194 However, when you're asked to mount the proc system, issue the following
195 command instead:
196 </p>
197
198 <pre caption="Bind-mounting the proc pseudo filesystem">
199 # <i>mount -o bind /proc /mnt/gentoo/proc</i>
200 </pre>
201
202 </body>
203 </section>
204 </chapter>
205
206 <chapter>
207 <title>Installing from Stage 1 without network access</title>
208 <section>
209 <body>
210
211 <p>
212 Burn a LiveCD iso.
213 </p>
214
215 <p>
216 Get the latest portage snapshot from
217 <uri>http://distro.ibiblio.org/pub/linux/distributions/gentoo/snapshots/</uri>
218 (or your favorite <uri
219 link="http://www.gentoo.org/main/en/mirrors.xml">mirror</uri>). Either place
220 this tarball on an existing partition on the computer your are installing to,
221 or burn it to a CD.
222 </p>
223
224 <p>
225 Follow all instructions of the Gentoo Installation Handbook up to <c>chroot
226 /mnt/gentoo</c> in Chapter 6. If you only have one CD-ROM remember to use the
227 <c>cdcache</c> option while booting so you can unmount the LiveCD and mount
228 your portage snapshot CD.
229 </p>
230
231 <p>
232 Open a new console (Alt-F2), we will continue with the Install Doc up to
233 running the bootstrap.sh script.
234 </p>
235
236 <warn>
237 Older realeases of the livecd required you to change the password using the
238 <c>passwd</c> command, before logging in manually.
239 </warn>
240
241 <p>
242 Go back to the first console (Alt-F1, without chroot) and mount a second CD on
243 <path>/mnt/gentoo/mnt/cdrom2</path>. Copy the portage tarball from cdrom2 and
244 unpack it to <path>/mnt/gentoo/usr/portage</path>.
245 </p>
246
247 <pre caption="Mount the snapshot cd">
248 # <i>umount /mnt/cdrom</i>
249 # <i>mkdir /mnt/gentoo/mnt/cdrom2</i>
250 # <i>mount /dev/cdroms/cdrom0 /mnt/gentoo/mnt/cdrom2</i>
251 # <i>cp /mnt/gentoo/mnt/cdrom2/portage-$date.tar.bz2 /mnt/gentoo/usr/portage</i>
252 # <i>cd /mnt/gentoo/usr/portage</i>
253 # <i>tar xvjpf portage-$date.tar.bz2</i>
254 </pre>
255
256 <p>
257 Switch back to the F2 console. Now if you try to run bootstrap.sh it will fail
258 because it won't be able to download any files. We will fetch these files
259 somewhere else and put them in /usr/portage/distfiles (on F2 console).
260 </p>
261
262 <p>
263 You need a list of Stage1 packages: glibc, baselayout, texinfo, gettext, zlib,
264 binutils, gcc, ncurses plus their dependencies.
265 </p>
266
267 <note>
268 Note that you need the versions of each package synced with your portage tree.
269 </note>
270
271 <pre caption="Getting the download listing">
272 <comment>(Don't forget the 2 in front of the &gt;)</comment>
273 # <i>emerge -fp glibc baselayout texinfo gettext zlib binutils gcc ncurses 2&gt; stage1.list</i>
274 # <i>mount -t vfat /dev/fd0 /mnt/floppy</i>
275 # <i>cp /mnt/gentoo/stage1.list /mnt/floppy</i>
276 # <i>umount /mnt/floppy</i>
277 </pre>
278
279 <p>
280 Take the floppy to the computer that has fast access. If you take a look at the
281 <path>stage1.list</path> file, you'll see that it provides you with several
282 URLs to download. Sadly, it lists several possible URLs for each package as
283 well, which isn't what you want. Strip all but one of the URLs first:
284 </p>
285
286 <pre caption="Stripping URLs">
287 <comment>(This script is depending on the output format given by emerge which
288 might change in the future without further notice - use with caution!)</comment>
289 # <i>cut -f 1 -d ' ' stage1.list > stage1.download</i>
290 </pre>
291
292 <p>
293 Now use <c>wget</c> to fetch all the listed sources:
294 </p>
295
296 <pre caption="Use wget to grab your source packages">
297 # <i>wget -N -i stage1.download</i>
298 </pre>
299
300 <p>
301 Once you have obtained all the files, take them to the computer and copy them
302 to <path>/mnt/gentoo/usr/portage/distfiles</path>. You will then be able to run
303 <c>bootstrap.sh</c>. Repeat this same wget fetch and place procedure for stage2
304 and 3.
305 </p>
306
307 </body>
308 </section>
309 </chapter>
310
311 <chapter>
312 <title>Diskless install using PXE boot</title>
313 <section>
314 <title>Requirements</title>
315 <body>
316
317 <p>
318 You will need a network card on the diskless client that uses the PXE protocol
319 to boot, like many 3com cards. You will also need a BIOS that supports booting
320 from PXE.
321 </p>
322
323 </body>
324 </section>
325 <section>
326 <title>Server base setup</title>
327 <body>
328
329 <p>
330 Create directories: The first thing to do is to create the directories where
331 your diskless system will be stored. Create a directory called
332 <path>/diskless</path> which houses a directory for each diskless client. For
333 the rest of this howto we'll be working on the client 'eta'.
334 </p>
335
336 <pre caption="directory setup">
337 # <i>mkdir /diskless</i>
338 # <i>mkdir /diskless/eta</i>
339 # <i>mkdir /diskless/eta/boot</i>
340 </pre>
341
342 <p>
343 DHCP and TFTP setup: The client will get boot informations using DHCP and
344 download all the required files using TFTP. Just emerge DHCP and configure it
345 for your basic needs. Then, add the following on
346 <path>/etc/dhcp/dhcpd.conf</path>.
347 </p>
348
349 <note>
350 This provide a static IP address for the client and the path of a PXE boot
351 image, here pxegrub. You have to replace the MAC address of the Ethernet card
352 of the client and the directory where you will put the client files with the
353 one you use.
354 </note>
355
356 <pre caption="dhcp.conf">
357 option option-150 code 150 = text ;
358 host eta {
359 hardware ethernet 00:00:00:00:00:00;
360 fixed-address <i>ip.add.re.ss</i>;
361 option option-150 "/eta/boot/grub.lst";
362 filename "/eta/boot/pxegrub";
363 }
364 </pre>
365
366 <p>
367 For TFTP, emerge <c>app-admin/tftp-hpa</c>. In
368 <path>/etc/conf.d/in.tftpd</path>, put the following :
369 </p>
370
371 <pre caption="in.tftpd">
372 INTFTPD_PATH="/diskless"
373 INTFTPD_USER="nobody"
374 INTFTPD_OPTS="-u ${INTFTPD_USER} -l -vvvvvv -p -c -s ${INTFTPD_PATH}"
375 </pre>
376
377 <p>
378 Setup GRUB: To provide PXE booting I use GRUB. You have to compile it by
379 yourself to enable the PXE image compilation ... but that's quite easy. First,
380 get the latest version of the GRUB source code (<c>emerge -f grub</c> will
381 place the tarball in <path>/usr/portage/distfiles</path>). Copy the tarball to
382 <path>/diskless</path> and then build it to make the pxe capable binary. Once
383 the binary is built, copy it to the diskless client's boot directory. Then edit
384 it's grub.lst config file.
385 </p>
386
387 <pre caption="grub setup">
388 # <i>tar zxvf grub-0.92.tar.gz</i>
389 # <i>cd grub-0.92</i>
390 # <i>./configure --help</i>
391 <codenote>In the options you will see a list of supported network interface drivers. </codenote>
392 <codenote>Select the driver compatible with your card. Herein referenced a $nic</codenote>
393 # <i>./configure --enable-diskless --enable-$nic</i>
394 # <i>make</i>
395 # <i>cd stage2</i>
396 # <i>cp pxegrub /diskless/eta/boot/pxegrub</i>
397 # <i>nano -w /diskless/eta/boot/grub.lst</i>
398 </pre>
399
400 <pre caption="grub.lst">
401 default 0
402 timeout 30
403
404 title=Diskless Gentoo
405 root (nd)
406 kernel /eta/bzImage ip=dhcp root=/dev/nfs nfsroot=<i>ip.add.re.ss</i>:/diskless/eta
407
408 <codenote>For the nfsroot option, the IP address is the one of the server and </codenote>
409 <codenote>the directory is the one where your diskless client files are located (on the server).</codenote>
410 </pre>
411
412 <p>
413 Setup NFS: NFS is quite easy to configure. The only thing you have to do is to
414 add a line on the <path>/etc/exports</path> config file :
415 </p>
416
417 <pre caption="/etc/exports">
418 # <i>nano -w /etc/exports</i>
419 # /etc/exports: NFS file systems being exported. See exports(5).
420 /diskless/eta eta(rw,sync,no_root_squash)
421 </pre>
422
423 <p>
424 Update your hosts: One important thing to do now is to modify your
425 <path>/etc/hosts</path> file to fit your needs.
426 </p>
427
428 <pre caption="/etc/hosts">
429 127.0.0.1 localhost
430
431 192.168.1.10 eta.example.com eta
432 192.168.1.20 sigma.example.com sigma
433 </pre>
434
435 </body>
436 </section>
437 <section>
438 <title>Creating the system on the server</title>
439 <body>
440
441 <p>
442 Reboot the server on a Gentoo LiveCD. Follow the standard install procedure as
443 explained in the Gentoo Install Howto BUT with the following differences. When
444 you mount the file system, do the following (where hdaX is the partition where
445 you created the /diskless directory). You do not need to mount any other
446 partitions as all of the files will reside in the <path>/diskless/eta</path>
447 directory.
448 </p>
449
450 <pre caption="mounting the filesystem">
451 #<i> mount /dev/hda3 /mnt/gentoo</i>
452 </pre>
453
454 <p>
455 Stage tarballs and chroot: This example uses a stage3 tarball. Mount
456 <path>/proc</path> to your diskless directory and chroot into it to continue
457 with the install. Then follow the installation manual until kernel
458 configuration.
459 </p>
460
461 <warn>
462 Be very careful where you extract your stage tarball. You don't want to end up
463 extracting over your existing installation.
464 </warn>
465
466 <pre caption="extracting the stage tarball">
467 # <i>cd /mnt/gentoo/diskless/eta/</i>
468 # <i>tar -xvjpf /mnt/cdrom/gentoo/stage3-*.tar.bz2</i>
469 # <i>mount -t proc /proc /mnt/gentoo/diskless/eta/proc</i>
470 # <i>cp /etc/resolv.conf /mnt/gentoo/diskless/eta/etc/resolv.conf</i>
471 # <i>chroot /mnt/gentoo/diskless/eta/ /bin/bash</i>
472 # <i>env-update</i>
473 # <i>source /etc/profile</i>
474 </pre>
475
476 <p>
477 Kernel configuration: When you do the <c>make menuconfig</c> of your kernel
478 configuration, don't forget to enable the following options with the others
479 recommended into the install howto.
480 </p>
481
482 <pre caption="menuconfig options">
483 - Your network card device support
484
485 - Under "Networking options" :
486
487 [*] TCP/IP networking
488 [*] IP: kernel level autoconfiguration
489 [*] IP: DHCP support
490 [*] IP: BOOTP support
491
492
493 - Under "File systems --> Network File Systems" :
494
495 &lt;*&gt; NFS file system support
496 [*] Provide NFSv3 client support
497 [*] Root file system on NFS
498 </pre>
499
500 <p>
501 Next configure your diskless client's <path>/etc/fstab</path>.
502 </p>
503
504 <pre caption="/etc/fstab">
505 # <i>nano -w /etc/fstab</i>
506 /dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
507 proc /proc proc defaults 0 0
508 tmpfs /dev/shm tmpfs defaults 0 0
509 </pre>
510
511 <p>
512 Bootloader. Don't install another bootloader because we already have one -
513 pxegrub. Simply finish the install and restart the server. Start the services
514 you'll need to boot the new client: DHCP, TFTPD, and NFS.
515 </p>
516
517 <pre caption="Starting services">
518 # <i>/etc/init.d/dhcp start</i>
519 # <i>/etc/init.d/tftpd start</i>
520 # <i>/etc/init.d/nfs start</i>
521 </pre>
522
523 </body>
524 </section>
525 <section>
526 <title>Booting the new client</title>
527 <body>
528
529 <p>
530 For the new client to boot properly, you'll need to configure the bios and the
531 network card to use PXE as the first boot method - before CD-ROM or floppy. For
532 help with this consult your hardware manuals or manufacturers website. The
533 network card should get an IP address using DHCP and download the GRUB PXE
534 image using TFTP. Then, you should see a nice black and white GRUB bootmenu
535 where you will select the kernel to boot and press Enter. If everything is ok
536 the kernel should boot, mount the root filesystem using NFS and provide you
537 with a login prompt. Enjoy.
538 </p>
539
540 </body>
541 </section>
542 </chapter>
543
544 <chapter>
545 <title>Installing Gentoo from an existing Linux distribution</title>
546 <section>
547 <title>Requirements</title>
548 <body>
549
550 <p>
551 In order to install Gentoo from your existing Linux distribution you need to
552 have chroot command installed, and have a copy of the Gentoo installation
553 tarball or ISO you want to install. A network connection would be preferable if
554 you want more than what's supplied in your tarball. (by the way, a tarball is
555 just a file ending in .tbz or .tar.gz). The author used RedHat Linux 7.3 as the
556 "host" operating system, but it is not very important. Let's get started!
557 </p>
558
559 </body>
560 </section>
561 <section>
562 <title>Overview</title>
563 <body>
564
565 <p>
566 We will first allocate a partition to Gentoo by resizing our existing Linux
567 partition, mount the partition, untar the tarball that is mounted, chroot
568 inside the psuedo-system and start building. Once the bootstrap process is
569 done, we will do some final configuration on the system so as to make sure it
570 boots, then we are ready to reboot and use Gentoo.
571 </p>
572
573 </body>
574 </section>
575 <section>
576 <title>How should we make space for Gentoo?</title>
577 <body>
578
579 <p>
580 The root partition is the filesystem mounted under <path>/</path>. A quick run
581 of mount on my system shows what I am talking about. We well also use df (disk
582 free) to see how much space I have left and how I will be resizing. Note that
583 it is not mandatory to resize your root partition! You could be resizing
584 anything else supported by our resizer, but let's talk about that later.
585 </p>
586
587 <pre caption="Filesystem information">
588 # <i>mount</i>
589 /dev/hdb2 on / type ext3 (rw)
590 none on /proc type proc (rw)
591 none on /dev/pts type devpts (rw,gid=5,mode=620)
592 none on /dev/shm type tmpfs (rw)
593 # <i>df -h </i>
594 Filesystem Size Used Avail Use% Mounted on
595 /dev/hdb2 4.0G 1.9G 2.4G 82% /
596 none 38M 0 38M 0% /dev/shm
597 </pre>
598
599 <p>
600 As we can see, the partition mounted as <path>/</path> named
601 <path>/dev/hdb2</path> has 2.4 gigabytes free. In my case, I think I will
602 resize it as to leave 400Megs free of space, therefore allocating 2 gigabytes
603 for Gentoo. Not bad, I could have quite some stuff installed. However, think
604 that even one gigabyte is enough for most users. So let's partition this thing!
605 </p>
606
607 </body>
608 </section>
609 <section>
610 <title>Building parted to resize partition</title>
611 <body>
612
613 <p>
614 Parted is an utility supplied by the GNU foundation, an old and respectable
615 huge project whose software you are using in this very moment. There is one
616 tool, however, that is extremely useful for us at the moment. It's called
617 parted, partition editor and we can get it from
618 <uri>http://www.gnu.org/software/parted/</uri>
619 </p>
620
621 <note>
622 There are other tools for doing resize of partitions as well, but author is
623 unsure/uninterested whether PartitionMagic(tm) or other software of the kind do
624 the job. It's the reader's job to check them out
625 </note>
626
627 <p>
628 Look up on that page the type of filesystem you want to resize and see if
629 parted can do it. If not, you're out of luck, you will have to destroy some
630 partition to make space for Gentoo, and reinstall back. Go ahead by downloading
631 the software, install it. Here we have a problem. We want to resize our Linux
632 root partition, therefore we must boot from a floppy disk a minimal linux
633 system and use previously-compiled parted copied to a diskette in order to
634 resize <path>/</path>. However, if you can unmount the partition while still
635 in Linux you are lucky, you don't need to do what follows. Just compile parted
636 and run it on an unmounted partition you chose to resize. Here's how I did it
637 for my system.
638 </p>
639
640 <impo>
641 Make sure that the operations you want to do on your partition are supported by
642 parted!
643 </impo>
644
645 <p>
646 Get tomsrtbt boot/root disk (free of charge) from
647 <uri>http://freshmeat.net/tomsrtbt </uri>, create a floppy as suggested in the
648 Documentation that accompanies the software package and insert a new floppy in
649 the drive for the next step.
650 </p>
651
652 <note>
653 Note again that Linux is synonym of "There's one more way to do it". Your
654 objective is to run parted on an unmounted partition so it can do its work. You
655 might use some other boot/root diskset other than tomsrtbt. You might not even
656 need to do this step at all, that is only umount the filesystem you want to
657 repartition in your Linux session and run parted on it.
658 </note>
659
660 <pre caption="Utility disk creation">
661 # <i>mkfs.minix /dev/fd0</i>
662 480 inodes
663 1440 blocks
664 Firstdatazone=19 (19)
665 Zonesize=1024
666 Maxsize=268966912
667 </pre>
668
669 <p>
670 We will now proceed with the build of parted. If it's not already downloaded
671 and untarred, do so now and cd into the corresponding directory. Now run the
672 following set of commands to build the utility and copy it to your floppy disk.
673 </p>
674
675 <pre caption="Building the utility floppy">
676 # <i> mkdir /floppy; mount -t minix /dev/fd0 /floppy &amp;&amp;
677 export CFLAGS="-O3 -pipe -fomit-frame-pointer -static" &amp;&amp; ./configure
678 &amp;&amp; make &amp;&amp; cp parted/parted /floppy &amp;&amp; umount /floppy </i>
679 </pre>
680
681 <p>
682 Congratulations, you are ready to reboot and resize your partition. Do this
683 only after taking a quick look at the parted documentation on the GNU website.
684 The resize should take under 30 minutes for the largest hard-drives, be
685 patient. Reboot your system with the tomsrtbt boot disk (just pop it inside),
686 and once you are logged in, switch the disk in the drive with your utility disk
687 we have created above and type mount /dev/fd0 /floppy to have parted under
688 /floppy. There you go. Run parted and you will be able to resize your
689 partition. Once this lenghty process done, we are ready to have the real fun,
690 by installing Gentoo. Reboot back into your old Linux system for now. Drive you
691 wish to operate on is the drive containing the partition we want to resize. For
692 example, if we want to resize /dev/hda3, the drive is /dev/hda
693 </p>
694
695 <pre caption="Commands to run once logged into tomsrtbt system">
696 # <i>mount /dev/fd0 /floppy </i>
697 # <i>cd /floppy; ./parted [drive you wish to operate on]</i>
698 (parted) <i> print </i>
699 Disk geometry for /dev/hdb: 0.000-9787.148 megabytes
700 Disk label type: msdos
701 Minor Start End Type Filesystem Flags
702 1 0.031 2953.125 primary ntfs
703 3 2953.125 3133.265 primary linux-swap
704 2 3133.266 5633.085 primary ext3
705 4 5633.086 9787.148 extended
706 5 5633.117 6633.210 logical
707 6 6633.242 9787.148 logical ext3
708 (parted) <i> help resize </i>
709 resize MINOR START END resize filesystem on partition MINOR
710
711 MINOR is the partition number used by Linux. On msdos disk labels, the
712 primary partitions number from 1-4, and logical partitions are 5
713 onwards.
714 START and END are in megabytes
715 (parted) <i> resize 2 3133.266 4000.000 </i>
716 </pre>
717
718 <impo>
719 Be patient! The computer is working! Just look at the hardware LED on your case
720 to see that it is really working. This should take between 2 and 30 minutes.
721 </impo>
722
723 <p>
724 Once you have resized, boot back into your old linux as described. Then go to
725 <uri link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=4">The Gentoo
726 Handbook: Preparing the Disks</uri> and follow the instructions. When
727 chrooting, use the following command to flush your environment:
728 </p>
729
730 <pre caption="Flushing the environment during chroot">
731 # <i>env -i /usr/sbin/chroot /mnt/gentoo /bin/bash</i>
732 </pre>
733
734 <p>
735 Enjoy!
736 </p>
737
738 </body>
739 </section>
740 </chapter>
741
742 </guide>

  ViewVC Help
Powered by ViewVC 1.1.20