From: "Walter Dnes" <waltdnes@waltdnes.org>
To: Gentoo Users List <gentoo-user@lists.gentoo.org>
Subject: [gentoo-user] Install from USB stick; here's how
Date: Sun, 6 Jan 2013 22:05:08 -0500 [thread overview]
Message-ID: <20130107030508.GA22701@waltdnes.org> (raw)
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
next reply other threads:[~2013-01-07 3:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-07 3:05 Walter Dnes [this message]
2013-01-07 13:08 ` [gentoo-user] Install from USB stick; here's how 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130107030508.GA22701@waltdnes.org \
--to=waltdnes@waltdnes.org \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox