public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Install from USB stick; here's how
@ 2013-01-07  3:05 Walter Dnes
  2013-01-07 13:08 ` Bruce Hill
  2013-09-03 17:05 ` [gentoo-user] " Grant Edwards
  0 siblings, 2 replies; 18+ messages in thread
From: Walter Dnes @ 2013-01-07  3:05 UTC (permalink / raw
  To: Gentoo Users List

  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 <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-09-07 23:58 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-07  3:05 [gentoo-user] Install from USB stick; here's how Walter Dnes
2013-01-07 13:08 ` Bruce Hill
2013-09-03 17:05 ` [gentoo-user] " Grant Edwards
2013-09-03 20:33   ` Walter Dnes
2013-09-03 21:16     ` Grant Edwards
2013-09-03 20:50   ` Alan McKinnon
2013-09-03 21:19     ` Grant Edwards
2013-09-03 21:25       ` Alan McKinnon
2013-09-03 22:13         ` Grant Edwards
2013-09-04  5:00           ` Walter Dnes
2013-09-04 14:07             ` Grant Edwards
2013-09-04  8:08           ` Alan McKinnon
2013-09-04  9:17   ` thegeezer
2013-09-04 19:41   ` Walter Dnes
2013-09-04 21:59     ` Grant Edwards
2013-09-06 20:21       ` Walter Dnes
2013-09-07 12:31         ` Grant Edwards
2013-09-07 23:57           ` Walter Dnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox