Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Installation on new hard disk

Ask for help with issues regarding the Installations of the Debian O/S.
Message
Author
syntone
Posts: 90
Joined: 2014-09-14 19:42

Installation on new hard disk

#1 Post by syntone »

I want install debian on a new hard disk.(non-partitioned) The laptop have both BIOS boot mode and UEFI boot mode. I want use UEFI mode. Should I first,before installation,to format hard disk as GPT (use GParted tool, for example), or Debian installer tool will do this? Please specify an exact steps. Also, about partitioning: I need create 3 primary partitions root(/), swap and /home: what should I choose to make it? Laptop amd64, 4gb RAM.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Installation on new hard disk

#2 Post by Head_on_a_Stick »

Read the official Debian buster installation guide. Sections 3.5 and 6.3.4 contain information about partitioning, along with Appendix C.

For a UEFI system you will need a FAT-formatted EFI system partition and a GUID partition table is recommended (some UEFI firmware implementations will not allow for UEFI booting from an MS-DOS partition table).

FWIW I prefer to pre-partition using gdisk, here is my layout:

Code: Select all

$ sudo parted /dev/nvme0n1 print 
Model: SAMSUNG MZVLB256HAHQ-000L7 (nvme)
Disk /dev/nvme0n1: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name               Flags
 1      1049kB  538MB   537MB   fat32           EFI System         boot, esp
 2      538MB   9128MB  8590MB  linux-swap(v1)  Linux swap
 3      9128MB  224GB   215GB   btrfs           Linux filesystem
 4      224GB   256GB   32.2GB  freebsd-ufs     OpenBSD disklabel

$
^ That's for a UEFI system with Debian buster, Alpine Linux and OpenBSD installed (Debian & Alpine are installed to subvolumes in the btrfs partition).
deadbang

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Installation on new hard disk

#3 Post by p.H »

You do not need to partition or format anything before the installation. The Debian installer will create a GPT partition table if booted in EFI mode and the drive does does not have a partition table yet. Guided partitioning will offer to create root+home+swap(+EFI implicitly) and will determine the sizes automatically. If you do not like the automatic partitioning, you can select manual partitioning and define partitions as you like (then do not forget to create an EFI partition as pointed out above by HoaS).

Note that there aren't primary, extended or logical partitions with GPT, just partitions.

syntone
Posts: 90
Joined: 2014-09-14 19:42

Re: Installation on new hard disk

#4 Post by syntone »

Is that right image for current stable Debian 10, Xfce desktop?

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Installation on new hard disk

#5 Post by Head_on_a_Stick »

I prefer the netinstall ISO. The live images copy the system to the disk and so are more susceptible to corruption and other problems.

EDIT: but I don't know about the new Calamares installer, I've never tried that.
deadbang

syntone
Posts: 90
Joined: 2014-09-14 19:42

Re: Installation on new hard disk

#6 Post by syntone »

netinst images contain no firmware, if happens some proprietary driver, how this is solved?

sgosnell
Posts: 975
Joined: 2011-03-14 01:49

Re: Installation on new hard disk

#7 Post by sgosnell »

I would recommend the Debian Live XFCE .iso. The netinst image is fine if you are experienced, but for someone who doesn't have a lot of experience it can be a little difficult. The one the OP linked is a good choice.
Take my advice, I'm not using it.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Installation on new hard disk

#8 Post by p.H »

syntone wrote:netinst images contain no firmware, if happens some proprietary driver, how this is solved?
There is an unofficial netinst image including non-free firmwares, just like other images.

User avatar
RU55EL
Posts: 546
Joined: 2014-04-07 03:42
Location: /home/russel

Re: Installation on new hard disk

#9 Post by RU55EL »

syntone wrote:netinst images contain no firmware, if happens some proprietary driver, how this is solved?
Usually, a computer will work well enough without firmware to allow you to install the firmware after installing Debian. Firmware issues, most commonly, in my experience, are with the video display adapter and the wifi hardware. It is possible to download the firmware before installing Debian, having it ready on a USB drive to install during the Debian installation process. I usually use the netinst image and deal with any missing firmware after I install Debian.

Another way is to install using a non-official installation disk with the firmware included. Unofficial non-free images including firmware packages

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Installation on new hard disk

#10 Post by Head_on_a_Stick »

sgosnell wrote:The netinst image is fine if you are experienced, but for someone who doesn't have a lot of experience it can be a little difficult.
Why do you say that? The only difference between the live images and the netinstall ISO is the tasksel section. I wouldn't say that selecting a desktop environment from a menu list is difficult.
deadbang

syntone
Posts: 90
Joined: 2014-09-14 19:42

Re: Installation on new hard disk

#11 Post by syntone »

just got a new hdd. Laptop existing Boot mode is set to Legacy. Below is two options: UEFI OS, UEFI OS. Which from them to select, first or 2nd?

If I decide Guided partitioning, will it show offfered partitions size before start installation? So that I can return to a manual partitioning, if the automatically calculated sizes of partitions don't fit me.
Will the Debian create it's own swapfile, or I need to create swap partition? If I want 8GB swap size, should I specify 8000 MB or 8192 MB?

User avatar
RU55EL
Posts: 546
Joined: 2014-04-07 03:42
Location: /home/russel

Re: Installation on new hard disk

#12 Post by RU55EL »

