From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 7D22D138322 for ; Mon, 7 Jan 2013 03:06:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 86C3E21C070; Mon, 7 Jan 2013 03:06:41 +0000 (UTC) Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by pigeon.gentoo.org (Postfix) with ESMTP id 3BC7221C070 for ; Mon, 7 Jan 2013 03:05:30 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq4NAG6Zu0/O+KRL/2dsb2JhbABEgXuwewOBGIEIglYcXxMhBSUkEwmIBQuYR6E3i2KEAGIDiEKEfIdchV+IOoFYgwc X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="211519285" Received: from 206-248-164-75.dsl.teksavvy.com (HELO waltdnes.org) ([206.248.164.75]) by ironport2-out.teksavvy.com with SMTP; 06 Jan 2013 22:05:28 -0500 Received: by waltdnes.org (sSMTP sendmail emulation); Sun, 06 Jan 2013 22:05:08 -0500 From: "Walter Dnes" Date: Sun, 6 Jan 2013 22:05:08 -0500 To: Gentoo Users List Subject: [gentoo-user] Install from USB stick; here's how Message-ID: <20130107030508.GA22701@waltdnes.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Archives-Salt: 35d43a44-e622-4cc2-bcce-d624a03f09d6 X-Archives-Hash: 7f9b916453c13b05c96ba101c178975c For those of you who don't want to do the tap-dance listed at... http://www.gentoo.org/doc/en/liveusb.xml * My netbook's harddrive is normally /dev/sda, except when I boot from a USB stick. The stick will become /dev/sda and the harddrive becomes /dev/sdb * My desktop's harddrive is also /dev/sda. I took the linux minimal install ISO, ran isohybrid on it, with the command... isohybrid install-x86-minimal-20121213.iso If you don't have isohybrid... emerge sys-boot/syslinux * I then copied it over to a USB stick (/dev/sdb) with the command... dd bs=4M if=install-x86-minimal-20121213.iso of=/dev/sdb Note that it's just the device letter. There is no partition number. Your letter may be different. Note also that the USB stick must *NOT* be mounted. - WARNING - be absolutely certain you have the letter right. E.g. using your harddrive's device letter would zap your harddrive. * I booted from the USB key and had an uneventful install. There were a few differences... - stuff that would normally be done to /dev/sda was done to /dev/sdb, because the USB stick with the install ISO was /dev/sda - I don't know if it was the install-from-USB, or my weird lan (192.168.123.248/248), but net-setup did not take for my wired eth0 address. I ran ifconfig and route manually. - lilo had to be set up differently for the first boot. This is a section in its own right * lilo will be written when the netbook's harddrive is /dev/sdb, but when the USB key is removed, it will boot with the harddrive as /dev/sda. lilo does not allow you to specify a non-existant partition in the "image" root section. But fortunately, you can do so in the "append" line, and even more fortunately, the "append" line overrides the "image" root section. Here's what I did... - WARNING - Change the "# MBR to install LILO to:" section to # MBR to install LILO to: boot = /dev/sdb The default /dev/sda will overwrite the boot record of the install USB stick, and not update your harddrive - Since my root is on partition ID 6, I set the image entry like so. Adjust for your system image = /boot/kernel-production root = /dev/sdb6 label = Production read-only # read-only for checking append = "root=/dev/sda6" Note that the main entry specifies root as /dev/sdb6 but the append entry specifies root as root=/dev/sda6. - run the "lilo" command. It will issue a warning about not going to the first disc; ignore the warning. Reboot, and remember to take out the USB stick before the system can boot from it. - First thing to do after the first boot is to edit /etc/lilo.conf to normal values; i.e. usually put "/dev/sda" in as expected # MBR to install LILO to: boot = /dev/sda image = /boot/kernel-production root = /dev/sda6 label = Production read-only # read-only for checking append = "" Adjust for your system. Then run lilo. You now have a standard lilo setup. * You can keep the USB stick as "rescue CD on a USB stick". If you want to return the USB stick to normal use, you'll have to zero out the first sector before you can repartition and reformat it. The command (assuming the stick is /dev/sdb) is... dd count=1 bs=512 if=/dev/zero of=/dev/sdb - WARNING - be absolutely certain you have the letter right. E.g. using your harddrive's device letter would zap your harddrive. -- Walter Dnes I don't run "desktop environments"; I run useful applications