Installing Ubuntu on an external HDD. How do I connect external drives? Install linux to removable disk

Firewire and eSATA hard drives, as well as other external media, have an important common feature: they connect to your computer on the go, and disconnect on the go. The system works with almost all media such as SCSI.

Cook to connect external drives in Linux?

Local systems (KDE, Gnome) of almost all distributions react to the connection of external media as follows: a new file manager window opens (sometimes with a confirmation request), which provides convenient access to the files of the connected external media.

Often, an icon appears on the Desktop, denoting the media and allowing you to open a context menu through which the file system can be specifically disconnected from the directory tree.

It is necessary to specifically disconnect all sections of the external media from the directory tree, and only then remove the cable! On most distributions, this is done by clicking on the media icon and selecting Eject, Safely Remove, or a similar entry from the menu.

In this way, you ensure that all write operations are completed, and then the device actually turns off. If you neglect this step, you risk damaging the file system and losing data!


In general, it is strange, since the procedure is simple. Maybe there just was not a section created from the store?

Maybe there just was not a section created from the store?
It is likely that it was. There were programs for Windows on the hard drive. I didn't want to run them under Wine. I don't use a virtual machine. That's it.

Although if there were already programs on it, then there was a section. But it is possible that everything was encrypted by these programs to protect the disk, which is why it was not so easy to format it.

