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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.13 Revision 1.14
14<author title="Editor"><mail link="swift@gentoo.org">Sven Vermeulen</mail></author> 14<author title="Editor"><mail link="swift@gentoo.org">Sven Vermeulen</mail></author>
15<author title="Editor"><mail link="antifa@gentoo.org">Ken Nowack</mail></author> 15<author title="Editor"><mail link="antifa@gentoo.org">Ken Nowack</mail></author>
16<abstract> 16<abstract>
17This HOWTO is meant to be a repository of alternative Gentoo installation 17This HOWTO is meant to be a repository of alternative Gentoo installation
18methods, for those with special installation needs such as lack of a cdrom 18methods, for those with special installation needs such as lack of a cdrom
19or a computer that cant boot cds. 19or a computer that can't boot cds.
20</abstract> 20</abstract>
21 21
22<version>0.31</version> 22<version>0.31</version>
23<date>17 July 2003</date> 23<date>17 July 2003</date>
24 24
35provide a repository of alternative Gentoo Linux installation techniques 35provide a repository of alternative Gentoo Linux installation techniques
36to those who need them. 36to those who need them.
37Or, if you prefer, it serves as 37Or, if you prefer, it serves as
38a place to put your wacky installation methods. If you have an 38a place to put your wacky installation methods. If you have an
39installation method that you yourself find useful, or you have devised an 39installation method that you yourself find useful, or you have devised an
40amusing way of installing gentoo, please dont hesitate to write something 40amusing way of installing Gentoo, please don't hesitate to write something
41up and <mail link="antifa@gentoo.org">send it to me.</mail></p> 41up and <mail link="antifa@gentoo.org">send it to me.</mail></p>
42 42
43 43
44</body> 44</body>
45</section> 45</section>
48<chapter> 48<chapter>
49<title>Booting the LiveCD with Smart BootManager</title> 49<title>Booting the LiveCD with Smart BootManager</title>
50<section> 50<section>
51 51
52<body> 52<body>
53<p>Download Smart BootManager <uri link="http://btmgr.sourceforge.net/index.php3?body=download.html">http://btmgr.sourceforge.net/index.php3?body=download.html</uri>. Linux source or binary format and windows .exe versions are available as well as many language packs. However, at this time, the prefered method would be to use the binary format, as the source will not compile with newer versions of nasm.</p> 53<p>Download Smart BootManager <uri link="http://btmgr.sourceforge.net/index.php3?body=download.html">http://btmgr.sourceforge.net/index.php3?body=download.html</uri>. Linux source or binary format and windows .exe versions are available as well as many language packs. However, at this time, the preferred method would be to use the binary format, as the source will not compile with newer versions of NASM.</p>
54 54
55<p>Either compile the package from source or just grab the binary. There are several options that can be utilized while creating your boot floppy, as seen below.</p> 55<p>Either compile the package from source or just grab the binary. There are several options that can be utilized while creating your boot floppy, as seen below.</p>
56 56
57<pre caption="Smart BootManager Options"> 57<pre caption="Smart BootManager Options">
58<i>sbminst [-t theme] [-d drv] [-b backup_file] [-u backup_file] 58<i>sbminst [-t theme] [-d drv] [-b backup_file] [-u backup_file]
74 0 is the first floppy drive 74 0 is the first floppy drive
75 128 is the first hard drive; 75 128 is the first hard drive;
76 76
77 -c disable CD-ROM booting feature; 77 -c disable CD-ROM booting feature;
78 78
79 -b backup_file backup the data that will be overwrited for 79 -b backup_file backup the data that will be overwritten for
80 future uninstallation; 80 future uninstallation;
81 81
82 -u backup_file uninstall Smart BootManager, should be used alone; 82 -u backup_file uninstall Smart BootManager, should be used alone;
83 83
84 -y do not ask any question or warning.</i> 84 -y do not ask any question or warning.</i>
122<body> 122<body>
123 123
124 124
125<p>Burn a LiveCD iso.</p> 125<p>Burn a LiveCD iso.</p>
126 126
127<p>Get the latest portage snapshot from <uri>http://distro.ibiblio.org/pub/linux/distributions/gentoo/snapshots/</uri> (or your favorite <uri link="http://www.gentoo.org/main/en/mirrors.xml">mirror</uri>). Either place this tarball on an existing partition on the box your are installing to, or burn it to a CD.</p> 127<p>Get the latest portage snapshot from <uri>http://distro.ibiblio.org/pub/linux/distributions/gentoo/snapshots/</uri> (or your favorite <uri link="http://www.gentoo.org/main/en/mirrors.xml">mirror</uri>). Either place this tarball on an existing partition on the computer your are installing to, or burn it to a CD.</p>
128 128
129<p>You'll also need a package list for the stage packages. Place the following dl-list.sh script on the same medium as the portage snapshot, you'll need it later.</p> 129<p>You'll also need a package list for the stage packages. Place the following dl-list.sh script on the same medium as the portage snapshot, you'll need it later.</p>
130 130
131<pre caption="dl-list.sh"> 131<pre caption="dl-list.sh">
132#!/bin/bash 132#!/bin/bash
295 295
296# remove temporary files and exit 296# remove temporary files and exit
297cleanup 0 297cleanup 0
298</pre> 298</pre>
299 299
300<p>Follow all instructions of Gentoo Install Doc up to "chroot /mnt/gentoo" in Step 8. If you only have one CD-ROM remember to use the <c>cdcache</c> option while booting so you can unmount the LiveCD and mount your portage snapshot CD.</p> 300<p>Follow all instructions of Gentoo Install Doc up to <c>chroot /mnt/gentoo</c> in Step 8. If you only have one CD-ROM remember to use the <c>cdcache</c> option while booting so you can unmount the LiveCD and mount your portage snapshot CD.</p>
301 301
302<p>Run "passwd" and get a new password for root. Open a new virtual console (Alt-F2) and login as root with your new password.</p> 302<p>Run <c>passwd</c> and set a new password for root. Open a new virtual console (Alt-F2) and login as root with your new password.</p>
303 303
304<p>On the new console (F2) continue with Install Doc up to running bootstrap.sh script.</p> 304<p>On the new console (F2) continue with the Install Doc up to running the bootstrap.sh script.</p>
305 305
306<p>Go back to the first console (Alt-F1, without chroot) and mount a second CD on <c>/mnt/gentoo/mnt/cdrom2</c>. Copy portage tarball from cdrom2 and unpack it to <c>/mnt/gentoo/usr/portage</c>. Further, grab the dl-list.sh script and place it in <c>/usr/sbin</c> and make it executable.</p> 306<p>Go back to the first console (Alt-F1, without chroot) and mount a second CD on <path>/mnt/gentoo/mnt/cdrom2</path>. Copy the portage tarball from cdrom2 and unpack it to <path>/mnt/gentoo/usr/portage</path>. Further, grab the dl-list.sh script and place it in <path>/usr/sbin</path> and make it executable.</p>
307 307
308<pre caption="Mount the snapshot cd"> 308<pre caption="Mount the snapshot cd">
309# <i>umount /mnt/cdrom</i> 309# <i>umount /mnt/cdrom</i>
310# <i>mkdir /mnt/gentoo/mnt/cdrom2</i> 310# <i>mkdir /mnt/gentoo/mnt/cdrom2</i>
311# <i>mount /dev/cdroms/cdrom0 /mnt/gentoo/mnt/cdrom2</i> 311# <i>mount /dev/cdroms/cdrom0 /mnt/gentoo/mnt/cdrom2</i>
314# <i>cd /mnt/gentoo/usr/portage</i> 314# <i>cd /mnt/gentoo/usr/portage</i>
315# <i>tar xvjpf portage-$date.tar.bz2</i> 315# <i>tar xvjpf portage-$date.tar.bz2</i>
316# <i>chmod +x /mnt/gentoo/usr/sbin/dl-list.sh</i> 316# <i>chmod +x /mnt/gentoo/usr/sbin/dl-list.sh</i>
317</pre> 317</pre>
318 318
319<p>Switch back to F2 console. Now if you try to run bootstrap.sh it will fail because it won't be able to download any files. We will fetch these files somewhere else and put them in /usr/portage/distfiles (on F2 console). </p> 319<p>Switch back to the F2 console. Now if you try to run bootstrap.sh it will fail because it won't be able to download any files. We will fetch these files somewhere else and put them in /usr/portage/distfiles (on F2 console). </p>
320 320
321<p>You need a list of Stage1 packages: glibc, baselayout, texinfo, gettext, zlib, binutils, gcc, ncurses plus their dependencies. </p> 321<p>You need a list of Stage1 packages: glibc, baselayout, texinfo, gettext, zlib, binutils, gcc, ncurses plus their dependencies. </p>
322 322
323<note>Note that you need the versions of each package synced with your portage tree.</note> 323<note>Note that you need the versions of each package synced with your portage tree.</note>
324 324
325 <p>Now us the dl-list.sh script to generate the package list that you need. Then copy the subsequent list to a floppy.</p> 325 <p>Now use the dl-list.sh script to generate the package list that you need. Then copy the subsequent list to a floppy.</p>
326 326
327<pre caption="Using dl-list.sh"> 327<pre caption="Using dl-list.sh">
328# <i>dl-list.sh glibc baselayout texinfo gettext zlib binutils gcc ncurses > stage1.list</i> 328# <i>dl-list.sh glibc baselayout texinfo gettext zlib binutils gcc ncurses > stage1.list</i>
329# <i>mount -t vfat /dev/fd0 /mnt/floppy</i> 329# <i>mount -t vfat /dev/fd0 /mnt/floppy</i>
330# <i>cp /mnt/gentoo/stage1.list /mnt/floppy</i> 330# <i>cp /mnt/gentoo/stage1.list /mnt/floppy</i>
331# <i>umount /mnt/floppy</i> 331# <i>umount /mnt/floppy</i>
332</pre> 332</pre>
333 333
334<p>Take the floppy to the machine that has fast access and feed this list to wget:</p> 334<p>Take the floppy to the computer that has fast access and feed this list to wget:</p>
335 335
336<pre caption="Use wget to grab your source packages"> 336<pre caption="Use wget to grab your source packages">
337# <i>wget -N -i stage1.list</i> 337# <i>wget -N -i stage1.list</i>
338</pre> 338</pre>
339 339
340 340
341 <p>Once you have obtained all the files, take them to the computer and copy them to <c>/mnt/gentoo/usr/portage/distfiles</c>. You will then be able to run <c>bootstrap.sh</c>. Repeate this same wget fetch and place procedure for stage2 and 3.</p> 341 <p>Once you have obtained all the files, take them to the computer and copy them to <path>/mnt/gentoo/usr/portage/distfiles</path>. You will then be able to run <c>bootstrap.sh</c>. Repeat this same wget fetch and place procedure for stage2 and 3.</p>
342 342
343 343
344 344
345</body> 345</body>
346</section> 346</section>
459 459
460<pre caption="/etc/inetd.conf"> 460<pre caption="/etc/inetd.conf">
461tftp dgram udp wait nobody /usr/sbin/tcpd in.tftpd 461tftp dgram udp wait nobody /usr/sbin/tcpd in.tftpd
462</pre> 462</pre>
463 463
464<p>To install the netkit tftp server under gentoo linux, emerge net-misc/netkit-tftp</p> 464<p>To install the netkit tftp server under Gentoo Linux, emerge net-misc/netkit-tftp</p>
465 465
466<note>There is an ebuild for xinetd... if you prefer to use this than feel free to do 466<note>There is an ebuild for xinetd... if you prefer to use this than feel free to do
467so. However I do not use xinetd, and do not know how to set up tftp with it. If you 467so. However I do not use xinetd, and do not know how to set up tftp with it. If you
468use it and such, please send me info on how to get xinetd working and I will include 468use it and such, please send me info on how to get xinetd working and I will include
469them in this howto.</note> 469them in this howto.</note>
470 470
471<p>Now that we have our tftp server ready, we need a kernel and a root initrd to 471<p>Now that we have our tftp server ready, we need a kernel and a root initrd to
472put in it. You can compile a custom kernel yourself, but make sure it has all the 472put in it. You can compile a custom kernel yourself, but make sure it has all the
473things necessary for running gentoo (like devfs) and for netbooting (like initrd 473things necessary for running Gentoo (like devfs) and for netbooting (like initrd
474support). The root initrd will be the rescue.gz included in the gentoo ISO.</p> 474support). The root initrd will be the rescue.gz included in the Gentoo ISO.</p>
475 475
476<impo>Mounting an ISO file without burning it to cd requires loopback filesystem 476<impo>Mounting an ISO file without burning it to cd requires loopback filesystem
477support.</impo> 477support.</impo>
478 478
479<pre> 479<pre>
482# <i>cp /mnt/cdrom/isolinux/kernel /mnt/cdrom/isolinux/rescue.gz /tftpboot</i> 482# <i>cp /mnt/cdrom/isolinux/kernel /mnt/cdrom/isolinux/rescue.gz /tftpboot</i>
483# <i>chmod 644 /tftpboot/*</i> 483# <i>chmod 644 /tftpboot/*</i>
484# <i>umount /mnt/cdrom/</i> 484# <i>umount /mnt/cdrom/</i>
485</pre> 485</pre>
486 486
487<p>Boot the machine you want to install to with your incredibly usefull grub floppy. 487<p>Boot the machine you want to install to with your incredibly useful grub floppy.
488Once booted you need to specify a way for the machine to get 488Once booted you need to specify a way for the machine to get
489its IP address, specify where 489its IP address, specify where
490to get a kernel and it's options, and where to get it's initrd.</p> 490to get a kernel and it's options, and where to get it's initrd.</p>
491 491
492<pre> 492<pre>
515<p>You will need a network card on the diskless client that uses the PXE protocol to boot, like many 3com cards. You will also need a BIOS that supports booting from PXE.</p> 515<p>You will need a network card on the diskless client that uses the PXE protocol to boot, like many 3com cards. You will also need a BIOS that supports booting from PXE.</p>
516</body></section> 516</body></section>
517 517
518<section><title>Server base setup</title> 518<section><title>Server base setup</title>
519<body> 519<body>
520 <p>Create directories: The first thing to do is to create the directories where your diskless system will be stored. Create a directory called <c>/diskless</c> which houses a directory for each diskless client. For the rest of this howto we'll be working on the client 'eta'.</p> 520 <p>Create directories: The first thing to do is to create the directories where your diskless system will be stored. Create a directory called <path>/diskless</path> which houses a directory for each diskless client. For the rest of this howto we'll be working on the client 'eta'.</p>
521 521
522<pre caption="directory setup"> 522<pre caption="directory setup">
523# <i>mkdir /diskless</i> 523# <i>mkdir /diskless</i>
524# <i>mkdir /diskless/eta</i> 524# <i>mkdir /diskless/eta</i>
525# <i>mkdir /diskless/eta/boot</i> 525# <i>mkdir /diskless/eta/boot</i>
526</pre> 526</pre>
527 527
528<p>DHCP and TFTP setup: The client will get boot informations using DHCP and download all the required files using TFTP. Just emerge DHCP and configure it for your basic needs. Then, add the following on <c>/etc/dhcp/dhcpd.conf</c>.</p> 528<p>DHCP and TFTP setup: The client will get boot informations using DHCP and download all the required files using TFTP. Just emerge DHCP and configure it for your basic needs. Then, add the following on <path>/etc/dhcp/dhcpd.conf</path>.</p>
529 529
530<note>This provide a static IP adress for the client and the path of a PXE boot image, here pxegrub. You have to replace the MAC address of the Ethernet card of the client and the directory where you will put the client files with the one you use.</note> 530<note>This provide a static IP address for the client and the path of a PXE boot image, here pxegrub. You have to replace the MAC address of the Ethernet card of the client and the directory where you will put the client files with the one you use.</note>
531 531
532<pre caption="dhcp.conf"> 532<pre caption="dhcp.conf">
533option option-150 code 150 = text ; 533option option-150 code 150 = text ;
534host eta { 534host eta {
535hardware ethernet 00:00:00:00:00:00; 535hardware ethernet 00:00:00:00:00:00;
537option option-150 "/eta/boot/grub.lst"; 537option option-150 "/eta/boot/grub.lst";
538filename "/eta/boot/pxegrub"; 538filename "/eta/boot/pxegrub";
539} 539}
540</pre> 540</pre>
541 541
542<p>For TFTP, emerge <c>app-admin/tftp-hpa</c>. In <c>/etc/conf.d/in.tftpd</c>, put the following :</p> 542<p>For TFTP, emerge <c>app-admin/tftp-hpa</c>. In <path>/etc/conf.d/in.tftpd</path>, put the following :</p>
543 543
544<pre caption="in.tftpd"> 544<pre caption="in.tftpd">
545INTFTPD_PATH="/diskless" 545INTFTPD_PATH="/diskless"
546INTFTPD_USER="nobody" 546INTFTPD_USER="nobody"
547INTFTPD_OPTS="-u ${INTFTPD_USER} -l -vvvvvv -p -c -s ${INTFTPD_PATH}" 547INTFTPD_OPTS="-u ${INTFTPD_USER} -l -vvvvvv -p -c -s ${INTFTPD_PATH}"
548</pre> 548</pre>
549 549
550<p>Setup GRUB: To provide PXE booting I use GRUB. You have to compile it by yourself to enable the PXE image compilation ... but that's quite easy. First, get the latest version of the GRUB source code (<c>emerge -f grub</c> will place the tarball in <c>/usr/portage/distfiles</c>). Copy the tarball to <c>/diskless</c> and then build it to make the pxe capable binary. Once the binary is built, copy it to the diskless client's boot directory. Then edit it's grub.lst config file.</p> 550<p>Setup GRUB: To provide PXE booting I use GRUB. You have to compile it by yourself to enable the PXE image compilation ... but that's quite easy. First, get the latest version of the GRUB source code (<c>emerge -f grub</c> will place the tarball in <path>/usr/portage/distfiles</path>). Copy the tarball to <path>/diskless</path> and then build it to make the pxe capable binary. Once the binary is built, copy it to the diskless client's boot directory. Then edit it's grub.lst config file.</p>
551 551
552<pre caption="grub setup"> 552<pre caption="grub setup">
553# <i>tar zxvf grub-0.92.tar.gz</i> 553# <i>tar zxvf grub-0.92.tar.gz</i>
554# <i>cd grub-0.92</i> 554# <i>cd grub-0.92</i>
555# <i>./configure --help</i> 555# <i>./configure --help</i>
572 572
573<codenote>For the nfsroot option, the IP address is the one of the server and </codenote> 573<codenote>For the nfsroot option, the IP address is the one of the server and </codenote>
574<codenote>the directory is the one where your diskless client files are located (on the server).</codenote> 574<codenote>the directory is the one where your diskless client files are located (on the server).</codenote>
575</pre> 575</pre>
576 576
577<p>Setup NFS: NFS is quite easy to configure. The only thing you have to do is to add a line on the <c>/etc/exports</c> config file :</p> 577<p>Setup NFS: NFS is quite easy to configure. The only thing you have to do is to add a line on the <path>/etc/exports</path> config file :</p>
578 578
579<pre caption="/etc/exports"> 579<pre caption="/etc/exports">
580# <i>nano -w /etc/exports</i> 580# <i>nano -w /etc/exports</i>
581NFS file systems being exported. See exports(5). 581NFS file systems being exported. See exports(5).
582/diskless/eta eta(rw,sync,no_root_squash) 582/diskless/eta eta(rw,sync,no_root_squash)
583</pre> 583</pre>
584 584
585<p>Update your hosts: One important thing to do now is to modify your <c>/etc/hosts</c> file to fit your needs. </p> 585<p>Update your hosts: One important thing to do now is to modify your <path>/etc/hosts</path> file to fit your needs. </p>
586 586
587<pre caption="/etc/hosts"> 587<pre caption="/etc/hosts">
588127.0.0.1 localhost 588127.0.0.1 localhost
589 589
590192.168.1.10 eta.example.com eta 590192.168.1.10 eta.example.com eta
595 595
596<section><title>Creating the system on the server</title> 596<section><title>Creating the system on the server</title>
597 597
598<body> 598<body>
599 599
600<p>Reboot the server on a Gentoo LiveCD. Follow the standard install procedure as explained in the Gentoo Install Howto BUT with the following differences. When you mount the file system, do the following (where hdaX is the partition where you created the /diskless directory). You do not need to mount any other partitions as all of the files will reside in the <c>/diskless/eta</c> directory.</p> 600<p>Reboot the server on a Gentoo LiveCD. Follow the standard install procedure as explained in the Gentoo Install Howto BUT with the following differences. When you mount the file system, do the following (where hdaX is the partition where you created the /diskless directory). You do not need to mount any other partitions as all of the files will reside in the <path>/diskless/eta</path> directory.</p>
601 601
602<pre caption="mounting the filesystem"> 602<pre caption="mounting the filesystem">
603#<i> mount /dev/hda3 /mnt/gentoo</i> 603#<i> mount /dev/hda3 /mnt/gentoo</i>
604</pre> 604</pre>
605 605
606<p>Stage tarballs and chroot: This example uses a stage3 tarball. Mount <c>/proc</c> to your diskless directory and chroot into it to continue with the install. Then follow the installation manual until kernel configuration.</p> 606<p>Stage tarballs and chroot: This example uses a stage3 tarball. Mount <path>/proc</path> to your diskless directory and chroot into it to continue with the install. Then follow the installation manual until kernel configuration.</p>
607 607
608<warn>Be very careful where you extract your stage tarball. You don't want to end up extracting over your existing installation.</warn> 608<warn>Be very careful where you extract your stage tarball. You don't want to end up extracting over your existing installation.</warn>
609 609
610<pre caption="extracting the stage tarball"> 610<pre caption="extracting the stage tarball">
611# <i>cd /mnt/gentoo/diskless/eta/</i> 611# <i>cd /mnt/gentoo/diskless/eta/</i>
635&lt;*&gt; NFS file system support 635&lt;*&gt; NFS file system support
636[*] Provide NFSv3 client support 636[*] Provide NFSv3 client support
637[*] Root file system on NFS 637[*] Root file system on NFS
638</pre> 638</pre>
639 639
640<p>Next configure your diskless client's <c>/etc/fstab</c>.</p> 640<p>Next configure your diskless client's <path>/etc/fstab</path>.</p>
641 641
642<pre caption="/etc/fstab"> 642<pre caption="/etc/fstab">
643# <i>nano -w /etc/fstab</i> 643# <i>nano -w /etc/fstab</i>
644/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0 644/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
645proc /proc proc defaults 0 0 645proc /proc proc defaults 0 0
646tmpfs /dev/shm tmpfs defaults 0 0 646tmpfs /dev/shm tmpfs defaults 0 0
647</pre> 647</pre>
648 648
649<p>Bootloader. Dont install another bootloader because we already have one - pxegrub. Simply finish the install and restart the server. Start the services you'll need to boot the new client: DHCP, TFTPD, and NFS.</p> 649<p>Bootloader. Don't install another bootloader because we already have one - pxegrub. Simply finish the install and restart the server. Start the services you'll need to boot the new client: DHCP, TFTPD, and NFS.</p>
650 650
651<pre caption="Starting services"> 651<pre caption="Starting services">
652# <i>/etc/init.d/dhcp start</i> 652# <i>/etc/init.d/dhcp start</i>
653# <i>/etc/init.d/tftpd start</i> 653# <i>/etc/init.d/tftpd start</i>
654# <i>/etc/init.d/nfs start</i> 654# <i>/etc/init.d/nfs start</i>
656 656
657</body></section> 657</body></section>
658 658
659<section><title>Booting the new client</title> 659<section><title>Booting the new client</title>
660<body> 660<body>
661<p>For the new client to boot properly, you'll need to configure the bios and the network card to use PXE as the first boot method - before CD-ROM or floppy. For help with this consult your hardware manuals or maufacturers website. The network card should get an IP address using DHCP and download the GRUB PXE image using TFTP. Then, you should see a nice black and white GRUB bootmenu where you will select the kernel to boot and press Enter. If everything is ok the kernel should boot, mount the root filesystem using NFS and provide you with a login prompt. Enjoy.</p> 661<p>For the new client to boot properly, you'll need to configure the bios and the network card to use PXE as the first boot method - before CD-ROM or floppy. For help with this consult your hardware manuals or manufacturers website. The network card should get an IP address using DHCP and download the GRUB PXE image using TFTP. Then, you should see a nice black and white GRUB bootmenu where you will select the kernel to boot and press Enter. If everything is ok the kernel should boot, mount the root filesystem using NFS and provide you with a login prompt. Enjoy.</p>
662</body></section> 662</body></section>
663 663
664</chapter> 664</chapter>
665 665
666 666
677</body> 677</body>
678</section> 678</section>
679 679
680<section> <title> Overview </title> 680<section> <title> Overview </title>
681<body> 681<body>
682<p>We will first allocate a partition to Gentoo by resizing our existing Linux partition, mount the partition, untar the tarball that is mounted, chroot inside the proto-system and start building. Once the bootstrap process is done, we will do some final configuration on the system so as to make sure it boots, then we are ready to reboot and use Gentoo. </p> 682<p>We will first allocate a partition to Gentoo by resizing our existing Linux partition, mount the partition, untar the tarball that is mounted, chroot inside the psuedo-system and start building. Once the bootstrap process is done, we will do some final configuration on the system so as to make sure it boots, then we are ready to reboot and use Gentoo. </p>
683</body> 683</body>
684</section> 684</section>
685 685
686<section> <title> How should we make space for gentoo? </title> 686<section> <title> How should we make space for Gentoo? </title>
687<body> 687<body>
688 688
689<p> 689<p>
690The root partition is the filesystem mounted under "/". A quick run of mount on my system shows what I am talking about. We well also use df (disk free) to see how much space I have left and how I will be resizing. Note that it is not mandatory to resize your root partition! You could be resizing anything else supported by our resizer, but let's talk about that later.</p> 690The root partition is the filesystem mounted under <path>/</path>. A quick run of mount on my system shows what I am talking about. We well also use df (disk free) to see how much space I have left and how I will be resizing. Note that it is not mandatory to resize your root partition! You could be resizing anything else supported by our resizer, but let's talk about that later.</p>
691 691
692 692
693<pre caption="Filesystem information"> 693<pre caption="Filesystem information">
694# <i>mount</i> 694# <i>mount</i>
695/dev/hdb2 on / type ext3 (rw) 695/dev/hdb2 on / type ext3 (rw)
700Filesystem Size Used Avail Use% Mounted on 700Filesystem Size Used Avail Use% Mounted on
701/dev/hdb2 4.0G 1.9G 2.4G 82% / 701/dev/hdb2 4.0G 1.9G 2.4G 82% /
702none 38M 0 38M 0% /dev/shm 702none 38M 0 38M 0% /dev/shm
703</pre> 703</pre>
704 704
705<p>As we can see, the partition mounted as "/" named /dev/hdb2 has 2.4 gigabytes free. In my case, I think I will resize it as to leave 400Megs free of space, therefore allocating 2 gigabytes for Gentoo. Not bad, I could have quite some stuff installed. However, think that even one gigabyte is enough for most users. So let's partition this thing! </p> 705<p>As we can see, the partition mounted as <path>/</path> named <path>/dev/hdb2</path> has 2.4 gigabytes free. In my case, I think I will resize it as to leave 400Megs free of space, therefore allocating 2 gigabytes for Gentoo. Not bad, I could have quite some stuff installed. However, think that even one gigabyte is enough for most users. So let's partition this thing! </p>
706 706
707</body> </section> 707</body> </section>
708 708
709<section> <title> Building parted to resize partition </title> 709<section> <title> Building parted to resize partition </title>
710<body> 710<body>
716do the job. It's the reader's job to check them out </note> 716do the job. It's the reader's job to check them out </note>
717 717
718<p> 718<p>
719Look up on that page the type of filesystem you want to resize and see if parted 719Look up on that page the type of filesystem you want to resize and see if parted
720can do it. If not, you're out of luck, you will have to destroy some partition 720can do it. If not, you're out of luck, you will have to destroy some partition
721to make space for gentoo, and reinstall back. Go ahead by downloading the 721to make space for Gentoo, and reinstall back. Go ahead by downloading the
722software, install it. Here we have a problem. We want to resize our Linux root 722software, install it. Here we have a problem. We want to resize our Linux root
723partition, therefore we must boot from a floppy disk a minimal linux system and 723partition, therefore we must boot from a floppy disk a minimal linux system and
724use previously-compiled parted copied to a diskette in order to resize "/". 724use previously-compiled parted copied to a diskette in order to resize <path>/</path>.
725However, if you can unmount the partition while still in Linux you are lucky, 725However, if you can unmount the partition while still in Linux you are lucky,
726you don't need to do what follows. Just compile parted and run it on an 726you don't need to do what follows. Just compile parted and run it on an
727unmounted partition you chose to resize. Here's how I did it for my system. 727unmounted partition you chose to resize. Here's how I did it for my system.
728</p> 728</p>
729 729
730<impo> Make sure that the operations you want to do on your partition are 730<impo> Make sure that the operations you want to do on your partition are
731supported by parted! </impo> 731supported by parted! </impo>
732 732
733<p> Get tomsrtbt boot/root disk (free of charge) from <uri> 733<p> Get tomsrtbt boot/root disk (free of charge) from <uri>
734http://freshmeat.net/tomsrtbt" </uri>, create a floppy as suggested in the 734http://freshmeat.net/tomsrtbt </uri>, create a floppy as suggested in the
735Documentation that accompanies the software package and insert a new floppy in 735Documentation that accompanies the software package and insert a new floppy in
736the drive for the next step. </p> 736the drive for the next step. </p>
737 737
738<note> Note again that Linux is synonym of "There's one more way to do it". Your 738<note> Note again that Linux is synonym of "There's one more way to do it". Your
739objective is to run parted on an unmounted partition so it can do its work. You 739objective is to run parted on an unmounted partition so it can do its work. You
765Reboot your system with the tomsrtbt boot disk (just pop it inside), and once 765Reboot your system with the tomsrtbt boot disk (just pop it inside), and once
766you are logged in, switch the disk in the drive with your utility disk we have 766you are logged in, switch the disk in the drive with your utility disk we have
767created above and type mount /dev/fd0 /floppy to have parted under /floppy. 767created above and type mount /dev/fd0 /floppy to have parted under /floppy.
768There you go. Run parted and you will be able to resize your partition. Once 768There you go. Run parted and you will be able to resize your partition. Once
769this lenghty process done, we are ready to have the real fun, by installing 769this lenghty process done, we are ready to have the real fun, by installing
770gentoo. Reboot back into your old Linux system for now. Drive you wish to 770Gentoo. Reboot back into your old Linux system for now. Drive you wish to
771operate on is the drive containing the partition we want to resize. For 771operate on is the drive containing the partition we want to resize. For
772example, if we want to resize /dev/hda3, the drive is /dev/hda 772example, if we want to resize /dev/hda3, the drive is /dev/hda
773</p> 773</p>
774 774
775<pre caption="Commands to run once logged into tomsrtbt system"> 775<pre caption="Commands to run once logged into tomsrtbt system">

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.20