Adding a second hard drive
Solved
Hello,
I have an old ASUS computer (2012):
1) a 2 TB hard drive;
2) dual boot: Win 7 and Debian Wheezy
I would like to know if it is possible to add a second hard drive (2 TB) on which I would install only Linux Mint. I know there is a maximum number of partitions (primary, logical, and extended) that must be respected.
Thank you
I have an old ASUS computer (2012):
1) a 2 TB hard drive;
2) dual boot: Win 7 and Debian Wheezy
I would like to know if it is possible to add a second hard drive (2 TB) on which I would install only Linux Mint. I know there is a maximum number of partitions (primary, logical, and extended) that must be respected.
Thank you
6 answers
-
Hello,
Some clarifications / details
Regarding the hardware and installed operating systems- You can have 3 systems (Windows, Debian, Mint) on the same PC.
- You can have as many hard drives as you want as long as you can physically connect them. In your case, there's no need to unplug any.
- Your hardware configuration is more than sufficient to install any Linux with any graphical environment.
Regarding the hard drive(s) and partitioning.- In this paragraph, I talk about LVM, but you probably won't need it (it's just for the sake of thoroughness)
- A hard drive (without LVM, which is the usual case) can contain four primary partitions per hard drive. That said, it's usually sufficient in practice. If more partitions are needed, you have to:
- either create extended partitions (subdivided into secondary partitions)
- or consider LVM (only for disks not containing a Windows system).
- Windows (at least older versions) must be installed on a primary partition and on a hard drive that does not use LVM. Linux imposes no constraints: it can be installed on primary or secondary partitions, with or without LVM.
- Linux is traditionally installed on three partitions:
-
/
(the system): plan for 25-30 Go to be safe, formatted in ext4. A very lightweight Linux system can get by with much less. -
swap
: usually two times the RAM not exceeding 4 Go (it's pointless), formatted as swap. Nowadays, this essentially means a 4 Go partition formatted as swap. -
/home
(documents and user profiles): arbitrary size (usually the remainder of the disk), formatted in ext4.
-
Regarding the boot menu (boot-loader)
The boot loader allows you to choose which operating system to boot from when you turn on your PC. It therefore appears before the operating system (which you will choose to boot) starts.
There are several boot loaders that are installed through an operating system (potentially the installation system), but in your case, it will most likely be GRUB. Specifically:- Windows: bootmgr is the boot loader deployed by Windows when multiple Windows coexist on the same PC. However, it only supports Windows systems and therefore not Linux systems. It is thus not suitable.
- Linux: there are mainly two: GRUB and LILO. Nowadays, the standard is GRUB. It is installed during the final step of the Linux system installation.
GRUB
GRUB allows you at startup to choose which operating system to boot, regardless of:- the number of operating systems;
- the nature of the system (Windows, Linux);
- the considered distribution (Windows 11, Debian, Mint...);
- the number of disks involved.
Once GRUB is installed (on the header of the hard drive where the BIOS boots in the boot sequence), be careful not to unplug the disks containing the systems referenced by GRUB, otherwise it will crash and you'll need to regenerate it (for example withboot-repair
).
Good luck.-
I had problems with partitioning that I absolutely do not master.
You just need to create 3 partitions:- a 4GB swap partition (or double the RAM if you have less than 2GB of RAM) - possibly shared with another Linux system
- a
/
partition of 25GB in ext4 (5GB for a lightweight system) - a
/home
partition of arbitrary size for your documents / user profiles (generally the rest of the disk).
(regardless of the disk, the type of partition, they don't even need to be on the same disk even though it's more natural).
The installer asks for the Device for boot-loader installation.
Q-1 Which disk should I choose? The old one or the new one?
The one that the BIOS boots from (and therefore that you can choose). Generally, if you have two disks (like one for the system and the other for data), you put it on the disk with the system. In your case, if you have systems on both (Windows on one, Linux on the other), it would make more sense to put it on the Linux disk and boot in the BIOS from the Linux disk.
Q-2 If there are three operating systems on two disks, are there three boot loaders or just one?
Just one, which gives you the choice between the 3 OS.
Q-3 In the case where there are three boot loaders, do they need to be on the same disk?
See Q2: a boot loader simply corresponds to the menu that allows you to choose which system to boot into.
Good luck -
I finally managed to install Mint Ulyssa (Mate).
Well done
However, in the Grub menu, I don't see Win 7 and Debian Wheezy that are on the old hard drive. On Monday, I will change the boot priority of the disks and see what Grub offers me.
The latest versions of grub do not scan Windows partitions. You need to correct the grub configuration as explained here. Personally, I put the magic directive in the file/etc/default/grub.d/multiboot.cfg
, created for the occasion:
sudo echo "GRUB_DISABLE_OS_PROBER=false" > /etc/default/grub.d/multiboot.cfg sudo update-grub
When I created the partitions with Mint Live and wanted to install Ulyssa, the installer informed me that the EFI partition was missing. It seems that I was not given the choice of partition type (MBR, GPT) that I wanted.
What doessudo parted -l
return? Then it’s normal that you weren’t given the choice between MBR and GPT since you already had a partition table. But if needed, you can switch from MBR to GPT withgdisk
(see this link).
Q1: yes (though more efficient is not the right adjective, it's rather that it allows more things), but it's better to prioritize GPT.
Q2: no, it's MBR specific (see this link
Good luck -
Hello,
Regarding your message in red, see this link. Basically, it's not very serious, but if you have the opportunity to move the partition withgparted
, that's better (after backing up your data).
The partitioning is correct, but it's a bit surprising that the ESP partition is not on/dev/sda
. However, since you are booting from/dev/sdb
, why not. Generally speaking, the ESP partition is only useful if you are using secure boot.
Regarding partitioning, you say you have pooled the swap. Very well, that seems to be the case. However, if you pooled/home
and/
under Mint, I find it a bit hard to see why you have so many ext4 partitions.
Regarding grub, yes, the same disk. In fact, it's enough to install grub with just one of the two distributions, but if both install grub, it's simply the last one to update grub that will install its own in the header of/dev/sdb
.
Whichever distribution installs grub, provided that the optionGRUB_DISABLE_OS_PROBER=false
is specified, it will scan all partitions and therefore detect all installed systems (regardless of which distribution is currently installing grub).
Usually, Linux distributions do not overwrite others unlike Windows
If you redeploy grub on the same disk, it will overwrite the old grub. If you install Linux on existing partitions, it will overwrite them. There is therefore no rule; you just need to be careful about what you’re doing.
I ran the command (under Mint) nano -v /etc/default/grub.d/multiboot.cfg
but nano opens a blank file (New file).
Yes, you need to create it. The files/etc/default/grub.d/*.cfg
are read when regenerating grub. After that, it's not mandatory, and it would also be possible to directly edit/etc/default/grub
. The result would be the same, but the configuration would be a bit less clean.
Indeed, when we add configuration bits, we try not to touch the default configuration file, and we keep them separate (when it’s intended for it, like here). This has two advantages:- Custom configuration is highlighted in dedicated files: it’s more readable and better organized.
- If
apt
needs to update the main configuration file, then since the file is still in its standard form, it will put the new one without asking for your opinion; if you have messed with it,apt
won’t know what to do and will ask you to make a decision (interrupting the whole update process until you respond). - This system can be found elsewhere (for example, see
/etc/apt/sources.list.d
)
Good luck -
Hello
I'm restating your questions from message #24 below.
1) Regarding partitioning
I didn't quite understand how we went from two disks with 8 partitions and another with 4 partitions to a disk with 6 partitions. But it doesn't matter. I understood that in this new partitioning you had Mint and Debian on the same disk. Assuming thatDONNEES_DEB
andDONNEES_MINT
correspond to the/home
partitions of Debian and Mint, then you could have merged them.
2) /etc/default/grub.d/multiboot.cfg must be created manually
Absolutely, and more generally the files following the pattern/etc/*.d/*
are configuration files injected by the user or an application, but not by the system itself. Note that the name of this file is completely arbitrary, you could call it/etc/default/grub.d/toto.cfg
and it would still work.
3) How grub2 works
That's a good question, it seems like there's a missing link between what we configure in /etc/default/grub and what is deployed in the boot sector of the hard drive. And in fact, that link exists, it's the file/boot/grub/grub.cfg
.
If you take the time to open it, you'll find some information you've provided in/etc/default/grub
but also all the missing aspects you've mentioned (especially regarding which partitions each system is on). And it's also where you realize how fortunate it is that we only need to tinker with/etc/default/grub
, because the file is much simpler to understand and much shorter.
So in theory, nothing would stop you from going directly to edit/boot/grub/grub.cfg
, that would do the job. And by the way, grub1 worked like that. Today, because of this clear distinction between what the user might want to configure and what actually needs to be configured, grub2's operation is significantly different.
As a user, you primarily useupdate-grub
which does everything that needs to be done according to the options you've provided in/etc/default/grub
. In reality,update-grub
does a lot of things for you behind the scenes:- it calls
os-prober
which, as its name suggests, searches for installed operating systems on your disk partitions; - it processes these results (as well as the content of
/etc/default/grub
and the files in/etc/default/grub.d/*
) ; - based on this information, it calls
grub-mkconfig
to recreate/boot/grub/grub.cfg
; - finally, it calls
grub-install
to install grub in the right disk's boot sector using/boot/grub/grub.cfg
.
If you want even more details, you can check the man pages for eachgrub-*
command (e.g.,man grub-mkconfig
).
Good luck - it calls
-
1)
Yes, you are right, it lacks rigor and I felt the same way when I discovered these concepts myself.
A few explanations: MBR stands for Master Boot Record, which refers to the disk header (see this link). This concept does not depend on the partitioning model (GPT or ... MBR). And that's why we continue to call this header MBR, whether we are using GPT or MBR partitioning.
Regarding the discussion of using DOS model instead of MBR model, I don’t find it more appropriate, as it is also a loaded term:- I have never seen anyone use the term DOS partitioning;
- we sometimes talk about DOS partition to refer to FAT16 partitions (=
fat
) or FAT32 (=vfat
), typicallyfdisk
adopts this convention; - DOS also refers to the MS-DOS operating system, which preceded Windows.
Lastly, it is important to distinguish between the partitioning model (i.e., GPT or MBR), which differently constrains the number and size of partitions on a disk, and the file system associated with each formatted partition:- Linux file systems: ext4, ext3, ext2, ...
- DOS file system: fat, vfat
- Windows file system: ntfs
2)
In my opinion, the EFI partition contains files utilized (notably.efi
files) by the boot loader (grub
in your case). These files are not necessarily produced during the installation of GRUB (for instance, some are already present when your Windows is pre-installed).
The ESP partition being mounted at/boot/esp
, you can look at its contents to form your own opinion.
(root@silk) (~) # find /boot/efi/ | grep efi$
/boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
/boot/efi/EFI/Microsoft/Boot/bootmgr.efi
/boot/efi/EFI/Microsoft/Boot/memtest.efi
/boot/efi/EFI/Boot/bootx64.efi
/boot/efi/EFI/debian/grubx64.efi
/boot/efi/EFI/debian/shimx64.efi
/boot/efi/EFI/debian/mmx64.efi
/boot/efi/EFI/debian/fbx64.efi
In any case, the phrase "An ESP contains the boot loaders or kernel images for all installed operating systems (which are contained in other partitions), device driver files for hardware devices present in a computer and used by the firmware at boot time, system utility programs that are intended to be run before an operating system is booted, and data files such as error logs." (source wikipedia) seems very debatable to me.
For example, the Linux kernel is stored in/boot
(and therefore not in/boot/efi
), which is on the/
partition of your Linux system (or the partition dedicated to/boot
, depending on how you partitioned).
Good luck.
-
jeannets Posted messages 28406 Registration date Status Contributor Last intervention Ambassadeur 6 604
Hello,
You need to find out the model of this PC or that of its motherboard...
If it's a tower, generally you can fit up to 6 drives... ? You need to check the number of SATA ports on the motherboard...
Then, for the partitions, you can do what you want while respecting the rules... Gparted is great for that.
Prepare your volume distribution on paper beforehand.
Personally, I would install two physical drives... One for Windows and one for Linux... -
Hi jeannets,
Indeed, I should have added some information. I will add it when I return home.
Yes, it is a tower.
You mention that one can put up to 6 drives ... So the following rules apply:
A drive can contain up to four primary partitions (only one of which can be active), or three primary partitions and one extended partition. In the extended partition, the user can create logical drives (that is, "simulate" multiple smaller hard drives).
This applies to each drive. In other words, if there are two hard drives on a computer, it will be possible to find, in total, eight primary partitions.
I want to add another drive because I have been experiencing some problems with my computer. When I started it up, often, over the last few years, it was not able to remain stable. I would log in under Win or Debian, and after five or ten minutes, it would freeze. Strangely enough, if everything was fine after ten minutes, I could work for hours without any issues. It's just at the beginning that the problem can occur. I read that this could simply be caused by a hard drive that is too full. I started removing files and noted some improvement. I will continue to remove files. I will try to keep my usage below 80% of the drive's maximum capacity.
For now, thank you for your response, -
jeannets Posted messages 28406 Registration date Status Contributor Last intervention Ambassadeur 6 604
Yes, four main partitions and only one active... but you can also have two main ones, each with a number of extended partitions inside... personally, I am in this case with three physical disks and 19 disks in total with the partitions... I recommend a "Datas" partition to store all your data... Emails, mail, accounting, documents, etc.
Linux doesn’t have to be in a main partition; it can operate from an extended partition... You can even have several Linux systems in different partitions using the same Swap... Similarly, with your data on disk D:, for example, it is interesting to access it from both Windows and Linux...
However, for large folders, it seems preferable to have a server on the network... Photos, Movies, Videos, Documentation, downloads, Backups... on 2 or 4 TB in RAID for security...
I think it's not good to have all this in the PC... When Windows uses too much of the disk in the same area and one day the disk fails, it needs to be replaced... The double failure is quite rare... and many things have to be redone... it can take a year.-
Information
1) ASUS CM6830
2) Intel Core i5-2320 3 GHz
3) RAM = 6 Go
4) 64 bits
I’m going to make my life easier. I’m going to unplug my old hard drive and connect the new one to install Mint. I don’t have time to read about having two hard drives.
Yes, indeed, having a dedicated data partition is a good approach. That’s what I was advised ten years ago, and my old hard drive has such a partition.
Thank you very much.
-
-
jeannets Posted messages 28406 Registration date Status Contributor Last intervention Ambassadeur 6 604
All of this looks good.
However... unplugging the other hard drive and then installing Mint will prevent the detection of the other "System," and your Dual boot (GRUB) will not be correct; it will be missing the boot option for Windows, if Windows is indeed on that other drive.
The multiboot is installed at the end of Mint, and that’s where the detection of the other system will not occur.-
Hi,
I don't understand your last message. Maybe I wasn't clear enough.
1) Currently, an old HDD (WIN 7, Debian) is installed;
2) I'm going to leave it there but I will completely unplug it;
3) I will insert and connect the new HDD and I will install Mint on it;
So, there will only be one functional HDD at a time. If I want to use the other HDD, I will have to unplug one HDD and connect the other.
It would be interesting to have two accessible HDDs, but I don't have the time right now to study all that.
Thank you.
-
-
jeannets Posted messages 28406 Registration date Status Contributor Last intervention Ambassadeur 6 604
Yes, I hadn't realized there was only one disk at a time... Obviously, from that perspective, the Dual Boot problem doesn't exist... and it works as you thought.
For later, dual boot Windows Linux here's a summary of the situation
https://www.astuces-aide-informatique.info/9490/dual-boot-windows-10-ubuntu-linux
The solution involves GRUB
https://doc.ubuntu-fr.org/grub-pc
Be careful: there are several GRUB, the old one: Grub4dos and also Grub2 which is often simply referred to as GRUB.
It is also possible to use the Windows Boot Manager by adding your other system
see with the utility software "EasyBCD".