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

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



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


Reply to: