I have cloned my Ubuntu 20.04LTS to external USB hard disk drive ( sdb1). How can I see in terminal that I use external usb hdd OS ? Thanks
I have cloned my Ubuntu 20.04LTS to external USB hard disk drive ( sdb1). How can I see in terminal that I use external usb hdd OS ? Thanks
You can check
df
of your directory root:Or use
mount
:If you don't know that your USB drive is
/dev/sdb1
, check output oflsblk
, e.g.:Never boot a computer with cloned copies of operating systems connected
When you have drives with cloned systems (systems with identical partition table and file systems), you should never boot the computer when both drives are connected. This can cause confusion, and there is a risk, that one or both of the systems will be corrupted, because the computer might use part of both systems and write things that makes them fail, when only one of the drives is connected.
This problem affects operating systems using more than one partition (separate partitions for EFI, boot, root, home etc or in a persistent live drive 'cdrom' and partition for persistence). If there is only a root partition, only one partition is selected, and there cannot be any mixture of partitions between the cloned copies.
How to identify which partitions are active in the running operating system
You can use the methods described in the answer by pLumo to identify the drives and in particular, the root file system,
/
I often use the following command line in a wide terminal window (wide to avoid line breaks),
but it is a good idea to select the options for
lsblk
in a more detailed way. I suggest the following commandor, if you wish, make an alias for it (convenient if you intend to use it several times), for example
and if you wish, edit that line into your
~/.bashrc
(bash configuration file). You can put the line near the other aliases in that file. Then it will activate the alias when you start new terminal windows (and bash shells in text screens),