trying to connect an external drive to me this is what it gives out: Error mounting / dev / sdb1 at / media / vadim / 3Q HDD External: Command-line `mount -t" ntfs "-o" uhelper = udisks2, nodev, nosuid, uid = 1000, gid = 1000, dmask = 0077, fmask = 0177 "" / dev / sdb1 "" / media / vadim / 3Q HDD External "" exited with non-zero exit status 13: $ MFTMirr does not match $ MFT (record 0).
Failed to mount "/ dev / sdb1": Input / output error
NTFS is either inconsistent, or there is a hardware fault, or it "s a
SoftRAID / FakeRAID hardware. In the first case run chkdsk / f on Windows
then reboot into Windows twice. The usage of the / f parameter is very
important! If the device is a SoftRAID / FakeRAID then first activate
it and mount a different device under the / dev / mapper / directory, (e.g.
/ dev / mapper / nvidia_eahaabcc1). Please see the "dmraid" documentation
for more details.

Try to install the mountmanager program, it helped me a lot in a similar situation at one time:

sudo apt-get install mountmanager

Original: "Ubuntu Hacks: Chapter 1 - Getting Started"
By Kyle Rankin, Jonathan Oxer, Bill Childers
Date of publication: June 2006
Translation: N. Romodanov
Date of transfer: July 2010

You can install an Ubuntu system, boot it, and run it completely from a FireWire device, USB, or other external drive, but this requires some special configuration. Below we will describe the process of such a setup from the beginning to the end.

In the course of writing this book, we realized that the main disadvantage of using a laptop as the main computer is that it is much more difficult to replace hard drives when testing systems. We needed to configure the Ubuntu system so that we could test various tricks and specific system settings, but if we could, we would not want to repartition the main laptop hard drive and reinstall the system. We decided to install the Ubuntu system on external media and run it from there; thus, the usual system remained intact, but we can start the Ubuntu system when needed.

Unfortunately, this installation option won't automatically work without some tweaking due to several reasons:

  • By default, the initrd file (source ram disk) used by Ubuntu lacks the drivers required to boot from an external device. Your BIOS will have no problem detecting your device (assuming it supports booting from removable drives), but once the kernel is loaded, Linux will not be able to detect and mount the drive to continue the boot process.
  • Even if the initrd has the appropriate drivers, it will take a few seconds for the kernel to load these modules and detect the removable drive before it tries to use them. During this time, the system will most likely try to boot and will not be able to find the removable disk, since its configuration will not be completed by this time.
  • The great thing about the Ubuntu installer is that it tries to detect other operating systems you might have installed on the system, and adds an entry to the GRUB bootloader for each OS. Unfortunately, this means that each OS must be on an internal hard drive, which is the first drive listed in the BIOS, while the removable drive will be the second (or third or fourth if you have other drives in your system). When the BIOS boots from a removable drive, it will be configured as the first drive in the system, causing problems in GRUB.

In this section, we'll look at how to fix each of these problems so that you can install Ubuntu on a removable drive and boot from it.

Configuring disk partitions

The first step is to start the Ubuntu installation process in exactly the same way as with any other installation options, so follow what you read about in the "Install Ubuntu" section [Hack # 5] until you get to the step of repartitioning the disk to sections. When Ubuntu moves on to partitioning the disk, note that the default will probably be some of the internal IDE or SCSI disks on the system. If your system uses an IDE device, you can select the external drive by specifying the SCSI detected drive. The disk line will probably look like "SCSI (0,0,0) (sda)". If you already have a SCSI drive on your system, it will be a little more difficult to find the USB drive, but it will most likely be the last SCSI drive listed on the system.

Warning

You must be absolutely sure that you have selected the correct drive at this point, as Ubuntu will format and repartition the drive you selected and delete any data it might have. If you are unsure of which drive to choose, boot with the Ubuntu Live CD and check the device names ( sda, sdb etc.) assigned to different drives on your system.

Installing GRUB

Once you have selected the appropriate device to format, continue with the Ubuntu installation process until you reach the stage of configuring the GRUB boot loader. Here you will be asked if you want to boot GRUB to your internal hard drive into the MBR. You should not do this as it will overwrite the bootloader that is used on the system. Instead answer No and in the next window specify / dev / sda (or whatever Linux device name is assigned to the removable disk) so that you can install GRUB directly to the removable disk.

Using chroot

We then continue with the Ubuntu installation process until you are prompted to select Continue and restart your system. Before rebooting, you will need to make a few settings on the system. The Ubuntu installer actually allows you to enter a main console, which you can use to run some limited commands on the system. Press Alt-F2 to go to this console, and then press Enter to activate it.

Now you need to prepare the removable disk, so you can use the chroot command and change some files. In fact, the removable disk will be mounted in the / target directory, and the first step is to mount the special / proc filesystem on this device:

# mount -t proc / target / proc

You can now use the chroot command to turn / target into a live partition on your system. Thus, you can run commands as if you were booting from this disk:

# chroot / target

Configuring initrd

As soon as the command is executed chroot, the first thing to do is add those Linux modules that will make your removable disk available for initrd... In the / etc / mkinitramfs / modules file, you can specify additional modules to be added to the initrd, so use a console text editor you like and edit that file. If you don't have your favorite console text editor, just use the editor vim(if you are unfamiliar with vim, see Editing Config Files [Hack # 74] for examples of how to use vim):

# vim / etc / mkinitramfs / modules

Once this file is open, go to the very end of the file, add the following few lines, then save your changes and close the file:

Ehci-hcd usb-storage scsi_mod sd_mod

prompt

If your removable device is connected via the IEEE1394 connector, then also add the following line:

Ieee1394ohci1394sbp2

and for other devices - just add to this file those modules that are needed for these devices.

Once the modules are properly configured, the next step is to configure the initrd daemon to wait a few seconds before continuing to load. This gives Linux time to discover and configure the removable disk. Open the /etc/mkinitramfs/initramfs.conf file in a text editor:

# vim /etc/mkinitramfs/initramfs.conf

In order for Linux to wait a few seconds before completing the boot process, now add a new parameter at the very beginning of the file

In our experience, ten seconds is sufficient to boot Linux from a USB drive, but you can change this value to higher or lower if required. Save your changes and close the file.

Now you can with the help of a special tool mkinitramfs re-create the file initrd, in which new settings will already be added:

# mkinitramfs -o /boot/initrd.img-2.6.15-16-386 /lib/modules/2.6.15-16-386

Change the initrd.img and / lib / modules paths to match the kernel version used in your installation CD.

Changing the GRUB setting

The last step is to change some settings in the GRUB config file. The Ubuntu installer configures the external device (or the second drive specified in the BIOS) as hd1, but you need the external drive to be hd0 as this device will be the first system device in the BIOS when booting from it. Open the GRUB menu.lst file in a text editor:

# vim /boot/grub/menu.lst

and find the lines that refer to the GRUB root device. They will look something like this:

## default grub root device ## e.g. groot = (hd0,0) # groot = (hd1,0)

Change the last line to point to device hd0:

## default grub root device ## e.g. groot = (hd0,0) # groot = (hd0,0)

Title Ubuntu, kernel 2.6.15-16-386 root (hd1,0) kernel /boot/vmlinuz-2.6.15-16-386 root = / dev / sda1 ro quiet splash initrd /boot/initrd.img-2.6.15 -16-386 boot title Ubuntu, kernel 2.6.15-16-386 (recovery mode) root (hd1,0) kernel /boot/vmlinuz-2.6.15-16-386 root = / dev / sda1 ro single initrd / boot /initrd.img-2.6.15-16-386 boot title Ubuntu, memtest86 + root (hd1,0) kernel /boot/memtest86+.bin boot

Title Ubuntu, kernel 2.6.15-16-386 root (hd0,0) kernel /boot/vmlinuz-2.6.15-16-386 root = / dev / sda1 ro quiet splash initrd /boot/initrd.img-2.6.15 -16-386 boot title Ubuntu, kernel 2.6.15-16-386 (recovery mode) root (hd0,0) kernel /boot/vmlinuz-2.6.15-16-386 root = / dev / sda1 ro single initrd / boot /initrd.img-2.6.15-16-386 boot title Ubuntu, memtest86 + root (hd0,0) kernel /boot/memtest86+.bin boot

If Ubuntu detects and configures other OSes and you want to take advantage of that too, just make the same changes to the config parameter for each OS. root- just replace hd0 with hd1. Then save your changes and close the file.

You can now exit chroot mode, so type exit in the console, then press Alt-F1 to return to the main Ubuntu installation console. You can now select the Continue option to reboot the machine and start the installed system.

prompt

Keep in mind that most computers cannot choose to boot from a removable disk by default in case you have a CD-ROM or other hard drive. In some BIOSes, it is possible to configure a setting so that when you press a special key during boot (for example, F12), you can choose which device you want to boot from. In other BIOSes, you may need to press one of the Esc, F2, or Del keys to enter the BIOS and adjust the boot order of devices.

If you want to have a portable flash drive or external hard drive, then there are at least two options:

  • install the system on a flash drive
  • (persistent storage)

The first option is similar to a typical operating system installation. But since we will install on a flash drive, we get portability - the ability to boot on any computer with a USB input. All changes made to the system are saved after a reboot. In general, work is not much different from work with a regular computer.

The second option is to create Live systems on a USB drive (the same flash drive). But since the Live system is not able to save changes (user files, system settings), another section is additionally created for it, on which files and settings made are saved. Ie, it would seem, it turns out something like in the first version - there is a system that "remembers" the changes made after restart. In fact, there are some nuances.

Live system with persistent itself takes up less space - the same as the downloaded ISO image - i.e. usually up to four gigabytes. The operating system installed normally takes about 13-15 gigabytes. On the other hand, a normally installed system boots faster because Live uses compression. A persistent Live system may face a problem when the new kernel (which is upgradeable) is incompatible with the old bootloader (which is part of the Live image and is not updated).

In general, both methods deserve the right to exist, and both of them will be considered on the pages of the site. This instruction will show you how to create a flash drive with Kali Linu installed x. A detailed procedure will be described to avoid some of the problems that may arise when installing the system on a USB drive or when booting from a USB flash drive or external drive.

Features of installing Kali Linux on a memory card

Installing to a USB stick is similar to installing to an internal drive. But in order not to accidentally damage the main computer system, computer hard drives or the boot loader of the main system, I suggest installing Kali Linux on a USB flash drive in a virtual computer. After completing this installation, you will be able to boot from this flash drive in your real computer. As a virtual computer, I use.

I assume that you already have VirtualBox installed, or you yourself know how to install it.

In VirtualBox, create a new virtual machine. The most common virtual computer for Linux. The only difference is that it shouldn't have a (virtual) hard drive. If you have difficulty creating a virtual machine in VirtualBox, or have difficulties with other issues related to VirtualBox, then refer to the instructions "", there it is detailed and illustrated with screenshots.

When, in the process of creating a new virtual computer, you reach the window HDD, then select " Do not connect virtual hard disk»:

When the virtual machine is created, start it. Official releases (not weekly automatic builds) are recommended as ISOs. When trying to use weekly builds, I got errors related to the inability to load kernel modules and the installation failed.

USB stick for Kali Linux

For Kali Linux, as well as any modern Linux distribution, I recommend memory cards over 16 gigabytes in size. Those. that's 32 gigabytes or more. The higher the speed, the better. Flash drives are poorly suited for multiple simultaneous read / write operations, and operating systems work in this mode. Even with a good memory card, your system will work noticeably slower than the desktop one, it can lag, slow down. With a bad (slow) memory card, work can become difficult, uncomfortable.

How many USB flash drives live with an installed operating system

I am one of those who do not spare their media carriers. I download torrents to my memory cards in my phone, I install operating systems on my USB sticks, I use them intensively, and I often make and restore full backups. I have not broken any memory / USB stick from heavy use. To be honest, I consider it a myth that memory cards can deteriorate due to frequent use. Maybe I'm just lucky. I want to say that USB flash drives (at least some) can "live" for years and be used with the operating systems installed on them.

Cleaning the USB memory stick to install the operating system

Before starting the installation, I recommend completely erasing the data from the flash drive (deleting the GPT), because otherwise I sometimes got errors with the problem of writing to the disk. We will do this by the forces of the Live system itself, having booted from the downloaded ISO.

When this menu appears, instead of choosing "Graphical Installation", boot into the system.

When you boot into the bottom bar of the virtual machine, connect your USB flash drive to the system:

You can see the list of disks, but since there are no other media (hard disks) there, you will see only a flash drive under the name / dev / sda:

Fdisk -l

To remove GPT from disk, if present, run:

Gdisk / dev / sda

To switch to expert mode, enter there

Then to uninstall the GPT enter

Agree twice to completely wipe the disk.

Now our flash drive is cleaned without removing it, restart the virtual system. Now select " Graphical install»:

Instructions for installing Kali Linux on a USB memory stick

There are no differences from the installation of the operating system - everything is quite standard, the choice of language, username, etc. If you have problems with this, then, again, refer to the note "".

Perhaps there is only a small nuance with the swap partition. We do not need a swap partition on a flash drive at all - we will use computer resources directly, i.e. all the RAM - this should be enough. But even if this is not the case, there will only be harm from the swap partition on the flash drive, since it will be very slow. To prevent the creation of a swap partition, then when you go to " Partitioning disks"Select the item" Manually»:

Choose a section:

Choose "Yes":

Choose "FREE SEAT":

In the next window, most likely, you will not have to change anything:

Choose "Primary":

Select "Partition setup complete":

Choose "Finish partitioning and write changes to disk":

The system complains that no partitions are specified for swap space and praises it in every possible way. In our case (installing the OS on a flash drive), it really is not needed. We choose "No":

Now choose "Yes":

After that, the normal installation of Kali Linux OS will begin.

Leave it unchanged here:

Select your flash drive:

When the installation is over (and this may take longer than you expected, since flash drives are not as fast as even regular hard drives, not to mention SSDs), then turn off the virtual computer. You can reboot your real computer to boot from the freshly installed USB stick.

Booting Kali Linux from a USB stick

If you do not have UEFI, then when the computer starts booting, press the Delete or Esc button many times (sometimes another - depending on the model of the motherboard - you can find out from Google). In BIOS, where "Boot Order" select your flash drive. The flash drive at this moment must be inserted into the computer, otherwise the BIOS will not see it. If the flash drive is inserted, but the computer does not see it, try inserting it into different slots and reboot each time and go to BIOS.

If you have UEFI, then you just won't get into BIOS. The easiest way to get into BIOS is to enter in the command line (as administrator):

Shutdown.exe / r / o

After that, a message appears that the computer will restart in less than one minute. After rebooting, we get here and select "Diagnostics":

Now select "Advanced options":

Now "UEFI Firmware Options":

Well, "Reload":

Different manufacturers have different BIOSes, so yours may be different. But I'll show you my laptop as an example, so that the essence is clear. Go to the Boot tab, select Boot Option Priorities, see what options there are:

Only one option and my flash drive is definitely not there.

We are looking for Secure Boot and disable (Disable):

A new OS Mode Selection menu item appears. In it, select CMS and UEFI OS. If you select only CMS OS, then the installed Windows will not boot.

Now we are looking for such an item as Fast BIOS Mode and disable it (Disable). This is necessary so that when the BIOS boots up, it starts checking for the presence of USB devices:

But again we need a BIOS! Therefore, when loading, press the corresponding key. I have this key - F2. On the old computer, that key was Delete. The BIOS itself writes this key when the computer boots. If you do not have time to look or do not understand English, then look for your model in Google. Or try brute force. In addition to the named ones, this key can also be Esc or some kind of F *.

Go to the Boot Option Priorities tab again. Now there is a flash drive. If you do as I do - put the flash drive in the first place, and Windows Boot Manager in the second, you will achieve the following effect: if the flash drive is inserted into the computer, Linux will boot from this flash drive. If there is no flash drive, then Windows will boot - and there is no need to go into BIOS again!

Do not forget to save and reboot.

Solving the problem "the disc contains an unclean file system"

When booting Linux, you may encounter an error:

The disc contains an unclean file system (0, 0)

Especially often this error appears when trying to boot from a USB flash drive or from an external drive. This is because the GRUB settings point to the wrong drive, such as the Windows drive. The system does not understand the file system of the disk and cannot continue booting. This problem can be solved quite simply.

Reboot your computer, and when the GRUB bootloader menu appears, press e... You will see something like the following:

Notice the line starting with linux... In my case, there is a record

Root = / dev / sda1

Since there were no other storage media besides the flash drive during installation in the virtual computer, it was named / dev / sda1... The real computer has at least one more hard disk, and the name / dev / sda1 could have been assigned to it. And the flash drive I'm trying to boot from now has a different name. This name can be / dev / sdb1, or / dev / sdc1 or something else (depending on the number of disks in the system).

If you don't know the new name, then just go through the different options. Move the cursor to the drive name and change it to / dev / sd b 1. Then press the key F10 and wait for the download. If the boot fails, restart your computer and change the entry to / dev / sd with 1 (and so on alphabetically), press F10 and check if the download was successful.

After successfully booting into the system, change the name of the bootable disk. For example, in my case, the disk name turned out to be / dev / sdc1(with letter c). Then the command to change the boot disk will look like this:

Sudo grub-install --recheck / dev / sdc sudo grub-mkconfig -o /boot/grub/grub.cfg

Instead of / dev / sdc substitute the name of your disk or flash drive.

Now, when restarting, there will be no error, and I will immediately get into Kali Linux installed on a flash drive.

Backing up a flash drive with Kali Linux

Installing an operating system on a flash drive, and especially its subsequent configuration and installation of programs, is a long process. In case the flash drive still breaks or you need it to record your term paper, you can make a backup copy of it. It is also recommended to make backups before installing video drivers or other similar experiments dangerous for the OS.

If we are talking about creating a backup copy of the OS, and not individual files, then the best option is to clone an image of the entire disk. If necessary, this will allow you to very quickly return the entire operating system with all the settings. The downside of this method is that the image with the backup will take up exactly as much space as the flash drive has. Even if, for example, the operating system with all the files occupies only half of the volume of the USB drive, the image will still be the size of the flash drive. As already mentioned, the plus is that you do not need to select files for synchronization, the entire backup is stored as one file, restoration guarantees a full return to its original state.

On Linux systems, a similar image can be made using the program dd, and for Windows there is a wonderful free, open source utility.

Launch Win32 Disk Imager as Device select your flash drive, and in the field Image File write the path where you want to save the image:

When everything is ready, click Read.

If you need to restore the operating system to a flash card, then in the same way select the image that you want to write to the flash drive and click Write.

Conclusion

This manual showed in detail how to install Kali Linux on a flash drive, describes possible problems and ways to solve them. In fact, in a similar way, you can set any Linux to USB memory stick... It will show you how to create a Kali Linux USB stick with persistent(persistent storage).

If you need to view the files located on the flash drive from the main Windows system, then refer to the instructions "".

Linux can come in handy for many reasons. For example, your old computer cannot be upgraded to newer versions of Windows or macOS, or you need specific Linux applications, or you are just curious to try a new one. Or maybe you just bought a new computer without an operating system and want to save money by choosing free Linux.

Installing Linux is easy. Of course, there are distributions like Arch, which is quite difficult to install for a beginner. But most modern distributions are very easy to install. Perhaps even simpler and faster than Windows.

Back up important data before installing Linux on your main computer. While working with partitions on your hard drive, you can inadvertently erase something important. Of course, if you follow the instructions and carefully read what you are doing, then nothing unexpected will happen. But - not a superfluous thing in any case.

You can install Linux on computers running Windows and macOS, or on an empty hard drive. You can choose Linux as your main system, or use it alongside your old system.

1. Download the Linux distribution

First of all, you need to choose a Linux distribution. The DistroWatch.com rating will help you decide.

Then you need to download the selected distribution. It's easier to do this: open the site of the required distribution kit, find the download section and select the one that suits your processor's bitness.

As a rule, Linux distributions on the official sites are offered to download in two ways. The first way is normal download. The second is through P2P via a torrent client. The second way is, of course, faster. So choose it if you want to save time.

When the ISO distribution is downloaded, you need to burn it to a CD or a regular USB flash drive.

Burning to CD can be done using standard system tools: "Burn disk image" Windows or "Disk Utility" macOS. It is enough to click on the loaded image with the right mouse button and select the corresponding item in the menu.

You will need special utilities to burn ISO to a USB flash drive. For Windows, choose Rufus, and for macOS, choose UNetbootin. These programs have a very simple interface, it is rather difficult to get confused in them.

3. Prepare the disk partition

This step should be performed in the event that you want to keep the system installed on you and use Linux at the same time. If you decide to transfer your computer to Linux completely or install the OS on an empty hard disk, skip this paragraph.

Windows

Open Windows Disk Management Tool. Select the disk or partition from which you plan to cut some space for your Linux installation. For most distributions, 10 GB is more than enough. But if you plan on installing a lot of apps, take more. Right-click on the partition and select Shrink Volume. Enter the size and click OK.

The process can take quite a long time, so please be patient.

When Disk Management finishes resizing partitions, an empty unallocated space appears on the disk, marked in black. This is where we will install Linux.

Later, if you do not need Linux, you can delete partitions with it and give the freed space back to Windows using the same "Disk Management Tools".

macOS

You can allocate space for your Linux installation through the macOS Disk Utility. Select your drive and click on the "+" sign to create a Linux partition. It may take a while to create a new partition.

4. Prepare the bootloader

Windows

This item only applies to new computers with preinstalled Windows 10, 8.1, or 8. These computers use a UEFI bootloader that will prevent you from booting any system other than Windows.

To fix this, go to your computer's BIOS settings and disable the Secure Boot option. Then reboot. Done, you can now download and install other systems alongside your Windows.

macOS

Unlike most computers, Mac requires a couple of additional steps to install Linux on a dual boot with macOS.

First of all, disable SIP. Reboot your Mac and press Cmd + R. The Recovery menu appears. Select "Terminal" in it and enter csrutil disable.

Restart your Mac again. SIP is disabled.

Manual

Suitable if you want to set the dimensions for your partitions yourself or, for example, create a separate partition for your files. To do this, select "Another option" and click "Continue".

Linux will display what partitions you have on your computer. You can delete them, format or, conversely, leave the sections with the information that you want to keep.

To install Linux instead of your system, select the partition with the installed system and remove it with the "-" button. Then create new partitions in the vacant space.

  • Root partition for Linux system files. Select the Ext4 file system and mount point /.
  • A swap partition, or swap partition, comes in handy if you don't have enough RAM, but a fast SSD. Select Swap Partition from the list of file systems.
  • Home section where your files will be stored. Select the Ext4 file system and the / home mount point.

Click "Continue" and confirm the changes. The installer will erase the partitions you selected and create new ones in the vacated space.

How to install Linux next to the current system

There are two ways to install Linux alongside your system.

Auto

Most Linux installers will immediately detect the systems you have installed. If you did not create a separate disk space for Linux, then you can try selecting the "Install next to Windows" option. The installer will create the necessary partitions on its own, and you will not have to do anything manually.

Manual

If you want to decide for yourself how much space to allocate to the system, and followed the instructions in paragraph 3, click "Other option" and click "Continue". You will see your disk partitions and the empty space that we have prepared for Linux. Create a root partition there (mount point /) as described above. The home section is not necessary in this case: you can copy and modify files on your main system.

Click Continue. The installer will leave your files where they are. It will simply create new partitions in the free space. You will be able to choose which system you want to boot at startup.

8. Complete the Linux installation

You will then be asked to introduce yourself. Enter your name and create a password. Do not forget the password, as you will always need it to complete tasks on behalf of everyone. You can encrypt your home folder if you want.

Then just wait. When the installation is complete, you will be prompted to remove the installation disc and reboot. Do not forget to disable boot from external drives in the BIOS if you enabled it.

What to do after installation

When you reboot and your Linux desktop appears in front of you, you can do everything you do in Windows and macOS: surf the Internet, edit documents and listen to music. Do not forget to update and take a look at the "Application Store" (or its equivalent, depending on the distribution kit) to install the applications you need.

Try Linux and you will see that it is no more difficult in everyday life than Windows or macOS.

Initial data or what I had to start the installation:

  1. Ubuntu distribution itself - ubuntu-11.04-dvd-i386.iso
  2. Netbook - Acer AO BGK-531h
  3. External HDD - Transcend Classic 320Gb

Actually, what I wanted to do:

Install Ubuntu on an external HDD, and when the HDD is connected to any computer and the boot from this HDD is set in BIOS-e, Ubuntu would boot. And if you boot a computer without connecting this HDD, the OS installed on this computer would boot.

The problem that I ran into and in fact I get around in this article:

During a normal installation (you connect an external HDD to your computer, boot through the Ubuntu bootable distribution and install it), the MBR (Master Boot Record) of the computer is overwritten, Ubuntu installs its GRUB and further booting the computer without an external HDD inserted is not possible. I do not exclude that there are possibilities to get around this phenomenon, but at the moment I do not know it, so I was looking for other ways to get around.

So let's get started:

After googling and reading numerous forums, I realized that to install without overwriting the MBR on a computer, you can a) disconnect the computer's hard drives, or b) install through a virtual machine. I decided to do with programmatic methods, and I also didn't want to turn it off, during the installation I worked quietly and surfed the Internet. I chose the program for creating a virtual system VirtualBox 4.1.0, although in principle this segment is not very saturated, it is not even saturated at all, and I did not have to choose for a long time.

1. Install this program, run it.

2. We create a virtual machine, with the OS type and version, it is probably better to choose Linux and Ubuntu, respectively. Why? As far as I understand, then the keyboard and mouse work better in the window of this VM. Although, I could be wrong:

3. Because I had a netbook and there is no DVD drive in it, I have an 8GB flash drive, I also did not have it at hand to create a bootable flash drive, I pre-installed Alcohol 52% and created a virtual drive in it to load the Ubuntu installation image. Fortunately, the VM accepts it as a normal drive and easily launches the installation from it. Again, here we can say that I wanted to do with completely programmatic methods ... Well, I didn't want to look for a USB flash drive or an external drive + DVD-ku yet ...

4. We start the virtual machine, at the first start it asks which host drive to use, select the drive that Alcohol 52% created and into which we have already mounted the ubuntu-11.04-dvd-i386.iso image. ui .. oops! The program installation window appears:

I will not talk about the subtleties of the installation, the only thing I will note are some points:

  • When I first started the installation, when I got to the choice of the hard disk where Ubuntu will be installed, I only had 1 disk there, the one that the VM started. That is, the VM did not see the connected USB HDD. Climbing through the settings, I found an external HDD connection in USB devices and checked the box, only after that it became possible, when choosing a place where the system would be installed, to select an external HDD.

  • The best choice for installing Ubuntu is text mode. The usual installation, although in graphical mode, somehow I did not like it.
  • And yet, a netbook for running a VM is not very suitable. Everything is done slowly and for a long time ... there is not enough power, so I did not wait and repeated the whole procedure on a normal computer.

As a result, we have an external HDD with Ubuntu OS, which can be connected to any computer, boot up and work, while all data will be saved.