[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to install Debian 7 to external hard disk



Continuing my long story below.

(Stupid google mail web client. I guess I need to install mutt, since
I'm finding sylpheed too limiting and clumsy. Or simply take the time
to set up the filters and actions in sylpheed. No, claws does not do
it for me, except on MSWindows. Bleaugh.)

On Mon, Aug 26, 2013 at 10:04 PM, Joel Rees <joel.rees@gmail.com> wrote:
> On Mon, Aug 26, 2013 at 7:29 PM, C.T.F. Jansen
> <frank.jansen@actrix.gen.nz> wrote:
>> Greetings,
>>
>> Is there a preferred way to install Debian 7 from DVD to an external (USB)
>> hard disk ?
>
> Several. Take your pick.
>
>> The whole external hard disk is to be used instead of the internal hard
>> disk.
>
> That makes things much easier.
>
>> This is to  experiment with the new release (and discover fish hooks
>> like graphics that don't work) while leaving the internal hard disk with the
>> production Debian 6 on it completely alone.
>
> Many of us do things like that.
>
>> One then boots from either the external hard disk or the internal hard disk.
>
> And you can switch it from the BIOS or via Grub, if your BIOS supports
> booting from USB.
>
>> A live Debian is not to be set up.
>
> Yeah, no particular need to set up a live image, since a normal
> install will work fine.
>
>> Grub and the rest of the boot processing
>> also goes on the external hard disk.
>
> That's the key to the install, really.
>
> Well, as has been mentioned, you don't need to install Grub on the
> external disk if you're okay with pointing to the external disk in
> your internal grub.
>
> On the other hand, if you intend to switch via the BIOS, you need to
> check that the BIOS supports booting from a USB device, and that boot
> from USB is enabled. Some BIOSes let you hit one key to pick a boot
> device and another to enter the BIOS. If you only have the option to
> enter the BIOS, you'll have to adjust the boot priority, which may be
> a security issue (requiring switching the priority back when you're
> satisfied with the test results).
>
>> To set this up, at what stage in the install process does one actually put
>> the new release on to the external disk ?
>
> At the partitioning stage.
>
> I would install gparted before I do the install and pre-partition the
> external drive. (More tools available to make sure you're getting the
> partitioning the way you want it.) You can check the partition map,
> the drive labels (which may change, particularly when you change boot
> priorities in the BIOS) and the UUIDs. Write the labels, sizes, and
> UUIDs for the drives and partitions down.

paths. "/dev/sda1" style paths, too. Write those down, even though
they might change.

(I'm not the only one who gets confused by "label" labels and "path" "labels".)

> Especially the UUIDs, even through they are long and a pain to write
> down. You probably will only need the first four to eight hex digitis
> of the UUIDs, you'll be able to tell when you look.
>
> Command line tools:
>
> df, especially "df -h", is useful for looking at existing partition sizes.
>
> "ls -l /dev/disk/", and of the four sub-directories there, is useful
> to see UUIDs and labels of existing partitions, and match them with
> the drives.
>
> (If you're really, really comfortable with command-line tools, you may
> prefer parted to gparted.)
>
> Even if you don't pre-partition, at least look at the partitions and
> write their sizes, labels, and UUIDs down.
>
> (The part of the label that can change is the drive letter. Partition
> number within the drive is stable.)

(path. I mean "path" here, in modern parlance.)

>> Does one need to also tell the install program where to put grub ?

Yes. In the past you could tell the installer to put a pointer in
existing Grubs for you in addition to putting Grub on the target disk,
and other interesting combinations. I don't think you want to trust
that with Grub2. (And old Grub doesn't seem to work very well any
more, I'm sure not sure why.)

You may end up hand-editing the Grub boot entries, but you need Grub
itself installed on the external drive to BIOS-boot from the external
drive. Be sure not to let it re-write Grub on your internal drive.
That's trying to fix something that ain't broke, as you know. If you
add Grub entries to the internal Grub, do it by hand. A
rescue/netinstall CD or a live CD may be of use here. Not to install,
just to make sure you don't get trapped.

>> or does
>> it do that automatically ?

It will offer to do it automatically. Automatic has always done what I
didn't want it to, especially when I have existing installs that I
want to multi-boot.

>> Is there any other special configuration one needs to do to properly put the
>> new release on to the external hard disk ?

Just make sure you don't let it pick the install target or cut/choose
the partitions for you.

Even if you pre-partition the external drive, the installer will ask
you which partition is root.

What you do is choose to run the partition step manually. All manually.

If your partitions are pre-cut, you still use the partitioning step to
tell the installer which partition is for /, /var, /usr, /home, etc.

>> It is vastly preferable not to unplug the internal hard disk or otherwise
>> disrupt the functioning system.

You may find that you'll want to change /etc/fstab to use UUIDs
instead of /dev/sda1-style paths. (And there are those other labels,
which get confusing to me, but I mostly ignore them. They are sort-of
stable, but they have their own drawbacks. UUIDs seem to be the most
reliable.)

>> Of course the internal hard disk will be backed up before the attempted
>> install ...

(Famous last words ...)

>> Thanks for any information.
>>
>> frank.jansen@actrix.gen.nz, ZL2TTS

--
Joel Rees


Reply to: