/[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.34 - (show annotations) (download) (as text)
Sat Aug 7 11:59:45 2004 UTC (9 years, 11 months ago) by swift
Branch: MAIN
Changes since 1.33: +11 -7 lines
File MIME type: application/xml
#58450 - No need to reboot (although its easier) and NIC in-kernel, not as a module

1 <?xml version='1.0' encoding="UTF-8"?>
2 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/altinstall.xml,v 1.33 2004/07/12 12:56:58 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.44</version>
52 <date>August 07, 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 You might want to reboot the server with a Gentoo LiveCD, although you can
443 very well continue immediately if you know how to proceed with the Gentoo
444 Installation Instructions from an existing installation. Follow the standard
445 install procedure as explained in the Gentoo Install Howto BUT with the
446 following differences:
447 When you mount the file system, do the following (where hdaX is the partition
448 where you created the /diskless directory). You do not need to mount any other
449 partitions as all of the files will reside in the <path>/diskless/eta</path>
450 directory.
451 </p>
452
453 <pre caption="mounting the filesystem">
454 #<i> mount /dev/hda3 /mnt/gentoo</i>
455 </pre>
456
457 <p>
458 Stage tarballs and chroot: This example uses a stage3 tarball. Mount
459 <path>/proc</path> to your diskless directory and chroot into it to continue
460 with the install. Then follow the installation manual until kernel
461 configuration.
462 </p>
463
464 <warn>
465 Be very careful where you extract your stage tarball. You don't want to end up
466 extracting over your existing installation.
467 </warn>
468
469 <pre caption="extracting the stage tarball">
470 # <i>cd /mnt/gentoo/diskless/eta/</i>
471 # <i>tar -xvjpf /mnt/cdrom/gentoo/stage3-*.tar.bz2</i>
472 # <i>mount -t proc /proc /mnt/gentoo/diskless/eta/proc</i>
473 # <i>cp /etc/resolv.conf /mnt/gentoo/diskless/eta/etc/resolv.conf</i>
474 # <i>chroot /mnt/gentoo/diskless/eta/ /bin/bash</i>
475 # <i>env-update</i>
476 # <i>source /etc/profile</i>
477 </pre>
478
479 <p>
480 Kernel configuration: When you do the <c>make menuconfig</c> of your kernel
481 configuration, don't forget to enable the following options with the others
482 recommended into the install howto.
483 </p>
484
485 <pre caption="menuconfig options">
486 - Your network card device support
487 <comment>(In the kernel, *not* as a module!)</comment>
488
489 - Under "Networking options" :
490
491 [*] TCP/IP networking
492 [*] IP: kernel level autoconfiguration
493 [*] IP: DHCP support
494 [*] IP: BOOTP support
495
496
497 - Under "File systems --> Network File Systems" :
498
499 &lt;*&gt; NFS file system support
500 [*] Provide NFSv3 client support
501 [*] Root file system on NFS
502 </pre>
503
504 <p>
505 Next configure your diskless client's <path>/etc/fstab</path>.
506 </p>
507
508 <pre caption="/etc/fstab">
509 # <i>nano -w /etc/fstab</i>
510 /dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
511 proc /proc proc defaults 0 0
512 tmpfs /dev/shm tmpfs defaults 0 0
513 </pre>
514
515 <p>
516 Bootloader. Don't install another bootloader because we already have one -
517 pxegrub. Simply finish the install and restart the server. Start the services
518 you'll need to boot the new client: DHCP, TFTPD, and NFS.
519 </p>
520
521 <pre caption="Starting services">
522 # <i>/etc/init.d/dhcp start</i>
523 # <i>/etc/init.d/tftpd start</i>
524 # <i>/etc/init.d/nfs start</i>
525 </pre>
526
527 </body>
528 </section>
529 <section>
530 <title>Booting the new client</title>
531 <body>
532
533 <p>
534 For the new client to boot properly, you'll need to configure the bios and the
535 network card to use PXE as the first boot method - before CD-ROM or floppy. For
536 help with this consult your hardware manuals or manufacturers website. The
537 network card should get an IP address using DHCP and download the GRUB PXE
538 image using TFTP. Then, you should see a nice black and white GRUB bootmenu
539 where you will select the kernel to boot and press Enter. If everything is ok
540 the kernel should boot, mount the root filesystem using NFS and provide you
541 with a login prompt. Enjoy.
542 </p>
543
544 </body>
545 </section>
546 </chapter>
547
548 <chapter>
549 <title>Installing Gentoo from an existing Linux distribution</title>
550 <section>
551 <title>Requirements</title>
552 <body>
553
554 <p>
555 In order to install Gentoo from your existing Linux distribution you need to
556 have chroot command installed, and have a copy of the Gentoo installation
557 tarball or ISO you want to install. A network connection would be preferable if
558 you want more than what's supplied in your tarball. (by the way, a tarball is
559 just a file ending in .tbz or .tar.gz). The author used RedHat Linux 7.3 as the
560 "host" operating system, but it is not very important. Let's get started!
561 </p>
562
563 </body>
564 </section>
565 <section>
566 <title>Overview</title>
567 <body>
568
569 <p>
570 We will first allocate a partition to Gentoo by resizing our existing Linux
571 partition, mount the partition, untar the tarball that is mounted, chroot
572 inside the psuedo-system and start building. Once the bootstrap process is
573 done, we will do some final configuration on the system so as to make sure it
574 boots, then we are ready to reboot and use Gentoo.
575 </p>
576
577 </body>
578 </section>
579 <section>
580 <title>How should we make space for Gentoo?</title>
581 <body>
582
583 <p>
584 The root partition is the filesystem mounted under <path>/</path>. A quick run
585 of mount on my system shows what I am talking about. We well also use df (disk
586 free) to see how much space I have left and how I will be resizing. Note that
587 it is not mandatory to resize your root partition! You could be resizing
588 anything else supported by our resizer, but let's talk about that later.
589 </p>
590
591 <pre caption="Filesystem information">
592 # <i>mount</i>
593 /dev/hdb2 on / type ext3 (rw)
594 none on /proc type proc (rw)
595 none on /dev/pts type devpts (rw,gid=5,mode=620)
596 none on /dev/shm type tmpfs (rw)
597 # <i>df -h </i>
598 Filesystem Size Used Avail Use% Mounted on
599 /dev/hdb2 4.0G 1.9G 2.4G 82% /
600 none 38M 0 38M 0% /dev/shm
601 </pre>
602
603 <p>
604 As we can see, the partition mounted as <path>/</path> named
605 <path>/dev/hdb2</path> has 2.4 gigabytes free. In my case, I think I will
606 resize it as to leave 400Megs free of space, therefore allocating 2 gigabytes
607 for Gentoo. Not bad, I could have quite some stuff installed. However, think
608 that even one gigabyte is enough for most users. So let's partition this thing!
609 </p>
610
611 </body>
612 </section>
613 <section>
614 <title>Building parted to resize partition</title>
615 <body>
616
617 <p>
618 Parted is an utility supplied by the GNU foundation, an old and respectable
619 huge project whose software you are using in this very moment. There is one
620 tool, however, that is extremely useful for us at the moment. It's called
621 parted, partition editor and we can get it from
622 <uri>http://www.gnu.org/software/parted/</uri>
623 </p>
624
625 <note>
626 There are other tools for doing resize of partitions as well, but author is
627 unsure/uninterested whether PartitionMagic(tm) or other software of the kind do
628 the job. It's the reader's job to check them out
629 </note>
630
631 <p>
632 Look up on that page the type of filesystem you want to resize and see if
633 parted can do it. If not, you're out of luck, you will have to destroy some
634 partition to make space for Gentoo, and reinstall back. Go ahead by downloading
635 the software, install it. Here we have a problem. We want to resize our Linux
636 root partition, therefore we must boot from a floppy disk a minimal linux
637 system and use previously-compiled parted copied to a diskette in order to
638 resize <path>/</path>. However, if you can unmount the partition while still
639 in Linux you are lucky, you don't need to do what follows. Just compile parted
640 and run it on an unmounted partition you chose to resize. Here's how I did it
641 for my system.
642 </p>
643
644 <impo>
645 Make sure that the operations you want to do on your partition are supported by
646 parted!
647 </impo>
648
649 <p>
650 Get tomsrtbt boot/root disk (free of charge) from
651 <uri>http://freshmeat.net/tomsrtbt </uri>, create a floppy as suggested in the
652 Documentation that accompanies the software package and insert a new floppy in
653 the drive for the next step.
654 </p>
655
656 <note>
657 Note again that Linux is synonym of "There's one more way to do it". Your
658 objective is to run parted on an unmounted partition so it can do its work. You
659 might use some other boot/root diskset other than tomsrtbt. You might not even
660 need to do this step at all, that is only umount the filesystem you want to
661 repartition in your Linux session and run parted on it.
662 </note>
663
664 <pre caption="Utility disk creation">
665 # <i>mkfs.minix /dev/fd0</i>
666 480 inodes
667 1440 blocks
668 Firstdatazone=19 (19)
669 Zonesize=1024
670 Maxsize=268966912
671 </pre>
672
673 <p>
674 We will now proceed with the build of parted. If it's not already downloaded
675 and untarred, do so now and cd into the corresponding directory. Now run the
676 following set of commands to build the utility and copy it to your floppy disk.
677 </p>
678
679 <pre caption="Building the utility floppy">
680 # <i> mkdir /floppy; mount -t minix /dev/fd0 /floppy &amp;&amp;
681 export CFLAGS="-O3 -pipe -fomit-frame-pointer -static" &amp;&amp; ./configure
682 &amp;&amp; make &amp;&amp; cp parted/parted /floppy &amp;&amp; umount /floppy </i>
683 </pre>
684
685 <p>
686 Congratulations, you are ready to reboot and resize your partition. Do this
687 only after taking a quick look at the parted documentation on the GNU website.
688 The resize should take under 30 minutes for the largest hard-drives, be
689 patient. Reboot your system with the tomsrtbt boot disk (just pop it inside),
690 and once you are logged in, switch the disk in the drive with your utility disk
691 we have created above and type mount /dev/fd0 /floppy to have parted under
692 /floppy. There you go. Run parted and you will be able to resize your
693 partition. Once this lenghty process done, we are ready to have the real fun,
694 by installing Gentoo. Reboot back into your old Linux system for now. Drive you
695 wish to operate on is the drive containing the partition we want to resize. For
696 example, if we want to resize /dev/hda3, the drive is /dev/hda
697 </p>
698
699 <pre caption="Commands to run once logged into tomsrtbt system">
700 # <i>mount /dev/fd0 /floppy </i>
701 # <i>cd /floppy; ./parted [drive you wish to operate on]</i>
702 (parted) <i> print </i>
703 Disk geometry for /dev/hdb: 0.000-9787.148 megabytes
704 Disk label type: msdos
705 Minor Start End Type Filesystem Flags
706 1 0.031 2953.125 primary ntfs
707 3 2953.125 3133.265 primary linux-swap
708 2 3133.266 5633.085 primary ext3
709 4 5633.086 9787.148 extended
710 5 5633.117 6633.210 logical
711 6 6633.242 9787.148 logical ext3
712 (parted) <i> help resize </i>
713 resize MINOR START END resize filesystem on partition MINOR
714
715 MINOR is the partition number used by Linux. On msdos disk labels, the
716 primary partitions number from 1-4, and logical partitions are 5
717 onwards.
718 START and END are in megabytes
719 (parted) <i> resize 2 3133.266 4000.000 </i>
720 </pre>
721
722 <impo>
723 Be patient! The computer is working! Just look at the hardware LED on your case
724 to see that it is really working. This should take between 2 and 30 minutes.
725 </impo>
726
727 <p>
728 Once you have resized, boot back into your old linux as described. Then go to
729 <uri link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=4">The Gentoo
730 Handbook: Preparing the Disks</uri> and follow the instructions. When
731 chrooting, use the following command to flush your environment:
732 </p>
733
734 <pre caption="Flushing the environment during chroot">
735 # <i>env -i /usr/sbin/chroot /mnt/gentoo /bin/bash</i>
736 </pre>
737
738 <p>
739 Enjoy!
740 </p>
741
742 </body>
743 </section>
744 </chapter>
745
746 </guide>

  ViewVC Help
Powered by ViewVC 1.1.20