syntone wrote:just got a new hdd. Laptop existing Boot mode is set to Legacy. Below is two options: UEFI OS, UEFI OS. Which from them to select, first or 2nd?
Both selections are the same?
syntone wrote:If I decide Guided partitioning, will it show offfered partitions size before start installation? So that I can return to a manual partitioning, if the automatically calculated sizes of partitions don't fit me.
Yes, you can go back to manual if you don't like the suggested partitions, before committing.
syntone wrote:Will the Debian create it's own swapfile, or I need to create swap partition? If I want 8GB swap size, should I specify 8000 MB or 8192 MB?
Guided partitioning will include a swap partition. For an 8GB swap file I use 8192MB, but it is not critical.

[edit] Changed from swapfile (which is wrong) to swap partition. [/edit]
Last edited by RU55EL on 2020-12-09 22:39, edited 2 times in total.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Installation on new hard disk

#13 Post by p.H »

syntone wrote:Laptop existing Boot mode is set to Legacy. Below is two options: UEFI OS, UEFI OS.
Are you sure ? If boot mode is set to legacy only (no UEFI), it should not offer UEFI OS choices.
syntone wrote:If I decide Guided partitioning, will it show offfered partitions size before start installation? So that I can return to a manual partitioning, if the automatically calculated sizes of partitions don't fit me.
Yes, but the installer will not allow to resize the proposed partitions. You will have to delete them and create new ones.
syntone wrote:Will the Debian create it's own swapfile, or I need to create swap partition?
If you select "use whole drive", the installer will create a swap partition with the size of the memory.
If you select "use available space", the installer may use an existing swap on the drive with most free space, or create one otherwise.
syntone wrote:If I want 8GB swap size, should I specify 8000 MB or 8192 MB?
If you have specific requirements, you should consider manual partitioning.

The installer uses decimal SI prefixes, so M = 10^6, not 2^30 (which would be the binary prefix Mi).
So specify 8 GB if you really want 8 GB (decimal), or 8590 MB if you actually want 8 GiB (binary).
RU55EL wrote:Guided partitioning will include a swapfile.
AFAIK, the Debian installer does not allow to create or use a swap file. It only allows to use a block device (whole drive, partition, RAID array, LVM logical volume or encrypted volume) as swap space.

syntone
Posts: 90
Joined: 2014-09-14 19:42

Re: Installation on new hard disk

#14 Post by syntone »

Laptop existing Boot mode is set to Legacy. Below is two options: UEFI OS, UEFI OS.
p.H wrote:Are you sure ? If boot mode is set to legacy only (no UEFI), it should not offer UEFI OS choices.
I temorarily use spare hard drive (ssd). F12 boot option show:

Image

Will the Debian create it's own swapfile, or I need to create swap partition?
p.H wrote:If you select "use whole drive", the installer will create a swap partition with the size of the memory.
If you select "use available space", the installer may use an existing swap on the drive with most free space, or create one otherwise.
so what way is better?

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Installation on new hard disk

#15 Post by p.H »

syntone wrote:F12 boot option show:
It is not pure legacy mode, it shows both legacy and UEFI boot options.
syntone wrote:Will the Debian create it's own swapfile, or I need to create swap partition?
Neither. I already explained and won't repeat myself.
syntone wrote:so what way is better?
Neither. They have different purposes.
IMO, manual partitioning is better.

User avatar
RU55EL
Posts: 546
Joined: 2014-04-07 03:42
Location: /home/russel

Re: Installation on new hard disk

#16 Post by RU55EL »

p.H wrote:
RU55EL wrote:Guided partitioning will include a swapfile.
AFAIK, the Debian installer does not allow to create or use a swap file. It only allows to use a block device (whole drive, partition, RAID array, LVM logical volume or encrypted volume) as swap space.
You are absolutely right!

I meant swap partition. (I've spent too much time with the dreaded Windows operating system.)

Thanks for correcting me,

User avatar
RU55EL
Posts: 546
Joined: 2014-04-07 03:42
Location: /home/russel

Re: Installation on new hard disk

#17 Post by RU55EL »

syntone wrote:Will the Debian create it's own swapfile, or I need to create swap partition?
My mistake, forget swapfile. Debian guided partitioning will create a swap partition. A swap partition is what you want with Debian. Please accept my apologies for advising you incorrectly.

syntone
Posts: 90
Joined: 2014-09-14 19:42

Re: Installation on new hard disk

#18 Post by syntone »

is it easier to create only efi system partition with GParted, then close GParted, shut down PC, boot from the installation media, and use Debian installer to create the other 3 primary partitions, or first create all partitions use GParted, then just install Debian?

User avatar
RU55EL
Posts: 546
Joined: 2014-04-07 03:42
Location: /home/russel

Re: Installation on new hard disk

#19 Post by RU55EL »

syntone wrote:is it easier to create only efi system partition with GParted, then close GParted, shut down PC, boot from the installation media, and use Debian installer to create the other 3 primary partitions, or first create all partitions use GParted, then just install Debian?
I would say that it is easier to use Debian guided partitioning. I've used Debian guided partitioning (for UEFI) and later tweaked the partition sizes for /, /home/, and swap. (I always use a separate partition for /home.)

syntone
Posts: 90
Joined: 2014-09-14 19:42

Re: Installation on new hard disk

#20 Post by syntone »

is it ok to create /boot partition at the first?

/boot ext4 500Mb
/boot/efi esp (fat32) 250Mb

Post Reply