neysx 07/05/10 15:51:09 Modified: liveusb.xml Log: #173117 update to 2007.0
Revision Changes Path 1.13 xml/htdocs/doc/en/liveusb.xml file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/liveusb.xml?rev=1.13&view=markup plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/liveusb.xml?rev=1.13&content-type=text/plain diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/liveusb.xml?r1=1.12&r2=1.13 Index: liveusb.xml =================================================================== RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/liveusb.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- liveusb.xml 22 Dec 2006 07:33:38 -0000 1.12 +++ liveusb.xml 10 May 2007 15:51:09 -0000 1.13 @@ -1,6 +1,6 @@ <?xml version='1.0' encoding="UTF-8"?> <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> -<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/liveusb.xml,v 1.12 2006/12/22 07:33:38 nightmorph Exp $ --> +<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/liveusb.xml,v 1.13 2007/05/10 15:51:09 neysx Exp $ --> <guide link="/doc/en/liveusb.xml"> <title>Gentoo Linux LiveUSB HOWTO</title> @@ -8,18 +8,21 @@ <author title="Author"> <mail link="[EMAIL PROTECTED]">Henrik Brix Andersen</mail> </author> +<author title="Editor"> + <mail link="[EMAIL PROTECTED]">Xavier Neys</mail> +</author> <abstract> This HOWTO explains how to create a Gentoo Linux LiveUSB or, in other words, -how to emulate a Gentoo Linux Installation CD using an USB flash drive. +how to emulate an x86 or AMD64 Gentoo Linux LiveCD using a USB flash drive. </abstract> <!-- The content of this document is licensed under the CC-BY-SA license --> <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> <license/> -<version>1.7</version> -<date>2006-12-21</date> +<version>2</version> +<date>2007-05-10</date> <chapter> <title>Introduction</title> @@ -29,15 +32,15 @@ <p> This HOWTO explains how to create a <e>Gentoo Linux LiveUSB</e> or, in other -words, how to emulate a Gentoo Linux Installation CD using an USB flash drive. -This is particularly useful for installing Gentoo Linux on a modern laptop with -no CD-ROM drive. +words, how to emulate an x86 or AMD64 Gentoo Linux LiveCD using a USB flash +drive. This is particularly useful for installing Gentoo Linux on a modern +laptop with no CD-ROM drive. </p> <p> Although the instructions found in this document aim at emulating a Gentoo -Linux Installation CD using an USB flash drive, they should work for any -arbitrary block device as long as you adjust the device names accordingly. +Linux LiveCD using a USB flash drive, they should work for any arbitrary block +device as long as you adjust the device names accordingly. </p> </body> @@ -51,10 +54,8 @@ </p> <ul> - <li>Bootable USB flash drive (at least 64MB)</li> - <li> - x86 computer with support for booting from USB - </li> + <li>Bootable USB flash drive with at least 1GB</li> + <li>i686 or x86_64 computer with support for booting from USB</li> </ul> <p> @@ -68,6 +69,14 @@ </li> </ul> +<note> +If you want to use the minimal CD on a smaller key or boot a <i686 system, +you need to follow the procedure described in this document with a +<b>2006.0</b> minimal CD image because of a <uri +link="http://bugs.gentoo.org/show_bug.cgi?id=173117">bug</uri> in more recent +releases. +</note> + </body> </section> </chapter> @@ -83,25 +92,29 @@ </warn> <impo> -This HOWTO assumes that the <path>/dev/sda</path> device node corresponds to +This HOWTO assumes that the <path>/dev/sdc</path> device node corresponds to your USB flash drive. If you have other SCSI-like devices make sure to use the correct device node. </impo> <p> -Create a FAT32 partition on your USB flash drive and mark it bootable using +Create a FAT16 partition on your USB flash drive and mark it bootable using <c>fdisk</c>. An example partitioning scheme can be seen below: </p> +<note> +If your key is 4GB or larger, use partition type <c>b</c> (W95 FAT32). +</note> + <pre caption="Example partitioning scheme"> -# <i>fdisk -l /dev/sda</i> +# <i>fdisk -l /dev/sdc</i> -Disk /dev/sda: 1048 MB, 1048313856 bytes -33 heads, 61 sectors/track, 1017 cylinders -Units = cylinders of 2013 * 512 = 1030656 bytes +Disk /dev/sdc: 2063 MB, 2063597056 bytes +255 heads, 63 sectors/track, 250 cylinders +Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System -/dev/sda1 * 1 1017 1023580 b W95 FAT32 +/dev/sdc1 * 1 250 2008124+ 6 FAT16 </pre> </body> @@ -111,13 +124,17 @@ <body> <p> -Create a FAT32 filesystem on the USB flash drive using <c>mkdosfs</c>: +Create a FAT16 filesystem on the USB flash drive using <c>mkdosfs</c>: </p> +<note> +If your key is 4GB or larger, use <c>-F 32</c> to create a FAT32 filesystem. +</note> + <pre caption="Running mkdosfs"> <comment>(Make sure you have sys-fs/dosfstools installed)</comment> # <i>emerge -av sys-fs/dosfstools</i> -# <i>mkdosfs -F 32 /dev/sda1</i> +# <i>mkdosfs -F 16 /dev/sdc1</i> mkdosfs 2.11 (12 Mar 2005) </pre> @@ -135,35 +152,33 @@ <pre caption="Installing a master boot record"> <comment>(Make sure you have sys-boot/syslinux-3.00 or later installed)</comment> # <i>emerge -av '>sys-boot/syslinux-3'</i> -# <i>dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda</i> +# <i>dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdc</i> 0+1 records in 0+1 records out +304 bytes (304 B) copied, 0.0162317 s, 18.7 kB/s </pre> </body> </section> </chapter> + <chapter> -<title>Copying the files</title> +<title>Copying the files to your key</title> <section> <title>Mounting the Gentoo Linux Installation CD</title> <body> -<warn> -This guide is designed only to be used with Gentoo 2006.0. Do not attempt to -use a 2006.1 CD or newer; you will end up with an unbootable USB disk. -</warn> - <p> -Download the <path>install-x86-minimal-2006.0.iso</path> file from your -local Gentoo Linux <uri link="/main/en/where.xml">mirror</uri> site and mount -the ISO image on <path>/mnt/cdrom/</path> as shown below: +Download either <path>livecd-i686-installer-2007.0.iso</path> or +<path>livecd-amd64-installer-2007.0.iso</path> from your local Gentoo Linux +<uri link="/main/en/where.xml">mirror</uri> site and mount the ISO image on +<path>/mnt/cdrom</path> as shown below: </p> <pre caption="Mounting the Gentoo Linux Installation CD ISO image"> -<comment>(Create the /mnt/cdrom/ mount point if needed)</comment> +<comment>(Create the /mnt/cdrom mount point if needed)</comment> # <i>mkdir -p /mnt/cdrom</i> -# <i>mount -o loop,ro -t iso9660 install-x86-minimal-2006.0.iso /mnt/cdrom/</i> +# <i>mount -o loop,ro -t iso9660 livecd-i686-installer-2007.0.iso /mnt/cdrom</i> </pre> <note> @@ -179,14 +194,14 @@ <body> <p> -Mount the newly formatted USB flash drive on <path>/mnt/usb/</path> as shown +Mount the newly formatted USB flash drive on <path>/mnt/usb</path> as shown below: </p> <pre caption="Mounting the USB flash drive"> -<comment>(Create the /mnt/usb/ mount point if needed)</comment> +<comment>(Create the /mnt/usb mount point if needed)</comment> # <i>mkdir -p /mnt/usb</i> -# <i>mount -t vfat /dev/sda1 /mnt/usb/</i> +# <i>mount -t vfat /dev/sdc1 /mnt/usb</i> </pre> </body> @@ -202,8 +217,8 @@ </p> <pre caption="Copying the files"> -# <i>cp -r /mnt/cdrom/* /mnt/usb/</i> -# <i>mv /mnt/usb/isolinux/* /mnt/usb/</i> +# <i>cp -r /mnt/cdrom/* /mnt/usb</i> +# <i>mv /mnt/usb/isolinux/* /mnt/usb</i> # <i>mv /mnt/usb/isolinux.cfg /mnt/usb/syslinux.cfg</i> # <i>rm -rf /mnt/usb/isolinux*</i> @@ -216,7 +231,7 @@ </p> <pre caption="Unmounting the ISO image"> -# <i>umount /mnt/cdrom/</i> +# <i>umount /mnt/cdrom</i> </pre> </body> @@ -227,68 +242,22 @@ <p> Adjust the syslinux configuration file using <c>sed</c> as shown below. The -<c>dobladecenter</c> parameter will introduce some extra delays before -attempting to mount the filesystem. This is needed to allow the USB -flash drive to settle upon detection. +<c>slowusb</c> parameter will introduce some extra delays before attempting to +mount the filesystem. This is needed to allow the USB flash drive to settle +upon detection. </p> <pre caption="Adjusting the boot parameters"> # <i>sed -i \ - -e "s:cdroot:cdroot dobladecenter:" \ + -e "s:cdroot:cdroot slowusb:" \ -e "s:kernel memtest86:kernel memtest:" \ /mnt/usb/syslinux.cfg</i> </pre> -<note> -Consider adding <c>docache</c> to the boot parameters. This will allow running -<c>umount /mnt/cdrom/</c> after booting so that you can unplug the USB flash -drive. Do not enable this unless the target computer has at least 128MB RAM. -</note> - -<!-- -(2006.1 workaround) posted by nightmorph - -Background: -After some lengthy discussion with Robin Johnson (robbat2) on IRC, it turns out -that the reason why 2006.1 fails to work with this guide is because inside the -initramfs, it specifies -t iso9660..but usb flash isn't this filetype, it's -vfat. 2006.0 was much better and just specified mount -t auto. so the thing is -to install an ~arch version of genkernel (3.4.4, still ~arch as of 2006-11-04) -and reconfigure syslinux.config to point at the renamed files. - -Obviously, unmasking an ~arch version is never desirable in documentation, so we -need some more alternatives...since 3.4.4 was only created at the end of -october; not likely to go stable all that soon. - -Procedure: -After adjusting the parameters, and before the disk is unmounted/bootloader -installed, the following must be done for ~arch genkernel. Please replace (dash) -with an actual - , since the damned xmllint throws a "comment not terminated" -error. - -# echo "sys-kernel/genkernel" >> /etc/portage/package.keywords -# genkernel (dash)(dash)bootdir=/mnt/usb (dash)(dash)install all -(not sure if syslinux has been installed previously yet) -# nano -w syslinux.cfg -(Edit it to point at the new filenames installed by genkernel) -(might be worth renaming to the ones normally used by syslinux, as -if the kernel name is too long, "vfat might bite") - -(might need to re-run syslinux as specified below to pick up the new names, -though maybe this renaming step should be in the section below?) -# syslinux /dev/sda1 - -TODO: -- if/when this document changes, brix requested some time ago that he be renamed -"Original Author" and be moved to the bottom of the credits list. -- if/when this fix goes in, robbat2 deserves credit: this is his solution after - all, and it works. - ---> - </body> </section> </chapter> + <chapter> <title>Installing a bootloader</title> <section> @@ -300,7 +269,7 @@ </p> <pre caption="Unmounting the USB flash drive"> -# <i>umount /mnt/usb/</i> +# <i>umount /mnt/usb</i> </pre> </body> @@ -314,11 +283,11 @@ </p> <pre caption="Running syslinux"> -# <i>syslinux /dev/sda1</i> +# <i>syslinux /dev/sdc1</i> </pre> <impo> -You will need to rerun <c>syslinux /dev/sda1</c> each time you modify the +You will need to rerun <c>syslinux /dev/sdc1</c> each time you modify the <path>syslinux.cfg</path> file for the configuration changes to take affect. </impo> -- [EMAIL PROTECTED] mailing list
