Re: question about installing debian or some linux system on an external hard drive

2021-02-10 Thread David Christensen

On 2021-02-10 02:58, Semih Ozlem wrote:

Hi everyone,

Is it possible and sensible to install debian or a linux system to an
external hard drive connected to a system via the usb port, while keeping
the current hard drive on the machine unchanged?



Yes, but:

1.  Document your CMOS settings.  A camera helps.

2.  Backup your data and your existing operating system first, using the 
tools provided with that operating system.  You will want an external 
hard disk drive to hold the backup images.  It's good to have two or 
more devices for backups, and store at least one off-site.


3.  Disconnect all other drives while experimenting with Debian.  You 
will make mistakes, and recovery is non-trivial and time consuming at best.



Start by installing Debian onto a USB flash drive.  These are cheap and, 
in most x86 PC's, you can install Debian onto a USB flash drive just 
like any other drive.  You will need to become familiar with the CMOS 
setup utility.  When you're done, you will have a portable Debian system 
that works in most x86 PC's.  Interactive performance will be choppy 
(because the RAM buffer in USB flash drives is tiny), but it works and 
you will be getting good experience in Debian installation and 
administration.




Where does one install grub2 and is grub2 to be installed before or after
the installation of the auxiliary system on the external hard drive?
What are the various options for disk partitioning 



AIUI the Debian installer (d-i) chooses MBR if you boot with BIOS and 
chooses GPT if you boot with EUFI.  I use BIOS because all of my x86 
computers support BIOS.  When I installed debian-9.9.0-amd64-xfce-CD-1 
on this machine, the d-i asked "Install GRUB into master boot record" 
and I answered "Yes".




and if one intends to
use docker as well would this change disk partitioning in particular
logical volume management?



In the d-i, I choose "manual" partitioning, erase the existing partition 
table, create a new partition table, and create three partitions:


1.  1 GB ext4 mounted at /boot

2.  1 GB random key encrypted swap

3.  12 GB passphrase encrypted ext4 mounted at / (root)


After the system is built, there will be at least one partition table 
entry available and whatever space is left on the device.  I'll let 
people familiar with Docker suggest how to best use those.




I have already viewed documents on debian website, but I am still unsure
about the definitive steps.


Go for it.  Take the time to document your work.  Use another computer 
and a camera.  Do research, download/ upload/ copy files, burn optical 
disks/ flash drives, type notes, take photographs, take videos, etc.. 
Don't be afraid to power down, grab another USB stick, and try again.



David



Re: question about installing debian or some linux system on an external hard drive

2021-02-09 Thread Dan Ritter
Semih Ozlem wrote: 
> Is it possible and sensible to install debian or a linux system to an
> external hard drive connected to a system via the usb port, while keeping
> the current hard drive on the machine unchanged?

As a temporary measure, this is reasonable. USB-connected drives
tend to be much less reliable than internal drives (SATA or
NVMe).

Your computer will need to support booting from that drive.
Almost all computers do support booting from USB disks.

> Where does one install grub2 and is grub2 to be installed before or after
> the installation of the auxiliary system on the external hard drive?

grub2 will generally be installed by the operating system
installer during the installation process. In this case you
would want grub2 installed on the MBR (master boot record) of
the external disk, and use the computer's BIOS or EFI to select
that disk at power-on time.

> What are the various options for disk partitioning and if one intends to
> use docker as well would this change disk partitioning in particular
> logical volume management?

Disks generally use either the MSDOS partition table or a GPT
partition table. The number and layout of partitions is a very
complex subject, but if you don't know what you are doing, it is 
reasonable to have a single-drive system have:

EFI (if needed)
swap 
root 

as a simplest case, or

EFI
swap
root
home

(which preserves home in the case of reinstalls)

Docker does not really affect this. 

Can you tell us more about the hardware and what you're planning
to do with it?

-dsr-




question about installing debian or some linux system on an external hard drive

2021-02-09 Thread Semih Ozlem
Hi everyone,

Is it possible and sensible to install debian or a linux system to an
external hard drive connected to a system via the usb port, while keeping
the current hard drive on the machine unchanged?

Where does one install grub2 and is grub2 to be installed before or after
the installation of the auxiliary system on the external hard drive?

What are the various options for disk partitioning and if one intends to
use docker as well would this change disk partitioning in particular
logical volume management?

I have already viewed documents on debian website, but I am still unsure
about the definitive steps.

Thank you in advance.